» » Embedding Perl in HTML with Mason

Download Embedding Perl in HTML with Mason fb2

by Ken Williams,Dave Rolsky

  • ISBN: 0596002254
  • Category: Technology
  • Author: Ken Williams,Dave Rolsky
  • Subcategory: Web Development & Design
  • Other formats: doc lrf mobi azw
  • Language: English
  • Publisher: O'Reilly Media; 1 edition (October 2002)
  • Pages: 318 pages
  • FB2 size: 1896 kb
  • EPUB size: 1503 kb
  • Rating: 4.3
  • Votes: 400
Download Embedding Perl in HTML with Mason fb2

This book shows readers how to create large, complex, dynamically driven web sites that look good and are a snap to maintain

This book shows readers how to create large, complex, dynamically driven web sites that look good and are a snap to maintain. Readers will learn how to visualize multiple Mason-based solutions to any given problem and select among them. This is an essential reading for any Perl programmer who wants to simplify web site design. Home page url. Download or read it online for free here: Read online (online html).

Dave Rolsky and Ken Williams, both core developers, introduce you to the concepts behind HTML::Mason and its many features which . Even if you're already familiar with mason this book will serve you as an excellent reference.

Dave Rolsky and Ken Williams, both core developers, introduce you to the concepts behind HTML::Mason and its many features which really make the life of a web developer way easier. 4 people found this helpful.

Dave Rolsky, Ken Williams. The only book to cover this important tool, Embedding Perl in HTML with Mason is essential reading for any Perl programmer who wants to simplify web site design. Learn how to use Mason, and you'll spend more time making things work, and less time reinventing the wheel.

Your sysadmin is looking for you and she’s carrying a big spiked club!

Dave Rolsky, Ken Williams. This concise book covers these features from several angles, and includes a study of the authors' sample site where these features are used. Embedding Perl in HTML with Mason shows you how to create large, complex, dynamically driven web sites that look good and are a snap to maintain. You'll learn how to visualize multiple Mason-based solutions to any given problem and select among them. The book covers the latest line of Mason development . x, which has many new features, including line number reporting based on source files, sub-requests, and easier use as a CGI.

There are two ways to embed Perl code into text with Mason.

Mason stores this generated Perl code on disk, so that it doesn't need to go through the parsing and compilation process for every request, and stores the compiled code in an LRU (least recently used) cache in memory. Once Mason has an object representing the initial component, it creates a request object and tells it to execute that component. There are two ways to embed Perl code into text with Mason. The first, the Perl line, is a line that starts with a percent sign ( % ).

Originally, it was called HTML::Mason::Container, but Ken Williams decided to package this class separately and . or, when creating the ApacheHandler object, we would simply pass in 'HTML::Mason::Lexer::XML' as the value of the lexer class parameter. Output: Compiling to a Different Output.

Originally, it was called HTML::Mason::Container, but Ken Williams decided to package this class separately and release it to CPAN, as it solves some fundamental problems of a large object-oriented system. Any Mason object that takes parameters to its constructor must inherit from this module. Of course, since all of the classes that you might consider subclassing inherit from Class::Container already, you shouldn't need to inherit from it directly.

Dave Rolsky and Ken Williams are the authors of Embedding Perl in HTML with Mason. Programming with Mason. Dec 11, 2002 by Dave Rolsky. Dave Rolsky and Ken Williams are the authors of Embedding Perl in HTML with Mason.

The only book to cover this important tool, Embedding Perl in HTML with . Dave is part of the core development team for Mason

The only book to cover this important tool, Embedding Perl in HTML with Mason is essential for any Perl programmer who wants to simplify Web site design. Dave Rolsky is a programmer, author, and activist with a background in music composition and reading science fiction. He has been active in the development of Free (Perl) Software for several years. Dave is part of the core development team for Mason.

Mason doesn't aim to be the one true Perl-based templating system for building web sites, but it's led many programmers to abandon their custom solutions when they've seen how much easier using Mason can be. It's a powerful, open source, Perl-based web site development and delivery engine, with features that make it an ideal backend for high load sites serving dynamic content. Mason uses a concept called components: a mix of HTML, Perl, and special Mason commands. These components can be entire web pages, or bits of HTML that can be embedded in top-level components. Shared and reusable, these components greatly simplify site maintenance: when you change a shared component, you instantly change all pages that refer to it.Although using Mason isn't difficult, creating a Mason-based site can be tricky. Embedding Perl in HTML with Mason, written by members of Mason's core development team, shows you how to take advantage of Mason's strengths while avoiding the obstacles that inexperienced users may encounter. Mason's unique features, when used properly, can streamline the design of a web site or application. This concise book covers these features from several angles, and includes a study of the authors' sample site where these features are used.Embedding Perl in HTML with Mason shows you how to create large, complex, dynamically driven web sites that look good and are a snap to maintain. You'll learn how to visualize multiple Mason-based solutions to any given problem and select among them. The book covers the latest line of Mason development 1.1x, which has many new features, including line number reporting based on source files, sub-requests, and easier use as a CGI. The only book to cover this important tool, Embedding Perl in HTML with Mason is essential reading for any Perl programmer who wants to simplify web site design. Learn how to use Mason, and you'll spend more time making things work, and less time reinventing the wheel.


Reviews about Embedding Perl in HTML with Mason (7):
Uste
The book itself is not bad, but the technology described in it is VERY out of date and stale.

This book is also available online for free on http://www.masonbook.com
Deorro
I've worked on enough PHP and other lousy web code to have cringed when I read the title of this book: Embedding Perl in HTML with Mason. "No!" I cried, "don't cross the streams!" By the end of the book, I was feeling much more at ease (but I still cringe a little at that title).Mason is (though it seems debated) a cross between a lightweight application server and a very lightweight templating system. Requests go into Mason, which dispatches them to handlers and produces a response. The handlers and dispatch are simple but powerful: they use ideas object-oriented programming and allow the programmer to easily abstract and reuse code parts.

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.
Dandr
I am using Mason for about a year. Then I saw the Mason book. My first tought was: "Why should I buy a book about Mason - The online documentation is excellent...?".
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.
Dellevar
Far from being just a reference, this book explains the conceptual framework behind Mason. The main idea of which is creating reusable components or building blocks to generate each element of your web site. This simple but powerful idiom is extremely useful in creating both small and very large dynamic web sites.
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.
Dancing Lion
But.. it is a little too short. Not really but I would have loved to have more book. The book covers just about every topic. I personally would have enjoyed to have more examples in each area. They made sure that there is at least on example for each topic. They even give some information about other competing products and about products that use Mason as it's base (for example Bircolage - I think I spelled that correctly). I am really glad the book to come out, it is a perfect addition to my collection of O'Reilly and Perl books.
Thanks for a great book!
Ynonno
As a longtime mason user (2 years, private and commercial use) I didn't have to think about buying this book. Dave Rolsky and Ken Williams, both core developers, introduce you to the concepts behind HTML::Mason and its many features which really make the life of a web developer way easier.... Even if you're already familiar with mason this book will serve you as an excellent reference. If you haven't heard of mason yet and you're into web development and Perl is your language of choice you should also definitely have a look at this book and mason in general.
Kipabi
Apart from being clear and well-written, this book is also the sum of all the knowledge of the Mason community, written by two of the developers of Mason themselves.
If you already use Mason, it's a must have.
If you are new to Mason, try it first (it isn't difficult at all), then read the book.
From my point of view this is an excellent technical book.
This is a good book. I had no idea about mason but helped me get right up to speed. Recommended for anyone who wants to get their foot in the door to learn mason.

Related to Embedding Perl in HTML with Mason fb2 books: