aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Trying to grasp J2EE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Trying to grasp J2EE" Watch "Trying to grasp J2EE" New topic
Author

Trying to grasp J2EE

Bryan Douglas
Greenhorn

Joined: Oct 25, 2005
Posts: 10
Hello, I have been learning Java slowly, always with the goal of trying to learn web programming and web services for Java. I feel I have a good grasp of basic java skills (Swing, networking, jdbc, etc.), and I would like to get started with J2EE. So far I have gotten Apache installed, and Tomcat is also installed. I cannot get them to work together yet, but I am working on it.

While browsing the Apache and Sun websites, I was overwhelmed with information. I am a bit confushed about J2EE though, it seems like there are so many technologies. I read a bit about each, and I would like to write what I understand about them. If I make any mistakes, please let me know so I can better understand J2EE. Thank you for your time and help!

Java related:
Servlets - program that runs on the web server for working with HTML, XML, etc.
JSP - for creating web pages with dynamic content
JSF - I do not really understand this one...
Java Beans - reusable components, like ActiveX objects in Windows

Server Related:
Jakarta - For working with Java on the Apache server
Ant - This is for aiding in debugging programs on a web server
Struts - A framework for writing programs that use the Model-View-Controller
Tomcat - A mini-webserver for JSP and Servlets
Maven - For managing development projects
Spring - ???



For web services, what does Java use? Does it also use SOAP? Is there a special java-oriented technology?
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

First "So far I have gotten Apache installed, and Tomcat is also installed."

Um, it is called Apache Tomcat. Apache is just an organization, not a product.

OK

First, JSF is the Sun Standard of what Struts is. It is a standard specification for a web framework. The JSF team was led by the guy that created Struts.

You see Sun has this notion of taking really cool things that everyone uses, but was created outside of any formal specification or standard. So then what Sun does, is go to those that created it, and have them come in and write a specification, then call it something else.

JavaBeans:

OK, I think you are mixing up JavaBeans, which is a "contract" of private variables and getters and setters (more to it than that but). And mixing it up with Enterprise JavaBeans (EJB) Which is in J2EE. In both cases they aren't really like ActiveX objects at all.

Jakarta is really just a name from Apache, not a technology, but Jakarta is the name for the group of open source projects through Apache.

Ant is a build scripting language. You can have a target that actually runs tests, but that is not what Ant "is". Maven is just like Ant, but has a bunch of features that help in "modularizing" your builds. You can run Ant tasks in Maven too.

OK, forget about Spring for now. Too much to talk about, and getting the previous concepts down is kind of like a pre-requisite, so to speak.

HTH

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
First "So far I have gotten Apache installed, and Tomcat is also installed."

Um, it is called Apache Tomcat. Apache is just an organization, not a product.

A lot of web pages are served by Apache HTTP servers.


SCJP 1.4, SCWCD 1.3, SCBCD 1.3
Bryan Douglas
Greenhorn

Joined: Oct 25, 2005
Posts: 10
Thank you for taking the time to reply to my post. I really appreciate it. I have a few more questions though.

Um, it is called Apache Tomcat. Apache is just an organization, not a product.


So I do not need the apache web server then? I just need tomcat? I thought that Apache was the name of an organization that produced a web server also called apache. Then, using modules, the server could be extended for use of perl, php, and even java. In order for tomcat to handle the servlets, mod_jk is installed, though which the apache server exchanges information. It seems there are extensions for IIS as well. Is my understanding incorrect?

About JavaBeans, so they are really just a predefined interface to an object? When I read about them, they seemed a lot like ActiveX objects. I am coming from an MFC/C++ background so I guess I am just tryinig to relate technology in my mind. THat is probable not a good thing, but anyway. One could drag and drop them into a project with a GUI editor, and then manipulate the properties of the object. One can also progamatically manipulate the object. So where do beans fit in, in regard to the picture at whole?

So, for new projects, would it be better to use JSF over Struts, or are they both accepatble solutions?

I am curious about Spring. It appears to be a framework making J2EE technology more transparent in designs.

So, I am guessing the best place to start is with JSP and Servlets. The seems to be very foundational, similar to ASP.NET it seems.
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
Tomcat has a built-in web server, so you don't need Apache right now. Whilst you are learning J2EE, I'd forget about Apache as it just complicates your setup.

Similarly, I'd forget about frameworks like Struts, JSF and Spring for now. Start out by learning servlets and then JSPs (both running in a Tomcat container). Once you've got a good grasp of the basics of Java web development, then you can move onto other technologies.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

Yeah, what Roger said.

I am curious about Spring. It appears to be a framework making J2EE technology more transparent in designs.


There are debates about that. Even whether Spring is easier or not. I know one or two situations where Spring is a real pain in the arse, and EJB 3.0 makes it easier. But we don't want to hijack your thread on that discussion.

Yes JSF is more of a standard. Struts should be implementing the JSF Specification in its next release, I would assume. Just like Hibernate 3.0 has implemented the EJB 3.0 Entity Bean specification.

Again, I want to make sure you use the right terminology, so that there is no confusion. If you say JavaBean, we assume you are talking about plain old java objects that have setters and getters. If you say Bean, we can't really know whether you mean JavaBeans or EJBs. I am assuming Bean means EJB. Which I don't think that is what you are assuming Bean means, and that is where we would have our problem.

Using JavaBeans is used quite a bit in the DTO "pattern" where you want an object to send over the wire with all the data that you need, and not have to make too many network calls. Because without it, you would have an EJB that you have to call a method on (Network call) it for each piece of data. I think the best way to explain JavaBeans is to realize their purpose is just a contract to make sure you have good encapsulation.

Mark
ak pillai
author
Ranch Hand

Joined: Feb 11, 2006
Posts: 288
Should not get confused between fundamental technologies and frameworks.

Once you have set up your Tomcat Server learn

1. Servlets [Google for servlet tutorials ]
2. JSPs [Google for JSP tutorials]

Note: while you are learing Servlets/JSPs, also try to understand packaging of a web module [i.e a war (Web ARchive file)].

3. Next learn JNDI
4. move onto learn: calling JDBC through Datasource.
5. Next learn EJB 3.0.
6. Next learn J2EE layered 3-tier or n-tier architecture, ear(Enterprise ARchive) packaging etc.



Finally you can start learning some of the popular frameworks which uses the above mentioned fundamental technologies.


good luck.


java j2ee job interview questions with answers | Learn the core concepts and the key areas
Bryan Douglas
Greenhorn

Joined: Oct 25, 2005
Posts: 10
Thanks for all the input and advice. Well, I shall get started with Tomcat and JSP then! Thanks again!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Trying to grasp J2EE