masonbook.com

gnat on 2003-05-22T23:04:52

I'm not trying to shill an O'Reilly book, I promise. I wanted to learn about Mason on short notice. I couldn't wait the few days it would take the O'Reilly Mothership to fedex me a copy of the Mason book. And then I remembered it was online ...

Yes, masonbook.com is awesome. And beautiful. When I've finished writing the Cookbook (goal: be done writing by Friday night so I can enjoy the weekend and it can all go to production on Tuesday) I want to use their pseudopod-to-HTML converter to see what the Cookbook looks like.

So yes, the Mason book is good. I struggled a little with the introduction to Mason, but I think I have a handle on it now. autohandlers are sweet! Already I'm looking around for a web site to build with Mason. I might try my hand at the retail site my Dad's company wants to build ...

I had to ask on #perl how the Template Toolkit compares to Mason. The Mason book rather glossed over that (they said they don't view TT as competition, but they didn't say why). In the Cookbook I need to steer people to the right tool for their problem, so I need to know what problems each is suited for.

When you ask people that question, though, the answer you get depends on whether you asked a Mason user or a Template Toolkit user. Some people (Autrijus and JesseTheRTGuy) had enough experience with both to answer that question. In a way it's a lot like asking "when should I use Perl over Python?" (yes, I know the answer to that question is "always" :-)

I think I have it down, though, so now I just need to distill 250 pages of documentation into three Cookbook pages and I'll be set! :-)

Anyway, kudos to Dave and Ken for a bang-up job. I can think of two departments within O'Reilly for whom this book should be mandatory reading ... :-)

--Nat


Integrated vs templating

koschei on 2003-05-22T23:21:49

Very generally speaking, to me, a heavy mason user and a light TT user (but I do find them both useful), I see the difference as being TT encouraging your template/code abstraction to be more pure while Mason is more web geared and template directed. It's Mason's inheritence scheme that really makes me happy.

Mason, I feel more like I'm writing web pages; TT I feel more like I'm writing logic. It's just how I feel about it =)

Visit our Library!

Robrt on 2003-05-23T00:23:44

The learn.perl.org Online Library

Mason vs TT

ask on 2003-05-23T08:39:20

I've used both quite a bit for both pet- and Really Big projects.

The elevator version:

Mason is like PHP on steroids. And with perl syntax.
In a web context TT is a balanced "MVC" toolkit for web applications.

Mason is best as a "callback" system and TT is mostly used as a "pipeline" system. They can both be used as the other.

In my experience "callback" is best for getting things done in a hurry. Mason is absolutely fantastic for this. I use Mason for quick web hacks all the time.

6 months later I am happier maintaining the mostly-pipeline systems.

Perrin wrote a great article about choosing a template system.