Thursday, January 27, 2005

Tools to start your WebApp

Recently I had to create a J2EE app entirely based on open source tools.This was something I had not tried since university days, 2 years ago, I remembered the amount of pain that it took me to find something which would allowed me to get started as quickly as possible and also to integrate the different open souce tools together to build something that really worked seamlessly.

I needed to have the following in my application:

1. Hibernate - had not tried this one before so was high time

2. MySQL database - its basically a simple installation and very easy to maintain and there are loads of free MySql database management tools around on the net waiting to be downloaded.

3. Struts for web-tier - just needed a simple stable MVC framework , I would only be dealing with Actions and Forms as I would be using Laszlo files instead of JSP pages so the choice of struts was quickly made.

4. Tomcat 5.X - the best web server around I really appreciate it, plus it is now a standard in the web server market.

5. Ant for build tool - used this because I didnot want to bother about MAVEN config files. With MAVEN you have to specify every artifact (jar, war ,..) in MAVEN's POM files plus its too pain staking for the small project that I wanted to develop.

6. XDoclet - most open source tools dont have special interfaces with drag and drop functionality to create Struts projects so I thought if i needed to write my struts-config files by hand why not make XDoclet generate it instead. At the same time i wouldn't need to write up Hibernate configuration files ..as it was all new to me.


So i started my quest to find the ultimate tool that would quench my needs and integrate as much as possible the above mentioned items.

The first option was Eclipse 3.0 as it is very similar to Web Application Studio (WSAD is build over eclipse 2.0) and is open-souce. As the interfaces were similar and the GUI seemed attractive I downloaded the 85 MB file ..installed... and surprise no support for creating web-mobules , you need to install additional plugins which needless to say cost $XXX dollars as usual. By itself it was not going to save me time.

So I tested out NetBeans 4 IDE , I had heard about it but had never tried it before. With a size of 37 MB it was considerably lighter than Eclipse. It seems that ANT plays a major role in this tool and I was pretty happy with that , was very easy to use and I said .. hey I found the holy grail here.It provides web-app templates which create the structure of your project along with supplying an ANT build file which does most things such as build,war,deploy , etc.. . Still there was no tight integration with Struts , which I found very annoying. And you have to do all the data connections manually which is something i rather not want to lose time into ,cause I needed to quickstart here.

Then I came across AppFuse and I could not believe it , apparently a guy had similar problems getting started creating an application, so what he did was he created a base project called AppFuse which uses Ant, XDoclet, Spring, Hibernate (or iBATIS), JUnit, Cactus, StrutsTestCase, Canoo's WebTest, Struts Menu, Display Tag Library, OSCache, JSTL and Struts (or Spring MVC).

What you need to quick-start with AppFuse is simply :

  • downloading the zip file

  • extract the downloaded file to a dir of your choice

  • set your Tomcat and Ant in class path

  • perform an ant command on the appfuse dir

  • .
    .
    .
  • ... and 2-3 ant commands away you get a fully functional app


  • It basically creates your database tables (MySQL by default), creates a workspace (Eclipse by default) has sample codes and their structure for you to build on , it uses XDoclet ,Canoo, Hibernate and struts although other technologies are also supported.It is also uses Tomcat and everything can be controlled from WAR generation to test-cases and deployment on Tomcat with the ANT build file. And it definitively brings a smile to your face.

    So the choice was quickly made and I opted for AppFuse its modular structure ensures me that I can integrate other technologies in the course of the development of my project.Futhermore the WIKI for AppFuse is full of tutorials and best practises , so that was a plus too.

    Hope this helps you fellow JAVA developers started on your projects....signing out for today....

    Monday, January 24, 2005

    Maven

    A sample chapter on Managing projects with Maven is available for download on sandcastsoftware from Richard HighTowers book, Java Tools.

    Its a good start if you want to know more about this powerful and modular tool which is Maven.Its really cool to use Maven and the scripting language for the builds, Jelly is quiet easy to comprehend. Futhermore it comes with an installer for Windows for developers who really dont like to spend time copying jars and classpaths here and there.

    Maven uses POM files and meta-data filled xml files to keep track of all your artifacts along with using one central repository for storing these artifacts and other generated artifacts during the build.

    I really appreciate the Maven site plugin which allows you to generate accurate and concise information on your codes.In one build you can know your developer activity , file activity (from information obtained from your Code Repository) and it also generates PMD , CheckStyle and metrics report to have a close eye on the quality of your code.

    Thursday, January 20, 2005

    Eid Mubarak

    Tommorrow we are celebrating Bakr-Eid in Mauritius which is when we sacrifice an animal , goat, sheep, cow or bull and divide the meat amongst poor people.

    Long ago muslim people used to do that in their backyards, but nowadays many people prefer to give money for the sacrifice to be done in other countries such as in india for example where tsunami has made thousands homeless. But for my part am taking part in mauritius itself.

    The festival usually last 3 days and during that time you can see loads of cattle on lorries being carried all over the island It is quite a spectacle.At times when they onload the cattle to the different places where the sacrifice is to take place it can even lead to major congestion. You can see small children muslim and non-muslim running about to catch a glimpse of the bulls , whilst elderly people narrate stories of ferocious bulls.

    Whats interesting in the actual ceremony is that you take the place of a cowboy , you need to throw ropes at the animal and try to bring it down without hurting it.This in itself is quiet a task and when you dont have much experience with it , you may get yourself hurt.

    I just hope i dont break my bones too much this time.

    Wednesday, January 19, 2005

    The Chocobo family


    Here is a picture of my cousin's 2 kitten Chocobo and Chocobi ..at least thats how i call them , everyone-else calls them Bella and Coco ... Posted by Hello

    Rich Internet Applications

    Wanting to engage myself into developing RIA (Rich Internet Applications) to make the most out of multimedia capabilities existing nowadays , i turned myself to Macromedia Flex. You need to buy a license to use Flex and many a developer dont have that much capital as to purchase a Flex presentation server starting at $12,000 for commercial use. There is a non-commercial license which lets developers use Flex.

    However Flex now in version 1.5 comes with loads of support and documentation from Macromedia. There is an IDE called Flex Builder 1.0 which is somehow similar as Macromedia Dreamweaver but with the advantage of editing and viewing MXML files which is the language in which Flex apps are written in.

    Installation of Flex is pretty straight forward too , you just have to dump a FLEX.war file inside Tomcat 5 for example and presto .. you can start developing flex apps.

    Another solution to developing RIA apps is Laszlo , I stumbled on this a few days ago while looking for information on Flex. Laszlo which intially was very expensive had to go open source following the entry of Flex in the RIA market. Laszlo makes use of XML and JavaScript to deliver rich media apps.Currently it makes use of Eclipse 3 as IDE and the presentation server (101 MB) is available for free download.


    Resources

  • Macromedia Flex Homepage

  • Laszlo Homepage

  • Flex blog by ASVGuy

  • Laszlo Dashboard demo

  • Tuesday, January 18, 2005

    A 18th of January

    Following comments that my Blog is too "techie" by a friend.. i've decided to write something which is not related to technology..

    So! Lets get started.. on what to write? Here in Mauritius the weather is pretty crappy so I can't write about the beautiful sea and lagoons..hmm .. what else Mauritian actuality aha!....o forgot .. i dont watch Mauritian National TV ...I watch French Television....

    .....am starting to get the temptation to write about something technical here... aaaaaaaa this is too hard!!!!!!!!

    Hey my cousin got herself 2 cute little kittens .. i will try to place their pics online. (added to @TODO list)

    My friend started her first blog ..wow welcome to the blog universe http://junean.blogspot.com/ .

    I need a shave!

    I had shawarma for lunch its kind of cheep Rs25 , thats less that one euro.

    Its getting dark here i think it might be raining soon.

    Well thats about how non techie i can get hihihihi

    Friday, January 14, 2005

    Samsung 3D movement recognition

    Here is something which is bound to be the latest trend after camera-phones.. phones with 3D movement sensor. Samsung has unveiled its latest phone the SCH-S310 which can detect movements using sophisticated sensors and algorithms.

    Basically the advantage of this technology means less typing and more interactivity , for example if you need to call a number e.g 3 , you just have to write 3 in thin air using your phone , for it to take 3 as your dialling number, and shake your phone to make the call.

    There is an array of possibilities with 3D sensors , lets see when we can get our hands on the SCH-S310 in Mauritius.

    Read Full Story
    Samsung 3D movement recognition

    Wednesday, January 12, 2005

    Hidden powers of Google


    Google is a very powerful search engine , if you master all the types of querying techniques possible it becomes a very useful tool. For example here is a query string which can be used to search public web server directories.

    Type the following text in google search box:

    Index of .mp3

    Google will return you a list of results. And clicking a result of type "Index of /mp3" will take you to a folder called mp3 with .mp3 files. You can play with the search string to get all different kinds of information on the content of the public directories.

    Tuesday, January 04, 2005

    hi 2005 ...bye 2004

    HAPPY NEW YEAR.......WAAAAAAAAAAAAAAAA! Ok so 2004 is over , I had lots of fun in 2004 met new people did new things , now its time to step in 2005 and see what lurks yonder. Its also first week of the year at the office and its just like going back to uni after hols..well not quite like it. Anyways stay in touch for some interesting killer apps for this year.