4 ms·
What frameworks and platforms would you recommend for web development with java? I am writing my senior project at college in java (mainly because of the wide a
by yolesaber 14y ago
What frameworks and platforms would you recommend for web development with java? I am writing my senior project at college in java (mainly because of the wide amount of image processing libraries available) and would love to add web capabilities.
- AlexSerov 14y agohttp://www.hybridserverpages.com/ http://www.hybridserverpages.com/ Just two days learning curve.
- cletus 14y agoI tend to prefer Python/Flask for Web dev to Python but if you are inclined to use Java there's only really one framework that doesn't make me want to tear my eyeballs out. That framework is Spring MVC. It is DI, adapters for vendor-specific libraries and utility. It's probably not the easiest thing to start with just because it is so flexible that it can be hard to know where to start. A good "Hello World" Spring MVC 3.1 app would go a long way. I really would like to use the Play Framework and it's so close to being great but it just falls too far short. I really liked Play 1.x with Groovy templates. It was simple and it pretty much just worked. Play 2.x has gone in a radically different (and backwards incompatible) direction. It is now part of Typesafe and the goal of Play 2.x is to make Scala a first-class citizen. The problem is that many of the niceties of Play are either harder to use or just outright missing in Java Play 2.x (eg AppEngine support and the OAuth client were all present in 1.x and are slated for a future 2.1 release). There really is a niche for a Java Web framework that like Play ditches the JEE/servlet model in favour of the Rails/Django way of doing things (including dynamic class reloading) but doesn't do it in a way that makes me want to stab myself repeatedly. This would include playing nice with the Java ecosystem (seriously just use Maven and to hell with SBT).
- mgkimsal 14y agoGrails (grails.org) is Spring under the hood, good MVC layer on top, and gives you Java or Groovy wherever you want to use it. For people coming from a dynamic language background (php, python, ruby, etc) I've found that Grails is a good middle ground option.
- mindcrime 14y agoThat framework is Spring MVC. Agreed that Spring MVC rocks, but Grails[1] is also awesome, and Wicket[2] is pretty cool. [1]: http://grails.org/ http://grails.org/ [2]: http://wicket.apache.org http://wicket.apache.org
- swah 14y agoCan't you stick with 1.2.x?
- brown9-2 14y agoIt's probably not the easiest thing to start with just because it is so flexible that it can be hard to know where to start. A good "Hello World" Spring MVC 3.1 app would go a long way. Try http://blog.springsource.com/2011/01/04/green-beans-getting-started-with-spring-mvc/ http://blog.springsource.com/2011/01/04/green-beans-getting-...
- Bamafan 14y ago"It is DI, adapters for vendor-specific libraries and utility. It's probably not the easiest thing to start with just because it is so flexible that it can be hard to know where to start. A good "Hello World" Spring MVC 3.1 app would go a long way." Spring is OK in the service and DAO layers. I prefer Stripes on the web layer. Stripes IMO has a far more sensible approach to laying out the web layer (e.g. combining controller and backing object, fewer configurations, more sensible tag system, etc.). http://stripesframework.org/display/stripes/Home http://stripesframework.org/display/stripes/Home
- deleted 14y ago[deleted]
- lmm 14y agoWicket, a thousand times wicket. It's so good it makes programming in java worthwhile. Its templating, if you can even call it that, is a quantum leap ahead of everything else: it's actually object oriented, you can write self-contained reusable components in the way you expect, and you get the full benefits of strong typing at every point. I really wish there was something like it for python, but everyone seems to think templates are good enough.
- elktea 14y agoWhat about something like Flask-HTMLBuilder? http://majorz.github.com/flask-htmlbuilder/ http://majorz.github.com/flask-htmlbuilder/
- lmm 14y agoThat's not the worst idea in the world, but it looks like it expects your python code to walk the whole html tree, and it's very much mingling of logic and markup. The great thing about wicket (well, one of many) is that your markup is inert html files, and you can put reams of static content in if you want, without cluttering up the actual code. Your component hierarchy has to match your html hierarchy, but not every tag needs a component; you just need to make sure A is a descendant of B in markup (with no other components in between) whenever A is a child of B in code.
- jiggy2011 14y agoPlay! Framework. I've been using it for over a year and I have to say it's the most "rails like" framework out there for Java. However they have just released play! 2.0 (which I have not used yet). This makes some major changes to the framework and it's not all backward compatible. I does have a heavy emphasis on Scala now, but you can still code everything using Standard Java if you want, although it does somewhat butcher Java "best practices". it's default ORM is JPA/Hibernate which works well enough as it gives you a ton of helper functions, it even automatically creates getter/setter method at runtime allowing you to do C# Style properties simply by declaring entity members as public.
- swah 14y agoI'm writing an AJAX webapp using Dropwizard, and seems that I won't be hitting any roadblocks anymore. The devs are very helpful on the google groups as well.