Live data from Hacker News

What's new in Servlet 3.1? - Java EE 7 moving forward

blogs.oracle.com

11–20 of 29 posts

Re: What's new in Servlet 3.1? - Java EE 7 moving forward

#11
post #9

Earlier quoted context omitted.

I like Play framework as an statically typed alternative, doesn't have most of the things we like less about Java, feels like RoR / Django, but is still statically typed (and supports Scala which I think is much more fun than Java once you get passed the "Scala is complicated" myth)

Scala may be "more fun", but, personally, I still have reservations about it being used in-the-large and I think calling the observation that Scala is, yes, complicated a "myth" is unnecessarily dismissive. You may not find it as such, but the language's kitchen-sink approach to features does have its drawbacks; I find that part of it manageable but that doesn't mean it's not complicated, it means I can deal with it.…

I don't think its dismissive, The truth is Scala is _not_ complicated. People can do complicated things with it, but in general the language poses no real barrier to entry. Now the second point you bring up is more of an issue that I run into at times as well. Where I find a solution to a problem that presents itsself as the "Scala" way of doing something, and After i close my browser and go home for the day I forget about why I did that and show up the next day staring at magical Glyphs on the page that appear to work ( ohh i needed :>> not >:> ). To solve that problem you need to stop doing things you don't understand and instead take the long way around and write out function names instead of using the shorthand operators that your provided with. Once you get used to a library you will commit the operators to memory and you will know that :: is cons and ::: is list append and you won't have the "what did I do here" problem nearly as much

Re: What's new in Servlet 3.1? - Java EE 7 moving forward

#12
post #5

I tend to think everyone is writing web Python or Ruby servers backed with some NoSQL database, that expose a RESTful interface to a fancy HTML5 client that leverages some cool JS framework. At my workplace, we have this debate going on about what to do with our GUIs (that are used only internally). The alternatives are 1) keep them in Java Swing, 2) progressively rewrite components in Java FX 2, 3) go web. These are…

I'd recommend taking a look at GWT - it is pretty much for your exact situation and works very well for that. You will still need to convert from Swing to HTML elements, but if you have done any sort of separation between UI logic and Swing itself, this is usually not too bad.

This way you can swap over your existing java apps to one of those fancy HTML5 clients you're talking about. ;)

Re: What's new in Servlet 3.1? - Java EE 7 moving forward

#13
post #11
post #9

Earlier quoted context omitted.

Scala may be "more fun", but, personally, I still have reservations about it being used in-the-large and I think calling the observation that Scala is, yes, complicated a "myth" is unnecessarily dismissive. You may not find it as such, but the language's kitchen-sink approach to features does have its drawbacks; I find that part of it manageable but that doesn't mean it's not complicated, it means I can deal with it.…

I don't think its dismissive, The truth is Scala is _not_ complicated. People can do complicated things with it, but in general the language poses no real barrier to entry. Now the second point you bring up is more of an issue that I run into at times as well. Where I find a solution to a problem that presents itsself as the "Scala" way of doing something, and After i close my browser and go home for the day I forget…

That's good for small teams/individual developers, but it really does become a nightmare in 5 years time. How do we know this? Go ask anybody who has had to maintain any kind of Perl code.

Scala is still very nice, but you need to exercise very heavy restraint so you don't end up with write-only code. (Java, and every other language, does admittedly have the same problem: I've seen Java code made up of so many levels of interfaces that tracking down what it does is almost impossible. Obfuscated C/C++ is a true terror. Ruby can get very nasty if you go 'off the rails'. etc etc.)

Re: What's new in Servlet 3.1? - Java EE 7 moving forward

#14
post #9

Earlier quoted context omitted.

I like Play framework as an statically typed alternative, doesn't have most of the things we like less about Java, feels like RoR / Django, but is still statically typed (and supports Scala which I think is much more fun than Java once you get passed the "Scala is complicated" myth)

Scala may be "more fun", but, personally, I still have reservations about it being used in-the-large and I think calling the observation that Scala is, yes, complicated a "myth" is unnecessarily dismissive. You may not find it as such, but the language's kitchen-sink approach to features does have its drawbacks; I find that part of it manageable but that doesn't mean it's not complicated, it means I can deal with it.…

"You may not find it as such, but the language's kitchen-sink approach to features does have its drawbacks; I find that part of it manageable but that doesn't mean it's not complicated, it means I can deal with it."

I don't find the language to be a kitchen-sink at all. It is a fusion of OO and FP, and so would reasonably be expected to support features from each of those paradigms. And it does so quite nicely. It is very well designed for this purpose. However it does provide facilities that allows the libraries to become arguably complicated, especially if you are not used to them. But being unfamiliar with a library's API is not really the same thing as the language being unreadable or obfuscated.

Re: What's new in Servlet 3.1? - Java EE 7 moving forward

#15
post #12
post #5

I tend to think everyone is writing web Python or Ruby servers backed with some NoSQL database, that expose a RESTful interface to a fancy HTML5 client that leverages some cool JS framework. At my workplace, we have this debate going on about what to do with our GUIs (that are used only internally). The alternatives are 1) keep them in Java Swing, 2) progressively rewrite components in Java FX 2, 3) go web. These are…

I'd recommend taking a look at GWT - it is pretty much for your exact situation and works very well for that. You will still need to convert from Swing to HTML elements, but if you have done any sort of separation between UI logic and Swing itself, this is usually not too bad. This way you can swap over your existing java apps to one of those fancy HTML5 clients you're talking about. ;)

I would advise against GWT, after two separate projects - it starts off simple, but then as the project grows the more you regret basing everything around GWT in the first place. This guy will definitely not save time doing it the way you suggested.

Re: What's new in Servlet 3.1? - Java EE 7 moving forward

#16
post #5

I tend to think everyone is writing web Python or Ruby servers backed with some NoSQL database, that expose a RESTful interface to a fancy HTML5 client that leverages some cool JS framework. At my workplace, we have this debate going on about what to do with our GUIs (that are used only internally). The alternatives are 1) keep them in Java Swing, 2) progressively rewrite components in Java FX 2, 3) go web. These are…

[deleted]

Re: What's new in Servlet 3.1? - Java EE 7 moving forward

#17
post #2

I worked on a bigger JavaEE project with serverlets and all the other things... after doeing things like: "someurl".toURI.toURL; to get a valid url and some other stuff that i really dont wanne start with... I just refuse do code something for the web with Java and Servlets and RMI or Beans or Java Technologie X... now i code in Javascript and ruby and iam so much happier as a developer :)

I'm afraid to say this, but you sound exactly like someone with very little experience when it comes to large scale enterprise systems (your "serverlets" sums it up).

Java EE is extremely powerful if you can wield its power, and obviously a good understanding of object oriented programming and design patterns is critical in order to make systems that are rock stable, safe (container managed transactions comes to mind) and scalability.

I think you'll see my point once you start working on larger problems. It's not random that many really big enterprise projects (such as banking software) are based around Java EE, and not Ruby on Rails.

Note that I am not trying to be overly negative - it's just that I see this kind of argument all the time, usually from people with no real enterprise experience.

Re: What's new in Servlet 3.1? - Java EE 7 moving forward

#18
post #8
post #5

I tend to think everyone is writing web Python or Ruby servers backed with some NoSQL database, that expose a RESTful interface to a fancy HTML5 client that leverages some cool JS framework. At my workplace, we have this debate going on about what to do with our GUIs (that are used only internally). The alternatives are 1) keep them in Java Swing, 2) progressively rewrite components in Java FX 2, 3) go web. These are…

The question should be "why do you want to go away from java swing ?" What are the problems/limitations you encounter ? If there's no serious reasons to change, why change ? (well, there's the fun to rewrite all, the fun to learn technologies, but from a business standpoint, that's not reasonable)

One argument for going web is recruitment: the pool of active developers that know Java, Swing and Spring is shrinking.

Also, the size of the developer community in the Java/Swing world versus that in web technologies is not even comparable when it comes to sharing knowledge and open-source components. (I work for a lab, so many open-source licenses are compatible for us.)

And, sure... it would be so much fun!

Re: What's new in Servlet 3.1? - Java EE 7 moving forward

#19
post #15
post #12

Earlier quoted context omitted.

I'd recommend taking a look at GWT - it is pretty much for your exact situation and works very well for that. You will still need to convert from Swing to HTML elements, but if you have done any sort of separation between UI logic and Swing itself, this is usually not too bad. This way you can swap over your existing java apps to one of those fancy HTML5 clients you're talking about. ;)

I would advise against GWT, after two separate projects - it starts off simple, but then as the project grows the more you regret basing everything around GWT in the first place. This guy will definitely not save time doing it the way you suggested.

You make that statement as if there is no way you could be wrong - yet there are multiple very large GWT deployments running very happily in production. I've done the exact thing - moving a finance system to a GWT frontend (it also retained a desktop frontend), and the system was reasonably easy to convert. You hook up some html in UiBinder, get some RPC working for the data, login form, refactor the widgets to use the uibinder html, use activities/places to handle navigation and backstack, and off you go.

So "definitely not save time" seems a bit harsh? Maybe worded "if you have anything like my experience, you will definitely not save time"?

EDIT: What part of GWT caused you issues btw? Maybe my uses never hit on the trouble parts.

Re: What's new in Servlet 3.1? - Java EE 7 moving forward

#20
post #13
post #11

Earlier quoted context omitted.

I don't think its dismissive, The truth is Scala is _not_ complicated. People can do complicated things with it, but in general the language poses no real barrier to entry. Now the second point you bring up is more of an issue that I run into at times as well. Where I find a solution to a problem that presents itsself as the "Scala" way of doing something, and After i close my browser and go home for the day I forget…

That's good for small teams/individual developers, but it really does become a nightmare in 5 years time. How do we know this? Go ask anybody who has had to maintain any kind of Perl code. Scala is still very nice, but you need to exercise very heavy restraint so you don't end up with write-only code. (Java, and every other language, does admittedly have the same problem: I've seen Java code made up of so many levels…

Right its a problem that exists in every language, there is nothing novel about scala that lends it to being any more cryptic then c++, other then there is a different set of rules as to what can be used where. Operator overloading in C++ is just as bad as scala, but most c++ programmers are used to it since they have seen it for a while. The first time I saw :/ I was really confused as to what it was since that's not an idiomatic C operator, but after seeing it in a few places you get used to the fact that its an operator and you read through it, just like I would if I saw a << in C++
Post reply on HN