790 likes | 939 Views
So Many Tools, So Little Time. Architecture of Present and Future Web Technologies. Jay Sissom Indiana University jsissom@indiana.edu. Version 2.0. Agenda. Basics Example application Tool overview DHTML/XML Summary. Perl/CGI Perl Apache Module PHP 3 Cold Fusion Active Server Pages
E N D
So Many Tools, So Little Time Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0
Agenda • Basics • Example application • Tool overview • DHTML/XML • Summary • Perl/CGI • Perl Apache Module • PHP 3 • Cold Fusion • Active Server Pages • VB Webclasses • Java Server Pages • Java Servlets • Enhydra Java App Server
Disclaimers and Fine Print • Jay likes compiled languages much better than interpreted • Jay likes strongly typed languages • Jay has LOTS of opinions • What’s right for Jay might not be right for you • Examples don’t contain all the error checking they should!
Web Transaction Client Server webdev.indiana.edu http://webdev.indiana.edu/cgi-bin/AcctBal
Connect to webdev.indiana.edu Hello client, how may I serve you? GET /cgi-bin/AcctBal I’m going to run this program /www/cgi-bin/AcctBal, then send you it’s output Thanks, Bye! Bye! Web Transaction Client Server webdev.indiana.edu http://webdev.indiana.edu/cgi-bin/AcctBal
Example program • IU departmental surplus auction site • Modeled after eBayTM
Perl/CGI • CGI – Common Gateway Interface – the original dynamic web content interface • Perl – Interpreted language that excels at text processing
Perl • One of the most used web programming languages • Interpreted language • Weakly typed • Basic object oriented features • Available on almost any Unix and Windows 9x, NT, 2000 • Open Source
Perl Pros • Free! • Fairly quick development • Tons of add-in modules • Lots of documentation • Has some object oriented features • Has a database abstraction layer (DBI)
Perl/CGI Cons • JAY WARNING: Interpreted, Weakly typed • CGI has lots of overhead
Perl/CGI Resources • http://www.perl.com/ - A bunch of Perl resources • http://www.cpan.org/ - Perl Modules • http://www.perl.org/ - More Perl stuff
Perl Apache Web Module • An add-on to the Apache web server • Lets you write web server modules in Perl • Perl modules are loaded/compiled when the web server loads • Modules are reloaded when code changes (in some cases) • Open Source
Perl Web Module Pros • Free! • Fairly easy to learn • Code loaded and compiled once • Tons of add-in modules/databases • Lots of documentations • Has a database abstraction layer (DBI)
Perl Web Module Cons • JAY WARNING: Interpreted, Weakly typed • You are tied to Apache • Difficult to develop/debug
Perl Web Module Resources • http://perl.apache.org/ - Get software/docs • http://perl.apache.org/guide/ - Usage guide • http://perl.apache.org/faq/ - FAQ • http://perl.apache.org/dist/cgi_to_mod_perl.html – Changing program from CGI – Mod Perl
PHP • Hypertext Preprocessor • Embeds code within HTML pages • Supports many OS’s/Web Servers • Open Source
PHP Pros • Free! • Easy to learn • Easy development • Some basic object oriented features • Supports many modules/databases
PHP Cons • Interpreted/Weakly typed language • No database abstraction layer
PHP Templates <?php // code include “whatever.template”; ?> <HEAD> <TITLE><?php echo $title; ?> … whatever.template
PHP Resources • http://www.php.net/ - PHP offical source • http://www.phpbuilder.com/ - Example code
Cold Fusion • Interpreted HTML preprocessor • Code is embedded in HTML pages • Specialized tags contain code • Works on NT/Solaris/Linux • Commercial Product
Cold Fusion Pros • Commercial Support is available • A popular web development tool • Has OLEDB and native database drivers in addition to ODBC
Cold Fusion Cons • Interpreted language • Weakly typed language • No OO features
Cold Fusion Resources • http://www.allaire.com/ - Allaire Corp • http://www.houseoffusion.com/ - Cold Fusion articles/information • http://www.cfscripts.com/ - Scripts • http://www.defusion.com/ - More stuff • http://www.cfmcentral.com/ - More stuff
Active Server Pages • HTML preprocessor • Interpreted language • Code embedded within HTML pages • NT/W2K only (3rd party package for Unix) • Only OO features come from COM
Active Server Pages Pros • Free (comes with NT Option Pack or W2K) • Quick development • Extremely popular • Pretty good development tools
Active Server Pages Cons • Pretty much limited to IIS on NT or W2K • COM objects must be developed in different language • Very Weakly typed and Interpreted • Only supports ODBC & OLEDB database interfaces
Active Server Pages Resources • http://www.asptoday.com/ - Articles about ASP • http://msdn.microsoft.com/ - MS docs • http://www.develop.com/ - #1 MS technology training company
VB Webclasses • Web application development tool in Visual Basic • Comes in the Professional & Enterprise versions of VB • Compiled code that use HTML templates • Only runs on IIS under NT or W2K
VB Webclasses Pros • HTML and logic are separate (kinda) • Logic is compiled! • Language is strongly typed (if you like) • Programmers write code, graphics designers write HTML
VB Webclasses Cons • Microsoft might drop the feature in a future version • There are still bugs in the VB feature • Not enough separation between HTML and logic Webclasses & Visual Studio SP3+ don’t work well with Windows 2000!*
Webclasses & Win 2000 • Knowledgebase Q255502 • Knowledgebase Q259725 • Knowledgebase Q234317
VB Webclasses Resources • http://msdn.microsoft.com/ • http://www.asplists.com/asplists/faqvbwebclasses.asp - FAQ • http://www.desertware.com/vbuniverse/webclass.htm - Resources
Java Server Pages • Free! (Sometimes) • The Java version of ASP & PHP • Java code embedded within HTML • Code is compiled and saved on first use • Available on many OS/Web Servers • Java is very object oriented
Java Server Pages Pros • Code is portable • Very Strongly typed language • Code is compiled once • It’s not very difficult to port ASP to JSP
Java Server Pages Cons • Code and HTML are in the same file • Java has a pretty steep learning curve
Java Server Pages Resources • http://www.serverpages.com/Java_Server_Pages • http://java.sun.com/products/jsp/
Java Servlets • Free! (usually) • Java Server API • Code is compiled and saved on first use • Available on many OS/Web Servers • Java is very object oriented
Java Servlets Pros • API is pretty simple • Code must be compiled before using • Pretty portable • The Servlet API can be overridden to provide additional functionality
Java Servlets Cons • Sometimes a web server reset is required to load changed classes • Unless you use a third party package, HTML is in with the logic Check out www.webmacro.org
Java Servlet Resources • http://java.sun.com/ • http://www.servletcentral.com/ - Online magazine • http://www.servlets.com/ • http://www.webmacro.org/ - Separate HTML from code
Enhydra App Server • Free! (pay version available) • Java based with source code • Proprietary web development model • Automatic data mapping with optional business logic layer • Supports Servlets/Java Server Pages • Supports EJB in Enterprise edition • Available for many OS’s
Enhydra App Server Pros • Very scalable even across OS’s • Has built in data/object mapping • Proprietary interface separates HTML from code • Proprietary interface is based on WC3 DOM • Also supports Java Servlets and JavaServer Pages • Can integrate with Jbuilder & Oracle Developer • EJB support in Enterprise edition
Enhydra App Server Cons • Huge learning curve • Proprietary UI development is difficult • No commercial support yet • Very little documentation • Integrates with Jbuilder through Kelp add-on Use JSP or Servlets with their Data Objects and Business Objects!
Enhydra App Server Resources • http://www.enhydra.org/ • http://www.lutris.com/
Enterprise Java Beans • A method for building business logic • EJB Servers provide support for • Transactions • Security • Database Connectivity • Deploy EJB’s on any compatible server without changing code* * Assuming you didn’t use any proprietary features of a server.
Enterprise Java Beans • Used for very high-end applications • Supported in many servers such as: • Enhydra Enterprise Server • JRUN • Bea Weblogic • Gemstone/J • Persistence PowerTier for EJB • IBM Websphere • Jboss Open Source Server (www.jboss.org) • And others….
Current/Future tools • DHTML • XML • Server side • Client side • SOAP