Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #7614

Re: Need to learn J2EE and friends

From Arved Sandstrom <asandstrom3minus1@eastlink.ca>
Newsgroups comp.lang.java.programmer
Subject Re: Need to learn J2EE and friends
References <7e0c1e0d-c526-4ecf-af94-cc4e21eb54f6@x14g2000prn.googlegroups.com>
Message-ID <EBl9q.15335$cx4.6008@newsfe04.iad> (permalink)
Organization Public Usenet Newsgroup Access
Date 2011-09-06 06:20 -0300

Show all headers | View raw


On 11-09-05 10:23 PM, nroberts wrote:
> I've recently been assigned as engineer to adopt a product written in
> Java that uses J2EE, EJB, and Struts.  After the upcoming maintenance
> release a decision to re-engineer the product has already been made.
> 
> I have tons of experience in C++ and in object oriented programming,
> and in that regard Java is no challenge to me...only a slightly
> different syntax and a different API.  The architecture of
> "enterprise" applications though is entirely new and as I get into
> it...quite a bit foreign.  There seems to be a rigor and logic to the
> Java way that I need to learn.  I did a modicum of work on dynamic web
> programming with PHP way back in the day but even that appears quite
> different from what I'm tasked to work on now.  My primary experience
> is in desktop application programming.
> 
> I went to the local instance of Barnse and Noble to find something to
> help but found little of value.  The most tempting offering was a
> generic book on SOA but I was not sure how much help it would be and
> it was rather expensive.  I'm not even sure SOA would be topical since
> we're not developing a "service" at all.  I'm working through a
> tutorial on using Eclipse with glassfish but at some point I need to
> break out of the IDE and understand the generic project structure.  We
> appear to be using Ant for the build process...  Frankly, I wasn't
> sure would help me as I looked at the bookshelf.  Most books just
> seemed to be thick for the sake of being thick, going over things like
> XML syntax basics, while I need concise, upper level treatment and
> overview.
> 
> I need to get up to speed on the concepts regarding these multi-tier
> web programs and how they fit in with Beans and Struts...perhaps new
> technologies that would be of help as well.  I need to learn the
> differences between application programming and "enterprise"
> programming and I also need to learn what I need to learn...because I
> don't even seem to really know that either.
> 
> Where would be a good place to start?

In addition to what the others said (basically, start working through
the Java EE tutorial), I'll add a few notes:

1. As you begin teasing apart what a J2EE/Java EE application does, do
keep in mind that at their core these API families are 95 percent about
writing web apps. Plain and simple. Whether it's the Struts framework
building upon  the Servlet API in the web tier, or session beans in the
services layer that encapsulate your business logic and provide
scalability and lifecycle management, it's all about scalable and
distributed servicing of requests.

2. If you understand the Servlet API in the web tier, and session beans
and message-driven beans in the business layer, those are the real guts
of a J2EE/Java EE app. Almost everything else builds on that. I hope
fervently that you are not afflicted with a J2EE 1.3 or 1.4 application
that makes use of EJB2.x enterprise (session/entity) beans.

3. Name-dropping: Struts, like Java Server Faces (JSF), or Wicket, or
Tapestry, etc, is a web-tier framework that aims to simplify processing
of requests. A fairly common characteristic is support of MVC. I hope
that you are using Struts 2, and not Struts 1. Technologies like JSP and
Facelets are _view_ technologies, and are used by these web frameworks.

4. Talking to databases: JPA (Java Persistence API) is an orthogonal API
that is equally applicable to (desktop) Java, namely Java SE, or
"enterprise" Java, namely Java EE. It's an API for object relational
mapping, and combines lessons learned from ORMs like JDO, Hibernate,
Toplink etc. If the app that you are confronted with does not use it,
then I expect that either it's old and uses EJB 2.x entity beans, or it
uses native ORM APIs for something like Hibernate or TopLink, or it uses
straight JDBC.

5. More name-dropping: you may hear Spring mentioned. This is an entire
family of frameworks. The core of Spring is Java object configuration
and management through an "inversion of control" (IoC) container, using
dependency lookup and injection. There are many other Spring
frameworks/libraries for web MVC, transactions, security, web services etc.

There was a decent rationale for using Spring IoC back in the day, like
in the earlier versions (1.x and 2.0) By the time Spring 2.5 came out
what was available in Java EE (Java EE 5) was already caught up, and now
with Java EE 6, Spring is basically pointless. *My* opinion. If anyone
suggests Spring to you as "the way to go" ask them why they think so,
and if it has to do with making up for some ancient version of J2EE then
recommend an upgrade to Java EE 6 instead.

6. "Enterprise" in "J2EE" or "Java EE" or "Enterprise Java" means "web".
Official documentation may not put it quite so baldly, but it's
basically all about handling HTTP/HTTPS requests from web browsers, or
SOAP requests coming in over HTTP/HTTPS for a Java web service.

The other main non-negligible input mechanism is messaging (JMS, or Java
Message Service).

There are obviously some other aspects to "enterprise", like being able
to talk to other systems like an EIS (you'll see the Connector
architecture discussed in the tutorial). But fundamentally it's about
being a web app.

7. SOA: nobody in your shop may be tossing the term around right now,
but it doesn't hurt to be aware of basic SOA early on. Make yourself a
SOA resource and it will help you. At this stage of the game you will
actually improve the application overall by ensuring that it is modular,
and that the building blocks in the business tier are actually small-s
services in the SOA sense, without actually ever worrying about web
service endpoints or ESB or workflow.

Questions: I assume you meant "adapt", not "adopt", in keeping with the
"re-engineer" somewhat later on. Any information you can supply about
the nature of the requested adaptations, and leeway that you have for
suggesting improvements, and timelines, would help us.

For my part I've been doing J2EE/Java EE, with the odd vacation, since
the year 2000. It's my bread and butter. Others here have similar
experience levels. So I suspect we can help.

AHS

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Need to learn J2EE and friends nroberts <roberts.noah@gmail.com> - 2011-09-05 18:23 -0700
  Re: Need to learn J2EE and friends Lew <lewbloch@gmail.com> - 2011-09-05 18:48 -0700
    Re: Need to learn J2EE and friends nroberts <roberts.noah@gmail.com> - 2011-09-06 09:05 -0700
      Re: Need to learn J2EE and friends Lew <lewbloch@gmail.com> - 2011-09-06 15:03 -0700
      Re: Need to learn J2EE and friends Arne Vajhøj <arne@vajhoej.dk> - 2011-09-06 19:09 -0400
  Re: Need to learn J2EE and friends Arne Vajhøj <arne@vajhoej.dk> - 2011-09-05 21:49 -0400
  Re: Need to learn J2EE and friends markspace <-@.> - 2011-09-05 18:58 -0700
  Re: Need to learn J2EE and friends Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-09-06 06:20 -0300
    Re: Need to learn J2EE and friends nroberts <roberts.noah@gmail.com> - 2011-09-06 08:06 -0700
      Re: Need to learn J2EE and friends Arne Vajhøj <arne@vajhoej.dk> - 2011-09-06 19:06 -0400
        Re: Need to learn J2EE and friends markspace <-@.> - 2011-09-06 17:30 -0700
          Re: Need to learn J2EE and friends Arne Vajhøj <arne@vajhoej.dk> - 2011-09-06 20:42 -0400
    Re: Need to learn J2EE and friends Arne Vajhøj <arne@vajhoej.dk> - 2011-09-06 19:01 -0400
      Re: Need to learn J2EE and friends Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-09-06 21:09 -0300

csiph-web