Posted on

Why I dislike JavaEE


I’ve some research and I’ve read that JavaEE is actually a really good framework for developing enterprise level websites. I disagree:

Simple page that shows files in a directory

JavaEE

  1. Create servlet to send files to JSP page
  2. Insert entry into DD
  3. Create Java class to grab files
  4. Use JSTL to parse files and display them on page

PHP

  1. readdir();
  2. iterate over array

Insert and retrieve a single row in a database

JavaEE

  1. Download mysql connector jar
  2. Place connector into Glassfish lib
  3. Log into admin console
  4. Add new connector and connection pool and insert all relevant DB info
  5. Create a new Java class that will be your table
  6. Add variables
  7. Create getters and setters for each
  8. Annotate, and pray that it works
  9. Create Table from entities
  10. Create a new reference of the entity
  11. Set required values (one at a time)
  12. Using an EntityManager and a User Transaction persist it to the database and slaughter a goat to bring favor from the gods so that it may just work
  13. Using the EntityManager, use Query Language, which is not MYSQL to access a MYSQL database…couldn’t I just use MYSQL instead?
  14. Get a reference of the requested resource, get all information using getters

PHP

  1. mysql_connect()
  2. mysql_select_db()
  3. mysql_query(“inset into…”)
  4. mysql_query(“select * from…”)
  5. mysql_result()

Something went wrong…

JavaEE

  1. Clusterfuck of exceptions because everything is so “Object Oriented” that if one thing happens to not work, EVERYTHING doesn’t work and throws exceptions because you forgot a semicolon on line 37 of GetUsers.java
  2. Dig through server log and hunt down every exception related to your project, god forbid you didn’t clear it in the last 30 seconds.
  3. (if you’re as lucky as everyone else) find nothing and read through your code by hand
  4. find missing semicolon and add it

PHP

  1. “Expected “;” on line 37 on GetUsers.php

Does JavaEE look like a good server side language now?

Advertisements

About boringtechie

Hello, I'm the boring techie! So you've landed yourself on this site due to me or someone else linking you here, and you're wondering: "What does this kid do, and why should I even care?" Right? Of course you are. Basically, I'm a Techie, though I'm not as boring as the title says, that's one of those things where the word means the opposite of what's REALLY going on... Anyway, I write tuts and make commentaries. That's about it...

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 )

Google+ photo

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

Twitter picture

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

Facebook photo

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

w

Connecting to %s