Monday, August 22, 2005

Struts

Struts brings an MVC structure to Java servlet programming. It provides mechanisms for routing HTTP requests to application components in the controller layer, and connecting those components to appropriate model JavaBeans and views. Views can be written in JSP or any other HTML-generating system, and Struts provides utilities for converting between JavaBeans and HTML forms, with appropriate validation and error reporting. Struts gives developers the full capabilities of Java servlets, including built-in internationalization support, verbose XML-based configuration, and large-scale deployment. Nevertheless, Struts is based on a session-state model of web applications and does not provide a mechanism for state with environment semantics. This makes it very susceptible to the Orbitz bug.




Highlights
  • Forms defined with DynaBeans (like JavaBeans but not statically-coded)
  • Comprehensive control over sessions
  • Enterprise-level tools (WAR files for deployment)
  • A bit of magic to go between JavaBeans and forms, with free validation and error reporting
  • Built-in support for i18n
  • Simple module mechanism
Downsides
  • Regular JSP has poor modularization semantics (only textual include), though tag libraries may promise some more sensible reuse
  • Has no “interaction” scope to emulate the environment

Opinion and Idle Speculation
  • A serious mess of XML configuration files
  • Similar functionality to Rails, but without the amazing magic that makes Rails worthwhile

0 Comments:

Post a Comment

<< Home