Re: please help me get started with building a website
On 22-04-2010 21:39, mr_wu wrote:
Can you kindly give me suggestions on using Java as the main component
in website building? I'm especially interested in using it in backend
as well as front end and incorporate hopefully AJAX.
Do you want to use Java both in frontend of the server side and backend
of the server side or both at client and server?
The first rules out AJAX unless you plan on using GWT.
The second is very standard Java EE.
Webserver I'm
familiar is apache, sql server will be postgres.
My background: I've already built a long running successful site with
mod_perl/apache/dbi as backend/front end with very little javascripts.
I wish to build on my java skills. I have already built a few
original desktop apps using j2se and in terms of lines of code my
experience with java is higher than perl. But I have known perl much
longer and I can build a website very fast in perl.
I am looking for something equivalent to mod_perl with perhaps a
templating feature built-in. I've looked into Tomcat but after
reading their intro + a bit more i'm not clear whether they have what
i want or even how it fits into apache if at all. Is glassfish an
alternative to Tomcat? What about jboss?
Tomcat, Glassfish and JBoss are all servers. Tomcat only implements the
web part of Java EE while Glassfish and JBoss implements everything (and
actually Glassfish and JBoss usually comes with Tomcat embedded for the
web part).
All of them give you the option of:
- speaking HTTP directly with them
- speak HTTP with Apache HTTPD and have that speak AJP with them
I've also written a tiny java applet on my mod_perl site and I notice
that the applet takes its time to load the first time. It's because
the browser has to load JVM the first time? I'm afraid that this type
of problem will be present if I were to use java for interactivity
i.e. AJAX. True or false? If I use JAVA just for server side (JSP?),
I won't see the problem? Will it be more interactive than pure
mod_perl site? Just easier to develop? More scalable?
Java applets do come with a small load time. But on a new system
it should not be that bad.
Server side Java obviously does not have this problem.
Server side Java is good for:
- large sites with lots of code
- sites with stateful clustering
- sites with transaction requirements
- sites that needs to integrate with web services, message queues and
ERP systems
Thanks in advance for any suggestions. Any reading material online or
print? Server will be on linux. Development on Windows/Linux/Mac
better?
It should not matter that you develop on another platform than
the one you deploy at.
Arne