Chapter 6. Embedded Perl Web Scripting

   

In the last two chapters, we've looked at several categories of Perl web-based Oracle applications: those that use standard Perl CGI scripts and those that use the Apache mod_perl module to make those scripts run more efficiently . With both approaches, though, the developer needs to worry about the design of the web pages displayed by the application. Interesting as web page design can be, you may feel that as an Oracle DBA you have enough responsibilities on your plate. You may need to fill web pages with data ” product lists, employee data, and all kinds of other information ” but you may not have a keen interest in how to lay out that data on the pages themselves . In this chapter, we'll look at another approach to dynamic web programming, one that completely separates database issues and web page design issues. This approach is to use embedded scripting, and it can be an elegant solution, as long as the embedded language is a simple and straightforward one.

This embedded approach is also known as templating , because the presentation layer ” or site design ” is the template to which is added the application or code development layer (that layer contains the business-specific detail).

There are various web programming solutions loosely based on the idea of embedding code into HTML pages, and then preprocessing it. With Java, for example, you use Java Server Pages (JSPs). Microsoft's version of this technology is known as Active Server Pages (ASPs). There are also several excellent Perl embedded scripting solutions that we'll describe in this chapter:

Embperl

An embedded scripting language that's useful for building up mod_perl web sites from collections of small reusable components . It uses a C-library back end to assist with its processing.

Mason

Another embedded scripting language. Similar to Embperl in its functionality and use of mod_perl , but built purely in Perl. It uses an object-oriented style of component programming.

   


Perl for Oracle DBAs
Perl for Oracle Dbas
ISBN: 0596002106
EAN: 2147483647
Year: 2002
Pages: 137

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net