Welcome to Induction

Induction is a powerful, high performance, Java MVC web application framework. Induction supports dynamic application reloading, type-based dependency injection and dependency analysis between models, views and controllers. The goal of Induction is to simplify the task of building complex, high performance, maintainable web applications using Java™ technology.

Induction has an extensible architecture including support for controller, view and redirect resolvers, plug-in configuration loaders and plug-in templating engines. Induction belongs to the class of Java web application frameworks usually referred to as request-based frameworks. Induction is compatible from JDK 1.4 to JDK 1.6 (Java 6).

New release! Induction: v1.5.4b (Mar 2013)

This release contains an important feature fix in the URL resolvers and a bug fix in the form parser.

Feature fix: previously only the ‘/*’ pattern could be specified in the web.xml for the Induction servlet (e.g. /*). Now patterns that do not begin with a ‘/’ such as *.action are supported. The previous limitation was caused by Induction dispatching using only the value returned by getPathInfo() of the HttpServletRequest, now the full path constructed using getServletPath() + getPathInfo() is used.

Bug fix: fixed a bug in the HTML form parser that prevented the use of form variables with a data type prefix (e.g. int:age) with the POST form submit method. The problem occured with browsers that URL encoded special characters (such as ‘:’) in POST data.

Induction: v1.5.3b (Sep 2012)

This release contains some changes and fixes related to error dispatching, and a minor bug fix related to the form parser.

Change: if an error occurs during request interceptor execution it is now routed to the error controllers (if any are declared). Previously interceptor errors got propagated out as a unhandled errors.

Change: when attempting to find an error controller Induction now dispatches based on the root cause of the exception generated. Previously Induction dispatched based on the actual exception thrown. The previous behaviour made it impossible to have an error controller trap a specific root cause exception class since root cause exceptions typically get wrapped by upper application layers before being thrown.

Bug fix: fixed a case where the interceptor sequence may continue to execute even after a runtime error is dispatched to an error controller.

Bug fix: fixed a bug in the HTML form parser that prevented the use of map variables (not common) in a form, an example of a map variable in a URL string is: address[city]=Scottsdale&address[state]=AZ. Map variables now work as expected.

Induction: v1.5.2b (May 2011)

This release contains a few minor new features and some important bug fixes. The most important fix is for a bug that prevented Induction from detecting controllers and views when run from inside a .war file in Linux.

Feature: User-provided templating engine implementations can now request the injection of any model in the templating engine implementation class constructor.

Bug fix: The ClassFinder failed to work correctly when scanning a .war file’s contents in Linux/Unix since it was stripping the leading / in path used to scan the file system.

Induction: v1.5.1b (Dec 2010)

This release contains a few minor new features and some important bug fixes. The most important fix is for a bug that prevented Induction from working correctly in the GlassFish 3.0.1 built-in web container.

Feature: Support for a new static model scope. The static model scope is broader than the previous broadest scope, which was the application model scope. An application scope model has one instance per Induction dispatcher servlet, while the a static scope model has one instance per servlet context. The new static scope is useful for models that need to be shared across Induction dispatcher instances. For example the static scope could be use to provide access to a shared J2EE javax.naming.InitialContext instance.

Feature: Enhanced meta information in the ViewExecutorException and ControllerExecutorException exception classes. The goal of this enhancement is to provide better information to an error controller about the view or controller in which an error occured.

Feature: New getList() and getMap() methods in the Induction form object to provide more streamlined access to list and map parameters in an HTML form. Previously developers had to use the getObject() method and typecast the return value.

Feature: The ShortURLRedirectResolver now supports the <class-replace> directive (with the same sematics as the forward resolving ShortURLViewResolver and ShortURLControllerResolver that already support this directive). This directive is specified in <class-to-url-map> block in the <redirect-mapping> section.

Bug fix: The Induction dispatcher servlet’s init() method now has a call to super.init(). The absence of this super.init() call caused GlassFish 3.0.1 to call the init() method of the Induction servlet for every request!

Bug fix (minor): Attempting to access a form variable on a HTML form for which no form data was submitted now correctly throws a FormException instead of returning a null value. Previously a FormException was thrown only if some form data was submitted but no data was submitted for the requested parameter.

Induction: v1.5.0b (Aug 2010)

This release adds powerful capabilities to the controller and view resolvers. These resolvers now support full power of dependency injection in the the methods called to resolve each request. A summary of the new features follow:

Enhanced controller and views resolver interfaces (more details here) now support dependency injection in the new resolveRequest() and resolveThrowable() methods

Backwards compatibility note: The new methods replace the previous overloaded resolve() methods, so any pre-1.5.0b custom resolvers need there resolve() methods renamed to work with 1.5.0b. If you use the standard resolvers that come with Induction no changes are needed.

A new URLResolver class to provide access to Induction’s URL mapping engine. The URLResolver provides access to the class to URL resolution mechanism used by the RedirectResolver.

The URLResolver is the final piece required to enable writing fully URL independent applications using Induction. It was inadvertently left-out until this release! Thanks to Pierre Lavignotte for directing awareness of this issue on the user group!

View-to-view injection support. If a view type A is declared in the constructor formal parameter list of view B, then an instance of view A is automatically injected into view B’s constructor.

Bug fix: Form objects are now correctly cached within request scope (previously a new object was created each time, causing failure when the Form is requested from more than one context per request)

Bug fix: Form parser now correctly handles array parameters of the form foobar[].

Bug fix: Fixed a bug in the ReloadingClassLoader that resulted in infinite recursion when loading a classes with certain types of cyclic dependencies

Induction: v1.4.0b (Jan 2010)

This release introduces important support for error handlers. Also new in this release in automatic high-performance buffering of all template output (independent of templating engine). Following is summary of the salient new features:

New support for error handlers

New <error-to-class-map> directive in config XML to configure error handlers

ControllerResolver interface has a new resolve() method to to support resolving an exception to a controller

New high-performance template output buffering

The output of a template is sent to the client only if the template completes without errors.

Since now nothing is written to the client for a template that errors, this means:

A user no longer sees the messy stack trace generated by most templating engines

The error handler you write, now has more options, such as returning a redirect or error code to the client (since no writing was started on the response)

The implementation (re)uses StringWriters from a pool to conserve memory and improve performance

Improvements in reporting of errors that occur during controller/view execution

Induction: v1.3.0b (Nov 2009)

The most powerful MVC framework for Java has raised the bar again. Induction v1.3.0b introduces support for request interceptors with unsurpassed power and elegance and further expands the capabilities of the unrivaled power of its short URL resolvers. New features in this release:

Powerful new support for request interceptors. Request interceptors are backed by the same zero-configuration type-based dependency injection support currently available in Induction controllers.

The ShortURL resolvers are enhanced to support a new <class-replace> directive in the <url-to-class-map> section of the Induction configuration. This directive allows a character in a URL that is not legal in a Java class name to be replaced with a character that is legal in a Java class. For example, this directive can be used to map a hypen in URL to, say, an underscore in a controller or views class name. Induction is the only MVC framework to date that supports mapping a hyphenated URL to a controller/view even when the mappings are established automatically via dynamic controller/view discovery.

Induction: v1.2.0b (Jun 2009)

Induction v1.2.0b has major new features and several enhancements. A summary of the changes follow:

New support for direct mapping URLs to views. This is a whole new subsystem which means there is now a new view resolver in addition to the already existing controller and redirect resolvers.

New support for controllers to return a view type in addition to the previous support for returning a view instance. If a view type is returned, Induction will instantiate the view type (with dependency injection on the view constructor parameters)

The previous simplistic default resolver implementation are now replaced with powerful, production-quality, regex-driven resolvers. The new resolvers “discover” controllers and views (using a configured regex pattern) and are capable of mapping short URLs to controller and view classes straight out of the box (for example it can easily and efficiently resolve /login.action to class named, say, myapp.security.LoginController). The new resolvers are configured using new three new configuration sections in the Induction configuration XML. The sections are <controller-mapping>, <view-mapping> and <redirect-mapping>.

New <include-config ...> directive in the Induction configuration XML to provide flexibility in organizing configuration data.

New <init-on-startup ...> directive to support initializing application scope models on startup.

And other enhancements to expand access to system level objects (such as the templating engine and classloader) in controllers and views for use by specialized applications.

Almost every page of the project website updated to reflect features new in 1.2.0b. There is a new tutorial explaining the powerful built-in resolvers (new in 1.2.0b) and a new Quick Reference section.

Why a new framework?

There is already a number of Java web application frameworks, so why another Java web application framework? Induction was created because we believe that the following are important:

It should not be necessary to redeploy an application to a Servlet container every time Java code is changed. It should be possible to simply recompile the changed source (using your favorite IDE) and simply reload the respective web page.

Maintaining large web applications requires the ability to analyze the dependencies between models, views and controllers

It should be easy to leverage the power of dependency injection in an application

An application should not be cluttered by superfluous XML configuration files.

Handling file uploads should be so simple to the point of being unremarkable (this would be an unremarked point, expect for how complex some frameworks seem to make it)

Pluggable templating engines (initial plugin for Freemarker, plugins for other templating engines based on community feedback)

Controllers

Parameter injection: a model object is accessible in a controller by simply declaring a parameter of the model object’s type in the controller’s handler method

Sophisticated form parameter processing, making it easy to use list and map HTML form variables

Handling an uploaded file is as simple as handling a string input on a form

If the controller returns an instance of view interface or an instance of the Redirect class, the value is then accordingly processed by Induction

Views

Integrated support for templating engines (ships with support for Freemarker)

Each template view is represented by a class that encapsulates all the data the template depends on, enabling powerful Java based dependency analysis when template changes need to be made to text-based HTML templates

Models

Declarative control of the lifecycle of model objects

Dependency injection into user-provided model constructors

Dependency injection into user-provided model factory methods

Model-to-model dependency injection with cycle detection

For further discussion of how Induction promotes the Model-View-Controller (MVC) paradigm to web application development read the Model-View-Controller Overview

Where Can I Download Induction?

You can download the latest release of Induction on the downloads page. We recommend the Getting Started Tutorial to getting you up and running quickly. We think you are going to have enjoyable journey.

Who Is Responsible For Induction Development?

Induction is under active development by Acciente with the goal of providing a powerful MVC web application framework for its customers and for the community at large. Acciente is committed to the long-term success of Induction. Acciente is also committed to the use of Induction by commercial organizations.

How Is Induction Licensed?

Induction is licensed by Acciente under the commercial friendly Apache License 2.0. The decision to release Induction under the Apache License 2.0 was motivated by the numerous high quality open source software projects available under commercial friendly licenses from the Apache Software Foundation, other organizations and individuals. At Acciente we appreciate the generosity of these projects and would like to contribute in the same spirit.

What is the status of Induction Development?

The planning of the Induction project started in late 2007, several Java web application frameworks were reviewed to see if the development of Induction would be justified. After this initial research, over a period of about 2 months, it was decided that the development investment in Induction would be justified.

Design and implementation work on Induction started in February 2008. Early work focused on the reloading classloader (also released as open source), a key part of Induction. After several months of very careful work, the first beta version was released to private beta testing sites in May 2008. General availability of Induction to the public was announced in June 2008.

Acciente takes the design, stability and performance of Induction very seriously. We use Induction as the preferred web application framework for our customers.

About Acciente

Acciente, LLC is a software company located in Scottsdale, Arizona specializing in systems architecture and software design for medium to large scale software projects. You can learn more about Acciente on our about us page.