[Perl] Framework para aplicaciones Web
Roberto Andrade Fonseca
randrade@abl.com.mx
07 Mar 2002 10:35:55 -0600
Hola:
El jue, 07-03-2002 a las 00:03, Alejandro G. Bedoya escribi=F3:
> Cuales son las ventajas del Mason??? que es lo que hace???
Esta parte de uno de los manuales lo explica:
DESCRIPTION
Mason is a tool for building, serving and managing large web sites. Its
features make it an ideal backend for high load sites serving dynamic
content, such as online newspapers or database driven e-commerce sites.
Mason's various pieces revolve around the notion of ``components''. A
component is a mix of HTML, Perl, and special Mason commands, one
component per file. So-called ''top-level`` components represent entire
web-pages,
while smaller components typically return HTML snippets for embedding in
top-level components. This object-like architecture greatly simplifies
site
maintenance: change a shared component, and you instantly changed all
dependant pages that refer to it across a site (or across many virtual
sites).
Mason's component syntax lets designers separate a web page into
programmatic and design elements. This means the esoteric Perl bits can
be
hidden near the bottom of a component, preloading simple variables for
use
above in the HTML. In our own experience, this frees content managers
(i.e., non-programmers) to work on the layout without getting mired in
programming details. Techies, however, still enjoy the full power of
Perl.
One of the best ways to learn about Mason is to explore the samples/
directory created during installation. There you will find a collection
of
components, simple to complex, illustrating most of Mason's component
syntax.
...
WHAT ARE COMPONENTS?
The component - a mix of Perl and HTML - is Mason's basic building block
and computational unit. Under Mason, web pages are formed by combining
the output from multiple components. An article page for a news
publication,
for example, might call separate components for the company masthead, ad
banner, left table of contents, and article body. Consider this layout
sketch:
+---------+------------------+
|Masthead | Banner Ad |
+---------+------------------+
| | |
|+-------+|Text of Article ..|
|| || |
||Related||Text of Article ..|
||Stories|| |
|| ||Text of Article ..|
|+-------+| |
| +------------------+
| | Footer |
+---------+------------------+
The top level component decides the overall page layout, perhaps with
HTML
tables. Individual cells are then filled by the output of subordinate
components, one for the Masthead, one for the Footer, etc. In practice
pages are built up from as few as one, to as many as twenty or more
components.
...
-----------------
Puedes visitar:
http://www.masonhq.com/
--=20
Saludos,
Roberto Andrade Fonseca
randrade@abl.com.mx