Tuesday, 30 January 2007
Useful quickstart for Magritte
Ramon Leon's ever-impressive blog has a great quick screencast introduction to Seaside and Magritte, and reading between the lines, it does appear that the approach that I described in my previous post is the right way to be thinking about the role of Magritte.
Posted by Michael Davies at 17:53
Subscribe to: Post Comments (Atom)
Thanks, as for Magritte, I think of it this way. Magritte is for composing dynamic views from models. They could be tabled reports, edit screens, or just read only views, but they need to come from a separate model. Magritte is used because these things are always the same, they can be made simpler with abstraction.
Magritte is for things you've figured out a repeatable way to do. If you find yourself doing the same thing over and over, create a Magritte description for the meta ata and a Magritte component for the display, and now you can do it anytime with little effort.
Seaside is for doing stuff you've not done before. Things you haven't yet learned how, or need to, abstract.
You should learn to mix and match Seaside code and Magritte components together on the same page. Do boring stuff with Magritte, and new fun cool stuff with Seaside. Magritte is after all, just a bunch of Seaside components running of of some meta data you've stuck onto the domain classes.
Thanks for taking the time to reply, Ramon.
I think I'm starting to get it more clearly now. After reading your comments, I went back and had a look at the use of MAReport in Conrad, and saw what I'd missed the first time through. Within 30 minutes I've now worked out how to edit your simple blog to use Magritte to display the list of comments under each post.
This is starting to get pretty exciting; as you say, Magritte really is doing the heavy lifting, leaving me to play with the interesting stuff!
Post a Comment