
Java Server Pages and Servlets
March 28th, 2006I have always enjoyed working on websites, and whenever I have free time I always try to find ways to improve MattFaus.com. Websites, especially personal websites, are a perfect blend of visual and technical creativity. The markup languages that the web uses, such as HTML, CSS, and XHTML have made great strides in enabling web designers to make beautiful and complex websites while maintaining a rather structured framework. The reason I love working on dynamic websites is because they provide an immediate fruit of labor and there is practically zero deployment necessary. Once you have uploaded the website and released it to the public, the entire world can see what you have created by simply pointing their browser to your domain. As opposed to traditional desktop programs that entail downloads, installations, and a broader spectrum of compatibility issues. One limitation that I have felt while I was building dynamic websites up to this point has been their power limitation. I have used PHP and MySQL for my personal site as well as a couple client sites I have built and although PHP is very fun and easy to use, it does not have the power and complexity of an object oriented language.
Enter Java Server Pages and Servlets. With these technologies I can not only create simple and effective dynamic scripts for a website, but I can effectively generate a website that serves as the front-end for a very powerful and complicated object oriented machine running on the backend. I’m sure JSPs could run just as effectively as little PHP scripts for generating dynamic content, such as my pics page on MattFaus.com, but I think the real power with JSPs and Servlets is their access to the entire Java Framework. Without changing any code of a preexisting application, one could easily create a Servlet that performs as a completely usable user interface with zero deployment concerns, and this is amazing.
It seems that Java Servlets and XML Web Services are closely related. However, servlets seem more powerful and easier to implement. Instead of having to create a WSDL, installing a SOAP runtime environment, constructing SOAP objects, and passing them across the wire, and then processing returned SOAP objects, servlets simply use HTTP GET and POST methods to pass data and the output is formatted and returned immediately into the web browser.
I’m sure there are pros and cons of each, but so far I have enjoyed working with Java Servlets much more than Web Services.
