[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
more on server-side data binding
I recently did a survey of some web technologies. Part of this was to
look into "server-side data binding"; that is, how to get a Web-server
to interact with databases. This is not all Linux-specific, but I
thought it would be a good follow-up to Bruce's KLUG presentation last
night to send this on to the list to include the section on server-side
data binding.
For what it's worth, I think the best approach is to use Java servlets.
Enjoy.
<extract begins here>
Server-side data binding
There are a number of options for server-side data binding. That is,
there are a variety of ways of extending HTML which servers can
interpret in order to provide data services to client browsers.
CGI
CGI, or the Common Gateway Interface, was the first standard for running
programs from the Web. Basically, you write arbitrary programs to
generate HTML.
ISAPI
Yet another proprietary Microsoft approach is Internet Server
Applications, or ISAPI (see Note 5). Again, there are Apache extensions,
but only for the Windows environment. ISAPI is a CGI replacement;
reputed to be faster than CGI, but doesn't allow embedded commands.
ASP
Active Server Pages, or ASP (see Note 4), is a series of HTML extensions
provided by Microsoft. Interestingly, there are ASP extensions for
Apache, but I think you have to use Perl as the server-side scripting
language. ASP allows for capturing session state (automagically via
cookies) and interacts easily with ADO, Microsoft's "Active Data Object"
protocol.
PHP
PHP (see Note 9) "is an HTML-embedded scripting language. Much of its
syntax is borrowed from C, Java and Perl with a couple of unique
PHP-specific features thrown in. The goal of the language is to allow
web developers to write dynamically generated pages quickly." (from the
FAQ). The acronym used to mean "Personal Home Pages," but now doesn't
mean anything at all.
DynaMorph
DynaMorph is a third-party server-side HTML extension (see Note 6), like
ASP. Its advantages are that it is cross-platform and cross-server.
Java Servlets
Sun provides a Java-based architecture for HTML extensions, called Java
Servlets (see Note 7). Lots of other vendors provide
servlet support either directly in their Web servers, or via plug-in
modules for specific servers. There is an Apache module for interpreting
Java Servlets. Third parties provide IIS interpreters, including an
interpreter from IBM.
Data binding is provided through JDBC ("Java Database Connectivity")
(see Note 8), which is Java's answer to Microsoft's ODBC. There are many
JDBC drivers for different databases. It supports arbitrary SQL
statements, and all of the standard SQL requirements. There is also a
JDBC-ODBC bridge which may be helpful in some situations. There are
reasonable standards for session management, etc.
Notes
Note 4: Active Server Pages
"Active Server Pages (ASP) is a server-side scripting environment that
you can use to create dynamic Web pages or build powerful Web
applications. ASP pages are files that contain HTML tags, text, and
script commands. ASP pages can call ActiveX components to perform tasks,
such as connecting to a database or performing a business calculation.
With ASP, you can add interactive content to your Web pages or build
entire Web applications that use HTML pages as the interface to your
customer." From the on-line
documentation at
http://msdn.microsoft.com/isapi/msdnlib.idc?theURL=/library/tools/aspdoc
/iiwawelc.htm. See also:
http://www.microsoft.com/workshop/server/asp/ASPover.asp, an "ABC of
ASP."
Note 5: Internet Server Application (ISAPI)
Microsoft's ISAPI page:
http://www.microsoft.com/win32dev/apiext/isapimrg.htm. The Apache
documentation: http://www.apache.org/docs/mod/mod_isapi.html.
Note 6: DynaMorph.
"DynaMorph is a cross-platform, server-side extension to the HTML
language which makes building dynamic websites and web-based
applications a snap. A DynaMorph document contains both DynaMorph and
HTML commands and is interpreted when it is requested by a web browser.
The DynaMorph language is fully-featured, allowing both the novice and
experienced programmer access to CGI capabilities without the hassle of
traditional CGI programming. Because DynaMorph integrates directly into
HTML documents, you can start using DynaMorph without making any changes
to your site." From www.morphtech.com.
Note 7: Java Servlets.
Sun's official site is:
http://jserv.javasoft.com/products/java-server/documentation/webserver1.
0.2/servlets/api.html. A comparison of Servlet engines is at:
http://www.inside-java.com/articles/servlets/sengines.htm, which
includes links to companies that sell servlet engines that run on a
variety of platforms. Sun also maintains a list at
http://java.sun.com/products/servlet/runners.html. The official Apache
Servlet project, the Apache-Jserv project is at
http://java.apache.org/jserv/index.html. A reasonable tutorial is at
http://novocode.de/doc/servlet-essentials/chapter1.html.
Note 8: Java Database Connectivity (JDBC)
Sun's official site is: http://java.sun.com/products/jdbc/index.html.
Sun's "supporting vendors" list is at
http://java.sun.com/products/jdbc/jdbc.vendors.html, with a list of JDBC
drivers at http://java.sun.com/products/jdbc/jdbc.drivers.html
Note 9: (PHP)
The main site is: http://www.php.net.
<end extract>
--
Will Fitzgerald
Neodesic Corporation