Hello Ranchers I have a project which reqires me to develop a website and host data for my client. I wish to do it using Java. I'm a novice to advanced topics such as EJB etc. Should I use Servlets & JSPs or is there any other option. Kindly suggest the best options...
Thanks & Regards
I "try", I "catch" and "finally" WIN !!!
All depends on your requirements. In general EJBs are not required. If you write your appplication with proper layers like business layer, DAO layer, service layer etc, if required in the future it can be easily refactored.
I have a project which reqires me to develop a website and host data for my client. I wish to do it using Java.
As I always say, choose the right tool for the job. So why Java? The Java Web tier is relatively difficult to create applications for: you need to code all the behaviour, re-compile for every change (except JSPs/tag files) and re-deploy to the Web server. In general, this isn't something anyone can just pick up and do. Setting up the development environment alone can take a couple of days if you're not experienced.
If you're only doing a simple site with low-moderate traffic requirements, you're going to make your life a lot more complicated by using Java. Why not stick to something interpreted like PHP and speed up the development cycle? Using PHP5 you can effectively utilise OO programming too.
Secondly, Java containers consume a lot of resources. As a typical example, a Tomcat instance allocates upwards of 256MB RAM before doing anything. Apache with PHP extensions is much smaller, in the order of 32MB RAM. You'll also have to find a host or administrator for Java apps, while there are plenty more Apache admins and hosts around.
On the flip side, if you need a high performance application or one backed by an extensive programming API, then Java is great. But expect to double your production time, much more if you're only just starting to learn it all.
Edit: You can use a Java Web framework to shave off the development time quite significantly. The tradeoff is that you have to learn that framework which itself can take days or weeks... so to start with it isn't all that fast. [ November 04, 2008: Message edited by: Charles Lyons ]
Charles Lyons (SCJP 1.4, April 2003; SCJP 5, Dec 2006; SCWCD 1.4b, April 2004)
Author of OCEJWCD Study Companion for Oracle Exam 1Z0-899 (ISBN 0955160340 / AmazonAmazon UK )
I am forced to say "thanks" to Charles and Rakesh. I learned important things by this thread.
best regards, omi
Most of the programming problems can't be solved because you don't know what the exact problem is.
Defining your problem correctly leads you to the right solution.
Swapna Gouri Kalanidhi
Joined: Mar 14, 2008
Hello Ranchers Thanks a ton for giving me a better outline of different technologies... Here's what I exactly require:
I need to host some confidential information on a site where only the client can view and access it. He should be able to modify & retrieve data from the DB. Also, since he is not ready to publicise his site, he will not need to extend it further. At the max he might want to add/update few more customers and their details. So is using Servlets and JSP a better option??
@Charles and Rakesh I know Servlets & JSPs to some extent whereas I dont even know the definitions of PHP and other frameworks.... Also I have just 4 weeks of time to get this done, so cannot afford to learn something new & apply. So what do you think is a better option for me?? Kindly suggest..!
Again, Thanks a bunch for getting back...!
Joined: Dec 16, 2007
Considering the time constraint and your area of expertise, you can go for Struts or Spring MVC. Look for a couple of samples on the net and i think you will be good to go. You can do the app but i cannot guarantee that you will understand thoroughly how it will work.