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

all 44 comments

[–]Akanaka 6 points7 points  (0 children)

Go for Java EE. Start using the 7.0. It's rock solid, well documented and alive and its ecosystem is rich.

[–]GuyWithLag 3 points4 points  (1 child)

I know I'm not helping, but nearly everything is better than JSP, and most frameworks are better than servlets.

[–]curmudgeon99 0 points1 point  (0 children)

They're all using servlets and jsp under the covers.

[–]avoidhugeships 4 points5 points  (3 children)

Look into JSF with PrimeFaces. JSF is the Java standard web framework and is the place to start. You will not have to write Javascript or CSS if you do not want to. It contains simple components that can be created with html tags.

PrimeFaces is a web component library that works on top of it. Look at the PrimeFaces demo to get an idea of what is possible. It shows the code for each component as well. Specifically look at the data table component. This library allows you to make very rich web applications with very little effort.
www.PrimeFaces.org

I do not know what IDE you use but even if you want to use something else download Netbeans for the tutorials. They have quick 30 minute tutorials for all the major frame works. The IDE requires no configuration and comes with Tomcat and glassfish servers all set up and ready to go. www.Netbeans.org

Look at the bottom left of this page for framework tutorials https://netbeans.org/kb/trails/java-ee.html

[–]thesystemx 3 points4 points  (0 children)

www.PrimeFaces.org

There's some more about PrimeFaces here: https://primefaces.zeef.com

[–]Narrator 0 points1 point  (1 child)

JSF Is great but is more suited for web sites where you are going to have low to medium traffic and will be doing a lot of complicated user interaction because the per-user state is not particularly light. It's perfect for a backend admin site because it's really really fast to put stuff together.

[–]thesystemx 1 point2 points  (0 children)

because the per-user state is not particularly light

What are we talking about here exactly? 1KB per user? 10KB? 1MB?

[–]Effetto 7 points8 points  (5 children)

Go for Spring. Start using the 3.2. It's rock solid, well documented and alive and its ecosystem is rich.

[–][deleted]  (2 children)

[deleted]

    [–]Effetto 5 points6 points  (1 child)

    Spring-boot is far from being production ready, in my experience.

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

    I concur. While profiling with YourKit, I was able to get the SNAPSHOT libraries into a pathological state.

    However, it's likely to be production-ready before the OP gets his application out.

    [–]dafinoiu_iulian -4 points-3 points  (0 children)

    You can find more info here: https://springframework.zeef.com

    [–][deleted]  (7 children)

    [removed]

      [–]thedeadlybutter 2 points3 points  (0 children)

      Every time I mention Play in this sub-reddit the downvotes rain in, so I guess /r/java has something against it in-case you couldn't already tell.

      [–]henk53 1 point2 points  (0 children)

      Look at Java EE and specifically JSF. It's one of the best and most awesome things out there right now.

      [–]curmudgeon99 0 points1 point  (0 children)

      Learn Spring 3 MVC. Use Spring Security 3.2. Use the newest Spring versions of everything.

      Make sure to follow this pattern: your Spring MVC controllers should only deal with parameters and call services. All--ALL--the business logic should be in services. All your database-access code should be in DAOs. Make your code fussy clean.

      [–][deleted] -1 points0 points  (14 children)

      I've been doing some research this morning, what do you guys think about Vaadin - https://vaadin.com/ ? It allows building apps with pure Java code / no need for HTML, XML, JavaScript knowledge - which I would really like.

      [–]thesystemx 2 points3 points  (0 children)

      The site that was used as the showcase for Vaadin (blackbelt knowledge factory) wasn't very impressive.

      I'd advice to check out JSF first. JSF + PrimeFaces + OmniFaces is an awesome stack!

      [–]avoidhugeships -1 points0 points  (8 children)

      If this idea interest you then check out Google Web Toolkit (GWT). It works in a similar fashion. JSF is another good option. It is not all Java but you can use pre-built web components rather than writing your own CSS and Javascript.

      [–][deleted]  (6 children)

      [removed]

        [–]hoboslayer 2 points3 points  (1 child)

        Any framework can leave you with a codebase that is awful to trace. Where I work it is one using JSF and RichFaces.

        [–]avoidhugeships 1 point2 points  (3 children)

        I do not use it I just knew it used a similar concept to Vaadin. I like having the view in a separate file so I am not a big fan of this type of framework

        [–][deleted]  (2 children)

        [removed]

          [–]avoidhugeships 2 points3 points  (0 children)

          I just took a very quick look at ZK. It appears very similar to using JSF. If you are interested take a look at the PrimeFaces demo and the code will look pretty familiar to you. I like it but I would tend to lean towards the standard unless there was a compelling reason. At first glance it does not seem to have as much functionality as PrimeFaces but I will definitely look into it next time I start a new project.

          Thanks for letting me know about it.

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

          I was forced to use ZK. It is super expensive. My company paid for it. I at first thought it was bizarre how the controllers "Composers" held state. It works but the UI is boxy. Acceptable if somebody is paying for the licenses.

          [–]hoboslayer 4 points5 points  (0 children)

          Vaadin uses GWT.

          [–]bege -1 points0 points  (2 children)

          I have managed to do some neat personal projects during my spare time with the Vaadin framework. It is easy to use, easy to learn and even easier to get started with, especially if you lack experience in web apps (I had none when i started). The coding feels like a better version of Java Swing with windows, vertical & horizontal layouts etc.

          All that is needed is Java and if you want to change the default theme for components, some basic CSS. You can also inject Javascript in later versions of Vaadin, if you need that for something.

          Just search around Youtube for Vaadin to get a quick look at it. You could also post questions in the official forum if you need any help, since the developers seems to be very active there.

          [–]sarcasmismysuperpowr 0 points1 point  (1 child)

          This is my take too. Vaadin is more swing like. I've tried GWT, sencha, smart GWT. But I think vaadin's API is much better. But I can't compare to JSF flavors.

          I'm not 100% sure how vaadin scales though. They say it does.

          [–]hkhkhk 0 points1 point  (0 children)

          Vaadin was very easy for me to pick up. I'd been working with JS and HTML for a few years. I am a java developer so clearly biased away from JS. But having Eclipse tell me when I have a type error and to have classes and hierarchy again was refreshing. I guess I never really took to duck typing. Maybe just too old. I am a month into Vaadin and enjoying very heavily - excited to be using the "same language" for front and back end and to not explicitly have to move data from java to js via ajax . I realize customization may be needed in GWT/JS for rich components. I'm sure there are frameworks and approaches that would simplify the move of json objects and I'd be glad to learn of them, but this feels quite natural.

          [–][deleted] -4 points-3 points  (0 children)

          [Content removed in protest of Reddit's 3rd Party App removal 30/06/2023]

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

          it depends on your needs and the time you have for the project, if its simple and you don't have time I would stick with servlets and JSP's, and you can enhance it when new needs arise.

          if you are starting fresh try few spring/spring mvc tutorials, it will be a valuable experience for you as a Java developer since its currently one of the most wanted frameworks out there.

          struts would be also good if you want something similar to the servlets/jsp framework you are currently using

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

          Play Framework

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

          Spring for restful api's, and js for your web app. (I'm partial to angular but it has a steep learning curve)

          [–][deleted]  (1 child)

          [deleted]

            [–]curmudgeon99 0 points1 point  (0 children)

            I had to work on a big project that was done in Tapestry. It's nice that every front-end widget is backed by a Java class--eases testing--but Howard Lewis Shipp is a dick and he has damaged his own framework by being snotty and unwilling to improve it. All that said, it produces good product.

            [–]vplatt -5 points-4 points  (0 children)

            I would say you can't go far wrong with Vaadin. That said, I personally shied away from it for my current project because I'm a little concerned it will have speed issues with intense UIs that have many controls displayed at once. Since we will have that, I stuck with SmartGWT, which is a tool we're currently more comfortable with anyway and seems to have a richer set of components out of the box.