First Release of Induction - MVC Web Framework


News: First Release of Induction - MVC Web Framework

  1. Acciente is thrilled to announce the first public release of the Induction MVC web framework. Induction is a request-based MVC web application framework for Java supporting dynamic application reloading, type-based dependency injection, dependency analysis between models, views and controllers (using any popular IDE) and an extensible architecture. Induction was created by Acciente in response to the problems it encountered with some of its largest and most demanding clients. Induction seeks to promote high developer productivity by supporting "hot" reloading of application changes. It promotes the refactoring and evolution of complex web applications by supporting complete dependency analysis between models, views and controllers. Induction also attempts to address needs critical to large web applications: controller and redirect resolvers, plug-in configuration loaders, an extensible architecture and high performance. We have been working on Induction for several months now, and it has already gone through one round of beta testing. Motivations/Design Goals: * Eliminate the need 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 painless to leverage the power of dependency injection for web applications. * XML for configuration should be used wisely. * Handling file uploads should be simple to the point of being unremarkable. * An extensible architecture. Several services including the configuration loader and templating engine are pluggable (the default templating engine is Freemarker, plugn-ins for other template engines may be written as needed). Solid default implementations of the services are provided. Next Steps: * Check out the Getting Started Tutorial. * You can download Induction on the Induction downloads page. * Come join the Induction discussion group on Google Groups. Induction is licensed under the commercial friendly Apache 2.0 license. Again are really excited to finally release Induction to the community and we look forward to your feedback. Please visit the project website at for more information.
  2. The class reloading features are already offered and solved by several web frameworks like Tapestry5 and Seam. Anyway there are dynamic language frameworks that runs on VM like Groovy also. So I think this class reloading features is not a big issue anymore nowadays. But anyways keep up the good work. Hopefully you can offer something new to the community.
  3. Joshua, to achieve dynamic class reloading is not the only reason Induction was created. Perhaps most compelling is Induction's approach to MVC and its way of integrating dependency injection. Dependency injection in Induction is second nature, it starts in your controller's handler method. Another major goal for Induction was to allow the use of Java dependency analysis tools in IDEs (Eclipse, IDEA, ...) to analyze the dependencies between models, views and controllers, and we achieved this. I think this ability to analyze is crucial to manage the evolution of applications as they become more complex. On a pragmatic note, in contrast to Tapestry 5, Induction works with JDK 1.4 all the way to JDK 1.6 (Java 6).
  4. I just realized that the Induction 1.1.1b download was compiled with JDK 6! I created a new 1.1.2b-jdk1_4 distribution compiled with JDK 1.4, you will find it on the Induction downloads page. Cheers
  5. I just found out that the project website is down :( My hosting company seems to be having a power outage (given cause: lighting strike). It bites that this coincides with the announcement on the TSS. They are expecting to restore power in a few hours. In the meantime you can download the framework directly from Induction on Google Code Thanks
  6. MVC is dead[ Go to top ]

    Compared to component-oriented frameworks like Tapestry 5 and Wicket, MVC is a tortuous exercise in futility :)
  7. Re: MVC is dead[ Go to top ]

    Compared to component-oriented frameworks like Tapestry 5 and Wicket, MVC is a tortuous exercise in futility :)
    Tom, I think the MVC pattern can be used with both request-based (like Induction, Struts, Spring MVC, ..) and component-oriented frameworks (Tapestry, Wicket, JSF, ..). Wicket looks like a well thought out approach to a component-oriented framework. A small point in common: Induction like Wicket has "a refreshing lack of XML" (quoting Jonathan Locke from his description of Wicket) :) One of my concerns with component-oriented frameworks is the substantial change they make to the expertise required of "template" authors, and also the possible extra demand they place on application servers.
  8. Using interfaces[ Go to top ]

    It is convenient to use minimal external configuration files and using Java reflection to enforce some conventions helps with that, however that may be taking the concept too far! What harm would it make to have a few interfaces which are implemented by the Induction-specified classes? Is it just because the arguments of the handler method may vary?
  9. Re: Using interfaces[ Go to top ]

    It is convenient to use minimal external configuration files and using Java reflection to enforce some conventions helps with that, however that may be taking the concept too far!
    Thanks for raising the topic. The goal was in a way to "optimize" the amount of configuration without sacrificing expressiveness or incurring a performance penalty. It is not always easy to the optimize the configuration design, and I think its is sometimes overlooked.
    What harm would it make to have a few interfaces which are implemented by the Induction-specified classes? Is it just because the arguments of the handler method may vary?
    Yes, the variable arguments and variable handler method names played a role. While your controllers do need to extend Induction's Controller marker interface (this is for security), the Controller interface does not enforce any methods. The reason for this decision was to enable having controller handler method names (yes, a controller is allowed to have as multiple handler methods) that make sense to your application instead of the framework. For example a UserProfile controller may have methods like load( String userID ) and save(). Induction does use more strict interfaces for framework components. For example a template engine plug-in has to to implement a strict TemplatingEngine interface. However the configuration-less dependency injection is used uniformly even when creating these framework plug-ins. I posted a new tutorial today on how Induction creates controllers (it actually apply more generally).
  10. How does this compare to WEB4J? (see:
  11. How does this compare to WEB4J?

    Arjan, to provide a fair assessment I would have to take a fairly close look at WEB4J, which I have not done. There are points on which I completely agree with the WEB4J folks: * Java web development is too often unwieldy and unprofitably complex * Software (including frameworks) should have a design, to quote the WEB4J folks, "centered on giving you feelings of elegance, beauty, and concision". Following are a few differences WEB4J and Induction (again please note that I know very little about WEB4J): * Induction does not require a redeploy/restart every time you change your app, not sure if WEB4J does this * Induction allows MVC dependency analysis * Induction is open source, WEB4J is not * Induction currently supports Freemarker, and you can easily plug-in other template engines, it looks like WEB4J uses JSP templating. * WEB4J comes with its own persistence engine, Induction does not impose any, in Induction you may use direct JDBC, Hibernate, iBATIS, Cayenne, Toplink, etc. If you decide to try Induction, I would love to hear your feedback on the Induction forums.
  12. Adinath, Out of curiosity I had a look at Induction, namely the docs and examples. Since you have been providing helpful responses, I'd be interested to know how Induction compares to Stripes. While the examples are good, it would be nice to include an example that shows how to:
    • Create a form
    • Handle different data types
    • Apply some validation
    • Give feedback to the user upon validation errors
    • Redirect to a 'success' page upon valid input
    • Ignore validation (or ignore the input altogether) if the user pressed Cancel instead of Submit.
    Of course, there are a million and one possibilities. This is just an example that, in my opinion, gives a good idea of how to do common things in a framework, while keeping the scope of the example small enough to avoid being too complicated. Cheers, Freddy Stripes ...and Java web development is fun again
  13. Freddy, It is neat that you ask about Stripes. I think both Stripes and Induction share several common aspirations, including an aversion to verbose and superfluous XML configuration. One easy difference to spot from Stripes is that Induction does not require JDK 1.5. To provide any meaningful comparison I would need to learn much more about Stripes. So I am going to share some of the factors that spurred the Induction project, and hopefully it helps you judge using your knowledge of Stripes: * Improve developer productivity (and happiness) by being able to dynamically reload application changes (I felt that developers using dynamic languages like Python and Ruby had a needless edge in this regard) * Ability to analyze dependencies between models, views and controllers (such analysis facilitated by strong typing in Java is one reason that justifies its use in complex web apps, but sadly this ability is lost in the several layers of indirection of some frameworks) * Reasonable use of XML configuration * Built-in model life-cycle management, and an elegant way to access models from controllers (via dependency injection) * Being to able to control the framework's behavior, but not mandating developer configuration even for common cases * "Ridiculously easy" file upload handling :) As for Struts, I looked at it *very briefly* circa 2002 (I think), and I told a buddy something to the effect: "I can't believe people do all of this!" Induction, however, was not created in rebellion to any particular framework. It was created, out of a small sense of duty to the community, to show an approach to a good MVC framework. Two previous frameworks that I created, both corporately sponsored and proprietary, were not publicly available. I felt strongly that if I ever built another framework I wanted the community to have access to it. On another note, I like how Stripes maps Action class names to URLs, I am considering providing an Induction ControllerResolver that uses a similar resolution protocol. Thanks for your suggested example. I think I'll also add some model interaction to such an example. Cheers, Adinath
  14. Hi Adinath, Thanks for your reply. As you pointed out, there are similarities between Stripes and Induction, and some considerable differences, namely the JDK requirement. Stripes uses annotations and generic types for many of the niceties it provides to developers, and so has required JDK 1.5 from the start. Dynamically reloading application changes is a very nice feature, indeed. Seeing the dependencies between models, views, and controllers: I'm assuming for example that you know controller A uses template B because it has a reference to a class; but within that class, the dependency to a template is still a String file name. I think that's normal. In Stripes, Action Beans are central; from looking at an Action Bean class, you see directly which templates it is using, and which model classes as well because they are all right there in the class, not off in some configuration file. I think you are right in seeing value in this. On your other points, I think Stripes and Induction have a lot in common - little XML configuration, extensibility of the framework, file uploading, and so on. It seems they were also developed by people who saw Struts and had a "surely there are easier ways to get things done!" reaction. If you get around to adding the example I mentioned, I'd be interested in having a look, I'm always curious about how different web frameworks approach these types of examples. Thanks and cheers, Freddy
  15. Hi Freddy, Thanks for your comments. I think the Stripes dependency on JDK 1.5 is reasonable, considering how long JDK 1.5 has been out. Since I had not planned on using annotations in the design of Induction, I decided to keep it compatible with JDK 1.4. A few thoughts about views: An issue we encountered with large web apps was the inability to determine the "largest available set" of data used by a template. In a sense it would be desirable if a template were like a function, with the template data being input parameters. Induction achieves this by passing only the view "bean" to the template. So the developer can precisely control, in Java code, the "largest available set" of data used by a template. On a somewhat related note, some frameworks require that the models be passed to a view, there are cases were passing the model is not a good pattern. One such case is where the model contains much more data than concerns the view. In Induction since the view "bean" is the "data interface" to the template, it can choose the minimal set of data from a model or other source to expose to the template. On an unrelated note, I just noticed that the Induction Forms Tutorial omits discussion of Induction support for map and array form variables (the HTML variable names are parsed by Induction, it uses the syntax varname[keyvalue1], varname[keyvalue1][keyvalue2], ..., for maps and varname[] for arrays). This map and array support applies to all variable types including file upload variables. When I get around to the example, how would you like to be notified? Cheers, Adinath
  16. Very interesting, Adinath. You can reach me at xf2697 { at ] fastmail [ dot } fm. Cheers, Freddy
  17. Again MVC framework?[ Go to top ]

    Is there still any thing new worth of researching into in the rusty MVC?
  18. Hi, I've been looking for Java MVC web frameworks that considerably "friendly, less XML configuration" similar with PHP's code igniter or "fresh-new-baby-born-but-rocks" ASP NET MVC. Neither Struts 2 or Spring MVC are appealing for me. Seems that i'm going to evaluate this Induction framework. I will report my found later. Cheers.