Downsides of using Stripes+Spring vs Spring MVC
Asked Answered
F

1

12

I am coming from Struts 1 world. Now I am starting a new project and we are using Spring.

I could use Spring MVC, but seeing how simple it is to use Stripes (no xml is a big plus) I am tempted to use that with our brand spanking new Spring web application. I have no experience in either Stripes or Spring MVC (apart from basic CRUD application).

Question is, what are the downsides of using Stripes as opposed to Spring MVC? Several parts of the application will be RESTful, will it make it harder if we use Stripes? What about validation? I suppose Stripes will be easier to implement, no?

Fungosity answered 21/7, 2010 at 10:57 Comment(0)
N
8

Stripes is a great framework. It's been our framework of choice the past few years and has yet to disappoint.

However, if you mean RESTful in the sense that you want to use HTTP PUT/DELETE, etc. Stripes might not be your answer. I think you'd have to set up Filters, or additional logic in your Beans, it wouldn't be straight-forward (as it seems to be in Spring from a cursory googling).

On the other hand, if you mean things like /app/delete/3 or /app/update/4 & pass POST params, Stripes is an excellent choice.

The Stripes book (Pragmatic Programmers) explains the framework well, and has a chapter on using DI with Spring. All the normal bells and whistles (including validation) are excellent.

Nievelt answered 22/7, 2010 at 19:35 Comment(3)
No I won't be using PUT/DELETE. But I will be using a lot of AJAX. Normally I would let JQuery to POST/GET and a Servlet will return response in JSON (which is easily parseable by JQuery).Fungosity
We do exactly this, often. Stripes can either return a JavaScriptResolution (stripes.sourceforge.net/docs/current/javadoc/net/sourceforge/…) where it converts Java objects to eval'able JSON, or can just create JSON yourself and pass it back as a StreamingResolution (stripes.sourceforge.net/docs/current/javadoc/net/sourceforge/…)Nievelt
Thanks for the JavaScriptResolution and StreamingResolution links, didn't know about these two actually.Fungosity

© 2022 - 2024 — McMap. All rights reserved.