aspose file tools*
The moose likes Servlets and the fly likes best way to make my internal j2ee app web-based? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "best way to make my internal j2ee app web-based?" Watch "best way to make my internal j2ee app web-based?" New topic
Author

best way to make my internal j2ee app web-based?

Khusro Jaleel
Greenhorn

Joined: Nov 28, 2005
Posts: 3
Hi everyone,

I'm an experienced Java/J2EE dev and I've written an internal J2EE app for a company which runs on a very old JBoss-2.4.4 and is accessed only through Swing interfaces which I have written. I have now been asked to make all new interfaces web-based, meaning any new stuff should be web-accessible and I may also have to convert the older interfaces to web pages.

The only problem is that I have NO experience using J2EE over the web. What I mean is that I have only ever used it with Swing interfaces and looking at the web technologies available (Tomcat, Struts, JSF, Spring, Tapestry, etc) I am confused as to which way to proceed. I am currently in the learning phase and I have been given a very tight deadline (maybe 1 or 2 weeks) to come up with a viable web-based solution.

I have started to read about struts and will try to do some tutorials in it and get some stuff working to get a feel for it and I assume I will have to do the same for the other frameworks before I have a chance of making my own decision. I also have the 'Core J2EE Patterns' book and am hoping to cram in as much of the knowledge there as possible. It seems that book has a lot of web-centric patterns though I suppose one could apply them in other cases.

But I would like some guidance from anyone here who has experienced such a similar transition and has had to implement something like this.

I would like to know if maybe Struts is overkill in my case, or maybe JSF is now a better way to do this? Or just straight servlets with Tomcat?

Any help or insights appreciated,

Khusro
Sonny Gill
Ranch Hand

Joined: Feb 02, 2002
Posts: 1211

Hi Khusro. Welcome to Java Ranch

I am afraid you are in for a long hair-pulling ride. The plethora of J2EE frameworks can make it very hard to choose one. They all have their place though.

Now, you don't really need to use any of the frameworks. If it is a small application, you can very well write the web interface using Servlets, JavaBeans, JSPs and JSTL. Make sure that there is adequate decoupling between the business logic and web MVC layers. Read up on Front Controller pattern, if you haven't already done so. Rod Johnson's first two books address issues in web MVC design quite well.

If the application is big enough and you decide to you a framework, I recommend having a look at Tapestry. Tapestry provides a component based development model for web frontend (so does JSF). I have only looked at these two briefly, but I found Tapestry to be much more elegant than JSF, JSF code just looks ugly!! Another component based framework, which is said to be much simpler with a shorter learning curve, is Wicket.
[Edit: I recommended these because you are coming from Swing background and may feel right at home writing components. A lot of people who start with request-response based frameworks like Struts etc. find component based web development too complex and hard to adapt to]

If you decide to ditch component based development, and go for request-response based development, I would recommend Spring MVC. The other choices are Webwork 2 and Struts. If you do a google search on saloon.javaranch.com, you will find a few posts comparing Spring MVC with Struts.

Good Luck, and HTH
[ November 28, 2005: Message edited by: Sonny Gill ]

The future is here. It's just not evenly distributed yet. - William Gibson
Consultant @ Xebia. Sonny Gill Tweets
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Exemplary reply, Sonny.

JSF/Tapestry is your best bet. You can say them as server-side swing. The learning curve is also very short, especially for you.

Spring doesn't suit your requirement I think. Because your db tier and business tier are already there. You just need a web application framework which should help you in presentation.

Struts would overkill. Moreover, you'd find many giants here, calling struts as bloated framework.

Thanks.
[ November 29, 2005: Message edited by: Adeel Ansari ]
Khusro Jaleel
Greenhorn

Joined: Nov 28, 2005
Posts: 3
Thank you so much for both your replies guys. I have so far been too busy to look into it any further but at least with your suggestions, I have a better start at it. I was initially going to go full-on struts but now I will just skim the struts stuff and try to focus more on JSF and also Tapestry.

Thanks once again for the suggestions, I will let you know about my progress
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: best way to make my internal j2ee app web-based?
 
Similar Threads
Overall value of POJO work experience?
JSF
Struts vs. JavaServer Faces vs. other?
Swing and ofbiz (type) frameworks
JSF... My post-JavaOne impressions.