Apache
  Home arrow Apache arrow Apache Tapestry: ASO and More Components
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? 
APACHE

Apache Tapestry: ASO and More Components
By: Alexander Kolesnikov
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 17
    2007-05-21


    Table of Contents:
  • Apache Tapestry: ASO and More Components
  • Creating hivemodule.xml
  • AddCelebrity page
  • Creating the template with new components
  • Continuing to configure the application

  • 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: ASO and More Components
    ( Page 1 of 5 )

    We shall continue working on the CelebrityCollector application. The next step is to create a page for adding a new celebrity. While we create that page, I will introduce you to three more components that will add new capabilities to our application and help us get around certain problems.

    There is one inconvenience that hinders our progress: the DataSource object that we use to obtain either the whole list of celebrities or a selected celebrity is currently stored as a property of the CelebritiesList page. This is not convenient as we are planning to access this object from different pages, and  the changes we might make to it on one page should be immediately reflected by another page.

    In other words, the DataSource should be stored somewhere, we don't care where, but it should be readily available for our code whenever we need it. If you remember our discussion of Inversion of Control and Dependency Injection in the previous article, you can probably guess that we are going to use some kind of IoC here. And since we want the DataSource delivered to us (or injected, like those drinks to our mini-bar) this should be a DI indeed.

    You might also remember that the system that takes care of IoC issues in Tapestry 4 is HiveMind. All we need to do is create a HiveMind configuration file, hivemodule.xml, and specify in it that we are going to need an instance of the DataSource class. The first time we request this instance at runtime, Tapestry (well, HiveMind, behind the scenes) will create it for us and store it in some kind of memory. Whenever we request it afterward, the same instance will be given to us (you can see an implementation of the so-called Singleton design pattern here).

    Sounds good, now let's actually do all this.



     
     
    >>> 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 6 hosted by Hostway
    Stay green...Green IT