Behavior, Content, Money – 3 Things you should never give away for free!!!

BCmoney MobileTV

How to deploy an Apache Tiles project

Posted by bcmoney on August 22, 2011 in Java, XML with No Comments


No Gravatar
Quick-start-3

Apache Tiles is Java’s leading version of a widget container, built on the Portlet specification. In Java, portlets are similar in concept and serve almost the same functional purpose as widgets in the web world

Long before the release of the W3C’s Widget specification, most modern programming languages had already (predictably) evolved a system for plugins, extensions and/or the representation of widgets. One such platform (also happens to be a web platform) known for its high degree of modular design and use of separate templates to comprise a given view, is Apache Tiles.

I’ve accepted a new position at TeamSpace / TheREDspace in Halifax, NS; and, while I’m not at liberty to divulge much juicy information about their clients or the specific technology stacks they use, I can mention that Tiles is a great open source project on which some of their very popular (i.e. heavily trafficked) online services are currently running quite successfully. They are able to perform updates in near real-time with Continuous Integration build servers that push to an staging server where business owners and testers can then sign-off on a given release on a feature-by-feature basis. Usually, even with good deployment practices, you need to sign off on a whole release, but with this approach leveraging Apache Tiles, individual functionality within the release can be given a green, yellow or red light.

As a developer, that means the feedback is instantaneous, so for this new position, I’ve really had to up my game and taken the time to brush up on my understanding of portlets. I wish I could share more, I actually prepared a 30-page document summarizing all the steps in great detail but it can’t be shared and is the property of my employer. That said, in case someone wants to try to integrate Tiles to their own Java web projects, I’ll include some useful steps here for getting started with your first Tiles project:

SHORTCUT IF YOU’RE USING MAVEN

  1. Point your POM to the MAVEN repository:
      <dependency>
        <groupId>org.apache.tiles</groupId>
        <artifactId>tiles-extras</artifactId>
        <version>2.2.2</version>
      </dependency>
  2. First Build/compile, then Run your project

MANUAL LIBRARY LOADING

  1. Download project: http://tiles.apache.org/download.html
  2. Unzip to your project directory (or a common one if you plan to reuse it alot)
  3. Start a new default Java web project in your Eclipse IDE (should also work with NetBeans and others) then create a sub-directiory/sub-folder for libraries… for simplicity I usually just call mine  “libs” or something similar
  4. Physically copy the tiles-extra.jar file to “libs” then add to your project’s BUILD Path
    (depends on IDE but assuming you know how, if not right-click on the project and something like “Configure Path” as per Eclipse… for your’s if you still can’t figure out, try a search engine)
  5. Now you can add some basic Tiles and then try to Build/compile then Run your project

After following either the Maven or Manual setup, you should be ready to go with your first Tiles project.

If you had trouble following any of these steps, you can always just try the following sample code project (was setup as Eclipse project so may need conversion/import process to open properly in another IDE):

 

 

 

Leave a Reply

No trackbacks yet.

No post with similar tags yet.

Posts in similar categories

BC$ = Behavior, Content, Money

The goal of the BC$ project is to raise awareness and make changes with respect to the three pillars of information freedom - Behavior (pursuit of interests and passions), Content (sharing/exchanging ideas in various formats), Money (fairness and accessibility) - bringing to light the fact that:

1. We regularly hand over our browser histories, search histories and daily online activities to companies that want our money, or, to benefit from our use of their services with lucrative ad deals or sales of personal information.

2. We create and/or consume interesting content on their services, but we aren't adequately rewarded for our creative efforts or loyalty.

3. We pay money to be connected online (and possibly also over mobile), yet we lose both time and money by allowing companies to market to us with unsolicited advertisements, irrelevant product offers and unfairly structured service pricing plans.

  • Archives