Live data from Hacker News

Developing and running a Java EE Hello World application

wiki.jetbrains.net

11–20 of 84 posts

Re: Developing and running a Java EE Hello World application

#12
Setting up any web stack is a pain in the ass and probably just as long of a tutorial. For example, write out a tutorial which goes from base Ubuntu install to "hello world" on Rails, I bet it's just as long or longer. I suppose it depends on how much detail you want to include. There are just more "one click" install options for other stacks.

Re: Developing and running a Java EE Hello World application

#13

Taking a cheap jab at Java EE just because their "Hello World" introduction article is a bit lengthy is bad form. Judging by the insulting "kids" reference in your title, Java EE has a completely different mindset than you are used to and the target audience doesn't include you. That doesn't mean the millions of other developers and billions of other platforms running Java are inferior.

At a previous employer, we've migrated a complex J2EE (with EJB 2.0 and such) E-Banking system to use only Jetty and JDBC directly. No one in operations noticed the difference. But the developers did. Oh they were about 5x as productive afterwards. With no missing features. Perhaps I'm not included in the target audience. But if E-Banking can do it, what remains of the "target audience" ?

Agreed. It's also possible to use frameworks such as Spring Data/Boot, Roo or Grails to get started really quickly - a bit like the django/rails crowd. Lots of interesting things happening in Java world at the moment.

It seems like originally Java drew from the mega complex enterprise application world influenced by people building large scale C++ apps etc so were hardly aware of the complexity they were adding. Now there is a lot of influence from modern web frameworks to quickly developing and expanding an app.

Touch to maintain some of those old Java apps though from 5-10 years ago in some cases.

Re: Developing and running a Java EE Hello World application

#14
And this is why the last time someone said to me they were building their startup in Java I laughed (internally)

This is ridiculous and unjustifiable. Really. Yes, I've already though otherwise (not with Java, mind you)

It's a circlejerk of "developers" patting themselves in the back for creating solutions to the problems they themselves created. Like XML (which is still better than Corba, yay!)

Re: Developing and running a Java EE Hello World application

#15

Taking a cheap jab at Java EE just because their "Hello World" introduction article is a bit lengthy is bad form. Judging by the insulting "kids" reference in your title, Java EE has a completely different mindset than you are used to and the target audience doesn't include you. That doesn't mean the millions of other developers and billions of other platforms running Java are inferior.

At a previous employer, we've migrated a complex J2EE (with EJB 2.0 and such) E-Banking system to use only Jetty and JDBC directly. No one in operations noticed the difference. But the developers did. Oh they were about 5x as productive afterwards. With no missing features. Perhaps I'm not included in the target audience. But if E-Banking can do it, what remains of the "target audience" ?

"But, but.. it's not enterprise!!!111"

How are they going to justify their consultant fees then?

Thank you very much for this comment.

Re: Developing and running a Java EE Hello World application

#17
post #2

I don't do web apps with java, so I honestly don't know if it's the proper way to do it, a satire, or if there is a more straightforward way. Especially, I don't see why one has to write both the class HelloWorldServlet and HelloWorldBean; couldn't one just inherit from one class or implement one interface?

You could just have the servlet write "Hello World" directly.

The Bean is not really useful in the example -- it's mean as a stand in, to know how to write one for your business logic needs, e.g user or product bean etc. (Btw, beans are just lightweight classes used mostly as structs, with getters and setters).

Re: Developing and running a Java EE Hello World application

#18
Except that that's not just a "Hello Word" page.

That's routing to the right page, transaction and session control, storing the text of the message in a separate class than the one that returns the response, and using a template to return the resulting HTML.

Looking at the section with the actual example code in it, you could do it in about half that, if you wanted a simple version that just returned "Hello World".

If you don't want routing, templating, separation of concerns, etc. then you wouldn't be using a framework like that, of course.

Re: Developing and running a Java EE Hello World application

#20

Taking a cheap jab at Java EE just because their "Hello World" introduction article is a bit lengthy is bad form. Judging by the insulting "kids" reference in your title, Java EE has a completely different mindset than you are used to and the target audience doesn't include you. That doesn't mean the millions of other developers and billions of other platforms running Java are inferior.

At a previous employer, we've migrated a complex J2EE (with EJB 2.0 and such) E-Banking system to use only Jetty and JDBC directly. No one in operations noticed the difference. But the developers did. Oh they were about 5x as productive afterwards. With no missing features. Perhaps I'm not included in the target audience. But if E-Banking can do it, what remains of the "target audience" ?

May be true for J2EE. Java EE plays in a different league.
Post reply on HN