Quote from: Peter at Jun 03, 2010, 04:07 AM
Also, what did you use to make the screencasts? I’ve been playing with Camtasia Studio but it’s both expensive and the quality when uploaded to YouTube doesn’t satisfy me, while yours are nice and crisp!
Screenflow. It’s not perfect, but for the price it’s probably as close as you’re going to get, and once you get the hang of it it’s super easy to work with.
Quote from: MadeMyDay at Jun 03, 2010, 04:18 AM
Another question: In the second video you store your values in MongoDB. What are you using it for? I am also experimenting with MongoDB these days but never thought about connecting MODx to it ;-)
The reason we used MongoDB for that particular implementation was because we needed documents to have rich inter-relations. For example, Person A (a MODx document) may have Produced Film Z, Co-Produced Film Y, and Directed Film X. That person may also have been mentioned in Press Releases Q and R, and is a managing partner of Company 1. If we only needed to do the relationships one way (ie. Person A has all those things listed on their bio page), we’d be fine. But what if we want the Film Z page to display all the related People? The Person A JSON TV would know about the Company Z relationship, but the Company Z has no way of knowing about Person A.
The only way I could figure to accomplish this with MySQL (without radically hacking the MODx core, which we try to avoid) was to use regex in the SQL queries. And while I love regex, that just didn’t seem right.
So we went to MongoDB. That allows the JSON TV to be stored in Mongo, so while it’s in MODx, we don’t really care. What we care about is that we can now use Mongo to query our data however we want. So we can get all the related items from Person A, or from Company 1, or from Press Release R, or Film Z.
I hope that makes sense, and that I’m not hijacking this thread.
I’ve attached the source for both implementations (JSON TV with and without Mongo). The Mongo-backed approach really is only worthwhile if you need lots of inter-linking between lots of items. The normal JSON TV approach works fantastic for lots of images or links belonging to a single document. For example, here’s the output from the JSON TV for links (which is on that screencast):
Click for full size -
Uploaded with plasq’s Skitch
Take the first element in the JSON object and output it one way. All subsequent, output another way. (There’s a Ditto-like snippet to make that happen.)
A word of warning on the source attached: You’ll soon discover why we don’t release more of what we’ve done to the community. (Luckily, people usually pick up where we leave off and we at least get a mention in the comments

)
It will very likely cause more harm than good to you unless you have a ton of patience and the ability to debug other people’s code. Also, all the JSON relies on a base64 encoding widget that may or may not need to replace the equal sign to get around the MODx parser. If you have any questions please ask, but I don’t want to hijack this thread so maybe start a new one or PM me or something. Hopefully this helps you improve your own solution, or at least gives an idea for how to manipulate the data that’s stored (especially if you’re storing JSON). It all works (for us, at least), but it’s not pretty, nor documented.