Logo         Community
The Company
Your Account
Contact Us
The JSP Files (part 1): Purple Pigs In A Fruitbasket
Get to grips with Java Server Pages with this introductory tutorial, which covers variables, includes and the String object.

| The JSP Story |

Ever since Sun Microsystems (aka "the dot in dot-com") came up with Java, the geeks have been screaming themselves hoarse about the wonders of this technology. Terms like "platform-independent code" and "write once, run anywhere" have been given so much airplay that even novice Java developers are aware of them, and the language is also popular with talk-show pundits and Internet consultants, who tout it as the solution to almost all problems of cross-platform compatibility.

Now, we're big fans of Java - we've used it in the past, and will do so again in the future - but this series of tutorials isn't about Java. It's actually about an offshoot of Java, the innocuously-named Java Server Pages, or JSP, which attempts to offer Web developers a compelling alternative to traditional server-side scripting languages like Perl, PHP and ASP.

How? First, a little history...

During the early days of the Web, it was the sheer amount of (free!) content that encouraged people to use it. Using the easy-to-learn HTML language, any one and their deaf grandma could set up a Web page and reach out to other like-minded souls online. As the infrastructure improved, content was no longer restricted to text; you could now view pictures or watch videos on the Web. And as more and more people began adding interactivity to their Web sites, a bunch of programming languages were born in order to meet increasingly complex requirements.

The best-known of these is, of course, Perl, although PHP and ASP are also popular favourites. The problem with these languages, however, is that every request to the Web server for a Web page generates a new process on the server, leading to performance problems as visitor traffic increases.

Java offers a solution to this problem, by using so-called "servlets" to create interactive Web sites (a Java servlet is like a Java applet, except that it runs on the Web server, not the client Web browser - and if you're confused now, wait till we get to scriptlets). Java also makes it possible for brick-and-mortar companies to interface their legacy systems with the new technologies available on the Web, and rapidly develop and link back-office automation systems together via the Internet.

However, servlets have a problem of their own - a simple interface or logic modification could often result in far-reaching changes to the servlet. And so, JSP was developed to separate application logic from the interface, so that changes to one would not affect the other. Working closely with developers like The Apache Group, JSP uses a tag-based approach (similar to PHP and ASP) which allows designers to make changes to the user interface without affecting application logic.

If you're wondering about scalability, JSP supports component-based architectures using JavaBeans or Enterprise JavaBeans; this allows a developer to create reusable code modules and thereby speed up development time. And since this is Java, you can seamlessly connect Web applications to legacy systems, thereby reducing the costs of moving a real-world business into cyberspace. Say it with us - platform independence rocks!

How to do Everything with PHP & MySQL
How to do Everything with PHP & MySQL, the best-selling book by Melonfire, explains how to take full advantage of PHP's built-in support for MySQL and link the results of database queries to Web pages. You'll get full details on PHP programming and MySQL database development, and then you'll learn to use these two cutting-edge technologies together. Easy-to-follow sample applications include a PHP online shopping cart, a MySQL order tracking system, and a PHP/MySQL news publishing system.

Read more, or grab your copy now!

more like this print this article  next page
In trog...
Logging With PHP
Building A Quick-And-Dirty PHP/MySQL Publishing System
Output Buffering With PHP
Date/Time Processing With PHP
Creating Web Calendars With The PEAR Calendar Class
In the hitg report...
Crime Scenes
Animal Attraction
Lord Of The Strings
In boombox...
Patience - George Michael
Think Tank - Blur
My Private Nation - Train
In colophon...
Hostage - Robert Crais
The Dead Heart - Douglas Kennedy
Right As Rain - George Pelecanos
In cut!...
American Chai
The Core
Find out how you can use this article on your own Web site!

Copyright © 1998-2018 Melonfire. All rights reserved
Terms and Conditions | Feedback