Discussions

News: EasyWeb4J 0.1 Greatly Simplifies Web Development with Java

  1. EasyWeb4J is an open-source web application stack for Java. Its design is greatly inspired by Ruby on Rails. It significantly reduces time to market and development cost for Java web applications. * Provides zero-configuration routing. * Provides simple and effective template system with plain JSPs * Supports pretty URLs out-of-the-box. * Allows well-encapsulated domain models. * Handles Hibernate lazy initializations cleanly. * Leverages existing technologies to ensure low learning curve. * Does not compromise on performance. It is very simple to get started with. Try out the tutorial, you'd love it. Use the forums if you face any trouble while getting started with it. Visit: http://easyweb4j.sourceforge.net/
  2. Some good points[ Go to top ]

    The pretty URLs available "by design" and the automapping between actions and JSPs are good ideas. About the "repositories", they are DAOs, right? Why don't you rename them? Is it possible to use transaction attributes in them? About the rest, I'm sorry that it seems like any other framework I've seen out there. I see a mix of JSF (the action names in the controller), Click (naming convention between action and view, though in Click it involves the page name) and some poor replacement for HTML tags connected to the framework. However go on in your work, new ideas are always welcome.
  3. Re: Some good points[ Go to top ]

    First of all, thanks for taking the time to try it and giving your comments. I used repositories make it sound more in line with the "Repository Pattern". Transactions are handled on a per-request basis. Actually there are 2 transactions per request to handle lazy inits cleanly. Both JSF and Click are highly component based while EasyWeb4J is not. JSF needs plenty of configuration (even in 2.0) and actions have no relationship to the URL. Apache Click has a somewhat similar mapping between Page class and template file, however, its design is very different from EasyWeb4J. For example, its views cannot be just normal HTML if you have to utilize all its facilities like validations. So re-use of designers' work is a bit more difficult. It also performs validations outside the model while EasyWeb4J encourages you to move them into the model where they belong. I strongly suggest that you try building a small app in both JSF/Click and in EasyWeb4J to see how EasyWeb4J actually deviates a lot from them.
    some poor replacement for HTML tags connected to the framework.
    Which tag are you talking about? Also, you can completely ignore the EasyWeb4J tags if you don't feel like using them without missing any functionality. I also request you to track the blog as I'd be posting HOW TOs and release announcements there.
  4. Re: Some good points[ Go to top ]

    I used repositories make it sound more in line with the "Repository Pattern".
    Do you mean this? Now I got it. In fact your repository helps to write less code. Great!
    Transactions are handled on a per-request basis. Actually there are 2 transactions per request to handle lazy inits cleanly.
    Got it, one for the "action" and one for the "render" phase, but is it needed to have always the action transaction? For example when navigating from a link to another I don't see this necessity.
    For example, its views cannot be just normal HTML if you have to utilize all its facilities like validations.
    Sincerely I don't see JSP pages with EL and JSTL tags as "normal HTML pages".
    It also performs validations outside the model while EasyWeb4J encourages you to move them into the model where they belong.
    Did you take a look at JSR-303? But since you support Hibernate, and Hibernate has its own implementation (Hibernate Validator 4), I think it will be easy :-)
    I strongly suggest that you try building a small app in both JSF/Click and in EasyWeb4J to see how EasyWeb4J actually deviates a lot from them.
    Will do!
    some poor replacement for HTML tags connected to the framework.

    Which tag are you talking about? Also, you can completely ignore the EasyWeb4J tags if you don't feel like using them without missing any functionality.
    In fact I meant the EasyWeb4J tag library. My fear is that, for the purpose to create some sort of "component framework" above your product, it will end up in something poorer than something we already have (Struts 2, JSF). Antonio
  5. Re: Some good points[ Go to top ]

    but is it needed to have always the action transaction? For example when navigating from a link to another I don't see this necessity.
    If the other page represented by the link displays data from DB transactions are needed. However, in the next version I'm planning to add an annotation which can be applied to action methods, to indicate that the action has no business with database and hence needs no transaction. :)
    Sincerely I don't see JSP pages with EL and JSTL tags as "normal HTML pages".
    What I meant by normal HTML is not about the content of the developed page. After all no dynamically generated can be truly pure HTML. What I meant while comparing with Apache Click, is the extent to which HTML provided by designers can be directly reused by the developers. And this is quite good in EasyWeb4J views.
    Did you take a look at JSR-303? But since you support Hibernate, and Hibernate has its own implementation (Hibernate Validator 4), I think it will be easy :-)
    When JSR-303 is finalized probably I'll try to use it in a future version. But one important thing to note about EasyWeb4J models is that they need not be normal Java beans (getters and setters are optional). So if this JSR's implementation handles it well I'd not hesitate to throw what I currently have. ;) I decided not to go with Hibernate's validators because EasyWeb4J also supports JPA (any provider) and all models in application need not be persistent.
    My fear is that, for the purpose to create some sort of "component framework" above your product, it will end up in something poorer than something we already have (Struts 2, JSF).
    Any tag library which works fine with plain JSPs & Servlets is good to go with EasyWeb4J. JSF components would not work though.
  6. Can anyone provide features comparison to Grails?
  7. Can anyone provide features comparison to Grails?
    In some ways EasyWeb4J is similar to Grails as it derives its inspiration from Rails too. However, EasyWeb4J is definitely not as elegant, as Groovy is dynamic while Java is not. However, I'm sure EasyWeb4J will perform way better than GoG. :D
  8. EasyWeb4J vs. Struts2[ Go to top ]

    Can briefly tell how EasyWeb4J differs from Struts2? Thanks. Asgaut
  9. Re: EasyWeb4J vs. Struts2[ Go to top ]

    Can briefly tell how EasyWeb4J differs from Struts2?
    Struts 2 handles just the presentation while EasyWeb4J is an entire stack which simplifies DB driven web apps. Struts 2 involves significantly more configuration for its actions than EasyWeb4J. Struts 2 needs you to use a lot of custom tags to utilize its features. This reduce the extent to which you can re-use designers' output. Struts 2 does not come with templating support out of the box. However, you can use third-party templating engines. EasyWeb4J handles layouts with simple JSP pages without losing out on functionality. Struts 2 requires the objects used in your views to have getters and setters which break enccapsulation, while EasyWeb4J does not. AFAIK Struts 2 does not make having pretty URLs simple out of the box.
  10. public class Paradigm extends Model That's completely unacceptable... Come back when you got REAL solutions.
  11. public class Paradigm extends Model

    That's completely unacceptable... Come back when you got REAL solutions.
    Could you please tell me how else the kind of stuffs which EasyWeb4J models can do be implemented without that? Or do you suggest models must always remain dumb and all validations must be performed in the views?
  12. I'd like to see a practical example of how this feature can hurt your application adversely in the specific scenario of a domain model class inheriting from EasyWeb4J's Model.