- Paperback: 320 pages
- Publisher: O'Reilly Media; 1 edition (26 Oct. 2002)
- Language: English
- ISBN-10: 0596002254
- ISBN-13: 978-0596002251
- Product Dimensions: 17.8 x 1.9 x 23.3 cm
- Average Customer Review: 3.0 out of 5 stars See all reviews (2 customer reviews)
- Amazon Bestsellers Rank: 1,646,238 in Books (See Top 100 in Books)
- See Complete Table of Contents
Embedding Perl in HTML with Mason Paperback – 26 Oct 2002
|New from||Used from|
- Choose from over 13,000 locations across the UK
- Prime members get unlimited deliveries at no additional cost
- Find your preferred location and add it to your address book
- Dispatch to this address when you check out
Customers who bought this item also bought
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
If you are a seller for this product, would you like to suggest updates through seller support?
About the Author
is a programmer, author, and activist with a background in music composition and an obsession with Hong Kong films and the works of author Gene Wolfe. He has been actively developing Free (Perl) Software for several years and is a member of the Mason core development team. For more information about Embedding Perl in HTML with Mason please visit www.masonbook.com, a web site maintained by the authors where additional information and downloadable source code are available.
is a researcher in Document Categorization at the University of Sydney in Australia. He has written many Perl modules of varying utility, about 20 of which are available on CPAN. Like co-author Dave Rolsky, Ken is a member of the HTML::Mason core development team. His educational background is in mathematics and music. For more information about Embedding Perl in HTML with Mason please visit www.masonbook.com, a web site maintained by the authors where additional information and downloadable source code are available.
Excerpt. © Reprinted by permission. All rights reserved.
CHAPTER 5 - Advanced Features
In the previous chapters you have been introduced to the basic features of Mason, and you should have a fairly good idea by now of how you might actually go about constructing a dynamic web site from Mason components. You have seen a few of Mason s unique features, such as the autohandler mechanism, the dhandler mechanism, and the ability to pass arbitrary data between components. In this chapter well go beyond the basics and learn more about advanced ways to use Mason components to design large dynamic sites. Youll learn how to define multiple components in the same text file, how to create components on the fly from Perl strings, how to manage multiple component root directories, and (finally!)how to use all of Masons object-oriented features.
Although we often imagine a one-to-one correspondence between text files and Mason components, it is actually possible to define multiple components in a single text file. This is achieved by using a block, a special Mason directive that defines one component from within another. The component embedded within the block is called a subcomponent, and it is visible only to the component within which it resides:component A may not access component B s subcomponents directly.
Top Customer Reviews
The book's structure and style do not provide a useful introduction to Mason for the beginner, nor is the book an easy-to-use reference when starting out; rather than helping inexperienced users avoid obstacles, it actually presents more. Unravelling the book is the greatest task I've faced yet in learning Perl and Mason. One particular problem I encountered was the introduction of seemingly random syntax and phrases (and standards) which are only explained four chapters later; the "cook-book quick start" approach is unfriendly, and confusing. Unnecessary complexity abounds from the very first pages, and the examples are bizarre and stumbling.
Overall, while this book might be a useful reference (a la Nutshell) for people who already know Mason, it completely failes to deliver on what it should; a comprehensive, easy-to-follow introduction for developers new to the subject.
A useful book if you know Mason, but otherwise only buy it if you like the pretty aqua colour of the spine.
I have been using Mason professionaly for three years, and this is the only book I ever needed. Mason has a thriving community and pretty much all of them would agree.
Most Helpful Customer Reviews on Amazon.com (beta)
But even the introduction chapters of this book gives you new ideas how to get things done. Starting with the second half of chapter 4 every Masonsite developer should take a close look. He will find a in deep discussion about every Mason feature - and more (e.g. The Bricolage-CMS-Appendix).
I my opinion there is no discussion "to buy or not to buy" this book. The only question is "when".
On the one hand this book can be a bit boring for "new" Mason user and as mentioned before the online documentation is very good. On the other hand if you have your first mason-site done and read this book you will have very likely the urgent desire to rewrite some code.
But this is a common perl problem: "There are many ways to get things done."
I dislike the "Example" chapter. One of the big advantages of Mason is the possibility to seperate perl-code and HTML. This ist not very well done within the example-site.
Conclusion: This book is not needed to get in touch with Mason althought usefull - but if you are really starting to deploy a site I strongly recommend this book.
The book is aimed at intermediate to advanced Perl programmers, although a bright beginner could pick the material up with a little help from the Mason community's very helpful mailing list. This book is not a tutorial. Instead, the authors devote a long chapter (chapter 8) to the analysis of a fully functional web app with full source code. I preferred this approach however because it helped me focus on the application as a whole rather than silly pedantic examples that lack context.
Before reading this book, I had some experience working on a site that used a "home-brewed" templating system, but all the while I knew there had to be a better way. After reading through the first four chapters, I was able to build a rather sophisticated site and have been quite pleased with both Mason and this book. I fully recommend it.
I was able to configure a couple servers, write up some test components, throw together some quick admin tools, and remake a custom database web app in a very short time using Mason and this book. It may not be for you if you are new to Perl or Apache, but I think Amazon has a wide selection of books available on both of these topics. Buy 'em, read 'em, then get this one.
I highly recommend it.
It seems like a very powerful system, but its programmer-facing interface is fairly simple. The book walked through all the basic Mason concepts (request, autohandlers, dhandlers, components, methods, etc.) quickly, but with sufficient explanation and demonstration to make everything clear. Chapter 8 walked through the construction of a web and database application, using all the major features covered so far. The features had already been so clearly explained that I felt comfortable just skimming through the chapter.
After that, the book began to cover some more esoteric concepts. Mason is made up of a number of classes: an interpreter, a lexer, a compiler, and a resolver. A programmer can write his own class to implement any of these components, changing the system to suit his whims.At the end of all this, I felt like I could really make Mason do a lot of cool things, and that it was a nice-sized solution for a lot of problems. (I still don't see myself actually /using/ Mason for anything, but now I know it's not so bad, and I know how to use it.) The book was well-written, had the right amount of depth, and was the right length for end-to-end reading. I'm glad I read it.
Look for similar items by category
- Books > Computing & Internet > Computer Science > Information Systems
- Books > Computing & Internet > Digital Lifestyle > Online Shopping > Amazon
- Books > Computing & Internet > Programming > Languages
- Books > Computing & Internet > Web Development > Web Design > Applications
- Books > Computing & Internet > Web Development > Web Scripting & Programming