Apache
  Home arrow Apache arrow Apache Tapestry 4 Tutorial
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
APACHE

Apache Tapestry 4 Tutorial
By: Alexander Kolesnikov
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 149
    2007-04-03


    Table of Contents:
  • Apache Tapestry 4 Tutorial
  • JavaServer Pages came to the rescue
  • The Holy Trinity of software development
  • Why Tapestry?
  • Tapestry and prejudices

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Apache Tapestry 4 Tutorial
    ( Page 1 of 5 )

    In this article we'll begin by taking a look at servlets and JavaServer Pages, then proceed to learn about the MVC design pattern. After examining the problems these technologies solved, we'll focus on the Tapestry framework, study its advantages, and dispel some prejudices about it. This is the first article in a multi-part series covering Tapestry.

    In the beginning, there were servlets.

    A servlet is basically a piece of Java code written in such a way that it can run on a server on the Internet. Servlets live in a so-called servlet container that handles all the low level issues, allowing the servlet author to concentrate on what exactly he or she wants to do.

    Servlets are a foundation of every Java Web framework. Struts, JSF, Tapestry - all of them have at least one servlet, at the very least as a gateway between the world of Java and the world of Web.

    However, in the early days of Java Web development there were no frameworks, only servlets. And if a developer wanted to display a dynamically created HTML page, he or she would have to print out HTML inside of Java code like this:

    out.println("<table border=\"1\" cellpadding=\"5\" width=\"500\">");

    Now imagine that your page is a decent size, say, a hundred lines of code. You will have to write a hundred statements like this one. You can easily forget to escape one of those quotation marks or make some other error so that the servlet will not compile. This means the code is very fragile.

    But say you managed to do everything properly and your servlet compiles and works just fine. Now your designer decides to change something on the page. Being a true Java programmer you might have no idea about HTML and styles, and your designer certainly has no idea about Java. So who will make the change? This means the code is difficult to maintain. Also, any minor change in the page contents or design will require recompilation of the servlet.

    Although the servlets are powerful and efficient, they are not that good when it comes to rendering a dynamic HTML page. Some other solution was needed.



     
     
    >>> More Apache Articles          >>> More By Alexander Kolesnikov
     

       

    APACHE ARTICLES

    - Creating a VAMP (Vista, Apache, MySQL, PHP) ...
    - Putting Apache in Jail
    - Containing Intrusions in Apache
    - Server Limits for Apache Security
    - Setting Permissions in Apache
    - Installing Apache
    - Apache Installation and Configuration
    - Apache Tapestry and Custom Components: DateI...
    - Tapestry and AJAX: Autocompleter and InlineE...
    - PropertySelection and IPropertySelectionMode...
    - The DatePicker and Shell Components of Apach...
    - Apache Tapestry: ASO and More Components
    - Apache Tapestry and DirectLink, IoC and DI
    - Making a CelebrityCollector with Apache Tape...
    - Apache Tapestry and Listener Methods, Condit...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek