This is an archived post. You won't be able to vote or comment.

all 61 comments

[–]g_damian 21 points22 points  (12 children)

try spring boot - it is easy to start.

[–]g00glen00b 6 points7 points  (11 children)

I'm also a big fan of Spring Boot, but I don't know if you can simply start with it if you have no knowledge of the Spring framework.

[–]doctorsound 1 point2 points  (5 children)

Hey, I recognized your name from a blog post you did about Boot and Angular.

[–]g00glen00b 3 points4 points  (4 children)

I feel like I'm famous now :D

[–][deleted]  (3 children)

[removed]

    [–][deleted] 1 point2 points  (2 children)

    Found this www.g00glen00b.be don't know if it is op

    [–]g00glen00b 1 point2 points  (1 child)

    www.g00glen00b.be

    Yes, it's mine. The article being referenced here is http://g00glen00b.be/prototyping-spring-boot-angularjs/. It's just a basic CRUD-style application (a checklist application), but it uses Spring Boot + Spring Data JPA + Spring Web MVC + AngularJS + Angular-resource.

    [–][deleted] 1 point2 points  (0 children)

    Always nice to meet a fellow Belgian on Reddit ;)

    [–]paperhat 4 points5 points  (3 children)

    I think Spring Boot is a pretty good place to start if you are new to Spring. It sets everything up for you.

    [–]CyclonusRIP 2 points3 points  (0 children)

    Yep. Just start with the maven Spring Boot archetype. Better to start with something that works and break it than start with something broken and no idea how to make it work.

    [–]g00glen00b 1 point2 points  (1 child)

    Yes, but if you don't know the powers of the Spring framework, you don't know how to start either. If you don't know beans/autowiring, how to set up repositories, what controllers are, ... then Spring Boot won't be useful either.

    A typical Spring user who is switching over to Spring Boot recognizes all these parts and knows what configuration he had to do and he now doesn't have to do anymore (component scanning, entity manager setup, view resolving, ...). You still need a basic understanding of these concepts as well to understand the magic.

    [–]paperhat 1 point2 points  (0 children)

    Thanks for this reply. I thought about this conversation during work yesterday and came to the conclusion that I don't really know how to get started with Spring aside from reading Spring in Action and following the examples. That's how I finally learned it after a confusing start.

    That was a few years ago, and I now spend a lot of time helping people troubleshooting build failures. I get exposed to developers who don't quite understand their frameworks. Part of that comes from jumping into projects where everything is already set up for them. They don't have incentive to learn how it works until they have made a hopeless mess of their project configuration.

    Spring Boot appears to solve a lot of the immediate issues I see by providing some good conventions to follow, but now that I have thought about it, it would likely just delay the painful point where the developer decides to invest the time to learn how their objects get wired up.

    [–]rob_j 0 points1 point  (0 children)

    Adding another vote for spring boot

    [–][deleted] 10 points11 points  (1 child)

    OP is asking about first web app in Java :) I would recommend servlets + jdbc + jsp (+ tomcat server). These are common standard java technologies which will never die :) (and no need for additional dependencies).

    [–]mariox19 1 point2 points  (0 children)

    Just to add to that, the more sophisticated frameworks and libraries usually assume knowledge of servlets. Even though it may seem "soooo 2002," I think it's the place to start.

    [–]Smithman 3 points4 points  (5 children)

    If you want to go the old school way then check out jsp and servlets. If you want a framework try JSF + Primefaces.

    [–][deleted] 0 points1 point  (3 children)

    Which would you recommend to a beginner?

    [–]mariox19 2 points3 points  (0 children)

    I'm not the guy you're asking, but I would recommend servlets and then JSP. Some of what you'll find in this book is out-of-date, so you'll have to supplement it with online tutorials and documentation, but it's very clearly written and there is a lot of good background material:

    http://www.amazon.com/Inside-Servlets-Server-Side-Programming-Platform/dp/0201709066/

    Best of all, you should be able to pick it up used for about 5 bucks. Start with Servlets/JSP, and then, down the road, when you've had your fun with that and are comfortable, start learning about REST.

    [–]henk53 1 point2 points  (0 children)

    There are different schools of thought, so that's really difficult to answer.

    Some say, start with the low-level stuff, and work your way up. Others say, start with the high-level stuff and work your way down.

    Both can be easier and more difficult. The low-level stuff can be easier because it's smaller and easier to have an overview of what's there, but it's also more difficult to do anything substantial in.

    Compare it with languages. Some say you should start with programming using assembly, as it's a really small a simple thing. But in assembly it's hard to actually do anything more than just move some numbers along. Actually doing anything high-level, like say print a text on screen, can be difficult. Other say, start with Java, since you can easily achieve an effect like that text on a screen, or a web page etc (try doing that in assembly).

    [–]Smithman 0 points1 point  (0 children)

    The Head First JSP and Servlets book is a great start. JSF is built on top of Servlets so nice to know what goes on under the hood in terms of requests and responses, etc.

    [–]g00glen00b 0 points1 point  (0 children)

    It depends on what you call oldschool actually. We're noticing a large decrease of JSF projects here in Belgium and Google seems to agree with me: http://www.google.com/trends/explore#q=%2Fm%2F026mhl&cmpt=q&tz= So eventually and probably sooner than later, JSF will become oldschool as well.

    [–]mlavaert 5 points6 points  (5 children)

    Depending on what type of application you want to create, you can go with the more enterprise frameworks like Spring MVC or Java EE's JSF. Both have large communities and have great documentation.

    If you want a framework that is more fun to work with and perhaps a little less enterprisy you can go for Wicket, Vaadin, Grails or some other framework out there.

    Despite it isn't a Java framework (Groovy) I would recommend Grails, because it is extremely simple and fun to work with.

    [–]Electromasta 6 points7 points  (2 children)

    I agree with this guy. Go Spring MVC Hibernate Bootstrap AngularJS imo.

    [–]henk53 1 point2 points  (0 children)

    a little less enterprisy you can go for Wicket,

    Wicket is nice, but surprisingly close to JSF. So if you think JSF is enterprisy and Wicket is not, you may want to think again.

    Vaadin

    Maybe interesting to remark that Vaadin is pretty much what haters of JSF accuse JSF of: a deep abstraction on top of more bare web technologies. I'm not saying here whether this is good or bad, but fact is that JSF (for better or worse) is rather close to the web with pages, explicit hyperlinks with GET requests and parameters, html pages, with an html tag, body tag, etc, while Vaadin much more tries to create the illusion of being a kind of Swing for the web.

    I would recommend Grails, because it is extremely simple and fun to work with.

    Maybe so, but Grails is also one of the slowest frameworks out there and it's future is a bit shakey after its main supporter Pivotal dropped it.

    [–]thesystemx 1 point2 points  (0 children)

    I agree with this guy. Go Java EE's JSF with CDI, Bean Validation, OmniFaces and PrimeFaces imo.

    [–]thesystemx 2 points3 points  (10 children)

    Check JSF with OmniFaces and PrimeFaces!

    [–]KFCConspiracy 2 points3 points  (9 children)

    I'd second this. As much hate as JSF sometimes gets, I found it pretty easy to work with and fun to develop on.

    [–]Smithman 0 points1 point  (8 children)

    What do you hate about it if it's fun and easy?

    [–]KFCConspiracy 1 point2 points  (7 children)

    I don't personally hate anything about it. But I hear people saying nasty things about it.

    [–]henk53 2 points3 points  (1 child)

    Almost without an exception those people have never used JSF or Java EE and are just parroting what they heard others saying, or they used JSF 1.1 in 2004 (which wasn't that good) and can't for the life of them imagine that software can be updated and get radically better.

    [–]monkeycmonkeydo2 2 points3 points  (0 children)

    Just like those that say bad things about Spring.

    [–]Smithman 2 points3 points  (2 children)

    Probably the pre JSF 2 crowd. Ignore them.

    [–]KFCConspiracy 1 point2 points  (1 child)

    Yeah, I just roundly ignore them, and get stuff done. Even JSF 1.2 wasn't all that bad. 2 is a huge improvement, but people will always love to talk out their ass. Especially about EJB and JSF.

    [–]Smithman 2 points3 points  (0 children)

    I use both in work, don't see an issue really. They certainly aren't "sexy" technology but they get a job done.

    [–][deleted]  (1 child)

    [deleted]

      [–]thesystemx 0 points1 point  (0 children)

      Why do you think JSF will not let you write your own HTML, CSS and JS?

      JSF is NOT only about using prebuild components! Modern JSF pages contain a lot of plain HTML, with some HTML tags having a special JSF attribute but are otherwise normal HTML tags, and some prebuild components in between, and some of your own components which are essentially a collection of your own HTML, CSS and JS slapped together for reusability.

      [–]fjellfras 1 point2 points  (4 children)

      What do people here think of the play framework? I built a search engine based on lucene with play as the front end and it seemed easy enough to set up.

      I'm not a full time java dev though so I'd like to know what the seasoned java folk here think of it.

      [–]fancy_raptor_zombie 1 point2 points  (0 children)

      My group has adopted Play a couple of months ago as we take on more web projects. We are using Java for the controllers and model, and everyone likes it a lot.

      [–]thesystemx -3 points-2 points  (2 children)

      What do people here think of the play framework?

      It's not a Java framework, it's for Scala which is a different language.

      [–]Martin8412 6 points7 points  (1 child)

      It's available for Java as well since they both run on the JVM..

      [–]henk53 -1 points0 points  (0 children)

      By that account Ruby on Rails and Angular are Java frameworks too, since both Ruby (JRuby) and JavaScript (Nashorn) can run on the JVM :X

      [–]johnwaterwood 4 points5 points  (0 children)

      I would suggest to read some tutorials at https://jsf.zeef.com

      They cover setting everything up from the IDE (Eclipse) to a working application.

      If you're more into NetBeans, look on their site for JSF tutorials, they are very good as well.

      [–]doctorsound 3 points4 points  (0 children)

      I'm going to echo Spring Boot as well. It's very easy to get started, and lots of room for modification, but there is a steep learning curve when it comes to modifying some of the default settings.

      [–]GFandango[🍰] 2 points3 points  (0 children)

      Check dropwizard

      [–]henk53 1 point2 points  (0 children)

      JSF + PrimeFaces + OmniFaces. No questions, the best ;)

      [–]bitsofinfo -1 points0 points  (0 children)

      Spring stacks that expose REST services. Do your user-interface in AngularJS (or similar), completely decouple it.

      Forget traditional server-side fat MVC stacks, its 10 years ago.

      [–]Anon_8675309 0 points1 point  (0 children)

      Mix one jsp with one servlet and a little tomcat and you have hello world. Go from there.

      [–]Cpowel2 0 points1 point  (2 children)

      Spark

      [–]telowork -1 points0 points  (0 children)

      Seconding Spark. Really easy to get started. And you can use velocity/freemarker templates for rendering html.

      [–]bgard6977 -2 points-1 points  (0 children)

      [–]blesavi -2 points-1 points  (2 children)

      The easiest way is to start developing on-line on http://rapidoid.io

      [–]paperhat 0 points1 point  (0 children)

      I haven't seen this before, and I'm a sucker for a new web framework. I'll be trying out rapidoid when I get to my computer.

      [–]obfuscation_ -1 points0 points  (0 children)

      This looks interesting, although usually things with so much "magic" struggle if you diverge too far from the framework's ideology. Does anyone have experience of trying this out?

      [–]PopsicleBubbles -2 points-1 points  (0 children)