On Mon, 1 May 2006, Lionel MARTIN wrote:

If the book had to be written again, presenting a sample website, as what is done in the current version of the book with the apprentice site, which style would have it presented to the reader?

A really good question. The example in the book is a bit artificial, in that instead of module-izing everything, I left more code than I usually would in the components, because I was afraid that otherwise the example would be filled with "magic" calls to modules that weren't documented (in the book).

Here's what I wrote near the end of that chapter:

 As we mentioned at the beginning of this chapter, we wanted to make this
 site small enough to show you in a single chapter (albeit a rather long
 chapter), and we sometimes avoided using some features of Alzabo that
 could have simplified some of the code in order to avoid getting
 sidetracked into an Alzabo how-to.

Nowadays, I'd probably do even more module-ization. Another big change is that I now handle form submissions outside of Mason, in module code, and then simply redirect back to an appropriate URI.

Recently I've been playing around with more RESTian URIs, rather than .html pages, and I'm doing this without using dhandlers, since this seems more like something Apache should do (either via mod_rewrite or a mod_perl module hooking into an early request phase).

If I were to rewrite the chapter nowadays, I'd probably just bite the bullet and move everything I could out of components, assuming that with good naming readers would follow along and figure out what the module APIs did. I'd also show how to mix the use of Mason for content display and pure Perl modules for handling of other requests.


-dave

/*===================================================
VegGuide.Org                        www.BookIRead.com
Your guide to all that's veg.       My book blog
===================================================*/


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to