Stripes (framework)
This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these messages)
|
| Stripes | |
|---|---|
| Stripes Logo | |
| Original author | Tim Fennell |
| Initial release | 2005 |
| Stable release | 1.6.0
/ July 23, 2015 |
| Repository |
|
| Written in | Java |
| Engine | |
| Operating system | Cross-platform |
| Platform | Java Virtual Machine |
| Type | Web application framework |
| License | Apache License 2.0 |
Stripes is an open source web application framework based on the model–view–controller (MVC) pattern. It aims to be a lighter weight framework than Struts by using Java technologies such as annotations and generics that were introduced in Java 1.5, to achieve "convention over configuration". This emphasizes the idea that a set of simple conventions used throughout the framework reduce configuration overhead. In practice, this means that Stripe applications barely need any configuration files, thus reducing development and maintenance work. It has been dormant since 2016.
Features
[edit | edit source]- Action based MVC framework
- No configuration files
- POJOs
- Annotations replace XML configuration files
- Flexible and simple parameter binding
- Search engine friendly URLs
- Runs in J2EE web container
- JUnit integration
- Easy internationalization
- Wizard support
- JSP layouts
- JSP or freemarker templates as View
- Spring integration
- JPA support
- AJAX support
- Fileupload support
- Compatible with Google App Engine
- Open-source
- Lightweight
Example
[edit | edit source]A Hello World Stripes application, with just two files:
- HelloAction.java
import net.sourceforge.stripes.action.ActionBean;
import net.sourceforge.stripes.action.ActionBeanContext;
import net.sourceforge.stripes.action.DefaultHandler;
import net.sourceforge.stripes.action.ForwardResolution;
import net.sourceforge.stripes.action.Resolution;
import net.sourceforge.stripes.action.UrlBinding;
@UrlBinding("/hello-{name=}.html")
public class HelloAction implements ActionBean {
private ActionBeanContext context;
private String name;
public ActionBeanContext getContext() {
return context;
}
public void setContext(ActionBeanContext context) {
this.context = context;
}
public void setName(String name) {
this.name = name;
}
public String getName() {
return name;
}
@DefaultHandler
public Resolution view() {
return new ForwardResolution(“/WEB-INF/HelloWorld.jsp”);
}
}
- HelloWorld.jsp
<html><body>
Hello ${actionBean.name}<br/>
<br/>
<s:link beanclass="HelloAction"><s:param name="name" value="John"/>Try again</s:link><br />
</body></html>
No additional configuration files needed.
Bibliography
[edit | edit source]- Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
External links
[edit | edit source]Lua error in mw.title.lua at line 392: bad argument #2 to 'title.new' (unrecognized namespace name 'Portal').
- Lua error in Module:Official_website at line 94: attempt to index field 'wikibase' (a nil value).
- Pragmatic Programmers Stripes book at the Wayback Machine (archived 2016-06-29)
- Stripes book blog at the Wayback Machine (archived 2008-07-27)
- Tim Fennell's blog (lead developer stripes) at the Wayback Machine (archived 2016-01-24)
- Ben Gunter (Stripes developer) at the Wayback Machine (archived 2010-11-13)
- Stripes mailing list at the Wayback Machine (archived 2010-12-09)
- stripes on GitHub