JavaEE and why Sun is too smart for normal people

I’m starting to feel more comfortable with the definition of JavaEE (formerly J2EE).  Other overviews of JavaEE have been severly lacking for beginners. I consider myself somewhat astute, but when looking at pages such as this one and this one, my eyes start to glaze over by about the 3rd paragraph.  I cannot follow it at all.  If you are used to the Internet and downloading files, you are accustomed to seeing xxxxxx.exe files or xxxxxxx.zip files.  But with Java you get things like ‘download spec’.  What the hell is a spec?  How am I going to create programs using a spec?

I don’t mean to rail on Sun but their stuff seems to be written by developers, for developers.  Have you ever tried one of their tutorials? If you don’t have previous experience with JavaEE, I dare you to try one and make it work. Go ahead… I’ll wait… The same goes for programming books. I have a rant all saved up programming books that I’ll post some time. I don’t like programming books.  Give me a nice shiny textbook any day of the week.

With that said Sun’s documentation and information starts to make a heck of a lot more sense once you’ve had exposure through some other means. But that doesn’t change the fact that it sucks for beginners.  For instance a sentence like this from Sun: “(Java EE) is a set of coordinated technologies” is fairly simple… once you understand the Alphabet soup that comprises those coordinated technologies.  JSP, EJB, JDBC, POJO (only in the new version), and JAX-WS are completely cryptic when read in a sentence together. Throw it together with JSF, Hibernate, Maven, Ant, Swing, and all of their competitors and you quickly discover that JavaEE is not for beginners.

Here is what I think I know now that I’m getting into this:

Ant: Command line build tool.  It offers a way for you to specify your src files, target build path, classpaths, test utilities (such as jUnit), logging utilities (such as log4j) among myriad other things I’m sure.  Using the build.properties file and build.xml file you can specify all of these things such that you can run a simple ‘ant package’, or ‘ant test’ command from the command line to create thousands of files that comprise your final application AND run test scrips at the same time.  Great stuff once you get familiar with it. Key files: build.properties and build.xml both of which reside in your project base directory

Maven: To me this seems like Ant. I don’t understand Maven very well yet, although I’m using it within Eclipse.  I know that if you use Maven, you may not need Ant and vice versa.  Key files: pom.xml which is stored in your base project directory, but can be stored at lower levels in your program if necessary.  And settings.xml which is stored in .m2 directory in your Home directory (C:\Documents and Settings\Michael Hoitomt\.m2 for me on Windows).

JDBC: Used to connect to your database.  It is easier to use if you set up some properties for it either in your Build.xml file (Ant) or pom.xml file (Maven). The build tool (Ant/Maven) does a lot of the heavy lifting.  Database scripts (ddl files, data definition language, files that contain SQL scripts) are mapped in the configuration file (build.xml or pom.xml). Additionally database properties such as location, username, and password are mapped in the configuration file. Upon building your application Java/Ant or Java/Maven will use the configuration file to execute the database scripts and allow your program to pull and push data in and out of the database without having to specify all of the settings in each of your classes.

That’s where I’m at so far.  In one of the upcoming posts I will start talking about end to end application flow and how JavaEE makes it easier.

Advertisement

2 thoughts on “JavaEE and why Sun is too smart for normal people

  1. >If you are used to the Internet and downloading files, you are
    >accustomed to seeing xxxxxx.exe files or xxxxxxx.zip files. But with
    >Java you get things like ‘download spec’. What the hell is a spec? How
    >am I going to create programs using a spec?
    You politely tell the spec “please create an application for me”, after summoning it to your computer. Then it will ask you which folder should it create the application into, and what color should it be (I always create blue ones, I think they’re the best), and you’re done.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s