BT

InfoQ Homepage News WEB4J: Contrarian Web App Development for Java

WEB4J: Contrarian Web App Development for Java

Bookmarks

WEB4J is a minimalist, opinionated, full-stack web framework for Java. It's "Java productivity without the pain.... because of [WEB4J's] deep simplicity, it allows markedly faster development of applications," writes John O'Hanley, the author of the framework.

According to the web site, WEB4J:

  • Embraces convention over configuration (similar to Rails)
  • Treats the data, not the code, as king
  • Doesn't force developers to learn new ways of doing the same thing
  • Doesn't rely on JavaScript, custom XML or annotations, or object-relational mapping
  • Doesn't impose thread-safety constraints on your classes
  • Enables implementation of forms in plain HTML

One of WEB4J's most intriguing features is that it allows placement of SQL in plain text files external to the code. The SQL is then referenced in the code using special objects. This makes DAO (Data Access Object) classes very compact.

WEB4J is small, only 88 classes in size compared to the 346 classes in Rails, 720 in Struts, and 2400+ in Spring. John claims that it takes a much shorter time to learn WEB4J than other frameworks.

The web site is very up front about the weaknesses of WEB4J, which include:

  • No library of user interface widgets
  • No built-in support for AJAX, Web Services, or Dependency Injection
  • Supports JSP/JSTL, but no alternative markup libraries like Velocity
  • Backwards compatibility with previous versions of the framework is problematic

A humorous YouTube video promoting the framework surfaced last year. The video portrays two programmers in an enterprise setting who discover the framework and use it to escape from the pain of their traditional J2EE projects.

WEB4J is open source, released under the BSD license, and includes a sample project in the distrubution

 

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

  • Your message is awaiting moderation. Thank you for participating in the discussion.

    With JSPs? With SQL files? Static calls to an object called DB? Actions like in webwork (i.e. usage of subclasses)?
    InfoQ is famous for posting high quality stuff, what's this?
    I would recommend something like Waffle in Java, and hey Java is anyway dead, try Lift not this legacy thing

  • Re: What?

    by Ramon Lima /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    I think it's good to have access to a simple plain java framework, not everyone wants to be in Scala :). I think I prefer to have access to MDA and reference plain java.

  • Re: What?

    by Antonio Terreno /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Sure, Scala isn't for every one, however, have a look to waffle if you want to have something simple and cool, it's Java.

    waffle.codehaus.org/

  • No Hibernate\JPA integration = FAIL

    by Rubem Azenha /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Hibernate\JPA is state-of-art of OO persistence.
    Trying to create a different way to do persistence in Java is probably a waste of time.
    I've no problem with brilliance and innovation, but I thought that the "hey, I've build another (redundant) Java Framework" wave (which I've participated) had ended for good.
    This thing really sucks.

  • Hibernate = FAIL

    by Dan Howard /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Hibernate is a big lump of slow garbage. State-of-art LOL.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.