Embedding Perl in HTML With Mason

Dave Rolsky, Ken Williams

  • 出版商: O'Reilly
  • 定價: $1,220
  • 售價: 9.5$1,159
  • 貴賓價: 9.0$1,098
  • 語言: 英文
  • 頁數: 318
  • 裝訂: Paperback
  • ISBN: 0596002254
  • ISBN-13: 9780596002251
  • 相關分類: HTMLPerl 程式語言
  • 立即出貨(限量) (庫存=2)

買這商品的人也買了...

商品描述

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.

Table of Contents


 

Foreword

Preface

1. Introduction

2. Components

3. Special Components: Dhandlers and Autohandlers

4. APIs

5. Advanced Features

6. The Lexer, Compiler, Resolver, and Interpreter Objects

7. Using Mason with mod_perl

8. Building a Mason Site

9. Mason and CGI

10. Scalable Design

11. Recipes

12. Custom Mason Subclasses

A. The Mason API

B. Object Constructor Parameters

C. Text Editors That Understand Mason

D. Content Management with Bricolage

Glossary

Index

商品描述(中文翻譯)

Mason並不打算成為建立網站的唯一真正基於Perl的模板系統,但它已經讓許多程式設計師放棄了他們的自定義解決方案,因為他們看到使用Mason可以更容易。Mason是一個強大的、開源的、基於Perl的網站開發和交付引擎,具有使其成為高負載網站提供動態內容的理想後端的功能。Mason使用一個稱為組件的概念:HTML、Perl和特殊的Mason命令的混合。這些組件可以是整個網頁,也可以是嵌入在頂級組件中的HTML片段。這些共享和可重用的組件大大簡化了網站維護:當您更改共享組件時,您立即更改所有引用它的頁面。

儘管使用Mason並不困難,但創建基於Mason的網站可能會有些棘手。《在HTML中嵌入Perl:使用Mason》,由Mason核心開發團隊的成員撰寫,向您展示了如何充分利用Mason的優勢,同時避免不熟悉的用戶可能遇到的障礙。Mason的獨特功能,當正確使用時,可以簡化網站或應用程序的設計。這本簡明的書從多個角度介紹了這些功能,並包括了作者使用這些功能的示例網站的研究。

《在HTML中嵌入Perl:使用Mason》向您展示如何創建大型、複雜、動態驅動的網站,這些網站看起來很好,並且易於維護。您將學習如何對任何給定問題可視化多個基於Mason的解決方案並從中選擇。本書涵蓋了最新的Mason開發1.1x系列,其中包含許多新功能,包括基於源文件的行號報告、子請求和更容易用作CGI。作為唯一一本涵蓋這一重要工具的書,《在HTML中嵌入Perl:使用Mason》是任何Perl程序員簡化網站設計的必讀之書。學習如何使用Mason,您將花更多時間使事情運作,而不是重新發明輪子。

目錄

前言

前言

1. 簡介

2. 組件

3. 特殊組件:Dhandlers和Autohandlers

4. API

5. 高級功能

6. Lexer、Compiler、Resolver和Interpreter對象

7. 使用Mason與mod_perl

8. 構建Mason網站

9. Mason和CGI

10. 可擴展設計

11. 實例

12. 自定義Mason子類

A. Mason API

B. 對象構造函數參數

C. 理解Mason的文本編輯器

D. 使用Bricolage進行內容管理

詞彙表

索引