Quote from: Everett at Nov 22, 2010, 12:38 PM
1. In the core/components/doodles/model/doodles/Doodles.class.php, the class is defined as class Doodles whereas when I use my own xPDO generated models, they are always declared as extending xPDOObject. I would have expected the declaration to be class Doodles extends xPDOObject. What’s going on?
The Doodles base class is just a utility class that adds some Doodles-wide methods that are commonly used, such as storing the relative doodles base path and urls. That’s it.
2. Adding a bunch of methods to the class... is that normal? Does that stuff get annihilated if you re-generate your class files? That scares me. The generating of model/class files is integral to all of Revo, but the process is not well documented. I’ve figured it out a few times, but it still terrifies me.... and the prospect of having my custom-coded model classes blown away makes it even more difficult.
No, class files are never regenerated unless you explicitly delete them. Only the maps are regenerated.
3. Can you recommend a book or a site that gives a good foundation on using JS Ext? The complexity involved in going from a more standard interface with "Edit/Delete/View" buttons (with a separate controller for each) to JS Ext’s all-in-one AJAX magic is something like making a horse go light-speed. Trot to canter is ok... but trot to light-speed is bound to lose most riders. I think the only hope developers will have in understanding how to develop this stuff is to have solid examples with the stuff isolated (or become Jesus... see above).
I’ve found just looking at examples (like Doodles, or Quip, Discuss, Gallery, Batcher, Redirector, PackMan, etc) is far better than books.
That said, you *don’t* have to use ExtJS. Just return the HTML normally. You just won’t get the styles or validation that MODx Revo uses.
4. Processors? What are they? I don’t understand how these fit into MVC...
5. Connectors? Same question... are they just controllers for other controllers? So instead of me requesting a resource via a controller, a connector handles an Ajax request made by another controller? Is that right?
Think of them like form-layer accessors to the model. They are "controllers" that process data from the View. They are accessed via connectors, which are secure gateways protecting the processors.
Separating the form-layer processing into "processors" allows the processing code to be isolated, more easily managed, and used in other places rather than just that specific form.
6. Why is there a separate Doodle class (singular)? I thought the xPDO classes would describe a single object in addition to a collection, no?
The Doodle class is the xPDOObject. The Doodles class is the utility class.