Stripes (framework)
Encyclopedia
Stripes is an open source
Open source
The term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...

 web application framework
Web application framework
A web application framework is a software framework that is designed to support the development of dynamic websites, web applications and web services. The framework aims to alleviate the overhead associated with common activities performed in Web development...

 based on the model-view-controller
Model-view-controller
Model–view–controller is a software architecture, currently considered an architectural pattern used in software engineering. The pattern isolates "domain logic" from the user interface , permitting independent development, testing and maintenance of each .Model View Controller...

 pattern. It aims to be a lighter weight framework than Struts by using Java
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...

 technologies such as annotations
Java annotation
An annotation, in the Java computer programming language, is a special form of syntactic metadata that can be added to Java source code. Classes, methods, variables, parameters and packages may be annotated...

 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.

Features

  • Action based MVC
    Model-view-controller
    Model–view–controller is a software architecture, currently considered an architectural pattern used in software engineering. The pattern isolates "domain logic" from the user interface , permitting independent development, testing and maintenance of each .Model View Controller...

     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
    JUnit
    JUnit is a unit testing framework for the Java programming language. JUnit has been important in the development of test-driven development, and is one of a family of unit testing frameworks collectively known as xUnit that originated with SUnit....

     integration
  • Easy internationalization
    Internationalization
    In economics, internationalization has been viewed as a process of increasing involvement of enterprises in international markets, although there is no agreed definition of internationalization or international entrepreneurship...

  • 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

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


Hello ${actionBean.name}



Try again




No additional configuration files needed.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK