News: Java Web Development with Stripes

  1. Java Web Development with Stripes (15 messages)

    OnJava has posted Mark Eagle's "Java Web Development with Stripes," which predictably describes the ideas behind the open-source action-based framework Stripes, showing a Hello, World application and leveraging Ajax in it. (Well, for some values of "leveraging," that is. But the concepts should carry across to more useful applications as well.)
    Stripes is an open source, action-based Java web framework designed around the principles that web development should be simple and productive for developers. Traditional Java web development focused on versatility through decoupling, which resulted in multiple configuration files, additional objects, and other fragmented resources. These difficulties subjected many developers to a higher learning curve and reduced productivity. As a result, some Java developers have been lured away by non-Java frameworks such as Ruby on Rails or Django. Java web frameworks, like Stripes, are beginning to learn from the successes of alternative frameworks that streamline development. This article will show how Stripes distinguishes itself from other action based Java web frameworks, such as Struts, while supplying some of the simplicity available in Ruby on Rails.
    The key to the example is that the controller class actually has a default URL mapping, and validations are put into the controller's source via annotations. It also returns the actual name of the JSP page used to render the result, meaning that there's no mapping between result types and rendered pages. AJAX is provided for through the Prototype Javascript library, and Stripes' integration mostly consists of using the proper renderer.

    Threaded Messages (15)

  2. Stripes seems very interesting. i am gonna download it.. as far OnJava article. it seems good for small and medium web application. is there anyone? who already have tested "Stripes"
  3. Well written primer. Rightly focuses on the fundamentals and doesn't digress. @Hasan - I have played with stripes for a while now, and i am very impressed with the way they have thought out its various features. Yes, small to medium sized web applications may benefit well, but i don't see anything wrong in using it with large web apps as well. After all, it is for the web layer, and typically most of the heavy lifting is done in service and data layers.
  4. We've been using it for over a year on a fairly large (around 200 actions with multiple event handlers) web 2.0 style web application. We also evaluated WebWork, Spring MVC and SEAM and went for Stripes. It has good support for Spring, which we use as application framework. For Ajax functionality we've been using Stripes with both Taconite, Dojo and Prototype and it has played well with all of them. After one year of coding we still only have a configuration file (part of web.xml) which is around 20 lines. What I really like about Stripes is that handles much of what I need right out of the box in a very intuitive way. The parts that it doesn't provide out of the box is really easy to implement yourself using Before/After methods (local interceptors) or interceptors (global). I like its pure nature, it doesn't try to be everything. It's just a really really good MVC framework. If you need more functionality out of the box try looking at Stripernate which offers good integration with Hibernate (haven't used it myself so I can't comment on how good it is). /Jeppe
  5. Stripes seems very interesting. i am gonna download it.. as far OnJava article. it seems good for small and medium web application. is there anyone? who already have tested "Stripes"
    I've been using it for about a year across multiple apps. My experience has been very favorable so far, especially for anyone coming from a struts background it is extremely clean and easy to work with. I'd definitely recommend that anybody looking for an MVC framework take a look. It really comes into it's own when integrated with hibernate with annotations since (unlike realistic apps with Struts), you can use the actual persistent POJOs all the way from the UI to the database, letting stripes handle the validation entirely. I've only missed struts a very few times, the main drawback being the lack of an abstraction layer between the URL mapping of actions and the Java code itself. Since the default pattern is for Stripes actions to specify the view to be rendered (eg. JSP file, etc) directly in the Java code you can find that your actions are less "reusable" because what used to be nearly trivial in Struts - taking an existing action and sandwiching it in the middle of some others that forward through it to get some desired outcome - is not provided for you in Stripes. While that abstraction layer was one of the things that made Struts so complex and frustrating, I think a tiny little bit of baby got tossed out with the bath water in this aspect - it would be great to see some evolution to restore it. But overall it's a clear winner, and there's no way in hell I'd ever go back to Struts.
  6. Grails over Stripes[ Go to top ]

    Stripes is good framework. But i liked GRAILS more. We were able to develop web-application(small sized) at much quicker pace. It is more closer to Ruby on Rails framework. Provide Scaffolding and auto generating much of the code. Its built over Groovy and Hibernate. It uses convention over configuration to the maximum. It has got very easy to use and intuitive tags for Ajax implementation. Link to Grails http://grails.codehaus.org/ Thanks Vikramark http://portlets-jsr168.blogspot.com/2007/01/sidewalk-grails-framework-javas-answer.html
  7. Re: Grails over Stripes[ Go to top ]

    Sure, GRails is also pretty interesting, but it goes beyond the scope of Stripes, so you can't really compare both... Stripes is only a MVC framework, not a full-stack one. From my point of view, it leverages the servlet/jsp apis, it doesn't try to address all problems at once :-) I've been using Stripes to write web front ends in various circumstances, not only "persistent pojos" or CRUD, ya know... and it always revealed very productive. The features out of the box are sufficient for a majority of use cases, with the most efficient, flexible and simple FORM handling out there IMHO. Also, it's really simple, you get everything very fast, things are how you'd expect them to be... it just makes sense ! Besides that, as Jeppe commented, you have many hooks in Stripes that allows to extend the default behavior as you want to, and it always smells and feels simple and well thought. For example, a user recently published a Stripes extension that allows to write your actions... in Groovy :-) Also, if you're into Hibernate, check out Stripernate ! It basically enables automatic hydratation of persistent POJOs, session handling, validation etc. You write your annotated POJOs and it does all the dirty work for you... Really, Stripes is a breathe of fresh air for people like me who hated web developement for years. It almost makes all that crap smell good :-) Have fun, Remi
  8. Re: Grails over Stripes[ Go to top ]

    I work for a corporate and if I were able to choose a language other than Java for web development I'd choose rails. Website Monitoring
  9. Stripes is an 'easy' choice[ Go to top ]

    If I have my choice I will probably choose Rails. But choosing a framework for a real world project is a lot more complex – and the current proliferation of frameworks is maddening to say the least. It was a tough decision when I started a project in JSF some 18 months ago – and I am still wondering whether it is the right choice. But choosing Stripes is a lot easier – I mean A LOT, almost no hesitation. There are a few factors contributing to this – easy migration/skill transfer from Struts and other contemporary MVC frameworks were amongst the most important. Technology wise there is enough innovations to get me excited as well. I don't think there is a one Choice to rule them all. But all in all I think Stripes is in a very good position to fill a gap left by Struts, that JSF failed to fill so far.
  10. Yesterday, i have gone through the Stripes for the first time, my impression is WoW. it seems too promising, it has very few dependencies, and it worked fine on my first "Hello world". ActionBean with multiple event is really nice. more over i can easily manage web flow. validation with @validate and expression is really great work. moreover Spring integration is nice. and testing is very simple. thanks stripes team for such nice effort. i am planning to give a try from my next project. best regards,
  11. Also a Stripes fan.[ Go to top ]

    I have one application live In the World already. It was my learning application and it needs to be redone. In the past couple of months, I've done two others. Both of which are internal and "Going live soon". The key benefit to Stripes I think is it's simplicity. It's painless to get started -- really painless. Getting forms up and actions happening and results displayed is straightforward. The other benefit of Stripes is that it works with modern JSP, and works really well. JSP 2.0 and JSTL are really usable, and Stripes make it even more so. Stripes is very JSTL friendly. Stripes tag library are succinct and useful. It's not chock full of features, basically just overloading standard HTML elements. It doesn't hide from HTML, and doesn't pretend to be one of the component frameworks. It's an Action Framework, plain and simple. The other beauty to it is that it's really well designed. It's designed to handle Hard Parts of web programming, but not let that get in the way of the Easy Parts. Most of its internals are exposed to the developer through assorted interface, workflows, and callbacks. Its use of annotations is very clean. The downsides of Stripes are while it's well documented, I think the documentation could use some working over. The documentation is a bit disjointed. Also, it's Demo App that it uses to help you get started does things "the wrong way" IMHO, in terms of the flow of Actions and JSPs. My first app was written with the demo app as a guide to How To Do It, and that's one of the reasons I want to rewrite it. My new apps have a much better (IMHO) Actions forward to JSPs methodology than what is portrayed in the demo application. My final comment about Stripes is that it being a young framework is what make it really shine as a user. Simply put, when Struts (it's primary competitor) came out, web development in Java was just getting started, all of the standards were new, and everyone was Learning By Doing, as it should be. Stripes is a Next Generation Action framework, it's able to rest on the shoulders of all the hard work Struts and its developers and users have put in over the years. So, it gets to make use of all the modern systems. For example, because of annotations, Stripes is JDK 5 only. But, also, in todays world where Google is our Reference of Record for things, there is simply a lot of OLD, and BAD information on Struts out there today. Reading articles from 2000, and 2001 just aren't really relevant anymore, or at least shouldn't be. The signal to noise ratio is going down, particularly for a new Struts user. Stripes is a clean break. Search for stripes, and most everything is relevant. That's a huge win I think for a new user. I highly recommend Stripes for someone who is not interested in a component style web framework. It's easy to get started with, has the depth to take you where you want to go, and does its job of making the Request -> Action interface as painless as possible. The highest praise goes simply to the fact that I have had to only reinvent one small piece of what Stripes provides for my applications. I walked away from Struts because I reached that point far earlier.
  12. Stripes is great[ Go to top ]

    Stripes is great. I have used Struts, Spring MVC and Webwork and found Stripes to be the best. I actually just finished writing a blog using Stripes: http://paulbarry.com The are also plenty of helpful people on the Stripes mailing list.
  13. Stripes great but ..[ Go to top ]

    For action oriented web programming i think Stripes is great but i have recently found something i've missed for quite a long time in click.
  14. Stripes vs Semblance[ Go to top ]

    I have to port a simple front controller app to a "proper" mvc framework in a couple of weeks. Can someone contrast Semblance, which carries forward years of Struts and apparently wraps it up nicely, with Stripes? One thing I am concerned about is the default controls, many resort to tables for layout, which is a very bad practice in so many ways, and shouldn't be accepted in 2007.
  15. I can't comment about Semblance, but I came to Stripes from a Struts background and found it very easy to make the transition from a learning curve perspective as well as an actual code porting excercise. Stripes has alot of similarity in terminology with Struts, Actions vs ActionBeans, Resolutions vs ActionForwards, etc, but things are so much better/easier. It's kind of like Struts without all the evil things that made Struts so tedious, like ActionForms and configuration.
  16. Stripes is WOW[ Go to top ]

    It was an instantaneous WOW when I discovered Stripes 3 months ago and I have started 3 projects with it since. Stripes is really well conveived and engineered. It is really flexible as well, giving rise to various paradigms. The Demo example makes use of the pre-action paradigm. Various stripers are advocating the more familiar action->redirect->JSP paradigm. Coming from component framework background (JSF and ASP.NET), I am trying to fit Stripes to the web form/backing bean paradigm. It can’t do that fully yet as there is no viewstate support. I am doing by using hidden fields to maintain the state of the web form and preloading the database objects before the binding and validation phase. Tim Fennell has indicated that he is looking at providing viewstate support for Stripes. When this is done it will be hard for me to find enough reasons to use JSF again. The different voices on how to use Stripes can be confusing at first. But it points to Stripes flexibility – and I believe Stripes is not realizing its full potential yet.