Welcome to Scopes


Scopes 0.0.2 released!

Scopes 0.0.2 has been released! It has been made a bit of refactoring and added "click" and "init-based application" scopes. Download it now!


Scopes is a new way to use web application scopes. You no longer have to use HttpServletRequest.getSession().getApplication().getAttribute; instead you have a state object that is:

  • independent from the platform: you can use it in a Servlet environment, or in a Swing package;
  • usable in every tier, even in your business logic: it could be useful to avoid anhemic programming. See "[put pattern name]" for reference;
  • extensible: you can now add new scopes! In this package the "window" scope is ready to use!
  • independent from the framework: in a Servlet environment it is a simple wrapping HttpServletRequest.

Download Scopes.


Scopes abstract your web application from the use of a J2EE environment and its typical contexts (request, session, application) by wrapping all of them in a "State" class, that can be used as a representation of the application state for the layers below. You can build stateful objects, instead of relying in stateless Business Delegates and Transfer Objects, that are the main reason of anhemic programming.

Scopes provides an infrastructure for making new scopes: each part of the scope management (context building, managing the request, filtering the result) are supported through the use of interfaces and abstract implementations.

And, finally, Scopes enables the Window scope! Imagine, different attributes for different client windows, without relying on session that can lead to conflicts and incorrect views.