<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1375633167426904536</id><updated>2012-01-24T18:31:26.160Z</updated><title type='text'>The Impala Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>63</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-5459129994090812699</id><published>2011-11-08T16:53:00.008Z</published><updated>2011-11-08T17:05:09.966Z</updated><title type='text'>Dealing with library version clashes in Impala</title><content type='html'>&lt;span style="font-family:Helvetica, Arial, sans-serif;"&gt;One of the problems that  occasionally crops up in Java application development is library  class version clashes. For some reason, you have to use a particular version of some  library, but that library, or some of dependencies, clashes with other  libraries that you are using for different parts of the application. I  encountered an example of this occurring on our project, where we were  forced to use the old Axis 1.4 library to connect with an integration  partner. (For those who are interested, the reason is that the our  partner is using the &lt;span style="font-family:courier new;"&gt;rpc/encoded&lt;/span&gt; SOAP API configuration, which is  generally regarded as obsolete, and is not supported by any of the  modern SOAP libraries, from CXF to Metro, as well as the Axis successor,  Axis 2. See &lt;a href="http://stackoverflow.com/questions/412772/java-rpc-encoded-wsdls-are-not-supported-in-jaxws-2-0"&gt;here&lt;/a&gt;  and &lt;span style="text-decoration: underline;"&gt;here&lt;/span&gt;  for more on this problem.)&lt;br /&gt;&lt;br /&gt;The ability to deal with these kinds of problems is often cited as one  of the main reasons for using OSGi. In my development of Impala, I have  steered clear from tackling these kinds of problems, on the basis that  while they are theoretically quite valid to consider, in practice they  occur quite rarely, and there generally is a workaround. Unfortunately,  in my recent project, the workarounds seemed quite unpalatable. One  would have been to resort a plain text based client for this SOAP API.  For a small API, this would have been satisfactory, but for a large API  it would have involved quite a bit of extra work. Ultimately, it seemed  like a sensible point to add to Impala some capability for dealing with  library version clashes.&lt;br /&gt;&lt;br /&gt;The new mechanism simply involves the following:&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:Helvetica, Arial, sans-serif;"&gt; add any module-specific library in the module's &lt;span style="font-style: italic;"&gt;lib&lt;/span&gt; directory. For our  project, this involved adding &lt;span style="font-style: italic;"&gt;axis-1.4.jar&lt;/span&gt; and a couple of its  dependencies&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:Helvetica, Arial, sans-serif;"&gt; add the setting &lt;span style="font-family:courier new;"&gt;supports.module.libraries=true&lt;/span&gt; to &lt;span style="font-style: italic;"&gt;impala.properties&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family:Helvetica, Arial, sans-serif;"&gt;    This feature is currently in the code base and will be available in the next release, 1.0.2, which should be available soon.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; How does it work?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In the normal Impala application, a class is loaded first by using the  web application or system class loader (typically to load third party  libraries), then using a topologically sorted list of the dependent  module class loaders (typically to find application classes).&lt;br /&gt;&lt;br /&gt;With module-specific libraries, the scheme is a bit more complex. For  any module which has module-specific libraries, the module-specific  library locations are searched first. Suppose we are loading module A,  and we need to load the class &lt;span style="font-family:courier new;"&gt;Foo&lt;/span&gt; is in both the shared library area  (&lt;span style="font-style: italic;"&gt;WEB-INF/lib&lt;/span&gt;) and in a module-specific location for module A. In this  case, the class &lt;span style="font-family:courier new;"&gt;Foo&lt;/span&gt; will be found in and loaded from the module-specific  location.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Caveats&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The main caveat is that the class Foo should never be 'published' from  module A, for example as the return type in a method which might be  called from another module, otherwise &lt;span style="font-family:courier new;"&gt;ClassCastExceptions&lt;/span&gt; or &lt;span style="font-family:courier new;"&gt; LinkageErrors&lt;/span&gt; can result. Instead, the interfaces to module A should  ensure that appropriate abstractions are in place to ensure that this  does not occur. In our Axis example, we need to ensure that instances of  classes which hold references to Axis libraries are not passed around  between modules.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;More details on how the class versioning feature works, and how it can be configured, will be added to the documentation wiki.&lt;br /&gt;&lt;br /&gt;The solution is by no means the solution to any kind of class versioning requirement which may crop up. Multiple versions for particular classes is still seen as the exception rather than the rule, and the scope as well as the complexity of the solution reflects this. That being said, there is at least a workable practical solution when you are stuck in a corner on this problem.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-5459129994090812699?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/5459129994090812699/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=5459129994090812699' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/5459129994090812699'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/5459129994090812699'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2011/11/dealing-with-library-version-clashes-in.html' title='Dealing with library version clashes in Impala'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-6236112944253302613</id><published>2011-08-10T21:53:00.006+01:00</published><updated>2011-08-10T22:12:13.287+01:00</updated><title type='text'>Impala 1.0.1 released</title><content type='html'>I am pleased to announce the release of Impala 1.0.1. This release is basically a bug fix release. For more details on the bugs fixed, see &lt;a href="http://code.google.com/p/impala/issues/list?can=7&amp;amp;q=label%3AMilestone-Release1.0.1&amp;amp;colspec=ID+Type+Status+Priority+Milestone+Owner+Summary+Component&amp;amp;y=milestone&amp;amp;cells=tiles"&gt;this list&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;While the pace of Impala's development has slowed in recent months, it is still in active development. I am still using Impala every day in my day job. If provides the foundation for the next generation e-commerce fulfillment software we are developing at &lt;a href="http://www.realtimedespatch.co.uk/"&gt;Realtime Despatch&lt;/a&gt;. The reason I have been spending less time developing Impala is not because I have less use for it. On the contrary, it has really proved it's worth in the last year, making what could otherwise be a monster project quite comfortably manageable. The modularity and productivity features provided by Impala are not only fundamental for rapid development of our software, they also important in supporting our business model.&lt;br /&gt;&lt;br /&gt;That being said, there are a few features that are backing up which I am hoping to develop in the next few months, and hope to pick up the pace again.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-6236112944253302613?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/6236112944253302613/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=6236112944253302613' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/6236112944253302613'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/6236112944253302613'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2011/08/impala-101-released.html' title='Impala 1.0.1 released'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-413469819046945327</id><published>2010-05-20T16:21:00.003+01:00</published><updated>2010-05-20T16:50:38.524+01:00</updated><title type='text'>Impala Code Jam in London in London on May 26th</title><content type='html'>Next Wednesday I will be holding an Impala Code Jam at Skills Matter in London, organised through the Java Web User's Group (JavaWUG). For the people who come along, this will be a hands-on opportunity to spend some time working on a simple Impala application and to get a better understanding of the concepts involved, and for most, to get a first hand flavour of how Impala can help in writing better, more flexible Spring based applications.&lt;br /&gt;&lt;br /&gt;More details on the Code Jam are available &lt;a href="http://www.jroller.com/javawug/entry/javawug_projam_3_impala_framework"&gt;from the JavaWUG announcement&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-413469819046945327?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/413469819046945327/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=413469819046945327' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/413469819046945327'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/413469819046945327'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2010/05/impala-code-jam-in-london-in-london-on.html' title='Impala Code Jam in London in London on May 26th'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-3847035844097044367</id><published>2010-05-12T10:10:00.000+01:00</published><updated>2010-05-12T10:10:57.195+01:00</updated><title type='text'>Some further comments on the 1.0 release</title><content type='html'>I'd like to make some comments about the timing of the &lt;a href="http://impalablog.blogspot.com/2010/05/impala-10-final-released.html"&gt;1.0 final release of Impala&lt;/a&gt;. As I've mentioned elsewhere, the aim of Impala is to extract every last ounce of productivity and flexibility out of Spring-based development, while at the same time remaining true to the principles that made Spring popular in the first place - simplicity and testability. I believe that with this release I can confidently claim that these aims are being achieved, and that Impala provides one of the most productive and flexible environments for building Spring-based applications.&lt;br /&gt;&lt;br /&gt;Impala has been used in real world projects for almost three years. Over this period it has undergone extensive refactoring to ensure that the architecture is &lt;span style="font-style: italic;"&gt;right&lt;/span&gt; - flexible, maintainable, and open to the kinds of extensions which are likely to be introduced in the coming months and years. After over 5500 subversion commits, I am pleased to say that I am comfortable that this goal has been achieved.&lt;br /&gt;&lt;br /&gt;While Impala has allowed me to achieve unprecedented levels of productivity in projects in which I have used it, I have also been mindful that more widespread adoption requires adding support to commonly requested features, even ones not necessary in my own projects. Much of the effort put into the project in recent months supports these objectives. Impala now has decent support for Maven, and also allows for fully modularised web applications, including their constituent classes, JSPs and resources.&lt;br /&gt;&lt;br /&gt;This work has gone a long way to extending the capabilities of Impala and offering a greater choice in the technology combinations that will work out of the box with Impala. This work is continuing. Nevertheless, I am now comfortable that the feature set in Impala is suitable for a 1.0 release.&lt;br /&gt;&lt;br /&gt;I have really enjoyed developing Impala and look back on the work with a lot of pride. It has been a fun project, full of technical challenges. However, there is still plenty of work to do, and plenty of exciting areas to explore. To this end I would very much welcome more direct involvement from the community in helping the project to achieve it's potential. This involvement can take any form you might imagine, from testing the framework in different environments, to building a web site for the project, to adding tool support, through to working on new samples and even new feature set.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-3847035844097044367?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/3847035844097044367/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=3847035844097044367' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/3847035844097044367'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/3847035844097044367'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2010/05/some-further-comments-on-10-release.html' title='Some further comments on the 1.0 release'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-1522365809472971025</id><published>2010-05-12T09:38:00.007+01:00</published><updated>2010-05-12T09:58:27.097+01:00</updated><title type='text'>Impala 1.0 final released</title><content type='html'>I am pleased to announce the &lt;a href="http://www.impalaframework.org/"&gt;1.0 final release of Impala&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Impala is a dynamic, modular productivity framework built around Spring. The aim of Impala is to extract every last ounce of productivity and flexibility out of your Spring development environment, while at the same time remaining true to the principles that made Spring popular in the first place - simplicity and testability.&lt;br /&gt;&lt;br /&gt;Impala offers instantaneous redeployment of parts of your application, dramatically improving build/deploy/test cycle times. Impala supports on the fly 'drop-in' of new application functionality - including web modules - without requiring an application restart and without requiring any changes to existing application code or configuration.&lt;br /&gt;&lt;br /&gt;With Impala you can achieve the productivity benefits of a modular approach to application development. When using Impala, you no longer need to work with application contexts which contain hundreds of bean definitions. Instead, you break your application down into smaller, manageable chunks. You no longer need to put up with the ever-increasing complexity and tangled interdependencies which come with a monolithic approach to application development. Instead, you develop your application in a loosely coupled way, with a clean distinction between application's interfaces and implementation components.&lt;br /&gt;&lt;br /&gt;With Impala it is much easier to mix and match features for particular environments, which is particular useful for applications which may need to be deployed with different features and configurations on a per-environment basis. Writing integration tests with Impala is a doddle, because setting these up is simply a matter of selecting the modules you want to include in your tests.&lt;br /&gt;&lt;br /&gt;Impala works with all the technologies you would expect in the Spring world - Hibernate, Quartz, JMX, etc. - without requiring any special plugins to be written for those technologies. It also supports - in most cases without modification - web applications using a variety of web frameworks, from Struts to JSF to Tapestry and others. A lot of work has been put into making Impala elegantly support modular web applications, allowing for modular vertical web application 'slices', rather than just a modular back end.&lt;br /&gt;&lt;br /&gt;Impala works straight out of the box using a plain Eclipse installation (no fancy plugins required). It has a built-in build system which you can optionally use, based on Ant, and also integrates nicely with Maven.&lt;br /&gt;&lt;br /&gt;With Impala, you can take your Spring-based application development to a new level of ease and sophistication, with remarkably few changes to the way you write applications.&lt;br /&gt;&lt;br /&gt;See the full list of &lt;a href="http://code.google.com/p/impala/issues/list?can=7&amp;amp;q=label%3AMilestone-Release1.0"&gt;issues covered in this release&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;With Impala 1.0 released artifacts are also available in the Maven central repository. See &lt;a href="http://repo1.maven.org/maven2/org/impalaframework/"&gt;http://repo1.maven.org/maven2/org/impalaframework/&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;If you like Impala and would like to support the project, please take a look at this page: &lt;a href="http://code.google.com/p/impala/wiki/GetInvolved"&gt;http://code.google.com/p/impala/wiki/GetInvolved&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-1522365809472971025?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/1522365809472971025/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=1522365809472971025' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/1522365809472971025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/1522365809472971025'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2010/05/impala-10-final-released.html' title='Impala 1.0 final released'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-2726122245437541470</id><published>2010-04-25T19:56:00.002+01:00</published><updated>2010-04-25T19:57:32.091+01:00</updated><title type='text'>Impala 1.0 RC4 released</title><content type='html'>I am pleased to announce the release of Impala 1.0 RC4.&lt;br /&gt;&lt;br /&gt;Impala 1.0 RC4 was originally supposed to be the 1.0 final release. However, due to a few more than expected changes in this release, it was decided to have one last release candidate prior to 1.0 final.&lt;br /&gt;The main changes in this release are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;simplifications and enhancements in the mechanism for mapping web requests to modules, allowing for more intuitive arrangements of JSPs and resources within modules.&lt;/li&gt;&lt;li&gt;modification of the starter application to use the multi-web module mechanism out of the box, as this is the recommended approach for building Impala web applications.&lt;/li&gt;&lt;li&gt;the addition of Javadocs to the build artifacts (this is now required for artifacts deployed to the Maven central repository via Sonatype's infrastructure).&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;For more information on this release see: &lt;a href="http://code.google.com/p/impala/wiki/Release1_0RC4Announcement"&gt;http://code.google.com/p/impala&lt;/a&gt;&lt;a href="http://code.google.com/p/impala/wiki/Release1_0RC4Announcement"&gt;/wiki/Release1_0RC4Announcement&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Phil Zoio&lt;br /&gt;&lt;br /&gt;Impala Home:  &lt;a href="http://impala.googlecode.com"&gt;http://impala.googlecode.com&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-2726122245437541470?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/2726122245437541470/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=2726122245437541470' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/2726122245437541470'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/2726122245437541470'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2010/04/impala-10-rc4-released.html' title='Impala 1.0 RC4 released'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-1932771079636957456</id><published>2010-04-05T21:06:00.000+01:00</published><updated>2010-05-04T20:32:55.457+01:00</updated><title type='text'>Seven ways in which Impala makes Spring development more productive</title><content type='html'>&lt;span&gt;Impala is a modular, dynamic &lt;span style="font-style: italic;"&gt;productivity&lt;/span&gt; framework. The principal aim of Impala is to help developers extract every ounce of productivity out of the Spring development environment, while remaining true to the original Spring premise of simplicity and testability. The result is a much more productive Spring application development than you might think possible.&lt;br /&gt;&lt;br /&gt;Here's how Impala lets you be more productive when working with Spring.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;1. Virtually instantaneous build/deploy/test cycles&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span&gt;For typical Java applications, redeploying a change requires redeploying the whole application. Not with Impala. Only the affected parts of the application need to be deployed. This leads to virtually instantaneous build/deploy/test cycles, as the granularity of redeployment is typically very small relative to that of the application as a whole. You don't need to sit around for ages waiting for your whole application to load.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;2. Automatic modification detection and redeployment&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When you make a change to an Impala web application running in Eclipse, Impala can automatically pick up which parts of the application have changed, and redeploy those parts of your application without any user intervention. This removes the need for a manual step to perform this task. Impala gives you control over what resources are monitored for changes, how frequently resources are checked for modification, etc.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3. No explicit build step required&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When writing typical Java web applications using Eclipse, in many projects there is an extra build step required to package your applications in order to deploy them. Not with Impala. Eclipse automatically compiles your classes for you incrementally in the background. The project structure conventions for Impala mean that this sufficient, and that no extra build steps are required during development.&lt;br /&gt;&lt;br /&gt;Of course, you can do a regular WAR build when required for packaging for a production environment.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4. You can write your integration tests interactively&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Writing Spring integration tests can be slow, particularly for monolithic single module applications. Impala allows you to write integration tests interactively. You can write and run integration tests using an interactive console within Eclipse. If making changes to your application between test runs, you simply redeploy the changed modules. If you're simply changing your test, you don't need to do anything special as changes to your test class will automatically be picked up on the fly. All of this leads to a much more rapid build/deploy/test cycle when writing integration tests than would be possible otherwise.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;5. Suites including integration tests run super-efficiently&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When running a suite of integration tests, modules needed by successive tests are loaded incrementally and remain available for subsequent tests run as part of the same suite. There is no need for continually starting and stop Spring application contexts, which can really slow down the execution of integration tests.&lt;br /&gt;&lt;br /&gt;All of this makes test suite execution really fast, making Impala very friendly to use in environments where developers are expected (as they should be) to run the full project test suite before each commit to the version control system.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;6. Setup is very simple&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For a developer getting started on an existing project using Impala, it is really as simple as "check out and go" - simply check out the project files and starting writing and deploying the application within the IDE.&lt;br /&gt;&lt;br /&gt;If you're starting a new project, this too is easy, as Impala provides a script which allows you to set up a simple, working application by executing a couple of commands.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;7. Easy to use build and dependency management support if you need it&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Impala works with Maven, but if you're not a fan of Maven, Impala also features a reusable build system which saves you having to write create your own build from scratch. Impala also gives you a simple way to pull third party library jars and source from Maven repositories, even if you aren't using Maven as your build system.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-1932771079636957456?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/1932771079636957456/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=1932771079636957456' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/1932771079636957456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/1932771079636957456'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2010/04/seven-ways-in-which-impala-makes-spring.html' title='Seven ways in which Impala makes Spring development more productive'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-6355329597241210991</id><published>2010-03-12T14:37:00.004Z</published><updated>2010-03-12T14:44:30.689Z</updated><title type='text'>Impala 1.0 RC3 released</title><content type='html'>I am pleased to announce the release of Impala 1.0 RC3. Impala 1.0 RC3 is the final release candidate prior to the official 1.0 release. If no significant issues are raised against this released, it is envisaged that there will be virtually no changes in the subsequent 1.0 final release.&lt;br /&gt;&lt;br /&gt;This release contains a number of enhancements:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;simplifications making it easier to migrate existing Spring-based projects to use Impala. It is now possible to run Impala as part of an existing virtually unchanged traditional Spring web application, which should significantly simplify the task of migrating an existing Spring application to use Impala.&lt;/li&gt;&lt;li&gt;support for JSPs deployed within individual web modules. Prior to 1.0 RC3, JSPs need to be contained within the web application folder. With 1.0 RC3 it is now possible to completely modularise the web elements of a JSP-based web application.&lt;/li&gt;&lt;li&gt; support load time weaving of aspects created using AspectJ. &lt;/li&gt;&lt;li&gt; various other minor features and bug fixes.&lt;/li&gt;&lt;/ul&gt;Also, Impala 1.0 RC3 is available in the Maven central repository for the first time.&lt;br /&gt;&lt;br /&gt;For more information on this release see: &lt;a href="http://code.google.com/p/impala/wiki/Release1_0RC3Announcement."&gt;http://code.google.com/p/impala/wiki/Release1_0RC3Announcement.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In the next couple of weeks, I plan to add more documentation on how to get Impala working nicely with Maven, and how to migrate an existing Spring-based project to use Impala.&lt;br /&gt;&lt;br /&gt;Please don't hesitate to report any issues you may encounter, which you can do on the Impala issue tracker: &lt;a href="http://code.google.com/p/impala/issues/list"&gt;http://code.google.com/p/impala/issues/list&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Phil Zoio&lt;br /&gt;&lt;br /&gt;&lt;a href="http://impala.googlecode.com"&gt; http://impala.googlecode.com&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-6355329597241210991?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/6355329597241210991/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=6355329597241210991' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/6355329597241210991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/6355329597241210991'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2010/03/impala-10-rc3-released.html' title='Impala 1.0 RC3 released'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-3067610393243051717</id><published>2010-02-03T07:12:00.001Z</published><updated>2010-02-03T09:28:16.587Z</updated><title type='text'>OSGi and Enterprise Java dynamic modularity after Spring dm Server</title><content type='html'>The key message to be taken from SpringSource's decision to hand last month their Spring OSGi projects (Spring DM and dm Server) to the Eclipse foundation is the following: that OSGi is not ready for adoption by the mainstream of enterprise Java. Reality has finally dawned!&lt;br /&gt;&lt;br /&gt;According the &lt;a href="http://blog.springsource.com/2010/01/12/dm-server-project-moves-to-eclipse-org/"&gt;announcement from Adrian Colyer&lt;/a&gt;, CTO of SpringSource:&lt;br /&gt;&lt;blockquote&gt;&lt;em&gt;For a mainstream development team though, who just want to build an enterprise application as quickly as possible, and with as little hassle as possible, the costs currently associated with adopting enterprise OSGi can outweigh the short-term benefits&lt;/em&gt;. This situation needs to be addressed before enterprise OSGi can become the de-facto approach for &lt;em&gt;mainstream enterprise&lt;/em&gt; &lt;em&gt;application&lt;/em&gt; development.&lt;br /&gt;&lt;/blockquote&gt;While SpringSource will no doubt continue to support OSGi, the extent to which it will continue to provide resources to the &lt;span style="font-style: italic;"&gt;donated&lt;/span&gt; projects is far from certain. What is more clear, though, is it will no longer be wielding it's own considerable influence within the industry to shepherd its user base &lt;span style="font-style: italic;"&gt;en masse&lt;/span&gt; towards OSGi.&lt;br /&gt;&lt;br /&gt;This is a good thing. Firstly, the obsession with OSGi has distracted the community away from practical efforts which could work more comfortably within the existing enterprise Java model. Hopefully that obsession will go away, or at least be limited to those already converted to the OSGi way. Secondly, from a purely selfish, egotistical point of view, I feel vindicated. For years, I have been saying that OSGi is &lt;a href="http://impalablog.blogspot.com/2008/05/spring-application-platform-is-it-big.html"&gt;too complex for the Java mainstream&lt;/a&gt;. For years, I have been beaten over the head by a small group of hardcore OSGi evangelists who have persistently used the argument that if SpringSource is betting on OSGi, then it must be a good thing for everyone else, and that any alternative approach does not warrant any consideration. The bet has failed, and this argument has now fallen rather flat. If SpringSource, with all the credibility it has generated through the Spring Framework, all its intellectual and marketing muscle, and all the effort and expense it has incurred, cannot make work OSGi for mainstream enterprise Java, then no one else can.&lt;br /&gt;&lt;br /&gt;But all of this is also points to a real missed opportunity. The fact remains that &lt;span style="font-weight: bold;"&gt;Spring users still need a modularity solution&lt;/span&gt;. They need a way of being able to take advantage of the best of what dynamic modularity has to offer - dynamically composable software with genuine decoupling between parts of the application, and rapid build/deploy/test cycles during development - without having to take on all the complexity of the full-blown OSGi approach. This need still exists, and will not go away. As Adrian suggests, this need will not be served by OSGi without some fundamental simplifications, something I could not imagine happening any time soon.&lt;br /&gt;&lt;br /&gt;In the meantime, I have invited SpringSource to engage more with Impala. While they have flirted with the idea in the last few months, perhaps even seriously, they have backed away from it for now. In view of recent history, it is not that surprising. Imagine the uproar that would ensue among the OSGi zealots if SpringSource were to go down that route. It doesn't bear thinking about.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-3067610393243051717?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/3067610393243051717/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=3067610393243051717' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/3067610393243051717'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/3067610393243051717'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2010/02/osgi-and-enterprise-java-dynamic.html' title='OSGi and Enterprise Java dynamic modularity after Spring dm Server'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-3057853092140687430</id><published>2010-01-04T14:54:00.003Z</published><updated>2010-01-04T14:56:36.562Z</updated><title type='text'>Impala 1.0 RC2 released</title><content type='html'>I am pleased to announce the release of Impala 1.0 RC2. With this release, support for Maven is introduced for the first time, along with various other enhancements, refactorings and bug fixes, including:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;simplifications to the default project structure, making it more intuitive and Maven-friendly&lt;/li&gt;&lt;li&gt;a dynamic properties Spring namespace, making it easier to support properties which can be injected and dynamically updated without requiring module or application reloads.&lt;/li&gt;&lt;li&gt;further refinements to the mechanisms for supporting multi-module web applications.&lt;/li&gt;&lt;li&gt;initial support for Spring 3.0. &lt;/li&gt;&lt;/ul&gt;For more information on this release see: &lt;a href="http://code.google.com/p/impala/wiki/Release1_0RC2Announcement."&gt;http://code.google.com/p/impala/wiki/Release1_0RC2Announcement.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Cheers,&lt;br /&gt;Phil Zoio&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-3057853092140687430?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/3057853092140687430/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=3057853092140687430' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/3057853092140687430'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/3057853092140687430'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2010/01/impala-10-rc2-released.html' title='Impala 1.0 RC2 released'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-1558056906203352600</id><published>2009-11-26T08:51:00.001Z</published><updated>2009-11-26T09:15:02.344Z</updated><title type='text'>Don't let OSGi put you off modularity</title><content type='html'>If you are interested in the ideas of modularity, there is quite a good chance you have looked at OSGi. But there is also quite a good chance that you have been put off by the extra development overhead required to set up and maintain OSGi-based applications.&lt;br /&gt;&lt;br /&gt;If this is the case for you, my message is this: &lt;span style="font-style: italic; font-weight: bold;"&gt;don't let fact that you are put off by OSGi put you off the ideas of modularity&lt;/span&gt;. Modularity is a bigger, more important and valuable idea than any particular technology. The ability to modularise an application can massively improve your application's ability to absorb complexity as new features and components are added, which in turn means that you remain much more productive as your application grows. It reduces the rate of entropy in your system, extending its potential life span, which of course if great for business.&lt;br /&gt;&lt;br /&gt;This kind of modularity is one of the fundamental benefits of &lt;a href="http://code.google.com/p/impala/"&gt;Impala&lt;/a&gt;. Also, because Impala's modules are dynamically reloadable, and you also get dynamic redeployment of small parts of your application, allowing you to greatly &lt;span style="font-weight: bold;"&gt;accelerate application development&lt;/span&gt;, maintain high levels of productivity, and retain high levels of code and functionality reuse as you application grows.&lt;br /&gt;&lt;br /&gt;Impala does not solve all of the problems solved by OSGi. Notably, it does not provide versioning of third party libraries. However, it solves most of the important ones relevant for day to day development. Fundamentally, it allows you to modularise your &lt;span style="font-style: italic;"&gt;application&lt;/span&gt;, without having to worry about micro-managing the dependencies of third party libraries in your application. Don't get me wrong - there are times when this capability can be important, especially for very large projects with large budgets and teams. But certainly not for every project, and probably not even for the typical one.&lt;br /&gt;&lt;br /&gt;One way to think of choice is to look at the graph below.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_3D_qDW2IOvQ/SwpSIaSp4sI/AAAAAAAAAC0/2mdnqZixYcI/s1600/complexity.png"&gt;&lt;img style="cursor: pointer; width: 400px; height: 261px;" src="http://3.bp.blogspot.com/_3D_qDW2IOvQ/SwpSIaSp4sI/AAAAAAAAAC0/2mdnqZixYcI/s400/complexity.png" alt="" id="BLOGGER_PHOTO_ID_5407224607061697218" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The basic idea behind modularity is that the growth in complexity of your application slows as your application grows in size, compared to applications without modules. This applies both for Impala and OSGi-based applications. The difference is that because the barriers to entry are lower for Impala-based applications, the benefits kick in sooner, and accumulate for longer over the duration of the project, greatly reducing the overall cost of complexity over the lifetime of a project.&lt;br /&gt;&lt;br /&gt;So, don't shy away from modularity just because OSGi looks complex. The benefits of modularity are too valuable, and an alternative like Impala make these attainable with fewer headaches.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-1558056906203352600?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/1558056906203352600/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=1558056906203352600' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/1558056906203352600'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/1558056906203352600'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2009/11/dont-let-osgi-put-you-off-modularity.html' title='Don&apos;t let OSGi put you off modularity'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_3D_qDW2IOvQ/SwpSIaSp4sI/AAAAAAAAAC0/2mdnqZixYcI/s72-c/complexity.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-3734669107196019629</id><published>2009-11-05T20:19:00.002Z</published><updated>2009-11-05T20:45:29.942Z</updated><title type='text'>The granularity of change in dynamic Java web applications</title><content type='html'>When writing Java web applications, you are continually making changes to your application, and to be productive you need to be able to deploy and test these changes quickly. The kinds of changes you make are of all sorts: from changes to resources to changes to markup templates to changes in the way your application is wired to changes in the code itself.&lt;br /&gt;&lt;br /&gt;The point of this article is that not all changes are equal, both in their frequency and in the difficulty in applying them dynamically in a running web application. Let's go through some examples, and how the changes might be applied in different types of frameworks:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;1. Static resources&lt;/span&gt;&lt;br /&gt;The simplest kinds of changes for any dynamic web framework to apply are those of static resources - images, JavaScript files, page templates etc. That's because these kinds of artifacts are inherently free of dependents.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;2. Application configuration&lt;/span&gt;&lt;br /&gt;Configuration consists of things such as settings for data sources, mail servers, etc, as well as switches in your application itself. While it is in general possible to reflect these kinds of changes &lt;span style="font-style: italic;"&gt;dynamically&lt;/span&gt;, there is a cost. For example, if you are using database connection pooling, pointing to a different data source dynamically is a non-trivial exercise. Also, if your application checks particular application settings at source each time the affected functionality is used, then the system is more dynamic, but also less performant. By contrast, if you only load particular settings at startup (for example using wired in property placeholders in a Spring application context), the application is more efficient but is more likely to require reloads to reflect changes.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;3. Application wiring&lt;/span&gt;&lt;br /&gt;Application wiring is a configuration of sorts, but relates more to how parts of the system are composed or wired together to form the whole application. In a Spring application, the application wiring is simply your Spring configuration.&lt;br /&gt;&lt;br /&gt;In general, changes to application wiring requires reloads. There are special cases where this doesn't apply. For example, you could introduce new Spring beans without reloading the application context. Changes to existing beans and their collaborators are harder to make.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;4. Scripts&lt;/span&gt;&lt;br /&gt;Scripts are programs in your application which by definition can be altered without having to reload your entire application or even significant parts of it. However, a scripting infrastructure needs to be in place to allow changes to scripts to be introduced, recognised and reflected in the system.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;5. Application code&lt;/span&gt;&lt;br /&gt;Application code in a Java application are your Java classes. Actually, considering this group as a single category is an oversimplification, especially in a dynamic module system, where making changes to core interfaces and domain classes will impose much greater requirements in terms of reloading than peripheral or implementation classes with fewer dependants.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;6. Third party libraries&lt;/span&gt;&lt;br /&gt;The libraries in your application are the jar files containing all the third party dependencies.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The challenge for frameworks&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The key productivity challenge with a dynamic application framework is to make it as easy as possible to make the kinds of changes you need to make, while at the same time keeping the framework as lightweight as possible. In the next section I take a look a number of technology stacks, what they do to make different types of reloading possible, what they get wrong, and what they get right.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;A. Traditional Java web application&lt;/span&gt;&lt;br /&gt;A traditional Java web application might consist, for example, of a Struts or JSF front end, Hibernate back end, all wired together using Spring.&lt;br /&gt;&lt;br /&gt;The traditional Java web application has no problem reloading static resources without having to reload any other part of the application. Most web containers are able to reload an entire web application, including third party libraries, Java code, application wiring etc.&lt;br /&gt;&lt;br /&gt;The problem is they are not much good at reloading any finer grained changes. Any changes you make to your application wiring or code will normally require a full application reload.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;B. Scripted applications&lt;/span&gt;&lt;br /&gt;Scripted applications are based on scripting languages such as Groovy (Grails) and JRuby (Rails). As well as explicitly providing support for reloading capabilities, these frameworks rely on the fact that all application functionality is in scripts rather than in compiled Java code, making fine grained reloading of parts of the application possible. The downside (if you think of it this way) is that you have to work with scripted code without any of the type safety checking of a statically typed language such as Java.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;C. OSGi applications&lt;/span&gt;&lt;br /&gt;OSGi applications offer a fairly comprehensive solution to the reloading problem. All artifacts within the application, from resources to application code to libraries are contained within modules which are treated in a more or less uniform manner by the OSGi container. This is a strength, but it is also a weakness. The strength is that it does allow third party libraries to be reloaded in a fine grained way. The weakness is that in your high level view of the application, OSGi doesn't really allow you to easily distinguish between the parts of your application which should be easy to reload - e.g. resources - and the parts which are harder to reload, but are changed much less frequently during the lifetime of the application (third party libraries).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;What about Impala?&lt;/span&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Impala tries to find the right balance in the strengths of the various approaches. Resource reloading works as with traditional Java applications - nothing special needs to take place. Impala includes mechanisms which make it easier to change configurations dynamically without requiring any module reloading. For changing static configuration and application wiring, Impala allows you to reload parts of your application at exactly the right granularity. If only a single module is affected, then only that module needs to be reloaded. If the change affects core interfaces, then the reload will automatically ripple through to the right dependent modules.&lt;br /&gt;&lt;br /&gt;Impala even allows you to dynamically change the structure of modules within the application. Unlike OSGi, it doesn't support reloading of third party libraries. For this, an entire application reload is required. However, Impala's approach does your application modules in central focus, which is important as these are the normally parts of your application which change most frequently.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-3734669107196019629?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/3734669107196019629/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=3734669107196019629' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/3734669107196019629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/3734669107196019629'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2009/11/granularity-of-change-in-dynamic-java.html' title='The granularity of change in dynamic Java web applications'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-8821386860636816496</id><published>2009-11-01T20:32:00.004Z</published><updated>2009-11-01T20:39:36.408Z</updated><title type='text'>Slides for Impala talk at the Server Side Europe in Prague</title><content type='html'>I'm pleased to say that &lt;a href="http://javasymposium.techtarget.com/html/frameworks.html#PZoioImpala"&gt;my talk at The Server Side Java Symposium&lt;/a&gt; in Prague went well and was apparently well received. There definitely is a growing interest in the ideas of modularity and how the benefits of modularity can be achieved in practice.&lt;br /&gt;&lt;br /&gt;I've posted a copy of my slides for the talk &lt;a href="http://impala.googlecode.com/svn/wiki/presentations/tss-europe.pdf"&gt;here in PDF format&lt;/a&gt;. The document contains the slides that I presented, as well as quite a few which were held in reserve but weren't actually presented during the talk.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-8821386860636816496?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/8821386860636816496/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=8821386860636816496' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/8821386860636816496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/8821386860636816496'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2009/11/slides-for-talk-at-server-side-europe.html' title='Slides for Impala talk at the Server Side Europe in Prague'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-2078365284106103362</id><published>2009-10-14T20:15:00.002+01:00</published><updated>2009-10-16T11:12:49.426+01:00</updated><title type='text'>How to make your Spring wirings more manageable</title><content type='html'>When Spring first came along it was a breath of fresh air - a clever way to wire up applications which did not rely on the use of all sorts of singletons all over the place. (I still remember what it was like working that way, and shudder at the thought.) The idea was simple: let classes in the application just do their own job, but leave the business of figuring out how to get collaborators to the IoC container, with the help of some XML configuration. No longer did your application code did not have to deal the messy business of having to resolve their own dependencies.&lt;br /&gt;&lt;br /&gt;OK, we've solved the problem with the code, but &lt;span style="font-weight: bold; font-style: italic;"&gt;the job isn't completely done&lt;/span&gt;. Actually, the problem has shifted onto managing Spring wirings.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The problem with managing Spring wirings&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Applications necessarily get big. You end up having to write a lot of XML. So while your code may stay nice and clean, you end up with some tricky questions about how to manage this part of your application. Of course, here you try to be as "modular" as you can, putting DAOs together, infrastructure related beans together, etc. You try to identify vertical slices for your application and put beans relating to particular vertical slices together.&lt;br /&gt;&lt;br /&gt;The problem is that for all the bean definitions that exist in your application, some groups are inherently coupled, while others are inherently free of coupling. &lt;span style="font-style: italic;"&gt;In a vanilla Spring application, there is no way to express these dependencies at a system level. &lt;/span&gt;So it is very easy for your application wiring to become an unnecessarily fragile collection of invisible dependencies, liable to break in unexpected ways when any rearrangement takes place.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Autowiring, namespaces and class path scanners don't necessarily help&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Then of course there is the&lt;span style="font-style: italic;"&gt; drudgery of editing XML &lt;/span&gt;configuration files by hand. Personally, I think that is less of a problem, but Spring has gone to great lengths to free developers from some of this pain over the years, through the introduction of &lt;span style="font-style: italic;"&gt;autowiring&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;class path scanners&lt;/span&gt;, and XML namespaces. I happily embrace all of the above as they reduce the amount of code I need to write, but they don't address the fundamental problem. They don't enhance one's ability to express dependencies between parts of your application at a system level, and where possible, to reduce these dependencies.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;So how does Impala help?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Remember how easy Spring seemed when we were working with just small applications? Impala allows you to keep your applications small, or at least keep them &lt;span style="font-style: italic;"&gt;feeling small&lt;/span&gt;. This is done through &lt;span style="font-weight: bold; font-style: italic;"&gt;modules&lt;/span&gt;. You can think of a module as a mini-application which is able to communicate with other mini-applications in the system through well defined mechanisms and through sharing common interfaces.&lt;br /&gt;&lt;br /&gt;The Spring configuration for each module remains pretty small. If it starts getting too big, then its a good sign that some of it's functionality needs to be split off into another module. So within the module, you only need to deal with small configurations - &lt;span&gt;bite size chunks&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;You can configure beans within a module however you like - through plain Spring XML, custom namespaces or through annotations. If your module needs to use functionality from other parts of the system (as most will), then you can import services directly from the &lt;span style="font-style: italic;"&gt;shared service registry &lt;/span&gt;(as long as the service has been exported using an interface or class visible to the current module). If necessary, you can allow your module to depend directly on another module, either as a dependent or as a direct child.&lt;br /&gt;&lt;br /&gt;If you need to compose your application in different ways &lt;span style="font-style: italic;"&gt;according to environment&lt;/span&gt;&lt;span&gt; &lt;/span&gt;or customer, that's easy too. Simply change which modules your deploy, or you can even vary the configuration of within a module according to requirements.&lt;br /&gt;&lt;br /&gt;You no longer need to wait ages for &lt;span style="font-style: italic;"&gt;integration tests&lt;/span&gt; to load, because you can easily create integration tests which consist simply of the modules you need to use.&lt;br /&gt;&lt;br /&gt;And you get the benefits of much &lt;span style="font-style: italic;"&gt;more productive&lt;/span&gt;, responsive development environment because each of these modules can be reloaded on the fly, either individually, in groups, or as a whole - and this applies whether you are running integration tests or running your application on a web container.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-2078365284106103362?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/2078365284106103362/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=2078365284106103362' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/2078365284106103362'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/2078365284106103362'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2009/09/how-to-make-your-spring-wirings-more.html' title='How to make your Spring wirings more manageable'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-6047776766500920794</id><published>2009-10-06T08:58:00.002+01:00</published><updated>2009-10-06T09:01:29.802+01:00</updated><title type='text'>Talk at the Server Side Europe in Prague</title><content type='html'>I am doing a &lt;a href="http://javasymposium.techtarget.com/html/frameworks.html#PZoioImpala"&gt;talk on Impala at The Server Side Europe&lt;/a&gt;'s conference in Prague, which is taking place on October the 27th and 28th. Really looking forward to it, especially as I used to be a regular visitor of Prague in the early 90s when I was living in Germany.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-6047776766500920794?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/6047776766500920794/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=6047776766500920794' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/6047776766500920794'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/6047776766500920794'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2009/10/talk-at-server-side-europe-in-prague.html' title='Talk at the Server Side Europe in Prague'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-1415737068103972959</id><published>2009-10-03T14:52:00.000+01:00</published><updated>2009-10-03T20:14:00.712+01:00</updated><title type='text'>Why web.xml makes it hard to write modular web applications</title><content type='html'>In a typical Java enterprise application, the &lt;span style="font-style: italic;"&gt;web.xml&lt;/span&gt; is used to define servlets and filters, which are among the main entry points into your application from the outside world. Since &lt;span style="font-style: italic;"&gt;web.xml &lt;/span&gt;cannot be reloaded, added to or modified without reloading the entire application, it is not a very convenient place to host application configuration and definitions in a dynamic module applications.&lt;br /&gt;&lt;br /&gt;Another related problem is the limitations of the request mapping capability of web containers as defined by the current servlet specification. Currently, these make it possible to map requests to servlets and filters using an exact match (e.g. &lt;span style="font-style: italic;"&gt;/myservlet/myresource&lt;/span&gt;) or either a prefix and wildcard match (e.g &lt;span style="font-style: italic;"&gt;/myservlet/*&lt;/span&gt;) or using a suffix wildcard match (e.g. &lt;span style="font-style: italic;"&gt;*.do&lt;/span&gt;). It doesn't allow you to use a combination of prefix and suffix wildcard matches. This means that you cannot, for example, use the path (&lt;span style="font-style: italic;"&gt;/myprefix/*&lt;/span&gt;) to match application URLs, and at the same time allow your application's CSS files to be accessible in a resource such as &lt;span style="font-style: italic;"&gt;/myprefix/styles.css&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Multi-module web applications in Impala&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;One of biggest changes in the recent 1.0 RC1 release of Impala is the ability to write web applications which are less reliant on &lt;span style="font-style: italic;"&gt;web.xml&lt;/span&gt;, allowing both dynamic registration of modules containing servlets and filters, and at the same time solving the path mapping limitation described in the previous paragraph.&lt;br /&gt;&lt;br /&gt;In an Impala application, you cannot do away with the &lt;span style="font-style: italic;"&gt;web.xml &lt;/span&gt;altogether. However, you can reduce the request handlers defined in &lt;span style="font-style: italic;"&gt;web.xml&lt;/span&gt; to the following:&lt;br /&gt;&lt;pre class="brush:xml"&gt;&lt;br /&gt;&amp;lt;filter&amp;gt;&lt;br /&gt;&amp;lt;filter-name&amp;gt;web&amp;lt;/filter-name&amp;gt;&lt;br /&gt;&amp;lt;filter-class&amp;gt;org.impalaframework.web.spring.integration.ModuleProxyFilter&amp;lt;/filter-class&amp;gt;&lt;br /&gt;&amp;lt;init-param&amp;gt;&lt;br /&gt;  &amp;lt;param-name&amp;gt;modulePrefix&amp;lt;/param-name&amp;gt;&lt;br /&gt;  &amp;lt;param-value&amp;gt;urlmapping-web&amp;lt;/param-value&amp;gt;&lt;br /&gt;&amp;lt;/init-param&amp;gt;&lt;br /&gt;&amp;lt;load-on-startup&amp;gt;2&amp;lt;/load-on-startup&amp;gt;&lt;br /&gt;&amp;lt;/filter&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;filter-mapping&amp;gt;&lt;br /&gt;&amp;lt;filter-name&amp;gt;web&amp;lt;/filter-name&amp;gt;&lt;br /&gt;&amp;lt;url-pattern&amp;gt;/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;&amp;lt;/filter-mapping&amp;gt;&lt;br /&gt;&lt;/pre&gt;In the example above, the &lt;span style="font-style: italic;"&gt;ModuleProxyFilter&lt;/span&gt; captures requests and routes them into Impala modules. The mapping rules which determine which modules service which requests are contained within modules. Here's an example from the &lt;a href="http://code.google.com/p/impala/wiki/SamplesURLMapping"&gt;URL mapping sample&lt;/a&gt;:&lt;br /&gt;&lt;pre class="brush:xml"&gt;&lt;br /&gt;&amp;lt;web:mapping&amp;gt;&lt;br /&gt;&amp;lt;web:to-module prefix = "/webview" setServletPath="true"/&amp;gt;&lt;br /&gt;&amp;lt;web:to-handler extension = "htm" servletName="urlmapping-webview" filterNames = "characterEncodingFilter,sysoutLoggingFilter"/&amp;gt;&lt;br /&gt;&amp;lt;web:to-handler extension = "css" servletName="urlmapping-resources"/&amp;gt;&lt;br /&gt;&amp;lt;/web:mapping&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;web:servlet id = "urlmapping-webview"&lt;br /&gt;servletClass = "org.impalaframework.web.spring.servlet.InternalModuleServlet"/&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;web:servlet id = "urlmapping-resources"&lt;br /&gt;servletClass = "org.springframework.js.resource.ResourceServlet"&lt;br /&gt;initParameters = "cacheTimeout=10"/&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;web:filter id = "characterEncodingFilter"&lt;br /&gt;filterClass = "org.springframework.web.filter.CharacterEncodingFilter"&lt;br /&gt;initParameters = "forceEncoding=true,encoding=utf8"&amp;gt;&lt;br /&gt;&amp;lt;/web:filter&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;web:filter id = "sysoutLoggingFilter"&lt;br /&gt;filterClass = "org.impalaframework.urlmapping.webview.SysoutLoggingFilter"&amp;gt;&lt;br /&gt;&amp;lt;/web:filter&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This module defines a number of servlets and filters who's life cycles are tied to that of the module, rather than that of &lt;span style="font-style: italic;"&gt;web.xml&lt;/span&gt;. They can be dynamically registered and removed, and don't require an application restart. The modules can contain all the classes and resources necessary to service requests, without relying on the presence, for example, or resources such as JavaScript files on the context path (e.g. in the &lt;span style="font-style: italic;"&gt;WEB-INF&lt;/span&gt; directory).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;What about Servlet 3.0?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The changes described above are very much in line with the changes in the forthcoming Servlet 3 specification which allow servlets and filters to be added via web.xml fragments, and via annotations. It will also allows you to add Servlet and Filter instances programmatically. I expect that Impala will be able to take advantage of this mechanism when it becomes available, perhaps by wrapping the Servlet or Filter to ensure that it is associated with the originating module's class loader, and not the web application class loader. This will have the advantage of allowing Impala to make use of the web container's invocation infrastructure while still supporting dynamic servlet or filter registration.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-1415737068103972959?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/1415737068103972959/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=1415737068103972959' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/1415737068103972959'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/1415737068103972959'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2009/10/why-webxml-makes-it-hard-to-write.html' title='Why web.xml makes it hard to write modular web applications'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-5174478373082892175</id><published>2009-09-24T14:17:00.006+01:00</published><updated>2009-09-24T14:40:23.773+01:00</updated><title type='text'>Impala 1.0 RC1 released</title><content type='html'>I am pleased to announce the release of &lt;a href="http://code.google.com/p/impala/"&gt;Impala&lt;/a&gt; 1.0 RC1.&lt;br /&gt;&lt;br /&gt;With this release, Impala is now feature complete for the 1.0 final release, with only minor enhancements and bug fixes planned before this happens.&lt;br /&gt;&lt;br /&gt;Impala 1.0 RC1 contains a number of big feature improvements from the previous release:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;a more powerful and flexible mechanism for mapping web requests to and within modules, making it easier to build truly &lt;a href="http://code.google.com/p/impala/wiki/WebModuleBasedHandlerRegistration"&gt;multi-module web applications&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;a new Spring &lt;a href="http://code.google.com/p/impala/wiki/NamespaceWebReference"&gt;web namespace&lt;/a&gt; for registering servlets, filters and other web artifacts in Impala web modules.&lt;/li&gt;&lt;li&gt;enhancements to make the automatic module reloading mechanism more robust and suitable for applying in production environments.&lt;/li&gt;&lt;li&gt;various other minor bug fixes and enhancements, particularly in the areas of build, dynamic services and class loading.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;For more information on this release see &lt;a href="http://code.google.com/p/impala/wiki/Release1_0RC1Announcement"&gt;http://code.google.com/p/impala/wiki/Release1_0RC1Announcement&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-5174478373082892175?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/5174478373082892175/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=5174478373082892175' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/5174478373082892175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/5174478373082892175'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2009/09/impala-10-rc1-released.html' title='Impala 1.0 RC1 released'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-5583498913605968616</id><published>2009-09-06T19:13:00.045+01:00</published><updated>2009-09-17T14:13:41.184+01:00</updated><title type='text'>10 reasons for Spring users to try Impala</title><content type='html'>If you are a user of the Spring framework and you haven't tried Impala, I hope to convince you in this entry that you are really missing out.&lt;br /&gt;&lt;br /&gt;These are the reasons why I make this claim.&lt;br /&gt;&lt;br /&gt;When Spring was introduced 2004-2005, it brought a big shift in the frontier of Java enterprise software development, offering solutions to many of the challenges faced by developers in a way which other technologies before, notably EJB, had conspicuously failed. Spring is still very much a valid technology in today's environment, but the frontiers have shifted.&lt;br /&gt;&lt;br /&gt;One shift is in the increasing recognition of the shortcomings of the Java language itself, and the need for an eventual replacement as the premier JVM language. Another shift is the increasing awareness of the need for modularity in application development. My view is that without the backing of a truly modular framework, it is almost impossible to build a large enterprise application which does not end up becoming unwieldy, difficult to manage, and slow to build and deploy. This more than anything else leads to the perception that Java is unproductive to work with.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1. Impala gives your project a massive productivity boost&lt;/span&gt;&lt;br /&gt;The reason for this stems from Impala's dynamic reloading capability. When you make changes to an Impala application, you only need to reload the affected modules and their dependents. Indeed, you can set Impala up so that these modules will be reloaded automatically. This allows code/deploy/test cycles to be reduced to an absolute minimum. In some of the next few points we give some further examples of how Impala improves your productivity.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2. With Impala you can make your applications truly modular&lt;/span&gt;&lt;br /&gt;Modularity is about removing all unnecessary coupling between parts of your application, and is essential for building large applications which don't grow exponentially in complexity as they grow linearly in size.&lt;br /&gt;&lt;br /&gt;With Impala and other dynamic modularity frameworks, modularity is achieved through a separation of interface and implementation which is just not possible in traditional Java applications. With Impala, modularity is enforced at the class loader level.&lt;br /&gt;&lt;br /&gt;Impala makes it simple to deploy multiple flavours of the same application simply by choosing which modules to deploy. Impala gives you mechanisms for configuring individual modules, so that you can support different deployment options in a clean and simple way.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3. Impala works "out of the box"&lt;/span&gt;&lt;br /&gt;I can't resist using this term because it features often in Rod Johnson's books. If you try any of the Impala examples, you will notice that all you typically need to do is to check out the code, then run it in your IDE. (If a database is involved, you may need a little extra setup there.) There is no need for any extra build steps, installation of third party environments, containers, etc. It's all self-contained.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4. With Impala, Spring integration testing is a doddle&lt;/span&gt;&lt;br /&gt;Impala makes it really simple to write Spring integration tests. Gone is the need for convoluted test application context definitions such as&lt;br /&gt;&lt;pre class="brush:java"&gt;&lt;br /&gt;new ClasspathApplicationContext(new String[] {&lt;br /&gt;"config-context.xml",&lt;br /&gt;"dao-context.xml",&lt;br /&gt;"config-context.xml",&lt;br /&gt;"some-context-which-you-you-need-for-your-test.xml",&lt;br /&gt;"some-context-which-you-you-dont-need-for-your-test.xml",&lt;br /&gt;"another-context-which-you-you-dont-need-for-your-test.xml",&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;With Impala, all you need to do in a typical integration test is to specify which modules you want to include (dependent modules get included automatically), and use Impala's API to access beans either from the root or one of the module application contexts. For example:&lt;br /&gt;&lt;pre class="brush:java"&gt;&lt;br /&gt;public class InProjectEntryDAOTest extends BaseDataTest {&lt;br /&gt;&lt;br /&gt;public static void main(String[] args) {&lt;br /&gt;  InteractiveTestRunner.run(InProjectEntryDAOTest.class);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void testDAO() {&lt;br /&gt;  //get the entryDAO bean from the root module&lt;br /&gt;  EntryDAO dao = Impala.getBean("entryDAO", EntryDAO.class);&lt;br /&gt;  ... test methods&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public RootModuleDefinition getModuleDefinition() {&lt;br /&gt;  return new TestDefinitionSource("example-dao", "example-hibernate").getModuleDefinition();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Tests work equally well whether you are running them interactively (without the need to reload the entire application or even any part of it between successive test runs), or whether you are running it as part of a suite (in which case the application modules are incrementally loaded as required). In both cases, running integration tests is very efficient, allowing you to be much more productive while still practicing TDD.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;5. With Impala you can write truly multi-module web applications&lt;/span&gt;&lt;br /&gt;A big barrier to truly modular web applications is the reliance on &lt;span style="font-style: italic;"&gt;web.xml&lt;/span&gt;, because changes to &lt;span style="font-style: italic;"&gt;web.xml&lt;/span&gt; require a full application reload. The forthcoming release of Impala allows you to define servlets and filters within the modules themselves, with their life cycle tied to that of the containing module. It also allows you to map requests with arbitrary URL path prefixes to individual modules. Once within a module, requests can be mapped to filters and servlets based on file extension.&lt;br /&gt;&lt;br /&gt;These capabilities allow you to create a web application tier which is truly modular: you can package all of the filters, servlets, controllers, templates, images, Java script files required to service URLs with a particular prefix into the module jar itself. Indeed, you can even reduce your web.xml filter and servlet declarations to the following:&lt;br /&gt;&lt;pre class="brush:xml"&gt;&lt;br /&gt;&amp;lt;filter&amp;gt;&lt;br /&gt;  &amp;lt;filter-name&amp;gt;web&amp;lt;/filter-name&amp;gt;&lt;br /&gt;  &amp;lt;filter-class&amp;gt;org.impalaframework.web.spring.integration.ModuleProxyFilter&amp;lt;/filter-class&amp;gt;&lt;br /&gt;  &amp;lt;init-param&amp;gt;&lt;br /&gt;          &amp;lt;param-name&amp;gt;modulePrefix&amp;lt;/param-name&amp;gt;&lt;br /&gt;          &amp;lt;param-value&amp;gt;urlmapping-web&amp;lt;/param-value&amp;gt;&lt;br /&gt;  &amp;lt;/init-param&amp;gt;&lt;br /&gt;  &amp;lt;load-on-startup&amp;gt;2&amp;lt;/load-on-startup&amp;gt;&lt;br /&gt;&amp;lt;/filter&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;filter-mapping&amp;gt;&lt;br /&gt;  &amp;lt;filter-name&amp;gt;web&amp;lt;/filter-name&amp;gt;&lt;br /&gt;  &amp;lt;url-pattern&amp;gt;/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;&amp;lt;/filter-mapping&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;See the &lt;a href="http://impala.googlecode.com/svn/trunk/urlmapping-sample/urlmapping-web/context/WEB-INF/web.xml"&gt;web.xml&lt;/a&gt; from the &lt;a href="http://code.google.com/p/impala/wiki/SamplesURLMapping"&gt;URL mapping sample&lt;/a&gt; for the full example.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;6. Impala does not reinvent the Spring programming model&lt;/span&gt;&lt;br /&gt;Spring has been a huge success for a good reason - because it offers a much simpler programming model than was offered before. Spring offers a great solution for dependency injection as well as for making otherwise key technologies - transactions, AOP, JMX, remoting, etc - accessible or very simple to use.&lt;br /&gt;&lt;br /&gt;Impala does not reinvent the Spring programming module - within modules you will recognise all the artifacts familiar to Spring applications: collaborators wired together via dependency injection, configured using XML configuration files, annotations, etc. The big difference is that Impala gives you a well defined way for expressing relationships between modules within the application, allowing for simpler implementations of - and clear boundaries between - the constituent parts of a bigger application.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;7. With Impala you can forget about the build (most of the time)&lt;/span&gt;&lt;br /&gt;Impala allows you to develop your applications in a vanilla Eclipse environment without having to invoke any build scripts or do any extra environent setup to run your application. This makes getting new developers started on projects extremely simple. Simply check out and go.&lt;br /&gt;&lt;br /&gt;Of course, you will need to build for production environment. Impala includes an ANT-based build system which allows you to build either a WAR file or a Jetty-based standalone web application, which you simply unzip in the target environment and run.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;8. Impala fundamentally simpler to use than OSGi-based alternatives&lt;/span&gt;&lt;br /&gt;OSGi is a powerful technology, a very complete modularity solution. It is also quite a complex technology, requiring a non-trivial investment in time and energy to understand it, both conceptually and in its effect on the application environment.&lt;br /&gt;&lt;br /&gt;From a practical point of view, applying OSGi to enterprise environments is far from trivial, and involves solving a number of challenging technical problems. For example, many common Java libraries do not ship out the box in an OSGi-friendly way. Also, the use of the thread context class loader in many libraries poses a problem for OSGi-based applications.&lt;br /&gt;&lt;br /&gt;Solutions to these problems do exist, but they typically involve creating a more complex, more restrictive, or less familiar environment than required for traditional Java enterprise apps. Nothing comes for free. The question is whether it is worth paying the price.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;9. Impala poses no extra requirements for third party library management&lt;/span&gt;&lt;br /&gt;In terms of the management of third party libraries, Impala is no different from traditional Java applications. Third party library jars are bundled in the &lt;span style="font-style: italic;"&gt;lib&lt;/span&gt; directory of a WAR file. If you change a third party library, you will need to reload your application to apply these changes.&lt;br /&gt;&lt;br /&gt;Where Impala differs from traditional applications is the way that you manage application modules. In a WAR file, these will be bundled in a the &lt;span style="font-style: italic;"&gt;modules&lt;/span&gt; directory under &lt;span style="font-style: italic;"&gt;/WEB-INF&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;The relationship between modules can be hierarchical, or even in the form of a graph of dependencies. The important point is that modularity is applied to &lt;span style="font-style: italic;"&gt;your application's code.&lt;/span&gt; That is in my opinion the part which needs it most&lt;span style="font-style: italic;"&gt; &lt;/span&gt;because that's the part of your application which changes frequently. If you are not sure whether you agree with this point, ask yourself the questions:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;How often would you actually want to run multiple versions of the same third party library in the same application?&lt;/li&gt;&lt;li&gt;If you made changes to third party libraries in your application, how often would you want to apply these without restarting the application&lt;/li&gt;&lt;/ol&gt;If your answer to these questions is "not very often" or "not at all", then you probably don't need the full blown form of modularity offered by OSGi.&lt;br /&gt;&lt;br /&gt;Some may regard the traditional approach to third party libraries as broken - but it is also very convenient when it works!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;10. Impala is a practical solution for practical problems&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Impala did not evolve from an ivory tower view of how Java enteprise applications are supposed to be written. Instead, it was borne around two years ago out of the need to solve practical real world problems which were harming the productivity and maintainability of a large Java project. The most notable of these were the lack of any first class modularity in traditional Spring-based application development, and the slow build/deploy/test cycles arising from unwieldy integration tests.&lt;br /&gt;&lt;br /&gt;Impala has been designed and refactored to be simple and intuitive to work with, once you've grasped the basic concepts. It allows you to get the benefits of a modular approach to application development without many of the costs, and without being swamped by technobabble.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;What are you waiting for?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Working with Impala will give you the programmer's equivalent of a "spring in your step" - you will be amazed by how easily it is to get things done.&lt;br /&gt;&lt;br /&gt;So give it a go. Try one of the &lt;a href="http://code.google.com/p/impala/wiki/RunningSamples"&gt;samples&lt;/a&gt;, read the &lt;a href="http://code.google.com/p/impala/wiki/GettingStarted"&gt;tutorial&lt;/a&gt;, or kick start your own &lt;a href="http://code.google.com/p/impala/wiki/FirstSteps"&gt;application&lt;/a&gt;, and let me know how you get on.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-5583498913605968616?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/5583498913605968616/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=5583498913605968616' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/5583498913605968616'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/5583498913605968616'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2009/09/10-reasons-for-spring-users-to-try.html' title='10 reasons for Spring users to try Impala'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-7328545087045367883</id><published>2009-09-01T17:16:00.003+01:00</published><updated>2009-09-01T19:05:50.068+01:00</updated><title type='text'>Avoiding over eager reloading in Impala</title><content type='html'>The forthcoming version of Impala has new features which help to avoid "over-eager" reloading of modules, that is, module reloads which take place either unnecessarily and too frequently.&lt;br /&gt;&lt;br /&gt;If you run an Impala application within Eclipse you can have a running application automatically reload modules to reflect changes in your workspace. You do this by adding the line&lt;br /&gt;&lt;pre class="brush:plain"&gt;&lt;br /&gt;#Automatically detect changes and reload modules&lt;br /&gt;auto.reload.modules=true&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;to the file &lt;span style="font-style: italic;"&gt;impala-embedded.properties&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;This is really nice, because it means you can redeploy your application &lt;span style="font-style: italic;"&gt;without having to do anything&lt;/span&gt;, that is, no build step whatsoever.&lt;br /&gt;&lt;br /&gt;The trouble is, redeployment can get a bit overeager. For example, some changes will automatically get picked up without the need for redeployment, for example, my Freemarker web templates. Some changes you also want Impala to ignore completely, for example, changes which occur within your subversion (&lt;span style="font-style: italic;"&gt;.svn&lt;/span&gt;) directories.&lt;br /&gt;&lt;br /&gt;The next drop of Impala now contains a mechanism to filter which files get checked for modifications, via the auto.reload.extension.includes and auto.reload.extension.excludes. An example is shown below:&lt;br /&gt;&lt;pre class="brush:plain"&gt;&lt;br /&gt;#Includes only files ending with context.xml and class&lt;br /&gt;auto.reload.extension.includes=context.xml,class&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;With the setting above, only classes and files ending in context.xml will be checked for modifications, reducing the number of spurious reloads. You can also get complete control over the timing of reloads by specifiying a touch file.&lt;br /&gt;&lt;pre class="brush:plain"&gt;&lt;br /&gt;use.touch.file=true&lt;br /&gt;touch.file=/touch.txt&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Using a touch file removes all spurious reloads, but does require an extra build step every time in order to update the timestamp of the touch file.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-7328545087045367883?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/7328545087045367883/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=7328545087045367883' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/7328545087045367883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/7328545087045367883'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2009/09/avoiding-over-eager-reloading-in-impala.html' title='Avoiding over eager reloading in Impala'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-8947679406438196835</id><published>2009-08-28T16:47:00.003+01:00</published><updated>2009-08-28T17:15:11.367+01:00</updated><title type='text'>Spring Faces sample project</title><content type='html'>I recently put together a sample of Impala working with Spring Faces, that is, the combination of Spring Web Flow and JSF. The example is based on the Spring Faces &lt;a href="http://richweb.springframework.org/swf-booking-faces/spring/intro"&gt;flagship sample&lt;/a&gt;, a hotel booking application which uses JSF for persistence, and Spring Security for authentication/authorization.&lt;br /&gt;&lt;br /&gt;See &lt;a href="http://code.google.com/p/impala/wiki/SamplesSpringFaces"&gt;instructions on how to run the sample&lt;/a&gt; on the Impala wiki.&lt;br /&gt;&lt;br /&gt;I have to confess that none of the technologies used in this sample are personal favourites - I'm much more inclined towards Spring MVC, Hibernate on its own, and a more straightforward templating technology like Freemarker for the view layer. That being said, it was an interesting exercise, which threw up some interesting challenges, and also important to verify that Impala could work nicely with each of these technologies without a gargantuan amount of effort on the user's part.&lt;br /&gt;&lt;br /&gt;One of these challenges was figuring out how to set up the JSF runtime to be loaded up by the module class loader, rather than the application class loader.&lt;br /&gt;&lt;br /&gt;More significant for the evolution of Impala itself was figuring out how to create an arbitrary mapping from the request URI path prefix (the part of the URL after the host, port and application name), and an arbitrary module. In the Spring Faces sample, I needed to map all requests with a prefix of &lt;span style="font-style: italic;"&gt;/spring&lt;/span&gt; and no extension (e.g. .htm) in the path to the web module containing the Web Flow definitions and faces view. This particular requirement gave me the push I needed to implement the main features coming in the next drop of Impala, that is, the ability to map from arbitrary URI path prefixes to modules, and once within a module, to map individual requests to servlets or filters, themselves defined within the module, based on the URI extension.&lt;br /&gt;&lt;br /&gt;The Impala Spring Faces stack is somewhat experimental, but it does offer the promise of truly modular, dynamically reloadable applications based on these technologies.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Outstanding issues&lt;/span&gt;&lt;br /&gt;There are a few wrinkles outstanding, though. The Spring web flow long running transaction is still not working. I have added a &lt;span style="font-style: italic;"&gt;flush()&lt;/span&gt; call so that the booking does persist, but this happens at the time the booking is first entered rather than confirmed. Also, it does seem possible at least in some situations to make simple changes to the flow definitions and reload these without preventing the completion of existing flows, but I'm sure there are some corner case&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-8947679406438196835?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/8947679406438196835/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=8947679406438196835' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/8947679406438196835'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/8947679406438196835'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2009/08/spring-faces-sample-project.html' title='Spring Faces sample project'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-2398204921705367776</id><published>2009-05-17T21:27:00.002+01:00</published><updated>2009-05-17T21:30:06.367+01:00</updated><title type='text'>Impala 1.0 M6 released</title><content type='html'>I am pleased to announce the 1.0M6 release of Impala. The 1.0M6 is an important release for Impala, as it is the last pre-1.0 final release to include major enhancements and API changes. I am now pretty comfortable that the APIs and abstractions are correct and suitable for the 1.0 final release, but as always welcome any feedback from users on this.&lt;br /&gt;&lt;br /&gt;The 1.0M6 release includes a major reworking of the shared service registry and proxying mechanisms, a new Spring namespace for importing and exporting services, and enhancements to the dynamic reloading of modules.&lt;br /&gt;&lt;br /&gt;The headline improvements include the following.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Configuration of Impala services is now much simpler, as a new Spring 'service' namespace has been provided for easily exporting and importing services.&lt;/li&gt;&lt;li&gt;Service export and import can now be done not only by name but also by type or by custom attributes, the latter using a model similar to that used in OSGi.&lt;/li&gt;&lt;li&gt;Impala's mechanism for proxying services obtained from the service registry has improved, and is now more easily configurable.&lt;/li&gt;&lt;li&gt;It is now possible to export and import Impala services without having to specify an interface - proxying of the service implementation class is now also supported.&lt;/li&gt;&lt;li&gt;Impala now supports exporting and importing services based on Spring beans which are not singletons or not created using non-singleton Factory beans. It does this in a way that is totally transparent to users of the services, effectively allowing clients to treat all beans as singletons.&lt;/li&gt;&lt;li&gt;Impala now provides implementations of&lt;span style="font-style: italic;"&gt; java.util.List&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;java.util.Map&lt;/span&gt;, dynamically backed by beans imported from the service registry.&lt;/li&gt;&lt;/ul&gt;The 1.0M6 release also introduces a number of improvements to make dynamic module reloading more robust, particularly when using the module 'auto-reload' feature, as well as other minor enhancements and bug fixes.&lt;br /&gt;&lt;br /&gt;For more information on this release see&lt;br /&gt;&lt;a href="http://code.google.com/p/impala/wiki/Release1_0M6Announcement"&gt;http://code.google.com/p/impala/wiki/Release1_0M6Announcement&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-2398204921705367776?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/2398204921705367776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=2398204921705367776' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/2398204921705367776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/2398204921705367776'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2009/05/impala-10-m6-released.html' title='Impala 1.0 M6 released'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-2607900573314167056</id><published>2009-05-16T10:00:00.005+01:00</published><updated>2012-01-24T18:31:26.169Z</updated><title type='text'>Extending Spring MVC's annotation controller</title><content type='html'>In my latest project I am using Spring MVC's annotation based controller. I definitely am a fan of annotations for wiring up web applications, and suppose, relatively speaking, I can claim to be an early in this area having created &lt;a href="http://strecks.sourceforge.net/"&gt;Strecks&lt;/a&gt;, an annotation based framework for Struts.&lt;br /&gt;&lt;br /&gt;I must say I am enjoying using the new Spring MVC - it's a massive improvement over the original framework which I found pretty clunky, especially with regard to form handling.&lt;br /&gt;&lt;h2&gt;Setup&lt;/h2&gt;Configuring the application is a doddle. All you need to do is register the annotation &lt;span style="font-style: italic;"&gt;HandlerAdapter&lt;/span&gt; (which does the main request processing work) and &lt;span style="font-style: italic;"&gt;HandlerMapping&lt;/span&gt; (which maps URLs to your controllers). You can do this using Spring config like:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&amp;lt;bean class="org.springframework.web.servlet.mvc.&lt;/pre&gt;&lt;pre&gt;annotation.DefaultAnnotationHandlerMapping"&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;bean class="org.springframework.web.servlet.mvc.&lt;/pre&gt;&lt;pre&gt;annotation.AnnotationMethodHandlerAdapter"&amp;gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;and then you're ready to go. Controllers definitions can found automatically via class path scanning, or  added explicitly into the Spring config files, which I prefer to do.&lt;br /&gt;&lt;br /&gt;One really nice thing about the controllers is the simple way to map URLs to methods as well as to provide arguments to the methods, both using annotations. An example is show below:&lt;br /&gt;&lt;pre class="brush:java"&gt;@RequestMapping("/warehouse/postProductsSubmit.htm")&lt;br /&gt;public String postProductsSubmit(&lt;br /&gt;      Map model,&lt;br /&gt;      @ModelAttribute("command") PostProductsForm command,&lt;br /&gt;      BindingResult result) {&lt;br /&gt;//do stuff&lt;br /&gt;&lt;br /&gt;//redirect when finished&lt;br /&gt;return "redirect:postProductsForm.htm";&lt;br /&gt;}&lt;/pre&gt;&lt;h2&gt;So what's missing?&lt;/h2&gt;There were still a few bits I felt needed to be added to make the Spring MVC annotation truly usable for my application. Here's what they are.&lt;br /&gt;&lt;h3&gt;Missing annotations for obvious argument types&lt;/h3&gt;The Spring MVC annotations recognise a whole bunch of argument types. Many of these will be automatically recognised from the Servlet API including &lt;span style="font-style: italic;"&gt;HttpServletRequest&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;HttpServletResponse&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;ServletRequest&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;ServletResponse&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;HttpSession&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;Principal&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;Locale&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;InputStream&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;Reader&lt;/span&gt;, &lt;span style="font-style: italic;"&gt; OutputStream&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;Writer&lt;/span&gt;. Others will be recognised from Spring MVC annotations, such as &lt;span style="font-style: italic;"&gt;@ModelAttribute&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;@RequestParam&lt;/span&gt; (which binds a request parameter).&lt;br /&gt;&lt;br /&gt;What would be nice would be some built in annotation types which you could extract other types of information from the Servlet API environment in an non-intrusive way. Here I am thinking of the following:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;@SessionAttribute&lt;/span&gt;: extract and bind a named session attribute.&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;@RequestAttribute&lt;/span&gt;: do the same for a named request attribute.&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;@RequestHeader&lt;/span&gt;: extract a request header.&lt;/li&gt;&lt;li&gt;Plus various others&lt;/li&gt;&lt;/ul&gt;Luckily, there is an easy way of creating your own annotations for extracting information from requests and binding this to method arguments, via the &lt;span style="font-style: italic;"&gt;WebArgumentResolver&lt;/span&gt; implementation. I have created a number of these in the Impala MVC extensions project. See for example the &lt;a href="http://code.google.com/p/impala-extensions/source/browse/trunk/impala-extension-mvc/src/org/impalaframework/extension/mvc/annotation/resolver/SessionAttributeArgumentResolver.java" style="font-style: italic;"&gt;SessionAttributeArgumentResolver&lt;/a&gt; and it's associated &lt;a href="http://code.google.com/p/impala-extensions/source/browse/trunk/impala-extension-mvc/src/org/impalaframework/extension/mvc/annotation/SessionAttribute.java" style="font-style: italic;"&gt;@SessionAttribute&lt;/a&gt; annotation.&lt;br /&gt;&lt;h3&gt;Flash Scope&lt;/h3&gt;Flash scope, popularised initially by Rails, is a mechanism for transferring state from one request to the next without having to pass it via URLs. It is implemented through a session scoped attribute which is removed as soon as the value is consumed in the subsequent request. It works particuarly well with redirecting after a post.&lt;br /&gt;&lt;br /&gt;Flash scope is especially convenient for certain use cases because it combines the convenience of session-based attributes without the long running overhead of having state hanging around in a session over a long period.&lt;br /&gt;&lt;br /&gt;Spring MVC annotations currently don't support flash scope, so added an &lt;a href="http://code.google.com/p/impala-extensions/source/browse/trunk/impala-extension-mvc/src/org/impalaframework/extension/mvc/flash/FlashStateEnabledAnnotationHandlerAdapter.java"&gt;extension to &lt;span style="font-style: italic;"&gt;AnnotationMethodHandlerAdapter&lt;/span&gt;&lt;/a&gt; which support flash scope. Basically you can use it as follows. In your controller method, simply set a model attribute with the prefix &lt;span style="font-style: italic;"&gt;"flash&lt;/span&gt;:". The attribute will be available in the next request using the &lt;span style="font-style: italic;"&gt;@RequestAttribute&lt;/span&gt; annotation. An example below demonstrates this.&lt;br /&gt;&lt;pre class="brush:java"&gt;@RequestMapping("/submit.htm")&lt;br /&gt;public String submit(&lt;br /&gt;      Map model) {&lt;br /&gt;//do stuff&lt;br /&gt;&lt;br /&gt;//redirect when finished&lt;br /&gt;model.put("flash:mydata", mydataObject);&lt;br /&gt;return "redirect:show.htm";&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;@RequestMapping("/show.htm")&lt;br /&gt;public void(@RequestAttribute("mydata") MyDataClass mydata) {&lt;br /&gt;//if you redirected using flash, mydata&amp;nbsp;&lt;/pre&gt;&lt;pre class="brush:java"&gt;//will contain the mydataObject instance&lt;br /&gt;//from the last call&lt;br /&gt;}&lt;/pre&gt;&lt;h3&gt;No subclass hooks for manipulating model&lt;/h3&gt;When I first started with the annotation-based controller I found it a little frustrating that there were no subclass hooks in the provided &lt;span style="font-style: italic;"&gt;AnnotationMethodHandlerAdapter&lt;/span&gt; for manipulating the model. The only way you can do this is in the mapped request method as well as in special &lt;span style="font-style: italic;"&gt;@ModelAttribute&lt;/span&gt; methods, which are also present in your controllers. An example is below:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush:java"&gt;@ModelAttribute("command")&lt;br /&gt;public PostProductsForm getPostProductsForm() {&lt;br /&gt;return new PostProductsForm();&lt;br /&gt;}&lt;/pre&gt;&lt;pre class="brush:java"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="brush:java"&gt;&lt;/pre&gt;I'm not sure if this is still a problem because I have found quite acceptable workarounds which solve the problems I was trying to solve, without having to resort to such a technique. Nevertheless, is does strike me as a sensible thing to be able to do, provided it is is done in a well-defined and controlled way.&lt;br /&gt;&lt;h3&gt;Concluding Remarks&lt;/h3&gt;Spring MVC annotations have added a great deal of convenience to Spring MVC without sacrificing any of the flexibility which has always been its true strength. It's not perfection, but with a few extra fairly minor features it is easy to use and work very productively with. And of course - here comes the obligatory shameless plug! - it works even better when you use it with &lt;a href="http://impala.googlecode.com/"&gt;Impala&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-2607900573314167056?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/2607900573314167056/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=2607900573314167056' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/2607900573314167056'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/2607900573314167056'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2009/05/extending-spring-mvcs-annotation.html' title='Extending Spring MVC&apos;s annotation controller'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-3031263521153734741</id><published>2009-05-04T09:01:00.002+01:00</published><updated>2009-05-05T09:25:28.813+01:00</updated><title type='text'>Why developers don't just jump at OSGi</title><content type='html'>On paper, the choice to use OSGi should be an easy one. After all, OSGi offers an escape from the "jar classpath hell" that Java developers have been living with for years. The ability to compose systems through modules that can be composed and loaded dynamically promises a solutions to a range of important problems that enterprise developers have been grappling with, unsuccessfully, for years.&lt;br /&gt;&lt;br /&gt;Yet the takeup of OSGi has been quite slow. I was curious enough the other day to take a look on Jobserve on job postings requiring OSGi, and I found only a handful of positions available. While there seems to inexorable movement towards OSGi driven in particular by application server vendors (who, remember, also drove the adoption of the now infamous EJB 1 and 2), and a few evangelists, we are yet to see a groundswell of enthusiasm from the mainstream developer community, in the same way as, for example, with technologies like Grails and, before it, Spring.&lt;br /&gt;&lt;br /&gt;This is a shame, because I believe the ideas that underpin OSGi are fundamentally important to writing flexible systems which can remain manageable as they grow in size and complexity.&lt;br /&gt;&lt;br /&gt;I'd like to comment on some of the reasons why OSGi has still not taken off in a way which cements it's role as &lt;span style="font-style: italic;"&gt;the&lt;/span&gt; foundation for Enterprise Java applications, and also to explain why I haven't used OSGi as the basis of &lt;a href="http://code.google.com/p/impala/"&gt;Impala&lt;/a&gt;. My intention is not to spread FUD, but to identify some of the perceptions (and potentially misconceptions) held on OSGi and to give my interpretation on to what extent they are justified.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Some people just don't "get it"&lt;/span&gt;&lt;br /&gt;Not everybody thinks that the idea of partitioning an application into modules is a good one. Some developers are happier just to lump all classes together under a single source directory, and don't see how an application can benefit from modules. Maybe they haven't worked on projects that really require this kind of partitioning, or have suffered from a botched attempt to modularise an application. Clearly, these developers are not going to be early adopters of OSGi or, for that matter, a technology like Impala.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;OSGi won't really help the productivity of my development&lt;/span&gt;&lt;br /&gt;Clearly, there is more work involved in setting up an OSGi application than a regular Java application. You need to ensure that all your jars, both for your application and for the third party libraries, are OSGi compliant. For your application's jars, you'll be responsible for the bundle manifest yourself, making sure that its content fits in with the structure and organisation of your application. You'll definitely want some tool to make this job easier. Also, you'll have to source third party libraries which are OSGi compliant, or, in the worse case, add the necesary OSGi metadata yourself.&lt;br /&gt;&lt;br /&gt;The productivity advantages of dynamically updatable modules will probably kick in at some point, but not until you have a smooth running development environment set up. You can accelerate this process with the help of an OSGi-based framework such as SpringSource's&lt;a href="http://www.springsource.com/products/dmserver"&gt; dm Server&lt;/a&gt;, or &lt;a href="http://code.google.com/p/modulefusion/"&gt;ModuleFusion&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;While OSGi will undoubtedly help you write better and more flexible applications, you don't get many wild claims that OSGi will allow you to build your applications dramatically faster. Developers who come to OSGi with those kinds of expectations will probably be disappointed.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;OSGi requires a complex environment&lt;/span&gt;&lt;br /&gt;Enterprise Java has a reputation for being complex. Not only do you need to know the Java language, you need to know Spring, Hibernate, web technologies, relational databases, etc. etc.. You need to know all sorts of related technologies, test frameworks, ANT or Maven, and more. And this is just to write traditional Java applications.&lt;br /&gt;&lt;br /&gt;To write OSGi-based Enterprise applications, there is much more to know. You'll need a good conceptual understanding of how OSGi works - both in the way that it manages class loaders and the way services are exported and consumed. Not Java 101 stuff. You'll also need a practical understanding of the idiosyncracies of your own OSGi environment. There will be differences in the way you build and deploy applications, and the way you manage the tools and runtime, depending on which OSGi containers and helper frameworks you use. You won't need to be a rocket scientist to figure this all out, but you will need some time, patience and experience. The wave of books coming out on OSGi will definitely help, but don't expect the junior members of your team to be able to jump straight into an OSGi project and hit the ground running.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;How do I know it will all work&lt;/span&gt;?&lt;br /&gt;Some people might be put off OSGi because of lingering thoughts that they will run into difficulties getting their applications to work in an OSGi environment, especially those with large existing code bases.&lt;br /&gt;&lt;br /&gt;Some of the most commonly used frameworks out there are not very OSGi-friendly, typically either because they are designed and packaged in a not very modular way, or because they use class loaders in a way which does not align with the OSGi specification, for example, by using the thread context class loader to load classes. Naive use of these libraries in an OSGi environment will lead to unexpected problems.&lt;br /&gt;&lt;br /&gt;You'll need to find a way to work around these issues. The hard way will be to try to do it yourself. The easy way will be to rely on a packaged OSGi solution, again such as dm Server or ModuleFusion. But remember, even here, there are trade-offs. In the case of the dm Server, you'll be very closely tied in to SpringSource as a vendor, and with ModuleFusion, you may need to accept a technology stack which does not include your favourite frameworks.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;OSGi applications are difficult to test&lt;/span&gt;&lt;br /&gt;This, in my opinion, is a real achiles heel of OSGi. Because OSGi applications need to run in an OSGi container with class loading managed in a very specific way, you cannot run low level integration tests without the tests themselves running in a container. This makes testing OSGi applications particularly challenging.&lt;br /&gt;&lt;br /&gt;The only serious attempt I am aware of to address this problem is the Spring Dynamic Modules test framework, which dynamically creates a test bundle using your application code, launches an OSGi container, deploys the test bundle to the OSGi container (as well as the bundles you need to test plus some infrastructure bundles), and runs your test code. It's not especially pretty, but there's no substitute for real integration tests as opposed to unit tests or tests using mock objects.&lt;br /&gt;&lt;br /&gt;For me, ease of testing is of fundamental importance in choosing technologies - it certainly is a large part of the reason for the emergence of Spring. I certainly have no appetite for a return to the days of EJB 1 and 2 when applications could only be tested on a container.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Some concluding remarks&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Let me make my position clear. I am not an OSGi evangelist. I prefer to think of myself as OSGi-neutral. I have deliberately chosen not to base &lt;a href="http://code.google.com/p/impala/"&gt;Impala&lt;/a&gt; on OSGi, but I have designed it in a way which accomodates OSGi - indeed I even have a &lt;a href="http://code.google.com/p/impala/wiki/SamplesOSGi"&gt;working example&lt;/a&gt; of Impala running on OSGi. As OSGi gains traction - &lt;span style="font-style: italic;"&gt;and if users demand it&lt;/span&gt; - Impala will provide much better support for OSGi and even offer a simple migration route to OSGi which users can choose to adopt on a per project basis.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-3031263521153734741?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/3031263521153734741/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=3031263521153734741' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/3031263521153734741'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/3031263521153734741'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2009/05/why-developers-dont-just-jump-at-osgi.html' title='Why developers don&apos;t just jump at OSGi'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-4780506479208249445</id><published>2009-03-26T21:46:00.000Z</published><updated>2009-03-26T09:02:05.862Z</updated><title type='text'>Where are all the Groovy web frameworks?</title><content type='html'>A little while ago when I was exploring web frameworks - as I tend to do once every few months - I spent a bit of time looking into web frameworks built in Groovy.&lt;br /&gt;&lt;br /&gt;Groovy has all the raw materials needed for a powerful web framework implementation. It's dynamic nature and metaclass facility make it perfect for layering syntactic sugar on top of common tasks. It's very easy to dynamically update Groovy-based functionality - very little special framework is required - which makes it potentially very productive. And it already has very powerful facilities for templating, string manipulation, etc. - all capabilities required for web application development.&lt;br /&gt;&lt;br /&gt;With all of these advantages Groovy should be a very fertile breeding ground for web frameworks. After all, for all the dozens of Java web frameworks, you could at least expect a few out there harnessing the power and convenience of Groovy.&lt;br /&gt;&lt;br /&gt;Sadly, this does not seem to be the case. You can use Groovy to embellish plenty of existing Java web frameworks, but precious few web frameworks appear to have been built from the ground up with Groovy's power features in mind.&lt;br /&gt;&lt;br /&gt;I'd happily be proved wrong on this point, but from my searches &lt;a href="http://www.grails.org/"&gt;Grails&lt;/a&gt; seems to be the only real show in town.&lt;br /&gt;&lt;br /&gt;I like Grails' web framework. It is an excellent showcase for the power of Groovy. What I don't want is the full stack Grails experience. If I were to use Grails as a web framework, I would want to embed it in an &lt;a href="http://code.google.com/p/impala/"&gt;Impala&lt;/a&gt;-based application with a modular back-end. It was originally in the Grails 1.1 roadmap to separate the web part of Grails. However, during a recent &lt;a href="http://skillsmatter.com/podcast/java-jee/javawug-bof-44"&gt;meetup&lt;/a&gt;, I got it from the horse's mouth that this wasn't going to be happening any time very soon.&lt;br /&gt;&lt;br /&gt;According to Graeme Rocher, he would consider splitting the web framework "if his users demanded it". I think he is missing the point that by not providing a separately embeddable flavour of Grails he is isolating himself from a significant untapped user base - those looking for a capable web framework but not the full Grails stack. Maybe because Grails has become so popular it is a luxury he can afford!&lt;br /&gt;&lt;br /&gt;So where does this leave Groovy? I don't think that it is healthy for a language to be too dependent on a single framework for its popularity. The language needs - and deserves - more variety, a choice to suit a wider range of appetites.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-4780506479208249445?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/4780506479208249445/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=4780506479208249445' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/4780506479208249445'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/4780506479208249445'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2009/03/where-are-all-groovy-web-frameworks.html' title='Where are all the Groovy web frameworks?'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-6160384775141761729</id><published>2009-03-20T15:36:00.000Z</published><updated>2009-03-20T14:09:25.148Z</updated><title type='text'>A natural successor to Java?</title><content type='html'>Before I started learning Java in the late 1990s, I remember picking up a book on Java and on the back cover it was described as the "natural successor to C++". Java has now reached that stage in its evolutionary cycle. It's not that Java is not not a productive and capable language. Because of the excellent tool set that you get with Java it is still more productive (particularly for me) than anything else out there, including the likes of Groovy and Ruby. But just imagine how much more productive you could be with a language which had Java's tooling support, but was free from the annoyances and deficiencies of Java, which are now generally quite well understood but very difficult to fix without breaking backward compatibility.&lt;br /&gt;&lt;br /&gt;So what are we looking for in a language that will succeed Java? Firstly, it has to be based on the JVM. While Java as a language is running out of steam in terms of new features added, the JVM has still got real momentum, if only to be judged by the plethora of languages that run on the JVM, both from the ranks of languages which have independent lives outside of the JVM (e.g. JRuby), through to languages which are designed to work on the JVM.&lt;br /&gt;&lt;br /&gt;Second, it still needs static typing. That's a strong personal preference - I don't see myself ditching statically typed languages altogether. Dynamic languages like Groovy are great for certain tasks - web app development, integration, etc, but for the guts of a substantial application or application framework, I really do think static typing is a must have.&lt;br /&gt;&lt;br /&gt;Third, it needs to have substantial value add features. The one area most missing in Java is support for a more functional style of programming. As a developer who never studied computing at university, I have a background in commercially popular languages - the trend towards more functional programming styles has been around in academia for ages but is more recently moving into the enterprise programming world. While a more functional style of programming does not come that naturally to me, it's absence in Java is quite often a barrier to effective code reuse, and there is no doubt that adopting a more functional style of programming will help me to become a better programmer.&lt;br /&gt;&lt;br /&gt;Scala seems to tick the boxes nicely in these three areas, and the fact that it is still fundamentally OO will make it more accessible to existing Java developers.&lt;br /&gt;&lt;br /&gt;Still absorbing Scala, so its too early to say what I don't like about it. One concern is whether it is too feature rich, too complicated. Too many features may make it more powerful but may also raise barriers to adoption enough to prevent it from becoming mainstream.&lt;br /&gt;&lt;br /&gt;Another potential contender to watch out for is Fan. I saw &lt;a href="http://jroller.com/javawug/entry/javawug_bof_46_fan_next"&gt;Stephen Colebourne's talk&lt;/a&gt; earlier this week, and was impressed. It strikes me as a serious attempt to fix the problematic aspects of Java without introducing any unnecessary new complexity. It has a very simple type system, and will be much more accessible than Scala, and allows easy switching from the base static typing to duck typing.&lt;br /&gt;&lt;br /&gt;On the down side, it has a few features which may prove to be controversial, such as the inability to share mutable state between threads, and only partial support for generics. Another thing I'm note sure about is that abstracts over .NET as well as Java. This may be of interest to those who have to work in both of these environments, but I don't see much value in this for those working primarily in Java.&lt;br /&gt;&lt;br /&gt;While these questions rumble on in the background, I intend to add support in Impala for modules implemented in different languages. Should be very simple to do this - after all, it will be mostly just a question of adding build support.&lt;br /&gt;&lt;br /&gt;The multi-module structure of an Impala application makes development in multiple languages a good choice, with Java for core interfaces and domain classes, a language like Scala for the more complex implementation elements, and more dynamic languages suitable for modules closer to the fringe of the application.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-6160384775141761729?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/6160384775141761729/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=6160384775141761729' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/6160384775141761729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/6160384775141761729'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2009/01/natural-successor-to-java.html' title='A natural successor to Java?'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-3639686635524968202</id><published>2009-03-09T20:53:00.005Z</published><updated>2009-03-09T21:25:28.356Z</updated><title type='text'>New Impala extensions project</title><content type='html'>I've created a new &lt;a href="http://code.google.com/p/impala-extensions/"&gt;Impala Extensions&lt;/a&gt; project, also on Google Code. The idea is to host modules, typically extensions to Spring or Impala or both, which are generically useful, but not substantial enough to warrant their own project and too far from the core of Impala to warrant inclusion in Impala itself.&lt;br /&gt;&lt;br /&gt;So far the extensions project contains a set of extensions to Spring annotation-based MVC framework, and also a general purpose event management framework, particularly useful for managing persistent and asynchronous events (as a lightweight alternative to JMS). I expect the list to into a number of other areas over time.&lt;br /&gt;&lt;br /&gt;The extensions project also contains an example application which can be used as testbed for individual modules.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-3639686635524968202?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/3639686635524968202/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=3639686635524968202' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/3639686635524968202'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/3639686635524968202'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2009/03/new-impala-extensions-project.html' title='New Impala extensions project'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-5265470424617284508</id><published>2009-02-12T09:15:00.002Z</published><updated>2009-02-12T09:19:23.461Z</updated><title type='text'>Roadmap Update</title><content type='html'>I took a look at the Impala roadmap and realised that it had got a little out of date. I've corrected this - &lt;a href="http://code.google.com/p/impala/wiki/Roadmap"&gt;http://code.google.com/p/impala/wiki/Roadmap&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;There are some pretty cool features on there way, and plenty of work to do. The good news is that a final 1.0 is not too far away.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-5265470424617284508?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/5265470424617284508/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=5265470424617284508' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/5265470424617284508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/5265470424617284508'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2009/02/roadmap-update.html' title='Roadmap Update'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-1542970601833412891</id><published>2009-02-09T09:30:00.001Z</published><updated>2009-02-09T09:32:51.547Z</updated><title type='text'>Impala 1.0M5 released</title><content type='html'>I am pleased to announce the release of &lt;a href="http://impala.googlecode.com"&gt;Impala&lt;/a&gt; 1.0M5, which introduces many API and configuration improvements into the framework.&lt;br /&gt;&lt;br /&gt;Following 1.0M5, only minor changes in internal APIs are now expected prior to the 1.0 final release. The 1.0M5 release also features improvements which make it much easier to configure Impala-based applications, and to add your own extensions to the framework. While Impala is still very heavily based on the Spring framework, 1.0M5 now also makes it possible to plug in other runtime frameworks into Impala's dynamic module loading mechanism.&lt;br /&gt;&lt;br /&gt;For more information on this release see: &lt;a href="http://code.google.com/p/impala/wiki/Release1_0M5Announcement"&gt;http://code.google.com/p/impala/wiki/Release1_0M5Announcement&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-1542970601833412891?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/1542970601833412891/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=1542970601833412891' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/1542970601833412891'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/1542970601833412891'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2009/02/impala-10m5-released.html' title='Impala 1.0M5 released'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-8480261080780211565</id><published>2008-12-17T11:31:00.003Z</published><updated>2008-12-17T11:35:51.300Z</updated><title type='text'>Impala 1.0M4 released</title><content type='html'>I am pleased to announce the release of Impala 1.0M4, with preliminary support for OSGi.&lt;br /&gt;&lt;br /&gt;Impala 1.0M4 now includes the ability to arrange Impala modules and their corresponding class loaders in a graph, instead of in a hierarchy as in previous releases. This feature offers application developers much more flexibility in choosing the appropriate module structures for applications.&lt;br /&gt;&lt;br /&gt;1.0M4 is the first release of the project to include OSGi support. All Impala jars are now OSGi-compliant bundles. It is now possible to run Impala and its application modules in an OSGi container (currently Eclipse Equinox). Further improvements to Impala's support for OSGi are expected in subsequent releases.&lt;br /&gt;&lt;br /&gt;At this stage Impala support for OSGi is still experimental. It is not recommended at this stage to use it in a production environment.&lt;br /&gt;&lt;br /&gt;Impala promises to become the first and only project to offer a seamless transition to (and from) OSGi. There is no intention to make OSGi the default deployment model for Impala. However, OSGi is likely to become a good choice in the future for projects which will benefit from more rigorous management of third-party libraries than is possible using the traditional model.&lt;br /&gt;&lt;br /&gt;More information on Impala's position with respect to OSGi can be found in this blog entry: &lt;a href="http://impalablog.blogspot.com/2008/12/announcing-osgi-support-in-impala.html"&gt;http://impalablog.blogspot.com/2008/12/announcing-osgi-support-in-impala.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;For more information on this release see: &lt;a href="http://code.google.com/p/impala/wiki/Release1_0M4Announcement"&gt;http://code.google.com/p/impala/wiki/Release1_0M4Announcement&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;Phil Zoio&lt;br /&gt;&lt;br /&gt;Impala Home:  &lt;a href="http://impala.googlecode.com"&gt;http://impala.googlecode.com&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-8480261080780211565?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/8480261080780211565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=8480261080780211565' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/8480261080780211565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/8480261080780211565'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2008/12/impala-10m4-released.html' title='Impala 1.0M4 released'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-9077396226332978711</id><published>2008-12-05T09:26:00.003Z</published><updated>2008-12-05T11:10:20.748Z</updated><title type='text'>Announcing OSGi support in Impala</title><content type='html'>The soon to be released version of Impala will contain OSGi support. Does this mean that I've abandoned my mission to make Impala the simplest, most &lt;a href="http://impalablog.blogspot.com/2008/05/how-lightweight-is-impala.html"&gt;lightweight&lt;/a&gt;, test-friendly Java dynamic module framework. Absolutely not. The idea is simply to translate the benefits of Impala into an OSGi environment.&lt;br /&gt;&lt;br /&gt;In the future, you will no longer need to choose between OSGi and Impala. You can have the best of both worlds. As long as you have some appreciation for the value and benefits of dynamic modules in Java, then Impala can work for you, no matter what your stance on OSGi is.&lt;br /&gt;&lt;br /&gt;If you have not looked at OSGi and have no intention of doing so, then you're already well covered by Impala. If you are likely to look at OSGi in the future, then you can take advantage now of a framework which already does most of what you'd want, and move towards OSGi when you're ready. If you're already an OSGi enthusiast, I'd encourage you to take a look now at the Impala OSGi sample. Just point your Eclipse SVN repository explorer to &lt;a href="http://impala.googlecode.com/svn/trunk/osgi-sample"&gt;http://impala.googlecode.com/svn/trunk/osgi-sample&lt;/a&gt;, check out the contained projects, and run any of the unit tests. You'll see something like the following, for &lt;span style="font-style: italic;"&gt;MessageServiceTest&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://impala.googlecode.com/svn/wiki/images/osgi-test.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 1025px; height: 733px;" src="http://impala.googlecode.com/svn/wiki/images/osgi-test.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note that the unit test is actually run on the Equinox OSGi container using the &lt;a href="http://www.springsource.org/osgi"&gt;Spring Dynamic Modules&lt;/a&gt; test infrastructure. If this seems very easy, it's because it is - you won't even need to run any build scripts to get the example working!&lt;br /&gt;&lt;br /&gt;If you're familiar with Impala you will notice that your OSGi-based application is configured in an identical manner to regular Impala applications, allowing a seamless transition from a plain Impala to an OSGi-based runtime (and back again). Impala's abstraction for representing relationships between modules provides a convenient mechanism for expressing and reloading module subgraphs, something you need to do continually during development.&lt;br /&gt;&lt;br /&gt;Impala's OSGi support leverages much of the ground work covered by the &lt;a href="http://www.springsource.org/osgi"&gt;Spring DM&lt;/a&gt; project. Impala also automatically generates OSGi compliant jars using Peter Kriens' &lt;a href="http://www.aqute.biz/Code/Bnd"&gt;BND tool&lt;/a&gt; when using Impala's build support, and provides a convenience target to generate an OSGi manifest so that you don't need to continually create a new set of OSGi jars each time you modify your application.&lt;br /&gt;&lt;br /&gt;So is Impala's OSGi support production ready? Not at this point. Apart from the lack of any serious road testing, the big blocker is there is no explicit web support (yet). Additionally, Impala applications should have the option to use OSGi's service registry. I'd also like to better test framework integration so that Impala's interactive test runner and integration test suites can work equally well in an OSGi environment.&lt;br /&gt;&lt;br /&gt;There are still some interesting technical challenges to overcome, and plenty of work to do to bring this project to its full potential. So if there is anyone out there with an interest in dynamic modules, Spring, OSGi , etc. and would like to help out, I'd love to hear from you.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;So why add OSGi support to Impala?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The sweet spots in Impala are the ease in writing and running integration tests, ability to reload application modules, great web support, and a really simple, no-nonsense development environment. The sweet spots with OSGi is the way in which it gives you control over loading of third party libraries. OSGi allows you to dynamically reload third party libraries as well as concurrently run different versions of the same third party library classes, two things that you cannot do with Impala on its own.&lt;br /&gt;&lt;br /&gt;I might stick my neck out a bit by saying that the features that I described above that are available in Impala on its own are much more valuable for the typical Java application than the extra features provided by OSGi. It is for this reason that Impala is built from the ground up to work in the simplest, most developer-friendly way possible without any reliance on third party runtime environments, tools or build systems.&lt;br /&gt;&lt;br /&gt;That being said, there are clearly valid and potentially important use cases for the unique OSGi features. This, together with the growing industry momentum behind the technology, make OSGi support pretty much mandatory for any Java dynamic module system which demands to be taken seriously.&lt;br /&gt;&lt;br /&gt;As I made clear at a &lt;a href="http://impala.googlecode.com/svn/wiki/presentations/javawug-122008.ppt"&gt;talk in London&lt;/a&gt; last week, OSGi is the most powerful and sophisticated Java dynamic module system, particularly in its use of class loaders. But for many projects a simpler technology would suffice. Impala is the only dynamic module framework that offers the flexibility to choose easily between alternatives.&lt;br /&gt;&lt;br /&gt;It is worth noting that in the upcoming version 1.0M4, Impala introduces support for expressing module dependencies via a graph rather than simply as a hierarchy. This allows individual modules to reuse functionality from multiple dependencies, rather than a single parent. This feature is particularly important both because it narrows the gap between Impala's built-in module support and that provided by OSGi, allowing for a more seamless and less constrained transition between the technologies.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-9077396226332978711?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/9077396226332978711/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=9077396226332978711' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/9077396226332978711'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/9077396226332978711'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2008/12/announcing-osgi-support-in-impala.html' title='Announcing OSGi support in Impala'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-7191854502553827546</id><published>2008-10-13T09:24:00.002+01:00</published><updated>2008-10-13T09:26:39.095+01:00</updated><title type='text'>Impala 1.0 M3 released with major web enhancements</title><content type='html'>I am pleased to announce the release of Impala 1.0M3, with major web enhancements.&lt;br /&gt;&lt;br /&gt;Impala is a dynamic module framework for Java enterprise application development, based on the Spring framework. With a focus on simplicity and productivity, Impala radically transforms application development using Spring and related technologies.&lt;br /&gt;&lt;br /&gt;The Impala 1.0M3 release includes a range of improvements aimed at more robust and powerful support for web applications consisting of multiple dynamic modules. This release provides the underlying capabilities required for building dynamically reloadable web applications using frameworks other than Spring MVC, such as Struts, Wicket, Tapestry and others.&lt;br /&gt;&lt;br /&gt;Impala 1.0M3 also includes a dynamic properties framework, as well as various other feature improvements and bug fixes. A more detailed release announcement is here: &lt;a href="http://code.google.com/p/impala/wiki/Release1_0M3Announcement"&gt;http://code.google.com/p/impala/wiki/Release1_0M3Announcement&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;With Impala, you can take your Spring application development to the next level without having to grapple with unfamiliar technologies or tool sets. It requires no additional third party libraries beyond those required for vanilla Spring applications. It works within existing Java deployment environments, and requires no complex runtime infrastructure or tool support.&lt;br /&gt;&lt;br /&gt;Impala Home:  &lt;a href="http://impala.googlecode.com"&gt;http://impala.googlecode.com&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-7191854502553827546?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/7191854502553827546/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=7191854502553827546' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/7191854502553827546'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/7191854502553827546'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2008/10/impala-10-m3-released-with-major-web.html' title='Impala 1.0 M3 released with major web enhancements'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-9027361420469668077</id><published>2008-10-03T09:06:00.011+01:00</published><updated>2008-10-03T10:16:59.815+01:00</updated><title type='text'>Using the Thread's context class loader in a multi-module environment</title><content type='html'>When you working in a multi-module environment, a problem you bump up against is how to handle the thread's context class loader.&lt;br /&gt;&lt;br /&gt;In case you haven't seen this before, you can access the thread's context class loader using the code&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Thread.currentThread().getContextClassLoader();&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;and you can set it using&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Thread.currentThread().setContextClassLoader(classLoader);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Why it exists&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So why does the context class loader exist, and how is it used? The thread context class loader was introduced in Java 1.2 to enable frameworks running in application servers to access the "right" application class loader for loading application classes.&lt;br /&gt;&lt;br /&gt;Lets take a framework like Struts, which uses the thread's context class loader (as do many other similar frameworks). Struts allow you to declare &lt;span style="font-style: italic;"&gt;action&lt;/span&gt; classes in an XML configuration file. Once the framework has read the file and figured out what class to load (at this point only identified name), the framework needs a classloader to load the class.&lt;br /&gt;&lt;br /&gt;One naive approach to this problem would be to use the code&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;this.getClass().getClassLoader()&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This would return the the class loader responsible for loading the framework class. There is an obvious limitation here. The framework jar would need to be packaged in a location visible only to the application class loader, and not to the system class loader or to some shared or server class loader. Again, coming back to the example of Struts, say running in Tomcat, the framework jar would need to be placed in &lt;span style="font-style: italic;"&gt;WEB-INF/lib &lt;/span&gt;and not on the system class path or in a server class path such as &lt;span style="font-style: italic;"&gt;TOMCAT_HOME/common/lib&lt;/span&gt;. This restriction might hold in many cases, but is not one which can be relied upon.&lt;br /&gt;&lt;br /&gt;To solve this problem, the context class loader was invented, to give framework code a mechanism to find the "correct" class loader to load application classes. In the case of the web application, the server typically applies the web application class loader as the context class loader.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;So what's the problem&lt;/span&gt;?&lt;br /&gt;&lt;br /&gt;This mechanism has worked well enough until now, but is a bit of a hack, something which is certainly exposed by multi-module frameworks such as OSGi.&lt;br /&gt;&lt;br /&gt;There is an interesting &lt;a href="http://wiki.eclipse.org/index.php/Context_Class_Loader_Enhancements"&gt;article on the Equinox wiki page&lt;/a&gt; on this problem and how it addresses. To save some typing (and a bit of thinking), I've picked out a quote:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt; Many existing java libraries are designed to run inside a container (J2EE container, Applet container etc). Such containers explicitly define execution boundaries between the various components running within the container. The container controls the execution boundaries and knows when a boundary is being crossed from one component to the next. &lt;p&gt;This level of boundary control allows a container to switch the context of a thread when a component boundary is crossed. Typically when a container detects a context switch it will set the context class loader on the thread to a class loader associated with the component which is being entered. When the component is exited then the container will switch the context class loader back to the previous context class loader. &lt;/p&gt;&lt;p&gt;The OSGi Framework specification does not define what the context class loader should be set to and does not define when it should be switched. Part of the problem is the Framework is not always aware of when a component boundary is crossed.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;Some Solutions&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Eventually, the OSGi specification will presumably come up with a standard way of addressing this problem. Until then, it is up to vendors to implement their own solutions. Equinox does so through Buddy Class Loader and Context Finder mechanisms, which you can also &lt;a href="http://wiki.eclipse.org/index.php/Context_Class_Loader_Enhancements#Context_Class_Loader"&gt;read about here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Rob Harrop &lt;a href="http://blog.springsource.com/2008/05/02/running-spring-applications-on-osgi-with-the-springsource-application-platform/"&gt;describes his solution&lt;/a&gt; here for the Spring Application Platform:&lt;br /&gt;&lt;blockquote&gt;Each bundle in OSGi has it's own &lt;span style="font-family:courier;"&gt;ClassLoader&lt;/span&gt;, so therefore, only one bundle can be exposed as the thread context &lt;span style="font-family:courier;"&gt;ClassLoader&lt;/span&gt; at any time. This means that if a third-party library needs to see types that are distributed across multiple bundles, it isn't going to work as expected. &lt;p&gt;The Platform fixes this by creating a &lt;span style="font-family:courier;"&gt;ClassLoader&lt;/span&gt; that imports all the exported packages of every module in your application. This &lt;span style="font-family:courier;"&gt;ClassLoader&lt;/span&gt; is then exposed as the thread context &lt;span style="font-family:courier;"&gt;ClassLoader&lt;/span&gt;, enabling third-party libraries to see all the exported types in your application.&lt;/p&gt;&lt;br /&gt;&lt;/blockquote&gt;So this will work as long as you export the types that the third party libraries needs to load.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Impala's Solution&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Impala uses proxies to call across module boundaries. The proxy interceptor has access to a service reference for the target object being invoked. This service reference, as well as containing a reference to the target instance, also has a reference to the class loader responsible for loading the module which exported the target bean. Before invoking the instance, it sets the thread context loader to this class loader.&lt;br /&gt;&lt;br /&gt;That's quite a mouthful - if code makes more sense that this English then &lt;a href="http://code.google.com/p/impala/source/browse/trunk/impala/impala-core/src/org/impalaframework/spring/module/ContributionEndpointInterceptor.java"&gt;see this souce&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Additionallly, Impala Servlets - either extensions of the Spring DispatcherServlet or those responsible for integrating with other servlets - perform a similar operation.&lt;br /&gt;&lt;br /&gt;There are one or two gotchas. It is possible to call beans defined in parent modules without going through a proxy. In this case, the described mechanism will not be applied. I'm pretty confident though that this particular scenario won't cause any serious problems.&lt;br /&gt;&lt;br /&gt;I'd certainly be interested in finding out over the course of time whether there are other strategies that Impala's solution won't cover.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-9027361420469668077?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/9027361420469668077/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=9027361420469668077' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/9027361420469668077'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/9027361420469668077'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2008/10/using-threads-context-class-loader-in.html' title='Using the Thread&apos;s context class loader in a multi-module environment'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-7394372222027773073</id><published>2008-09-22T09:34:00.007+01:00</published><updated>2008-09-22T10:41:04.309+01:00</updated><title type='text'>Is the case for forking Spring building?</title><content type='html'>SpringSource recently announced a new maintenance policy which I, like many in the developer community, find quite disturbing. The basic idea is that SpringSource will only publish releases to non-paying customers of SpringSource for three months after the initial release. After that, it will be up to the rest of the community to do its own releases, with community releases only coming out every so often.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.theserverside.com/news/thread.tss?thread_id=50727"&gt;Reactions to this on The Server Side&lt;/a&gt; and other places have been understandably very negative. Personally, I have been less than enthusiastic about some of the developments that have been coming from SpringSource since it got VC funding.  See a &lt;a href="http://impalablog.blogspot.com/2008/05/spring-application-platform-is-it-big.html"&gt;previous entry&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;This time, it has gone to far. By biting the hand that feeds it, it has risked alienating its most loyal users and putting many people off the project altogether. It also really undermines the increasing number of other community projects which are built around Spring, projects like &lt;a href="http://code.google.com/p/impala/"&gt;Impala&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;As the author of a number of open source projects which despite obvious (to me) technical merits never attracted a very large number of users, I know only too well that users are by far the most precious feature of an open source project, to be valued above all else.&lt;br /&gt;&lt;br /&gt;SpringSource has not only begun to ignore it's users, it has shown the willingness to outrage them. This shows an unbelievable arrogance and complacency.&lt;br /&gt;&lt;br /&gt;All of this is quite apart from reservations I increasingly have about the direction that SpringSource is taking Spring.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;The project is no longer open&lt;/span&gt;&lt;br /&gt;if you look at the &lt;a href="http://www.mularien.com/blog/2008/09/19/how-open-source-is-spring-an-analytical-investigation/"&gt;history of SVN commits in Spring&lt;/a&gt;, you will notice that the project has become much less open. Around early 2005 there were plenty of commits going into Spring from individuals who are not SpringSource employees. Now commits to Spring core (the part that most people use) are only being made by SpringSource employees.&lt;br /&gt;&lt;br /&gt;Also, strategically important projects are increasingly developed outside of the public domain - including Spring 3.0, which will be the next major release of the core framework.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;We should be nervous about future licencing moves&lt;/span&gt;&lt;br /&gt;So far the official line is that none of the none of the licences will be changed for any existing project. It would probably impossible to do this anyway. However, many new projects from SpringSource are no longer coming out with friendly open source licences (specifically ASF 2). How do we know, for example, that Spring 3.0 won't be released as a "new" project with a less friendly licence.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Obsession with OSGi&lt;/span&gt;&lt;br /&gt;SpringSource has become obsessed with dragging the entire Java community into using OSGi. Don't get me wrong, I do like OSGi, and hope to support it with Impala, and at some point I am sure that I will be using it in real applications. But it shouldn't be at the exclusion of other things which could be done to make Spring more usable without OSGi. It's exactly for this reason that I started Impala. I wanted modules, reloadability, isolation, etc. but not necessarily with the baggage of OSGi at this point.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Key man dependencies&lt;br /&gt;&lt;/span&gt;Every project has it's major contributors, the individuals who do most of the heavy lifting while others go around doing the talking. Spring is no different - as the &lt;a href="http://www.mularien.com/blog/2008/09/19/how-open-source-is-spring-an-analytical-investigation/"&gt;commit graph shows&lt;/a&gt;, this is Juergen Hoeller, and it is very much down to his excellence that Spring is so well regarded. If Juergen decided to go off to pastures new, Spring core would be in a very bad place. For a project which is relied upon by so many around the world, this is not a good thing.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;In short, it's hard to like the way that Spring is going. But it's not too late to change. One of two things need to happen:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;SpringSource needs to take Spring back to where it came from. This doesn't mean winding up the company and going back to working for free. But it needs to reaffirm and re-demonstrate it's commitment to the spirit of open source - openness, transparency and a desire to serve it's users. This probably means lowering it's financial objectives. There's still plenty of money to be made from consulting, training, and from providing value added products and tools. But not when it contravenes the essence of what made Spring popular in the first place.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;If SpringSource cannot get it's act together, the project should be forked. Because Spring runs on an ASF licence, this is quite feasible. But there are lots of question to answer. Who would be willing to do this? Would they be the right people? And where would they take the project?&lt;br /&gt;&lt;br /&gt;Forking a project could be a dangerous move for the community, but &lt;a href="http://royal.pingdom.com/?p=391"&gt;history shows&lt;/a&gt; that it won't necessarily fail. Perhaps it's better for the project to take the pain now than to have death by a thousand cuts.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Judging by the strength of ill-feeling regarding SpringSource's latest announcement, I'm sure there must be other people in the wider Spring community thinking the same thing. I wonder if there are people working within SpringSource who feel the same way, or is the gravy train now just moving too fast for them to hop off?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-7394372222027773073?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/7394372222027773073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=7394372222027773073' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/7394372222027773073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/7394372222027773073'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2008/09/is-case-for-forking-spring-building.html' title='Is the case for forking Spring building?'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-7103279121565347457</id><published>2008-09-12T20:13:00.011+01:00</published><updated>2008-09-13T19:56:22.483+01:00</updated><title type='text'>Generic support for dynamically reloadable web frameworks</title><content type='html'>One little feature that I think we're close to pulling off with Impala is the ability to embed any Servlet-based web application and have it dynamically reloadable as a module. I'm thinking of the likes of Tapestry, Struts, etc.&lt;br /&gt;&lt;br /&gt;Up to version 1.0M2, this capability has only really existed for Spring MVC. However, to make Impala really attractive to users of other frameworks, you'd want to support these as well. After all, not every Spring user is also using Spring MVC as the web framework.&lt;br /&gt;&lt;br /&gt;More recent changes now allow you to embed any Servlet into a the application context XML belonging to an Impala web module, using code such as:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;bean id = "delegateServlet" class="org.impalaframework.web.integration.ServletFactoryBean"&amp;gt;&lt;br /&gt;  &amp;lt;property name = "servletName" value = "delegateServlet"/&amp;gt;&lt;br /&gt;  &amp;lt;property name = "servletClass" value = "servlet.SomeFrameworkServlet"/&amp;gt;&lt;br /&gt;  &amp;lt;property name = "initParameters"&amp;gt;&lt;br /&gt;    &amp;lt;map&amp;gt;&lt;br /&gt;      &amp;lt;entry key="controllerClassName" value = "servlet.ServletControllerDelegate"/&amp;gt;&lt;br /&gt;    &amp;lt;/map&amp;gt;&lt;br /&gt;  &amp;lt;/property&amp;gt;&lt;br /&gt;&amp;lt;/bean&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Note how the init parameters, the servlet name and the servlet class have been specified, as they would be for entries in web.xml.&lt;br /&gt;&lt;br /&gt;The InternalFrameworkIntegrationServlet, whose definition is shown below, is what allows the servlet to "live" within an Impala module. It contains the glue code&lt;br /&gt;that ties an invocation from outside of a module (within the context of a servlet container) to the servlet within the module.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;bean class="org.impalaframework.web.integration.InternalFrameworkIntegrationServletFactoryBean"&amp;gt;&lt;br /&gt;  &amp;lt;property name = "servletName" value = "myservlet"/&amp;gt;&lt;br /&gt;  &amp;lt;property name = "servletClass"&lt;br /&gt;    value = "org.impalaframework.web.integration.InternalFrameworkIntegrationServlet"/&amp;gt;&lt;br /&gt;  &amp;lt;property name = "delegateServlet" ref = "delegateServlet"/&amp;gt;&lt;br /&gt;&amp;lt;/bean&amp;gt; &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Finally, to communicate with the module itself, there is the ModuleRedirectingServlet, which simply delegates to the a servlet which is registered in the ServletContext using a name which corresponds with the name of the module (and happens to correspond with the first part of the URL's servlet path).&lt;br /&gt;&lt;br /&gt;Here's an example configuration in web.xml:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;servlet&amp;gt;&lt;br /&gt;   &amp;lt;servlet-name&amp;gt;module-redirector&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;   &amp;lt;servlet-class&amp;gt;org.impalaframework.web.integration.ModuleRedirectingServlet&amp;lt;/servlet-class&amp;gt;&lt;br /&gt;&amp;lt;/servlet&amp;gt;&lt;br /&gt;&amp;lt;servlet-mapping&amp;gt;&lt;br /&gt;   &amp;lt;servlet-name&amp;gt;module-redirector&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;   &amp;lt;url-pattern&amp;gt;*.htm&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;&amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Together, these offer the capability dynamically embedding applications using arbitrary web frameworks. The idea is that you can register and load a Struts, Webwork, Tapestry or other module after the JVM has started, without impacting any existing code or without having to restart the JVM or reload the entire web application within the application server. A powerful concept.&lt;br /&gt;&lt;br /&gt;There are definitely some gotchas to take care of. For one, it relies on object instances being loaded using the classloader obtained via Thread.currentThread().getContextClassLoader(). Also, how can we make sure that objects saved to sessions don't cause ClassCastExceptions when the module is reloaded? Also, how can we make sure that the same result does not occur because of one module attempting to access objects saved to the session by another module? And of course, we'd need to prove it working with real applications based on these frameworks, not example code assuming noddy pseudo frameworks. These kinds of problems will need to be taken care of before the problem can be considered to be fully solved. It should be fun figuring it out, though.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-7103279121565347457?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/7103279121565347457/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=7103279121565347457' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/7103279121565347457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/7103279121565347457'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2008/09/generic-support-for-dynamically.html' title='Generic support for dynamically reloadable web frameworks'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-5423592343661886047</id><published>2008-09-12T19:55:00.005+01:00</published><updated>2008-09-12T20:19:04.918+01:00</updated><title type='text'>Impala talk at Spring User Group UK</title><content type='html'>After quite a few weeks of being very busy at work, followed by a few weeks of taking it pretty easy and enjoying the summer, I'm now back to work, and trying to ramp things up a bit with Impala. On Wednesday night I did a talk at the &lt;a href="http://skillsmatter.com/event-details/java-jee/spring-ug-meeting%20more%20details"&gt;Spring User Group UK&lt;/a&gt; on Impala. You can &lt;a href="http://skillsmatter.com/podcast/java-jee/impala%20podcast"&gt;view the talk&lt;/a&gt; here - it's a bit grainy, but you can still hear everything. You can &lt;a href="https://impala.googlecode.com/svn/wiki/presentations/springug-092008.ppt"&gt;view the slides&lt;/a&gt; here.&lt;br /&gt;&lt;br /&gt;I was given half an hour for the presentation, and I managed to squeeze it into 27 minutes, including a demo. I was pretty happy with the talk - my little example demonstrating creating a new Hibernate entity within a Spring application went without a hitch.&lt;br /&gt;&lt;br /&gt;Hope to do a few more talks in the coming months.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-5423592343661886047?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/5423592343661886047/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=5423592343661886047' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/5423592343661886047'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/5423592343661886047'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2008/09/impala-talk-at-spring-user-group-uk.html' title='Impala talk at Spring User Group UK'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-5516211378179636346</id><published>2008-07-13T22:54:00.004+01:00</published><updated>2008-07-13T23:05:11.901+01:00</updated><title type='text'>Impala 1.0 M2 released</title><content type='html'>Today I dropped a release of Impala 1.0M2.&lt;br /&gt;&lt;br /&gt;It is mostly an incremental release, with a few relatively minor enhancements and bug fixes, but there is &lt;span style="font-weight: bold;"&gt;one significant feature&lt;/span&gt;: a mechanism for allowing module metadata to be contained within the module, instead of being externally specified, as in previous releases. I will post a bit more detail on this feature, as it does make specifying modules more intuitive and concise, as soon as time constraints ease. This change is covered in &lt;a href="http://code.google.com/p/impala/issues/detail?id=12"&gt;this issue report&lt;/a&gt;, and does involve minor backward incompatible changes.&lt;br /&gt;&lt;br /&gt;A total of 20 issues are covered in this release. The full set are covered &lt;a href="http://code.google.com/p/impala/issues/list?can=1&amp;amp;q=label%3ARelease1.0M2"&gt;in this search&lt;/a&gt;. Enjoy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-5516211378179636346?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/5516211378179636346/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=5516211378179636346' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/5516211378179636346'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/5516211378179636346'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2008/07/impala-10-m2-released.html' title='Impala 1.0 M2 released'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-8751895256332921930</id><published>2008-05-25T09:05:00.001+01:00</published><updated>2008-05-25T09:08:46.236+01:00</updated><title type='text'>How lightweight is Impala?</title><content type='html'>&lt;span&gt;In my &lt;a href="http://impalablog.blogspot.com/2008/05/what-makes-technology-lightweight.html"&gt;last blog&lt;/a&gt;, I described a set of criteria which can be used to determine how lightweight a framework or technology is. &lt;/span&gt;Let's consider &lt;a href="http://impala.googlecode.com"&gt;Impala&lt;/a&gt; against the criteria described above:&lt;br /&gt;&lt;br /&gt;&lt;span&gt;1. How much system resource does the technology use?&lt;br /&gt;Impala adds an almost negligible overhead to a plain Spring application.&lt;br /&gt;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span&gt;2. Do applications need special runtime support to run?&lt;br /&gt;&lt;/span&gt;Impala simply runs on the JVM. It's only runtime dependencies are Spring and logging libraries.&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt; 3. Are any special build steps required for the application?&lt;br /&gt;&lt;/span&gt;&lt;span&gt;No, it can be run from within Eclipse without any build steps.&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;4. How difficult is it to test applications which use the technology?&lt;br /&gt;&lt;/span&gt;The interactive test runner and integration test support make Impala applications easy to test in a very productive way.&lt;span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;5. Can applications be updated dynamically, or do updates require a restart?&lt;br /&gt;&lt;/span&gt;&lt;span&gt;Yes.&lt;/span&gt;&lt;span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt; 6. How easy is it to modularise applications which use the technology?&lt;br /&gt;&lt;/span&gt;&lt;span&gt;Modularity is built in from the ground up.&lt;/span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;7. Do applications require any code generation, either source code or byte code?&lt;br /&gt;&lt;/span&gt;&lt;span&gt;None, other than that which is used in the equivalent Spring application.&lt;/span&gt;&lt;span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt; 8. How quick are applications to start?&lt;/span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;Not perceptibly slower to start initially than the equivalent plain Spring application, but requiring dramatically fewer restarts.&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;br /&gt;9. How complex is the technology to understand?&lt;br /&gt;&lt;/span&gt;&lt;span&gt;Impala is simple to understand. The developer only needs to have a understanding of the basic principles, architecture and project conventions to get going. Only in very few places is interaction with Impala APIs required.&lt;br /&gt;&lt;br /&gt;10. Is any special tool support required to be productive with the technology?&lt;/span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;Impala works in a vanilla Eclipse installation without any additional required plugins.&lt;br /&gt;&lt;br /&gt;Overall, I'd argue that Impala passes this &lt;span style="font-style: italic;"&gt;lightweightness&lt;/span&gt; test with flying colours. I'm also pretty convinced that an equivalent comparison with alternative technologies would be less favourable.&lt;br /&gt;&lt;br /&gt;See &lt;a href="http://impalablog.blogspot.com/2008/05/what-makes-technology-lightweight.html"&gt;more details on these definitions&lt;/a&gt; for lightweightness.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-8751895256332921930?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/8751895256332921930/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=8751895256332921930' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/8751895256332921930'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/8751895256332921930'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2008/05/how-lightweight-is-impala.html' title='How lightweight is Impala?'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-2224181087683406163</id><published>2008-05-25T09:03:00.000+01:00</published><updated>2008-05-25T09:03:48.528+01:00</updated><title type='text'>What makes a technology lightweight?</title><content type='html'>What makes a technology lightweight? Being lightweight is considered a good thing. Lightweight technologies are popular with developers because they are simpler and less cumbersome to work with. The downside, of course, is that lightweight technologies can be less feature rich than their more "heavyweight" alternatives. Whether this matters depends on whether the missing features are actually required, that is, whether the value that these features provides outweigh the overhead that is added.&lt;br /&gt;&lt;br /&gt;Plenty of technologies are "sold" on the basis of being lightweight. While most of us have an intuitive idea of what lightweight means, it's quite useful to think of this concept in terms of a more concrete set of questions or criteria. This can be helpful in making comparisons between frameworks and technologies, and indeed for assessing claims made on behalf of particular technologies.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1. How much system resource does the technology use?&lt;/span&gt;&lt;span&gt;&lt;br /&gt;This is the most obvious  measure of how heavyweight a technology is. What is the memory footprint of an application? A more narrow definition of lightweight vs heavyweight technology is most likely to focus on this aspect of the definition.&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;2. Do applications need special runtime support to run?&lt;br /&gt;&lt;/span&gt;&lt;span&gt;If the technology requires special runtime support, then it automatically becomes more heavyweight. A good example is EJB 2, which requires applications to be run and tested in a container. Even if the container is embeddable in a standard JVM (for example within the IDE), this can make it more difficult to test applications, particularly if tests themselves need to run within the container interactive with the code under test.&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; 3. Are any special build steps required for the application?&lt;br /&gt;&lt;/span&gt;&lt;span&gt;If the technologies require artifacts to be packaged in a certain way, then this adds an overhead to the build cycle. A related question is, &lt;/span&gt;&lt;span&gt;can applications be run directly in an IDE without an explicit build?&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;&lt;span&gt;The most lightweight technologies by this definition require no build steps at all - you simply fire up the application in your IDE.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;4. How difficult is it to test applications which use the technology?&lt;br /&gt;&lt;/span&gt;If a technology requires special runtime support (see 2.) or it is complex to set up dependencies for running tests, the barrier to writing effective integration tests is raised, resulting in a reduction in productivity and/or quality.&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;5. Can applications be updated dynamically, or do updates require a restart?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;If every change made requires an application restart, this can make the technology feel more heavyweight, especially if restarts are time consuming. &lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;&lt;span style="font-weight: bold;"&gt; 6. How easy is it to modularise applications which use the technology?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;Technologies which allow applications to be packaged and run in a modular way will feel more lightweight than those which require everything to be run up as an amorphous "blob", especially as the application grows in size and the need to be more fine-tuned about what is deployed becomes more obvious.&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;7. Do applications require any code generation, either source code or byte code?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;Applications which require code generation generally involve extra build steps which can complicate the build process and/or slow down the build/test cycle. Byte code generation can hide much of this pain, but does introduce a measure of complexity which can make a technology feel heavyweight.&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; 8. How quick are applications to start?&lt;/span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;Technologies that are slow to start are clearly more heavyweight - they are doing more, have more going on behind the scenes, and are using more memory. They also are more likely to leave behind the perception that they are inefficient.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;9. How complex is the technology to understand?&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;The more complex a technology is, the more heavyweight it will feel. One way of thinking of it is this: for each step you take in working with the technology, the more time you will need to spend thinking about what you are doing, relative to simply &lt;span style="font-style: italic;"&gt;doing&lt;/span&gt;.&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;10. Is any special tool support required to be productive with the technology?&lt;/span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;span&gt;If special tool support is required to make you productive with a technology, then this technology will feel more heavyweight than one which imposes no such requirements. Now, not only do you need to worry about dependencies in your runtime environment, you need to worry about those in your tooling environment. Also, its slower to get going with the technology to start with.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;You can take this methodology further by ranking frameworks and technologies on a scale of 1 to 10 on each of these points. Some frameworks and technologies which purport to be lightweight are actually considerably less so when evaluated against these criteria.&lt;br /&gt;&lt;br /&gt;In my next blog, I will evaluate Impala's &lt;span style="font-style: italic;"&gt;lightweightness&lt;/span&gt; against these criteria.&lt;br /&gt;&lt;span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-2224181087683406163?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/2224181087683406163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=2224181087683406163' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/2224181087683406163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/2224181087683406163'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2008/05/what-makes-technology-lightweight.html' title='What makes a technology lightweight?'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-6554835188236132241</id><published>2008-05-21T20:21:00.005+01:00</published><updated>2008-05-21T20:44:46.601+01:00</updated><title type='text'>JavaWUG BOF 37: talk on Impala Framework</title><content type='html'>Just a quick update on my talk at the &lt;a href="http://www.jroller.com/javawug/entry/javawug_bof_37_impala_framework"&gt;Java Web User Group&lt;/a&gt; in London last night. Thanks for those who made - as always it was an enjoyable evening.&lt;br /&gt;&lt;br /&gt;Here's a &lt;a href="http://impala.googlecode.com/svn/wiki/presentations/javawug-2005.ppt"&gt;copy of the presentation&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;A main focus of my presentation was a demo based on an Impala version of the Spring Petclinic application - one of the main reference applications bundled with the Spring Framework.&lt;br /&gt;&lt;br /&gt;During the demo I introduced a new feature to the application, involving a new database table, some new Hibernate mappings, persistence code, as well as some enhancements to the web presentation layer. The changes were made without having to restart the application during the demo, all updates were made on the fly.&lt;br /&gt;&lt;br /&gt;The &lt;a href="http://impala.googlecode.com/svn/trunk/petclinic/"&gt;source code&lt;/a&gt; for the demo is available from the Impala subversion repository. The changes made during the demo are in &lt;a href="http://impala.googlecode.com/svn/trunk/petclinic/petclinic/edits.txt"&gt;this file&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-6554835188236132241?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/6554835188236132241/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=6554835188236132241' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/6554835188236132241'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/6554835188236132241'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2008/05/javawug-bof-37-talk-on-impala-framework.html' title='JavaWUG BOF 37: talk on Impala Framework'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-8411646479259800534</id><published>2008-05-16T17:04:00.005+01:00</published><updated>2008-05-19T08:59:56.482+01:00</updated><title type='text'>Talk next Tuesday on Impala at JavaWUG</title><content type='html'>Next Tuesday evening I am doing a talk on Impala in London. Here are the details:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.jroller.com/javawug/entry/javawug_bof_37_impala_framework"&gt;http://www.jroller.com/javawug/entry/javawug_bof_37_impala_framework&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You can register for the event here:&lt;br /&gt;&lt;a href="http://skillsmatter.com/event/java-jee/javawug-bof-37"&gt;http://skillsmatter.com/event/java-jee/javawug-bof-37&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The talk is at 6:30pm at Skills Matter in London. I'll be explaining why I created Impala, how it can dramatically accelerate Spring-based development and allow you to create more modular, maintainable applications. The format will a mixture of slides and demos.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-8411646479259800534?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/8411646479259800534/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=8411646479259800534' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/8411646479259800534'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/8411646479259800534'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2008/05/talk-next-tuesday-on-impala-at-javawug.html' title='Talk next Tuesday on Impala at JavaWUG'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-8191326428214054618</id><published>2008-05-10T21:17:00.003+01:00</published><updated>2008-05-10T21:20:43.943+01:00</updated><title type='text'>Impala 1.0M1 released - first public release</title><content type='html'>I am pleased to announce the first public release of Impala, a dynamic module framework for Java enterprise application development.&lt;br /&gt;&lt;br /&gt;Impala 1.0 M1 can be downloaded from &lt;a href="http://code.google.com/p/impala/downloads/list"&gt;http://code.google.com/p/impala/downloads/list&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Impala builds on the Spring Framework to provide a genuinely modular, highly productive environment for web-based applications. It allows you to divide Spring-based applications into a hierarchy of modules which can be dynamically added, updated or removed to an existing running application.&lt;br /&gt;&lt;br /&gt;Impala's modularity features make it possible to write applications which are much easier to maintain than plain Spring applications. Impala enables applications which can grow very large without exploding in complexity. Impala also enables genuine productivity enhancements over plain Spring development, through the dynamic module loading capability, seamless integration with Eclipse, and the efficient test management features. Impala also features basic built-in build support, based on ANT, and dependency management capabilities.&lt;br /&gt;&lt;br /&gt;With Impala, you can take your Spring application development to the next level without having to grapple with any unfamiliar underlying technologies or tool sets. It requires no additional third party libraries beyond those required for plain Spring applications. It works within existing Java deployment environments, and requires no complex runtime infrastructure or tool support.&lt;br /&gt;&lt;br /&gt;For more information on getting started with Impala, see &lt;a href="http://code.google.com/p/impala/wiki/GettingStarted"&gt;http://code.google.com/p/impala/wiki/GettingStarted&lt;/a&gt;.&lt;br /&gt;&lt;a href="http://impala.googlecode.com"&gt;&lt;/a&gt;&lt;a href="http://code.google.com/p/impala/downloads/list"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-8191326428214054618?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/8191326428214054618/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=8191326428214054618' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/8191326428214054618'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/8191326428214054618'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2008/05/impala-10m1-released-first-public.html' title='Impala 1.0M1 released - first public release'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-6919292971810242716</id><published>2008-05-05T22:10:00.003+01:00</published><updated>2008-05-06T20:24:47.560+01:00</updated><title type='text'>Spring Application Platform validates Impala's existence</title><content type='html'>A couple of days ago I wrote a blog in which I was somewhat negative about the Spring Application Platform. My issue is partly with the problems SpringSource is trying to solve, and also the way that they are trying to solve them.&lt;br /&gt;&lt;br /&gt;The problems being targeted are twofold: first, the ability to get more precise control over which versions of which class are loaded by which libraries in the JVM, and secondly, the need for modular applications.&lt;br /&gt;&lt;br /&gt;What I've been saying all along is that while the ability to get precise control over class versioning is worthwhile, it also involves quite a lot of pain, and for most developers, this pain will not be worthwhile.&lt;br /&gt;&lt;br /&gt;What &lt;span style="font-style: italic;"&gt;is&lt;/span&gt; really needed is modularity. SpringSource have gone straight for OSGi to achieve both modularity and class versioning. The problem is that this solution also brings is a lot of complexity. So in order to manage this complexity, an &lt;span style="font-style: italic;"&gt;extra&lt;/span&gt; solution is needed to hide this complexity. Enter the Spring Application platform.&lt;br /&gt;&lt;br /&gt;The problem with all of this is that there seems to be an implicit assumption that effective, dynamic modularity is not possible without OSGi. How about another approach? Why not try to see how far you can get with just the standard Java class loading mechanisms? Spare yourself all the hassle where it's not needed, and go straight for the sweet spot. That's the Impala approach. OSGi may come to Impala too, but it won't be forced on users.&lt;br /&gt;&lt;br /&gt;Surprisingly, you can get pretty far without OSGi. For one, you can have multiple versions of your own applications loaded simultaneously in different modules. You can do on the fly updates. You can also get tremendous productivity advantages from simple and lightweight mechanisms for managing integration tests, with fewer restrictions on your runtime environment than you will have with OSGi.&lt;br /&gt;&lt;br /&gt;What you don't get without OSGi is the ability to have multiple versions of third party libraries loaded concurrently within the same JVM. The question you have to ask yourself is this: how important is this feature to you? How much pain are you prepared to go to achieve it? After all, hundreds and thousands of Java applications have been written that don't rely on this feature. In my time as a Java developer, I can only think of at most a handful of occasions where class versioning issues have presented an issue. It does not seem like the kind of problem that deserves a solution with a far reaching impact on your technology choice, runtime environment and tool set.&lt;br /&gt;&lt;br /&gt;In short, I am apparently in agreement with SpringSource that modularity and dynamic reloading are two features whose absence has been a real limitation to development using the Spring Framework. This certainly convinces me that the last year or so that I have spent working on Impala has not been a waste of time. Indeed, the benefits experience by projects I have worked on using Impala suggest the contrary.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-6919292971810242716?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/6919292971810242716/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=6919292971810242716' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/6919292971810242716'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/6919292971810242716'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2008/05/spring-application-platform-validates.html' title='Spring Application Platform validates Impala&apos;s existence'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-3869683245723495186</id><published>2008-05-02T18:15:00.009+01:00</published><updated>2008-05-04T23:18:45.243+01:00</updated><title type='text'>Spring Application Platform - is it a big mistake?</title><content type='html'>It was with some consternation that I read the &lt;a href="http://www.theserverside.com/news/thread.tss?thread_id=49243"&gt;Server Side thread&lt;/a&gt; on Spring's announcement of a new application platform.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Firstly&lt;/span&gt;, the Spring Application Platform, as it's called, is essentially a Spring OSGi integration on steroids.  I've voiced concerns on how well OSGi is going to be received by ordinary developers, as against application server vendors. I'm yet to be persuaded that regular&lt;br /&gt;Java developers will be particularly enthusiastic about dealing with the idiosyncracies of OSGi. There is more than a hint of EJB history about it. SpringSource (and application server vendors?) have identified OSGi as &lt;span style="font-style: italic;"&gt;the way&lt;/span&gt;&lt;span style="font-style: italic;"&gt; that we ordinary mortals must&lt;/span&gt; now follow.&lt;br /&gt;&lt;br /&gt;Spring Application Platform (and Spring Dynamic Modules) are great if you've already bought into OSGi. As a general platform for enterprise application development - at this point I'm yet to be convinced.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Secondly&lt;/span&gt;, with its Application Platform, SpringSource has moved squarely into the application server market. This is something which I didn't expect them to do, and I don't think it's a very good idea. It's too invasive, too big a step in one particular direction for me to feel comfortable with. I think of the Spring Framework as a technology which works seamlessly with a broad variety of platforms and application servers. With the Application Platform, they're pinning their  colours to a particular mast - a technology stack based on Equinox and Tomcat, and setting themselves in competition with other application servers.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Thirdly&lt;/span&gt;, there is the question of the license. For the first time, SpringSource is introducing a major product which is not based on the Apache V2.0 license, instead going for a GPL license. That's a major change that reflects a real difference in the way that the company is positioning itself in the marketplace.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Finally&lt;/span&gt;, the question in my mind is where the Spring Framework itself fits into all of this. I've always thought of the Spring Framework as the flagship product coming from the Rod Johnson crew. It didn't matter if SpringSource came up with one or two turkeys in its portfolio, because at least the core framework is solid. But with the Spring Application Framework, they're betting big. They've clearly had some of their best brains working on the project for some time. A failure won't be quite as easy for the development community to brush off.&lt;br /&gt;&lt;br /&gt;So what will happen now? Will the Spring Framework become the "poor relation" of the Application Platform? Will new features and improvements go into the Spring Framework, or will this suffer in the future at the expense of the Application Platform. The waters have definitely been muddied.&lt;br /&gt;&lt;br /&gt;The Spring Application Platform is the biggest announcement to come out of the Spring team for some time. It also looks like it could be a big mistake. Spring became popular in the first place as a practical, community driven solution to the real problems with Java enterprise applications, with a focus on simplicity. The latest offering seems to be moving in a rather different direction.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-3869683245723495186?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/3869683245723495186/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=3869683245723495186' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/3869683245723495186'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/3869683245723495186'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2008/05/spring-application-platform-is-it-big.html' title='Spring Application Platform - is it a big mistake?'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-4442640457592303388</id><published>2008-04-30T19:07:00.007+01:00</published><updated>2008-04-30T20:28:30.866+01:00</updated><title type='text'>Thoughts on integration testing</title><content type='html'>Everybody (pretty much) knows what they mean by unit testing, and on the whole, I would expect most people to have a broadly speaking common understanding of what this means. Unit testing of course involves testing the behaviour of a particular unit of code (e.g. Java class) in isolation.&lt;br /&gt;&lt;br /&gt;When it comes to integration testing, it's probably not quite as clear cut. For example, does a test need to cover an entire use case to be considered an integration test? What about a database test which only covers a single JDBC-based method? Is this an integration test?&lt;br /&gt;&lt;br /&gt;For me, the key point of distinction is the &lt;span style="font-style: italic;"&gt;realness&lt;/span&gt; of the test. An integration test is such because it embodies the real behaviour of the system. The more a test relies on simulating aspects of a system's behaviour, the less &lt;span style="font-style: italic;"&gt;real&lt;/span&gt; it is, and further it moves away from being an integration test.&lt;br /&gt;&lt;br /&gt;This brings me on to the question of what is an integration test in a Spring/Impala environment. Here, an integration test will typically always involve using a real Spring application context rather than constructing the fixtures programmatically. It will involve involve connecting to a real database, rather than an in-memory test database (e.g. HSQLDB). It will make limited if any use of mock objects. All in all, integration tests in a Spring environment are closer in behaviour to that exhibited by the real system.&lt;br /&gt;&lt;br /&gt;Another question worth addressing is this: what is the relative value of integration tests versus unit tests? A working set of integration tests gives me much more confidence than a set of unit tests which are not backed by integration tests.&lt;br /&gt;&lt;br /&gt;One difficulty with integration tests is that they are much less direct than testing using unit tests. It's harder to establish the precise link between the tests and what is actually getting tested. On the plus side, you can get a lot of test coverage with very little code through integration tests.&lt;br /&gt;&lt;br /&gt;The other problem with integration tests is, of course, they can be painful to write. Specifying dependencies required for integration tests can be fiddly and time consuming. Also, integration tests can be slow to run. For these reasons, some developers shy away from integration tests, preferring to rely on unit tests plus manual testing of use cases using the deployed application. The big cost is that quality of the testing regime in these circumstances is much diminished, making it much easier for bugs to slip through.&lt;br /&gt;&lt;br /&gt;With Impala, integration tests are so easy to write and quick to run, that there really are no excuses. Integration tests are easy to write because dependencies are expressed at a high level through composition of modules. They are quick to run because of the dynamic module loading support used by the interactive test runner, and the efficient way that suites of unit tests are managed within Eclipse. See &lt;a href="http://code.google.com/p/impala/wiki/GettingStartedPart3"&gt;this wiki page&lt;/a&gt; for more details.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-4442640457592303388?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/4442640457592303388/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=4442640457592303388' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/4442640457592303388'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/4442640457592303388'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2008/04/thoughts-on-integration-testing.html' title='Thoughts on integration testing'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-3139710898189873574</id><published>2008-04-12T14:59:00.007+01:00</published><updated>2008-04-14T21:09:54.340+01:00</updated><title type='text'>Impala and Strecks</title><content type='html'>A few of you may about my involvement in another open source project, &lt;a href="http://strecks.sourceforge.net/"&gt;Strecks&lt;/a&gt;, which was a set of Java 5 specific extensions to Struts. Yes, remember Struts, the one that used to be so popular a few years ago. There are a few similarities between Impala and Strecks, but also a few differences, that I would like to comment on.&lt;br /&gt;&lt;br /&gt;First, the similarities. Just like Strecks was an extension to Struts, Impala is an extension to Spring. I wrote Streck to address what I perceived to be limitations of Struts. These limitations of Struts are now fairly well understood. In a similar way, I wrote Impala to address shortcomings of Spring - in particular, the lack of first class support for modules.&lt;br /&gt;&lt;br /&gt;Strecks allowed me to write web applications with Struts the way I believed they should be written. The changes I made with Impala have allowed me to write Spring applications in the way that I would like to write them. Some of the real headaches that came with attempting to scale Spring applications, attempting to build in sophisticated configuration options, have just gone away.&lt;br /&gt;&lt;br /&gt;Now to the differences. The timing of Strecks was unfortunate. Just as I was in the reasonably advanced early stages of development, an announcement was made that Struts was to merge with Webwork, with future Struts 2 development using the Webwork code base. That was the death knell to Struts as we knew it. I believed at the time that Strecks was a genuine way forward for Struts, without having to throw away the code base and stick a finger at the huge Struts user community. However, once the decision had been made, any project based on &lt;span style="font-style: italic;"&gt;old &lt;/span&gt;Struts had little chance of gaining any long term traction. I still took the project to a 1.0 final release, but there seemed little point in actively developing the project from then onwards, unless it served my own needs directly. Since then, I haven't been working on Struts projects more than intermittently, so such a need hasn't arisen in any real sense. That being said, it's still getting 100 to 200 downloads a month, so it hasn't disappeared completely off the map. Oddly, I am now spending a bit more time on a Struts-based project, so it might be a good opportunity to revive Strecks and put in a couple of features I had wanted to add. Also, I might focus on Strecks as a target for web framework integration with Impala.&lt;br /&gt;&lt;br /&gt;In contrast to Struts, I don't think there is any chance that the Spring code base is going to be deprecated any time soon. It's an extremely healthy project, arguably more so than any other in the Java community. Secondly, internally, Spring is well architected. It has all the extension points I have needed for Impala to fit naturally into the existing design paradigm. I have never felt the need to correct Spring's faults. Struts, on the other hand, had flaws in its architecture that were not always easy to get around when implementing features in Strecks.&lt;br /&gt;&lt;br /&gt;My hope is that the Spring community will share my view that Impala elegantly solves some of the real practical problems which come when developing large, complex Spring-based applications, delivering substantial productivity benefits at the same time. It has been a fascinating and enjoyable project to work on. It would be nice to see some of these benefits being shared more widely. But first I need to get the public release out!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-3139710898189873574?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/3139710898189873574/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=3139710898189873574' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/3139710898189873574'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/3139710898189873574'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2008/04/impala-and-strecks.html' title='Impala and Strecks'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-3417550402146711923</id><published>2008-04-04T14:12:00.005+01:00</published><updated>2008-04-04T14:27:38.750+01:00</updated><title type='text'>More about Impala scaffolding</title><content type='html'>It is important to appreciate the developers are busy people - if they are going to spend an hour looking at your project, then this has to be an hour well spent. For this reason, there is a real focus in Impala on making the developer experience as seamless as possible. Everything should work out the box. It's only when you start doing interesting stuff, stuff specific to your problem domain, that you should have to do any real work.&lt;br /&gt;&lt;br /&gt;In my previous post I described the &lt;a href="http://impalablog.blogspot.com/2008/04/scaffolding-for-impala.html"&gt;simple scaffolding system&lt;/a&gt; that is available for Impala. This is not supposed to compete with the scaffolding provided by Ruby on Rails, Grails and such projects. There is a fundamental difference in approach. Impala's scaffolding is only supposed to take you to the point where you have a clean slate to work on. It is not a code generation framework, and I have no intention of moving into that space with it. However, getting to a clean slate position - where you can actually start working on your application - is not a zero work task for many projects. For a project such as Impala which is designed to support very complex applications, you want to make this as simple as possible. I don't want developers who take time out to try Impala to spend their first hour creating directory structures, setting up class paths, and downloading third party libraries from various sources.&lt;br /&gt;&lt;br /&gt;The scaffolding I've created with Impala is designed to help you transition to square one as quickly as possible. Once you get there you have a working Impala &lt;span style="font-style: italic;"&gt;Hello World&lt;/span&gt; application, with working module definitions, a working web application, interactive integration tests and a JUnit suite. With a decent internet connection, running through the scaffolding steps should only take a few minutes - allowing time to play, try things out and do some fun stuff.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-3417550402146711923?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/3417550402146711923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=3417550402146711923' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/3417550402146711923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/3417550402146711923'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2008/04/more-about-impala-scaffolding.html' title='More about Impala scaffolding'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-484730649125300618</id><published>2008-04-01T19:56:00.015+01:00</published><updated>2008-04-04T14:11:25.256+01:00</updated><title type='text'>Scaffolding for Impala</title><content type='html'>It's been a little while since my last post, and since then, Impala has taken a few steps forward in the background. One of these is a simple scaffolding mechanism, which allows you to go from an empty empty Eclipse workspace to a working application in just a few simple steps.&lt;br /&gt;&lt;br /&gt;First, start by downloading the latest snapshot distribution of Impala from the subversion repository.&lt;br /&gt;&lt;br /&gt;http://impala.googlecode.com/svn/trunk/impala/impala/dist/impala-SNAPSHOT.zip&lt;br /&gt;&lt;br /&gt;You can do this via the web browser. From Linux or Mac OSX you may find it more convenient to use curl.&lt;br /&gt;&lt;br /&gt;cd ~&lt;br /&gt;curl -o impala-SNAPSHOT.zip http://impala.googlecode.com/svn/trunk/impala/impala/dist/impala-SNAPSHOT.zip&lt;br /&gt;&lt;br /&gt;You can then unzip the Impala distribution:&lt;br /&gt;&lt;br /&gt;unzip impala-SNAPSHOT.zip&lt;br /&gt;&lt;br /&gt;Once you've unzipped Impala, set the IMPALA_HOME environment property.&lt;br /&gt;&lt;br /&gt;IMPALA_HOME=~/impala-SNAPSHOT&lt;br /&gt;export IMPALA_HOME&lt;br /&gt;&lt;br /&gt;In windows, you will probably want to use the GUI to do the same.&lt;br /&gt;&lt;br /&gt;Now, change to IMPALA_HOME, and run the following command:&lt;br /&gt;&lt;br /&gt;ant -f scaffold-build.xml scaffold:create -Dimpala.home=./&lt;br /&gt;&lt;br /&gt;You will then be guided through an interactive process where you will need to specify the following information:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;the name of the project containing the &lt;span style="font-weight: bold;"&gt;root Impala module&lt;/span&gt;. This project is a kind of a master project, and will also be the project from which you will typically run ANT build scripts when this is necessary.&lt;/li&gt;&lt;li&gt;the name of the project containing a &lt;span style="font-weight: bold;"&gt;non-root module&lt;/span&gt;. In a real world application, non-root modules would contain implementations of DAOs, service methods - anything really. In a substantial real world application there will be several if not many non-root modules, together forming a hierarchy of modules.&lt;/li&gt;&lt;li&gt;the name of a project containing a &lt;span style="font-weight: bold;"&gt;web module&lt;/span&gt;. Although it is possible to have multiple web modules in a single application, the simple scaffolding starts with just one web project.&lt;/li&gt;&lt;li&gt;the name of the &lt;span style="font-weight: bold;"&gt;repository&lt;/span&gt; project. This contains the third party jars used by the different application modules.&lt;/li&gt;&lt;li&gt;finally, the name of the &lt;span style="font-weight: bold;"&gt;test&lt;/span&gt; project. The test project is really a convenience from which you can easily run suites of tests for the entire application.&lt;/li&gt;&lt;/ul&gt;The last time I ran this command, the following output was produced:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;ant -f scaffold-build.xml scaffold:create -Dimpala.home=./&lt;br /&gt;Buildfile: scaffold-build.xml&lt;br /&gt;&lt;br /&gt;scaffold:input-workspace-root:&lt;br /&gt;[input] Please enter name of workspace root directory:&lt;br /&gt;/Users/philzoio/workspaces/scaffold&lt;br /&gt;&lt;br /&gt;scaffold:input-main-project:&lt;br /&gt;[input] Please enter main project name, to be used for root module:&lt;br /&gt;main&lt;br /&gt;&lt;br /&gt;scaffold:input-module-project:&lt;br /&gt;[input] Please enter name of first non-root module:&lt;br /&gt;module&lt;br /&gt;&lt;br /&gt;scaffold:input-web-project:&lt;br /&gt;[input] Please enter name of web module:&lt;br /&gt;web&lt;br /&gt;&lt;br /&gt;scaffold:input-test-project:&lt;br /&gt;[input] Please enter name of tests project:&lt;br /&gt;test&lt;br /&gt;&lt;br /&gt;scaffold:input-repository-project:&lt;br /&gt;[input] Please enter name of repository project:&lt;br /&gt;repository&lt;br /&gt;&lt;br /&gt;scaffold:create-confirm:&lt;br /&gt;[echo] Workspace root location: /Users/philzoio/workspaces/scaffold&lt;br /&gt;[echo] Main (root) project name: main&lt;br /&gt;[echo] First non-root module project name: module&lt;br /&gt;[echo] Web project name: web&lt;br /&gt;[echo] Tests project name: test&lt;br /&gt;[echo] Repository project name: repository&lt;br /&gt;[input] Press return key to continue, or CTRL + C to quit ...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;scaffold:create:&lt;br /&gt;[mkdir] Created dir: /Users/philzoio/workspaces/scaffold&lt;br /&gt;[copy] Copying 6 files to /Users/philzoio/workspaces/scaffold/main&lt;br /&gt;[copy] Copied 6 empty directories to 5 empty directories under /Users/philzoio/workspaces/scaffold/main&lt;br /&gt;[copy] Copying 3 files to /Users/philzoio/workspaces/scaffold/main&lt;br /&gt;[copy] Copying 1 file to /Users/philzoio/workspaces/scaffold/main/spring&lt;br /&gt;[copy] Copying 4 files to /Users/philzoio/workspaces/scaffold/module&lt;br /&gt;[copy] Copied 5 empty directories to 4 empty directories under /Users/philzoio/workspaces/scaffold/module&lt;br /&gt;[copy] Copying 2 files to /Users/philzoio/workspaces/scaffold/module&lt;br /&gt;[copy] Copying 1 file to /Users/philzoio/workspaces/scaffold/module/spring&lt;br /&gt;[copy] Copying 11 files to /Users/philzoio/workspaces/scaffold/web&lt;br /&gt;[copy] Copied 8 empty directories to 4 empty directories under /Users/philzoio/workspaces/scaffold/web&lt;br /&gt;[copy] Copying 2 files to /Users/philzoio/workspaces/scaffold/web&lt;br /&gt;[copy] Copying 1 file to /Users/philzoio/workspaces/scaffold/web/spring&lt;br /&gt;[copy] Copying 2 files to /Users/philzoio/workspaces/scaffold/test&lt;br /&gt;[copy] Copying 1 file to /Users/philzoio/workspaces/scaffold/test&lt;br /&gt;[copy] Copying 1 file to /Users/philzoio/workspaces/scaffold/repository&lt;br /&gt;[copy] Copied 2 empty directories to 1 empty directory under /Users/philzoio/workspaces/scaffold/repository&lt;br /&gt;&lt;br /&gt;BUILD SUCCESSFUL&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Before we import the Eclipse project, there are just two more steps to follow:&lt;br /&gt;&lt;br /&gt;First, go the main newly project, and run the following two commands:&lt;br /&gt;&lt;br /&gt;cd /Users/philzoio/workspaces/scaffold/main&lt;br /&gt;ant fetch&lt;br /&gt;ant get&lt;br /&gt;&lt;br /&gt;The fetch command will copy the Impala libraries into the repository project of the new workspace, as shown by the following output.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;ant fetch&lt;br /&gt;Buildfile: build.xml&lt;br /&gt;[echo] Project using workspace.root: /Users/philzoio/workspaces/scaffold&lt;br /&gt;[echo] Project using impala home: /Users/philzoio/impala-SNAPSHOT&lt;br /&gt;&lt;br /&gt;repository:fetch-impala-from-lib:&lt;br /&gt;[copy] Copying 12 files to /Users/philzoio/workspaces/scaffold/repository/main&lt;br /&gt;&lt;br /&gt;repository:fetch-impala-from-repository:&lt;br /&gt;&lt;br /&gt;repository:fetch-impala:&lt;br /&gt;&lt;br /&gt;fetch:&lt;br /&gt;&lt;br /&gt;BUILD SUCCESSFUL&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The get command downloads the necessary third party libraries, as defined using a simple format in dependencies.txt files.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;ant get&lt;br /&gt;Buildfile: build.xml&lt;br /&gt;[echo] Project using workspace.root: /Users/philzoio/workspaces/scaffold&lt;br /&gt;[echo] Project using impala home: /Users/philzoio/impala-SNAPSHOT&lt;br /&gt;&lt;br /&gt;shared:get:&lt;br /&gt;[echo] Project using workspace.root: /Users/philzoio/workspaces/scaffold&lt;br /&gt;[echo] Project using impala home: /Users/philzoio/impala-SNAPSHOT&lt;br /&gt;&lt;br /&gt;download:get:&lt;br /&gt;[mkdir] Created dir: /Users/philzoio/workspaces/scaffold/repository/build&lt;br /&gt;[mkdir] Created dir: /Users/philzoio/workspaces/scaffold/repository/test&lt;br /&gt;[get] Getting: http://ibiblio.org/pub/packages/maven2/commons-logging/commons-logging/1.1/commons-logging-1.1.jar&lt;br /&gt;[get] To: /Users/philzoio/workspaces/scaffold/repository/main/commons-logging-1.1.jar&lt;br /&gt;[get] Getting: http://ibiblio.org/pub/packages/maven2/commons-logging/commons-logging/1.1/commons-logging-1.1-sources.jar&lt;br /&gt;[get] To: /Users/philzoio/workspaces/scaffold/repository/main/commons-logging-1.1-sources.jar&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;[download] ******************************************************&lt;br /&gt;[download]&lt;br /&gt;[download]                RESULTS OF DOWNLOAD OPERATION&lt;br /&gt;[download]&lt;br /&gt;[download] org/springframework/spring-webmvc/2.5.2/spring-webmvc-2.5.2.jar resolved from&lt;br /&gt;http://ibiblio.org/pub/packages/maven2/org/springframework/spring-webmvc/2.5.2/spring-webmvc-2.5.2.jar&lt;br /&gt;[download] org/springframework/spring-webmvc/2.5.2/spring-webmvc-2.5.2-sources.jar resolved from&lt;br /&gt;http://ibiblio.org/pub/packages/maven2/org/springframework/spring-webmvc/2.5.2/spring-webmvc-2.5.2-sources.jar&lt;br /&gt;[download]&lt;br /&gt;[download] ******************************************************&lt;br /&gt;&lt;br /&gt;get:&lt;br /&gt;&lt;br /&gt;BUILD SUCCESSFUL&lt;br /&gt;Total time: 3 minutes 6 seconds&lt;br /&gt;&lt;/pre&gt;We're now ready to import our projects into Eclipse. Start by opening Eclipse in the newly created workspace.&lt;br /&gt;&lt;br /&gt;Use the menus File -&gt; Import ... -&gt; General -&gt; Existing Projects Into Workspace. When prompted, set the import base directory to the workspace root directory. This should bring up a dialog box as shown below. &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_3D_qDW2IOvQ/R_KQcX45GRI/AAAAAAAAABE/crPfzwenxko/s1600-h/import.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://3.bp.blogspot.com/_3D_qDW2IOvQ/R_KQcX45GRI/AAAAAAAAABE/crPfzwenxko/s320/import.jpg" alt="" id="BLOGGER_PHOTO_ID_5184364938180237586" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Select all of the projects and import them.&lt;br /&gt;&lt;br /&gt;If you reach this point and no errors are showing in your workspace, the congratulations! You have just set up a new Impala workspace.&lt;br /&gt;&lt;br /&gt;Let's test it out:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Running up the web application&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Using CTRL-Shift + T, find the class StartServer. Right click, then select Run As ...  Java Application.&lt;br /&gt;&lt;br /&gt;This will start a Jetty Server and run up a server on port 8080.&lt;br /&gt;&lt;br /&gt;The text shown on the console view of Eclipse will look something like this:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;2008-04-01 20:56:10.408::INFO:  Logging to STDERR via org.mortbay.log.StdErrLog&lt;br /&gt;2008-04-01 20:56:10.479::INFO:  jetty-6.1.1&lt;br /&gt;2008-04-01 20:56:10.963:/web:INFO:  Initializing Spring root WebApplicationContext&lt;br /&gt;INFO : BaseImpalaContextLoader - Loading bootstrap context from locations [META-INF/impala-bootstrap.xml, META-INF/impala-web-bootstrap.xml, META-INF/impala-jmx-bootstrap.xml, META-INF/impala-web-listener-bootstrap.xml]&lt;br /&gt;INFO : ScheduledModuleChangeMonitor - Starting org.impalaframework.module.monitor.ScheduledModuleChangeMonitorBean with fixed delay of 2 and interval of 10&lt;br /&gt;INFO : LoadTransitionProcessor - Loading definition root-module&lt;br /&gt;INFO : ScheduledModuleChangeMonitor - Monitoring for changes in module root-module: [file [/Users/philzoio/workspaces/scaffold/main/bin]]&lt;br /&gt;INFO : LoadTransitionProcessor - Loading definition module&lt;br /&gt;INFO : ModuleContributionPostProcessor - Contributing bean messageService from module module&lt;br /&gt;INFO : ScheduledModuleChangeMonitor - Monitoring for changes in module module: [file [/Users/philzoio/workspaces/scaffold/module/bin]]&lt;br /&gt;INFO : LoadTransitionProcessor - Loading definition web&lt;br /&gt;INFO : ScheduledModuleChangeMonitor - Monitoring for changes in module web: [file [/Users/philzoio/workspaces/scaffold/web/bin]]&lt;br /&gt;2008-04-01 20:56:12.133:/web:INFO:  Initializing Spring FrameworkServlet 'web'&lt;br /&gt;INFO : ExternalLoadingImpalaServlet - FrameworkServlet 'web': initialization started&lt;br /&gt;INFO : ExternalLoadingImpalaServlet - FrameworkServlet 'web': initialization completed in 21 ms&lt;br /&gt;2008-04-01 20:56:12.168::INFO:  Started SelectChannelConnector @ 0.0.0.0:8080&lt;br /&gt;DEBUG : ScheduledModuleChangeMonitor - Completed check for modified modules. No modified module contents found&lt;br /&gt;DEBUG : ScheduledModuleChangeMonitor - Completed check for modified modules. No modified module contents found&lt;br /&gt;&lt;/pre&gt;You can connect to the server using the URL:&lt;br /&gt;&lt;br /&gt;http://localhost:8080/web/message.htm&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_3D_qDW2IOvQ/R_KVpH45GTI/AAAAAAAAABU/DMDZ4C6-Qgs/s1600-h/message.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://2.bp.blogspot.com/_3D_qDW2IOvQ/R_KVpH45GTI/AAAAAAAAABU/DMDZ4C6-Qgs/s320/message.jpg" alt="" id="BLOGGER_PHOTO_ID_5184370654781708594" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Note that Impala is started up to automatically detect changes in your modules, and reload modules in response to these changes. You can play with this mechanism by making changes to classes such as MessageController (in the web project) and MessageServiceImpl (in the module project).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Running the standalone interactive client&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Use Eclipse to find the JUnit test class MessageIntegrationTest. Again, run this as a Java application, and execute tests, reload modules etc, using the interactive test runner. Here's some example output:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;log4j:WARN No appenders could be found for logger (org.springframework.context.support.ClassPathXmlApplicationContext).&lt;br /&gt;log4j:WARN Please initialize the log4j system properly.&lt;br /&gt;Test class set to test.MessageIntegrationTest&lt;br /&gt;Unable to load module corresponding with directory name [not set]&lt;br /&gt;Starting inactivity checker with maximum inactivity of 600 seconds&lt;br /&gt;--------------------&lt;br /&gt;&lt;br /&gt;Please enter your command text&lt;br /&gt;&gt;test&lt;br /&gt;No module loaded for current directory: main&lt;br /&gt;Running test testIntegration&lt;br /&gt;.Hello World!&lt;br /&gt;&lt;br /&gt;Time: 0.055&lt;br /&gt;&lt;br /&gt;OK (1 test)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Please enter your command text&lt;br /&gt;&gt;reload&lt;br /&gt;Module 'root-module' loaded in 0.096 seconds&lt;br /&gt;Used memory: 1.5MB&lt;br /&gt;Max available memory: 63.6MB&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Please enter your command text&lt;br /&gt;&gt;module module&lt;br /&gt;Module 'module' loaded in 0.035 seconds&lt;br /&gt;Used memory: 2.1MB&lt;br /&gt;Max available memory: 63.6MB&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Please enter your command text&lt;br /&gt;&gt;t&lt;br /&gt;No module loaded for current directory: main&lt;br /&gt;Running test testIntegration&lt;br /&gt;.Hello World!&lt;br /&gt;&lt;br /&gt;Time: 0.012&lt;br /&gt;&lt;br /&gt;OK (1 test)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Run the suite of tests&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Any of the JUnit integration tests can be run as a regular unit test in Eclipse, with green bar and all. From the tests project, find the class AllTests. This contains a suite of tests covering all the tests in the project. Run this as a regular unit test, and you will see the following:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_3D_qDW2IOvQ/R_KXj345GUI/AAAAAAAAABc/HdwrVqijjhg/s1600-h/alltests.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://1.bp.blogspot.com/_3D_qDW2IOvQ/R_KXj345GUI/AAAAAAAAABc/HdwrVqijjhg/s320/alltests.jpg" alt="" id="BLOGGER_PHOTO_ID_5184372763610650946" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;There's plenty more to get your teeth stuck into, but having a working web application, a working suite of tests, and interactive tests which can be run out the box is a helpful start.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-484730649125300618?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/484730649125300618/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=484730649125300618' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/484730649125300618'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/484730649125300618'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2008/04/scaffolding-for-impala.html' title='Scaffolding for Impala'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_3D_qDW2IOvQ/R_KQcX45GRI/AAAAAAAAABE/crPfzwenxko/s72-c/import.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-8928814168018936069</id><published>2008-02-05T20:12:00.000Z</published><updated>2008-02-05T20:40:55.596Z</updated><title type='text'>Impala working on Tomcat as war</title><content type='html'>Today I reached a significant milestone with Impala. I successfully deployed and ran the Impala as a war file with reloadable modules, in Tomcat. Modules are placed as jars in the folder /WEB-INF/modules.&lt;br /&gt;&lt;br /&gt;This is a big step forward. Until now, Impala has been developed and deployed in Eclipse or using ANT and an embedded Jetty runner. That's great for development, but for production, a war file is much more convenient - just having a single file which can be dropped into a web container is much more deployment friendly than having to set up a special folder on the target machine which  has a structure which mirrors the development environment.&lt;br /&gt;&lt;br /&gt;A war deployment option was one of the main features which stands in the way of a public release. There's quite a bit of tidying up to do in the way that the build/packaging process works, but it's fair to say that we're now a big step closer to a first public release of Impala.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-8928814168018936069?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/8928814168018936069/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=8928814168018936069' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/8928814168018936069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/8928814168018936069'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2008/02/impala-working-on-tomcat-as-war.html' title='Impala working on Tomcat as war'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-2553332307789127336</id><published>2008-01-30T20:47:00.000Z</published><updated>2008-01-30T19:33:05.534Z</updated><title type='text'>Modularity: what is it, and why is it important?</title><content type='html'>&lt;div&gt;Modularity is taken for granted as something which has value in software engineering, perhaps without always a well articulated understanding of what it is, and why it is valuable. I came to this realisation when I found myself having in some difficulty attempting to explain why the modularity that Impala brings can be beneficial to a large application. Instinctively, I felt like I had a good understanding, but it's useful to put this understanding into words.&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;What is modularity?&lt;/strong&gt;&lt;/p&gt;&lt;div&gt;I googled remarkably few articles dedicated to the subject. The definition in the &lt;a href="http://wikipedia.org/wiki/Modular_programming"&gt;wikipedia&lt;/a&gt; entry was quite good, from which I quote the relevant sections:&lt;/div&gt;&lt;br /&gt;&lt;div&gt;"Programs that have many direct interrelationships between any two random parts of the program code are less modular (more tightly &lt;a title="Coupling (computer science)" href="http://en.wikipedia.org/wiki/Coupling_%28computer_science%29"&gt;coupled&lt;/a&gt;) than programs where those relationships occur mainly at well-defined &lt;a title="Interface (computer science)" href="http://en.wikipedia.org/wiki/Interface_%28computer_science%29"&gt;interfaces&lt;/a&gt; between modules.&lt;br /&gt;Modules provide a separation between &lt;a title="Interface (computer science)" href="http://en.wikipedia.org/wiki/Interface_%28computer_science%29"&gt;interface&lt;/a&gt; and &lt;a title="Implementation" href="http://en.wikipedia.org/wiki/Implementation"&gt;implementation&lt;/a&gt;. A module interface expresses the elements that are provided and required by the module. The elements defined in the interface are visible to other modules. The implementation contains the working code that corresponds to the elements declared in the interface."&lt;br /&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Modularity in Impala&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This definition fits in very well with how modularity is implemented in Impala. Modules fit into a hierarchy. An Impala module only depends directly on its parent. This means that two modules at the same level have no direct dependencies on each other. Modules communicate with each other through well defined interfaces - specifically Java interfaces defined in a shared parent module.&lt;div&gt; &lt;/div&gt;&lt;br /&gt;Child modules dynamically &lt;span style="font-style: italic;"&gt;contribute &lt;/span&gt;their implementation to a proxy bean defined in a higher level. I'm also planning contributions to a service registry, as is the case with OSGi. The proxies can themselves be dynamically registered, although static wirings of these are necessary to support the traditional named bean style dependency injection.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Why is Modularity Important?&lt;/span&gt;&lt;div&gt; &lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;Modularity is a key weapon in reducing with complexity in a large project. In the same way that blocks of functionality within a component should be partitioned into classes according to responsibilities, so should parts of an application be partitioned into modules. Like classes in an OO model, each module should have a well defined - albeit higher level - set of responsibilities. Ideally, these responsibilities should be closely related to each other.&lt;br /&gt;&lt;br /&gt;The benefits of modularity, in my view, are as follows:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;by definition,  it reduces the unnecessary cross dependencies between code for different parts of a system. This makes code easier to maintain and extend. Impala enforces this kind of modularity because classes at the same level of the module hierarchy are not visible to each other.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;it's easier to specify the constituents of a modular system at a higher level. An Impala application is just a collection of modules. In practical terms, it is much more convenient to specify an Impala application as a small number of modules than as a large number of Spring configuration files.&lt;/li&gt;&lt;li&gt;it's easier to read and understand a modular system. Each module has a clear and relatively narrowly defined set of functions, which can be more easily documented and explained than in the case of a system which is not modular.&lt;/li&gt;&lt;li&gt;a dynamic modular system such as Impala also has the advantage that parts of the system can be separately added, upgraded and removed. This is not possible in a system which is not modular.&lt;/li&gt;&lt;/ul&gt;Without modularity, a large system rapidly degenerates into one which is extremely hard to maintain. I would go so far as to argue that a large system which is not modular is doomed to excessive complexity, maintenance issues, and an unnecessarily high bug rate.&lt;div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-2553332307789127336?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/2553332307789127336/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=2553332307789127336' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/2553332307789127336'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/2553332307789127336'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2008/01/modularity-what-is-it-and-why-is-it.html' title='Modularity: what is it, and why is it important?'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-2455536646539100782</id><published>2008-01-16T19:49:00.000Z</published><updated>2008-01-16T21:30:49.210Z</updated><title type='text'>Spring Exchange 2008 in London</title><content type='html'>Today I attended the Spring exchange, held in London. Not only is it good to get away from the day job occasionally, but Spring is obviously the critical base technology for Impala, so an opportunity to get a quick, thorough and free update from the horse's mouth, as it were, is very welcome. Thanks to Spring Source and organisers Skills Matter.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Rod Johnson&lt;/span&gt; delivered the keynote, which as usual found another interesting angle to his perennial topic - the success of Spring. This time, the theme was the "The Changing of the Guard". It was all about the disruption that was taking place in enterprise development as a whole, with the leading technologies of yesteryear, J2EE and .NET, with their "One Size Fits All" approach, increasingly viewed as inadequate. A bleak future awaits J2EE, is his view. It's hard to disagree. Spring of course has pride of place in this future, evidenced for example by the continual upward rise of "Spring and Java" job adverts. As you would expect, he had some interesting ideas and perspectives. But I did feel like his talk went on a bit long ... I'm told it was 59 slides long!&lt;br /&gt;&lt;br /&gt;The second talker was &lt;span style="font-weight: bold;"&gt;Sam Brannen&lt;/span&gt;, who went through the new features of Spring 2.5, fairly succinctly although without too much fanfare. Spring 2.5 now targets Java 1.6, fully supports JEE 5, and ships OSGi compliant bundles. However, the biggest areas of development in Spring 2.5 core are the use of annotations, in particular the myriad of ways they can be used to set up Spring bean definitions, effectively reduce the amount of configuration code that you need to write, but not without a few health warnings having thrown in.&lt;br /&gt;&lt;br /&gt;Some of the annotation mechanisms include:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;JSR 250 common annotations, such as @PostConstruct, @PreDestroy and @Resource&lt;/li&gt;&lt;li&gt;the Spring @Autowire annotation&lt;/li&gt;&lt;li&gt;@Component, which identifies a class as a Spring bean&lt;/li&gt;&lt;/ul&gt;plus a whole bunch of others. While I am certainly a fan of annotations for specialised uses, such as in web frameworks such as &lt;a href="http://strecks.sourceforge.net/"&gt;Strecks&lt;/a&gt;, there is certainly the danger that such a sudden and vast proliferation of annotations will be confusing to many users. Personally, for most bread and butter bean definitions I think I will carry on preferring to use the basic XML definitions, with namespace support where appropriate.&lt;br /&gt;&lt;br /&gt;On the whole, the annotations and new namespace implementations are really syntactic sugar which don't really tackle a real problem which remains with Spring: the absence of modularity as a first class concept at the heart of the framework. SpringSource aims to address this using OSGi, and I'm told that Spring OSGi will ship 1.0 next week. Nevertheless, Spring OSGi will not quite get to the crux of the problem, because a solution is needed now, and OSGi still needs to go through plenty of growing pains before it reaches maturity in the enterprise space.&lt;br /&gt;&lt;br /&gt;The third talk before lunch was &lt;span style="font-weight: bold;"&gt;Dave Syer&lt;/span&gt;, who described the improvements to Spring's web offering. This is one area where they really have made impressive strides, and there is plenty more to come. Admittedly, it is also an area where some real catch up was necessary.&lt;br /&gt;&lt;br /&gt;The bit I liked best was Spring @MVC, the new Annotation-based controllers, which combined the component scanning, offer a much neater way to wire up web applications. Couldn't help thinking back to my work on &lt;a href="http://strecks.sourceforge.net/"&gt;Strecks&lt;/a&gt;, and the similarity in the approach! JSF support is much improved, but I'm not terribly bothered about this. There's more AJAX'y stuff, and interestingly, gracefully degrading versions of the JSF components.&lt;br /&gt;&lt;br /&gt;Both the afternoon sessions involved the impressive &lt;span style="font-weight: bold;"&gt;Adrian Colyer &lt;/span&gt;and &lt;span style="font-weight: bold;"&gt;Rob Harrop&lt;/span&gt; double act. One of the nice things about going to these kinds of conferences is you discover some unexpected things: this time, how they were using Eclipse MyLyn to group together different files used for different parts of their demos. A useful pedagogical technique. I  liked Adrian's presentation on the internals of the Spring runtime, with some well crafted diagrams, and Rob had some good perspectives on how to use Spring in the field.&lt;br /&gt;&lt;br /&gt;Something which really struck a chord for me was his advice on the structure of projects for large, complex applications, stressing the importance of modularity, and suggesting some practices for selecting between different configurations for development, testing and production. Yes, I'm back to my favourite themes: modularity and configurability, and of course, Impala. Not only does Impala bring modularity to Spring applications, but has some a couple of neat  ways of  tweaking module configurations without requiring any nasty build hacks.&lt;br /&gt;&lt;br /&gt;Unfortunately, I didn't get to the final round table Q&amp;amp;A session due to home commitments, but if I had, I would have asked about Spring 3.0. There was surprisingly little spoken about Spring 3.0, and the plans they seem to have are evolutionary, not dramatic, at least as far as the core project is concerned.&lt;br /&gt;&lt;br /&gt;A good day out, and I didn't even miss my train coming home!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-2455536646539100782?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/2455536646539100782/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=2455536646539100782' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/2455536646539100782'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/2455536646539100782'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2008/01/spring-exchange-2008-in-london.html' title='Spring Exchange 2008 in London'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-5147180113029399951</id><published>2008-01-12T21:17:00.000Z</published><updated>2008-01-12T18:04:42.072Z</updated><title type='text'>Spring users: seven reasons why you'll like Impala</title><content type='html'>Here are seven reasons why you'll like Impala if you like already Spring:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Spring encourages interface based programming. Impala takes this one step further: modules communicate with each other using interfaces, and interface implementations are contained within modules.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Modules help you to organise your code, and eliminate unnecessary cross-code and cross-bean dependencies. Modules provide a much simpler mechanism for identifying high level relationships between parts of an application than is possible using raw application context definition files and relationships between individual beans. &lt;/li&gt;&lt;br /&gt;&lt;li&gt;What's not to like? There's virtually nothing that you can do in Spring that you can't do in Impala in exactly the same way as you would do it in vanilla Spring. You can still use virtually any of the Spring APIs, any Spring feature, technique, configuration mechanism, etc., unmodified! There's no new API or language to learn. You don't need to throw away any best practices. If anything, Impala makes it easier to enforce best practices, because it strongly encourages modular applications with well defined interfaces (based on Java interfaces).&lt;br /&gt;&lt;/li&gt;&lt;li&gt;A small learning curve. To start benefiting from Impala, all you need to do is organise you project according to a well defined set of conventions, and to add a bean definition into the relevant Spring context files. Otherwise, everything is the same.&lt;br /&gt;&lt;br /&gt;Impala is not asking you to embrace a new programming model, set of APIs or even language. Simply leverage your Java and Spring knowledge, but to greater effect.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Spring is great for test driven development in that it helps you manage dependencies better. Impala takes this a step further. The interactive test runner makes writing integration tests - still a pain point with plain Spring development - really easy, hence encouraging test driven development at every level.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Tasks such as reloading configurations, updating application logic, refreshing logging configurations are simple with Impala. Impala leverages Spring's first class JMX support to simplify these tasks.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Impala defines a convention-based project structure which makes sense both in terms of productivity and enterprise Java development best practice.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-5147180113029399951?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/5147180113029399951/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=5147180113029399951' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/5147180113029399951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/5147180113029399951'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2007/11/spring-users-seven-reasons-why-youll.html' title='Spring users: seven reasons why you&apos;ll like Impala'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-3977406766551988896</id><published>2008-01-07T21:23:00.001Z</published><updated>2008-01-08T14:34:08.081Z</updated><title type='text'>Spring's Petclinic Sample, Impala style</title><content type='html'>I've spent a bit of time converting the Spring Petclinic sample so  that it runs with Impala. Petclinic it is actually a showcase for the various Spring data access technologies. I've cut down the Impala Petclinic sample to work with following configuration:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;data access using Hibernate&lt;/li&gt;&lt;li&gt;MySQL database&lt;/li&gt;&lt;li&gt;simple service and web tiers&lt;/li&gt;&lt;/ul&gt;To run the application, follow these steps:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;svn co http://impala.googlecode.com/svn/trunk/petclinic petclinic&lt;/li&gt;&lt;li&gt;Open Eclipse, with the workspace set to the checkout directory (petclinic)&lt;/li&gt;&lt;/ul&gt;Now set up the database:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;First, from petclinic/db, run createDB.txt (as root). This creates the petclinic user&lt;br /&gt;mysql -u root -p &amp;lt; createDB.txt&lt;/li&gt;&lt;li&gt;Then as the petclinic user, insert the tables&lt;br /&gt;mysql -u petclinic -ppetclinic petclinic &amp;lt; initDB.txt&lt;/li&gt;&lt;li&gt;To insert data, run&lt;br /&gt;mysql -u petclinic -ppetclinic petclinic &amp;lt; populateDB.txt&lt;/li&gt;&lt;/ul&gt;To run the tests from Eclipse, simply run the main class AllTests as a JUnit test, which is in the project petclinic-tests.&lt;br /&gt;&lt;br /&gt;To run up the web application, simply run the main class StartServer, which is in the project petclinic-web. This time, run it as a (main) Java application.&lt;br /&gt;&lt;br /&gt;To run up the interactive test runner, run HibernateClinicTest as a Java application. Type u for usage. You can run this class as a standard JUnit test - it's part of the AllTests suite.&lt;br /&gt;&lt;br /&gt;Next on my list is to create a sample based on Spring's Petstore sample (originally Clinton Begin's JPetstore application, a sample with a rather long history). This is more interesting, as it is a larger application with a greater variety of components, so should be an interesting showcase for Impala.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-3977406766551988896?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/3977406766551988896/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=3977406766551988896' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/3977406766551988896'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/3977406766551988896'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2008/01/springs-petclinic-sample-impala-style.html' title='Spring&apos;s Petclinic Sample, Impala style'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-2924145815450706747</id><published>2008-01-06T13:51:00.000Z</published><updated>2008-01-07T22:07:13.654Z</updated><title type='text'>When will Impala be "go public"?</title><content type='html'>At the moment, there is still no public release of Impala. There have been no announcements on any popular web sites, to the Spring mailing lists or forums, or to any other public forum. This is deliberate. This is not because the necessary features are not present. Most of the functionality needed for a public release is present, and the code is usable and good quality. There is is enough functionality to provide real benefit to a project using Impala.&lt;br /&gt;&lt;br /&gt;What still remains is to be absolutely sure that the Impala internal interfaces are correct. For the last few months (yes, literally!), I have been doing extensive refactoring, with the result that I am progressing towards this point. If users come up with a whole new set of requirements and ideas on how it can be used, there should be a clearly defined set of interfaces to build upon.&lt;br /&gt;&lt;br /&gt;The first public release of Impala won't be just before going 1.0. However, it will only occur when I have reached the point that I am satisfied that the interfaces are as correct as I can make them, to support extensibility and maintainability moving forward. I think I am quite close. The interfaces are in pretty good working order, and the organisation of the code seems to make good sense.&lt;br /&gt;&lt;br /&gt;I need to spend a bit more time working on the interactive test runner, and on deployment issues. Most of the work I've been doing with Impala has been within Eclipse itself. And of course, samples and documentation, although the first public release doesn't need to depend on these.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-2924145815450706747?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/2924145815450706747/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=2924145815450706747' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/2924145815450706747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/2924145815450706747'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2007/11/when-will-impala-be-go-public.html' title='When will Impala be &quot;go public&quot;?'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-8886156405420878095</id><published>2007-12-17T21:38:00.000Z</published><updated>2007-12-17T21:45:52.842Z</updated><title type='text'>Impala and OSGi</title><content type='html'>&lt;div&gt;The project most closely related to Impala is Spring OSGi, so it's tempting to try make some comparisons on the two projects, or at least on their approaches to solving the problems they are tackling. I should preface this by saying that I am talking from a certain position of relative ignorance: my understanding of Spring and OSGi is based mostly on what I have read in the documentation and a small amount of playing with samples some time ago. I've since been to a talk on OSGi at JavaWUG in London, and read a fair portion of the OSGi spec. I hope this has given me sufficient understanding to make a few remarks which reflect my impressions of the differences between Impala and the world of Spring OSGi.&lt;br /&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;br /&gt;&lt;strong&gt;Spring OSGi and Impala are tackling an overlapping set of problems&lt;/strong&gt;&lt;br /&gt;&lt;div&gt; &lt;/div&gt;&lt;br /&gt;&lt;div&gt;What Impala and Spring OSGi have in common is that they are both dynamic module based systems.&lt;br /&gt;&lt;br /&gt;Impala provides a developer productivity solution through build support, an interactive test runner, and support for efficient, fast running integration tests.&lt;br /&gt;&lt;br /&gt;OSGi, on the other hand, tackles a wider set of problems relating to visibility of classes. OSGi allows you to run multiple versions of third party libraries within the same JVM, which can prevent problems which may occur from different libraries depending on incompatible versions of the same third party library. You can think of OSGi as defining multiple class spaces for third party libraries as well as application code.&lt;br /&gt;&lt;br /&gt;Impala makes a clear distinction between application code and third party libraries. There is only a single class space for third party libraries. If there is a clash between third party libraries, then you are no better off (or worse off, for that matter) than you would be in a standard Java/pre-OSGi world. You would still need to resort to whatever workaround would apply in that case.&lt;br /&gt;&lt;br /&gt;While third party library clashes are certainly a theoretical possibility, it is quite rare in my experience to actually be a victim of such problems in a way which couldn't be addressed relatively easily through a simple workaround. Others may have different experiences in this regard. However, it does seem that there is quite a bit of overhead required to make sure that the Jars you use fit in nicely with OSGi requirements, so that they "play nicely" in OSGi world. It's the kind of overhead that I think most developers would look for ways to avoid for as long as they are able to do.&lt;br /&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;Impala has more of a focus on developer productivity&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;br /&gt;The purpose of Spring OSGi seems primarily to bring the benefits of OSGi to Java, via Spring. In that sense, it is OSGi centric. The fundamental trade-off with OSGi is one of productivity. Are you prepared to go to quite a lot more trouble in defining quite precisely the nature of dependencies between libraries, with the benefit that you will never get ClassCastExceptions due to classloader issues, and that you will be able to dynamically update library versions. Make no mistake, these benefits come at a cost. One very experienced OSGi developer described working with library dependencies OSGi as a "pain in the arse", something you wouldn't want to do without tool support.&lt;br /&gt;&lt;br /&gt;Impala, by contrast, does not impose these kinds of constraints. In fact, it's very essence is about productivity. Dynamic module reloading can benefit productivity, because it means that integration tests can be written on the fly against a running application.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Impala Support for OSGi&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Impala has all the internal interfaces necessary for seamlessly supporting OSGi, probably via Spring OSGi. I'm definitely considering adding this in the future. For the time being, that's not on the immediate horizon - getting the project into a publicly releasable form is a higher priority right now.&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;/strong&gt; &lt;/div&gt;&lt;br /&gt;&lt;div&gt; &lt;/div&gt;&lt;br /&gt;&lt;div&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-8886156405420878095?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/8886156405420878095/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=8886156405420878095' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/8886156405420878095'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/8886156405420878095'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2007/11/impala-and-osgi.html' title='Impala and OSGi'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-6951679572195390631</id><published>2007-11-25T21:52:00.000Z</published><updated>2007-11-26T14:34:03.748Z</updated><title type='text'>Impala being used on a "real" project</title><content type='html'>&lt;div&gt; &lt;/div&gt;I'm pleased to say that I am now using Impala for what looks like may and should become a core and major development at the company where I am working. The results have been great. Progress has been more rapid than I have expected, and a lot of this is down to the capabilities provided by Impala.&lt;br /&gt;&lt;div&gt; &lt;/div&gt;&lt;br /&gt;&lt;div&gt;I haven't run into any major obstacles that couldn't be overcome with relatively little effort. Dynamic reloading is working well. Test execution speed - a bugbear of the previous version - is quick. There are now around 200 tests, of which around 30 or so are integration tests which load up various bits of the application. The application currently consists of 21 Hibernate entities. Total execution time of all the tests - integration included- is about six to eight seconds for initial startup, plus the same again to run the tests.&lt;br /&gt;&lt;br /&gt;It's a major moment for any open source project is when it gets its first real commercial user. In this case, the actual user is still primarily myself. That's a good thing - it means that on a day-by-day basis I am getting to validate the features and functionality, discover bugs when the appear, and get ideas for improvements and new features.&lt;br /&gt;&lt;br /&gt;Successful open source projects are often extractions from existing successful commercial projects. Others are developed from a vision of the technology the developer would like to work with on his or her next project. Impala started off this way. The danger for the latter kind of projects is that the opportunities to use the technology in anger on real commercial projects may not present themselves that readily, with the danger that you don't get the chance to "eat your own dog food". At the moment, I am eating my own dog food by the spadeful, and it tastes good!&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;   &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-6951679572195390631?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/6951679572195390631/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=6951679572195390631' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/6951679572195390631'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/6951679572195390631'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2007/11/impala-being-used-on-real-project.html' title='Impala being used on a &quot;real&quot; project'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-5217459164897742205</id><published>2007-11-06T22:01:00.001Z</published><updated>2007-11-06T22:16:35.460Z</updated><title type='text'>New package and domain names</title><content type='html'>I've been spending a bit of time working on the package layout of Impala classes. While the project is still at an early stage, it makes sense to try to get this right.&lt;br /&gt;&lt;br /&gt;The first thing to do was to change the root package name. I've had to do this after moving the code from Java.net to Google code. The Impala root package is now org.impalaframework. It would have been nice to use org.impala, but I'm politely sticking to the convention that you should own the domain that you use (yes, I have actually bought the domain org.impalaframework!). I certainly didn't want to use com.googlecode; if I need to move the project again, then I don't want to have to do another root package rename. org.impalaframework is a bit wordy, but it at least there is a precedent in the form of the root package names used for Spring: org.springframework. Hope this doesn't make me too much of a copycat.&lt;br /&gt;&lt;br /&gt;All this being said, the convention that you should to use a package name which corresponds to a domain name that you own kinda sucks. Of course, this is only a convention, and you can choose to ignore it. I may choose to do so, but for now, I'm more interested in getting the structure of the packages and classes right. That means getting the names of classes and packages right, getting their locations correct and eliminating package cycles. This process should settle down soon. It will need to before I'm ready to do the first public release.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-5217459164897742205?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/5217459164897742205/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=5217459164897742205' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/5217459164897742205'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/5217459164897742205'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2007/11/new-package-and-domain-names.html' title='New package and domain names'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-4403814291320931558</id><published>2007-10-22T20:47:00.000+01:00</published><updated>2007-11-06T22:01:16.255Z</updated><title type='text'>Grails Exchange</title><content type='html'>Last month I did a talk on behalf of the &lt;a href="http://www.jroller.com/javawug/"&gt;Java Web User Group&lt;/a&gt; (JavaWUG)  at the &lt;a href="http://grails-exchange.com/home"&gt;Grails Exchange&lt;/a&gt;. Unfortunately, I did not go to the full conference but it was nice to pop in and attend a couple of the evening sessions, do my bit, and join in for a beer and chat aftewards.&lt;br /&gt;&lt;br /&gt;The thrust of my talk was on embedding Grails into Java applications. Grails is a full-stack framework, which aims to solve an overlapping set of problems to Impala. I feel lured towards Groovy, but every time I get put off by my perception that Groovy is too slow. I'm not talking about execution speed, more compile speed.&lt;br /&gt;&lt;br /&gt;Anyway, there could be a nice synergy with Impala and Grails - Impala for a standard Spring-based back end, and Grails for the front end. That's certainly a part of the reason for my interest in embedding Grails in a typical Java application.&lt;br /&gt;&lt;br /&gt;Impala, of course, works out of the box with Spring MVC, but it would be great to get integration going with other frameworks. One of the key requirements for a web framework integration with Impala is that the web application is itself dynamically reloadable. Of course, you could integrate Impala with any statically reloading web application, but it seems a bit pointless having dynamically reloadable back-end functionality while still having to restart the application every time you want to make a change to one of your presentation classes. Grails seems to fit the dynamic reloadable requirement quite well. However, unpicking it's functionality so that you can reuse it outside of the Grails environment is not trivial.&lt;br /&gt;&lt;br /&gt;Here's some code which goes part of the way to achieving this task.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;public static void main(String[] args) throws IOException {&lt;br /&gt;    MetaClassRegistry registry = GroovySystem.getMetaClassRegistry();&lt;br /&gt;&lt;br /&gt;    if (!(registry.getMetaClassCreationHandler()&lt;br /&gt;        instanceof ExpandoMetaClassCreationHandle))&lt;br /&gt;        registry.setMetaClassCreationHandle(new ExpandoMetaClassCreationHandle());&lt;br /&gt;&lt;br /&gt;    FileSystemXmlApplicationContext cpc =&lt;br /&gt;        new FileSystemXmlApplicationContext("web-app/WEB-INF/grails-context.xml");&lt;br /&gt;    DefaultRuntimeSpringConfiguration springConfig =&lt;br /&gt;        new DefaultRuntimeSpringConfiguration(cpc);&lt;br /&gt;&lt;br /&gt;    GrailsApplication application = (GrailsApplication) cpc.getBean("grailsApplication");&lt;br /&gt;    application.registerArtefactHandler(new ControllerArtefactHandler());&lt;br /&gt;    application.registerArtefactHandler(new TagLibArtefactHandler());&lt;br /&gt;    application.registerArtefactHandler(new DomainClassArtefactHandler());&lt;br /&gt;&lt;br /&gt;    application.getConfig().put("plugin.includes", "filter, controllers, taglib");&lt;br /&gt;&lt;br /&gt;    DefaultGrailsPluginManager pluginManager =&lt;br /&gt;        new DefaultGrailsPluginManager(new Class[] {}, application);&lt;br /&gt;   &lt;br /&gt;    WebApplicationContext context = springConfig.getUnrefreshedApplicationContext();&lt;br /&gt;    pluginManager.setParentApplicationContext(context);&lt;br /&gt;    pluginManager.loadPlugins();&lt;br /&gt;&lt;br /&gt;    pluginManager.doPostProcessing(context);&lt;br /&gt;    pluginManager.doRuntimeConfiguration(springConfig);&lt;br /&gt;    pluginManager.setApplicationContext(context);&lt;br /&gt;    pluginManager.doDynamicMethods();&lt;br /&gt;   &lt;br /&gt;    WebApplicationContext ctx = springConfig.getApplicationContext();&lt;br /&gt;&lt;br /&gt;    System.out.println(Arrays.toString(ctx.getBeanDefinitionNames()));&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Note that this code will fire up Grails, load its web-specific plugins. The trick now is to get the  rest of the environment working, so that a full Grails web application can slot neatly into Impala's environment. Something I'll be trying in the next few weeks.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-4403814291320931558?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/4403814291320931558/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=4403814291320931558' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/4403814291320931558'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/4403814291320931558'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2007/10/grails-exchange.html' title='Grails Exchange'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-1187315443275940932</id><published>2007-10-04T19:37:00.000+01:00</published><updated>2007-10-04T19:58:56.087+01:00</updated><title type='text'>Impala moved to Google code</title><content type='html'>I've just moved Impala from Java.net to Google code.&lt;br /&gt;&lt;br /&gt;Here's the new link: &lt;a href="http://impala.googlecode.com/"&gt;http://impala.googlecode.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here's why.&lt;br /&gt;&lt;br /&gt;I originally set Impala up with Java.net because I wanted project hosting which would be simpler, quicker and easier to maintain than Sourceforge, where I had previously hosted projects. On the whole things did work out that way, but there are a few things about Java.net that I don't like.&lt;br /&gt;&lt;br /&gt;First, and this is a biggie, there doesn't appear to be anonymous SVN source access. This means that people who want to check out the source code need to sign up to Java.net, and for some people this is definitely likely to be a barrier to trying out the project, and hence to the project's adoptions.&lt;br /&gt;&lt;br /&gt;On a related issue, there doesn't seem to be direct web-based SVN browsing available. I can't send a link which points directly to a source file on the SVN repository.&lt;br /&gt;&lt;br /&gt;Second, it seems to have quite a complicated roles and permission system that I didn't immediately understand and still don't. Frankly, the only roles or permissions I'd be interested in are project owner, committers and everyone else. Anyone should be able to see anything; only developers should be able to change things.&lt;br /&gt;&lt;br /&gt;Thirdly, while everything seems nicely packaged, the tools seem a bit dated. The bug tracker, which I hadn't started looking, looked like a wrapper around bugzilla.&lt;br /&gt;&lt;br /&gt;On the whole, the site has a bit of a clunky feel - I'm not that big a fan of the CollabNet software. I wouldn't expect this to change dramatically too soon, because I can just imagine the pain that would be involved with upgrading.&lt;br /&gt;&lt;br /&gt;Finally, setting up the project took a bit long. It took a couple of weeks before it was put in the Enterprise Incubator category. There's just a bit too much process around the project setup.  I want plain and simple hosting. The users and community as a whole, and not some Sun employees, will decide if there is any merit in the project.&lt;br /&gt;&lt;br /&gt;Google Code, on the other hand, was really no frills in its setup. The tools seem very simple to use. Everything is laid out clearly. I didn't need to spend ages figuring out how the site works. Google generally does a good job at creating usable applications, and this one doesn't seem to be any different.&lt;br /&gt;&lt;br /&gt;Of course, there is anonymous SVN access for casual users. I like the tabbed layout of the project home page. The bug tracker looks simple but very functional, and the same goes for the wiki. And, as you'd expect with Google, there is good indexing and search capability, so that documentation and source code is searchable.&lt;br /&gt;&lt;br /&gt;All in all, it made sense to change sooner rather than later, as the project is in a very early, pre-adoption phase. The job would be much more painful later on. Now I've got to rename the packages!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-1187315443275940932?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/1187315443275940932/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=1187315443275940932' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/1187315443275940932'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/1187315443275940932'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2007/10/impala-moved-to-google-code.html' title='Impala moved to Google code'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-8155552462296182586</id><published>2007-09-22T19:21:00.000+01:00</published><updated>2007-09-22T19:47:38.782+01:00</updated><title type='text'></title><content type='html'>I've added some timing information for running Impala in interactive test mode, and the numbers are quite interesting.&lt;br /&gt;&lt;br /&gt;I start by firing up a JUnit test class, called WineDAOTest, which looks like the following:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;public class WineDAOTest extends BaseDataTest {&lt;br /&gt;&lt;br /&gt;    public static void main(String[] args) {&lt;br /&gt;        PluginTestRunner.run(WineDAOTest.class);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void testDAO() {&lt;br /&gt;&lt;br /&gt;        WineDAO dao = DynamicContextHolder.getBean(this, "wineDAO", WineDAO.class);&lt;br /&gt;&lt;br /&gt;        Wine wine = new Wine();&lt;br /&gt;        wine.setColor("red");&lt;br /&gt;        wine.setVineyard("Chateau X");&lt;br /&gt;        wine.setTitle("Cabernet");&lt;br /&gt;        wine.setVintage(1996);&lt;br /&gt;        dao.save(wine);&lt;br /&gt;&lt;br /&gt;        Collection&lt;wine&gt; winesOfVintage = dao.getWinesOfVintage(1996);&lt;br /&gt;        System.out.println("Wines of vintage 1996: " + winesOfVintage.size());&lt;br /&gt;        assertEquals(1, winesOfVintage.size());&lt;br /&gt;&lt;br /&gt;        wine.setVintage(2000);&lt;br /&gt;        wine.setColor("rose");&lt;br /&gt;        dao.update(wine);&lt;br /&gt;&lt;br /&gt;        Wine updated = dao.findById(wine.getId());&lt;br /&gt;        assertEquals(2000, updated.getVintage());&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public PluginSpec getPluginSpec() {&lt;br /&gt;        return new PluginSpec("parent-context.xml", new String[] { "dao", "hibernate", "merchant" });&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The Impala features have been added by&lt;/p&gt;&lt;ul&gt;&lt;li&gt;exposing a main method which calls PluginTestRunner&lt;/li&gt;&lt;li&gt;obtaining the Spring context bean using DynamicContextHolder.getBean(...)&lt;/li&gt;&lt;li&gt;providing an implementation of getPluginSpec(), which tells the PluginTestRunner which plugins to include as part of the test. Note that we have plugins for the basic Hibernate configuration, for the DAO implementations, and for the service classes (the &lt;em&gt;merchant&lt;/em&gt; plugin)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;We now run the class in interactive mode by running it as a Java application in Eclipse (instead of running it as a JUnit test. Here's the output.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;--------------------------------&lt;br /&gt;Enter u to show usage&lt;br /&gt;&gt;u&lt;br /&gt;l [testClass] to load test class&lt;br /&gt;[testName] to run test&lt;br /&gt;reload [plugin name] to reload plugin&lt;br /&gt;reload to reload parent context&lt;br /&gt;s to show test methods&lt;br /&gt;r to rerun last command&lt;br /&gt;r to rerun last run test&lt;br /&gt;e to exit&lt;br /&gt;--------------------------------&lt;br /&gt;Enter u to show usage&lt;br /&gt;&gt;s&lt;br /&gt;Available test methods:&lt;br /&gt;testDAO&lt;br /&gt;--------------------------------&lt;br /&gt;Enter u to show usage&lt;br /&gt;&gt;testDAO&lt;br /&gt;Running test tests.WineDAOTest&lt;br /&gt;.Wines of vintage 1996: 1&lt;br /&gt;Time: 3.264&lt;br /&gt;OK (1 test)&lt;br /&gt;&lt;br /&gt;--------------------------------&lt;br /&gt;Enter u to show usage&lt;br /&gt;&gt;reload&lt;br /&gt;Parent context loaded in 0.551 seconds&lt;br /&gt;Used memory: 3.4MB&lt;br /&gt;Max available memory: 63.6MB&lt;br /&gt;&lt;br /&gt;--------------------------------&lt;br /&gt;Enter u to show usage&lt;br /&gt;&gt;reload&lt;br /&gt;Parent context loaded in 0.34 seconds&lt;br /&gt;Used memory: 4.2MB&lt;br /&gt;Max available memory: 63.6MB&lt;br /&gt;&lt;br /&gt;--------------------------------&lt;br /&gt;Enter u to show usage&lt;br /&gt;&gt;reload&lt;br /&gt;Parent context loaded in 0.521 seconds&lt;br /&gt;Used memory: 3.8MB&lt;br /&gt;Max available memory: 63.6MB&lt;br /&gt;&lt;br /&gt;--------------------------------&lt;br /&gt;Enter u to show usage&lt;br /&gt;&gt;reload hibernate&lt;br /&gt;Plugin hibernate loaded in 0.21 seconds&lt;br /&gt;Used memory: 4.3MB&lt;br /&gt;Max available memory: 63.6MB&lt;br /&gt;&lt;br /&gt;--------------------------------&lt;br /&gt;Enter u to show usage&lt;br /&gt;&gt;reload merchant&lt;br /&gt;Plugin merchant loaded in 0.16 seconds&lt;br /&gt;Used memory: 4.6MB&lt;br /&gt;Max available memory: 63.6MB&lt;br /&gt;&lt;br /&gt;--------------------------------&lt;br /&gt;Enter u to show usage&lt;br /&gt;&gt;reload dao&lt;br /&gt;Plugin dao loaded in 0.141 seconds&lt;br /&gt;Used memory: 4.5MB&lt;br /&gt;Max available memory: 63.6MB&lt;br /&gt;&lt;br /&gt;--------------------------------&lt;br /&gt;Enter u to show usage&lt;br /&gt;&gt;reload&lt;br /&gt;Parent context loaded in 0.511 seconds&lt;br /&gt;Used memory: 4.1MB&lt;br /&gt;Max available memory: 63.6MB&lt;br /&gt;&lt;br /&gt;--------------------------------&lt;br /&gt;Enter u to show usage&lt;br /&gt;&gt;reload&lt;br /&gt;Parent context loaded in 0.43 seconds&lt;br /&gt;Used memory: 3.9MB&lt;br /&gt;Max available memory: 63.6MB&lt;br /&gt;&lt;br /&gt;--------------------------------&lt;br /&gt;Enter u to show usage&lt;br /&gt;&gt;testDAO&lt;br /&gt;Running test tests.WineDAOTest&lt;br /&gt;.Wines of vintage 1996: 1&lt;br /&gt;Time: 0.081&lt;br /&gt;OK (1 test)&lt;br /&gt;&lt;br /&gt;--------------------------------&lt;br /&gt;Enter u to show usage&lt;br /&gt;&gt;testDAO&lt;br /&gt;Running test tests.WineDAOTest&lt;br /&gt;.Wines of vintage 1996: 1&lt;br /&gt;Time: 0.07&lt;br /&gt;OK (1 test)&lt;br /&gt;&lt;br /&gt;--------------------------------&lt;br /&gt;Enter u to show usage&lt;br /&gt;&gt;&lt;/p&gt;&lt;p&gt;&lt;/pre&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;Notice how the initial test run took 3.2 seconds, which is how long we'd expect a small Spring/Hibernate test run to take. After that it gets more interesting.&lt;br /&gt;&lt;br /&gt;Subsequent reloads of the application context (shown by the reload call) take only a fraction of the time: 0.55 seconds, 0.34 seconds, 0.51 seconds and 0.34 seconds. This is only a fraction of the time it takes to load the application context the first time.&lt;br /&gt;&lt;br /&gt;Reloading individual plugins in much quicker: hibernate took 0.21 seconds, dao took 0.14 and merchant took 0.16 seconds. This means, at least for a small application, we can reflect changes almost instantly. Even for an application which loads 10 times more slowly, the numbers are still quite acceptable.&lt;br /&gt;&lt;br /&gt;Running the test without doing the reload is also extremely fast: compare 0.07 and 0.08 seconds with the original 3.2 seconds.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-8155552462296182586?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/8155552462296182586/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=8155552462296182586' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/8155552462296182586'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/8155552462296182586'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2007/09/ive-added-some-timing-information-for.html' title=''/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-1627975045579370054</id><published>2007-09-19T18:49:00.000+01:00</published><updated>2007-09-20T20:01:46.903+01:00</updated><title type='text'>The Rationale of Micro Hot Deployment</title><content type='html'>&lt;div&gt;A big part of Impala's reason for being is that it supports micro hot deployment of Java applications. So what is micro hot deployment, and why is it a valuable concept?&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Traditional hot deployment in Java is all about being able to update an application on the fly, typically a WAR or EAR on an application server. In reality, this kind of hot deployment is not terribly useful. Firstly, it often comes with memory leaks, which mean that after a couple of redeployments you may end up running out of memory. Secondly, because it is a coarse-grained redeployment, it can take quite a long time. For example, if the server itself only takes two or three seconds to start up, and the application takes 20 to 30 seconds to load, then in terms of downtime you little worse off doing the server restart.&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;br /&gt;&lt;div&gt;Micro hot deployment involves hot (re)deployment of parts of an application. Java Servlet containers such as Tomcat already support this in a very limited sense. For example, JSPs, which are compiled into Servlets, can typically be updated without an application restart. This is because it is safe to associate a JSP with its own class loader, because the class which the JSP compiles to it will never be referenced by another application class. It is very much at the end of the application dependency chain.&lt;br /&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;br /&gt;&lt;div&gt;The only other form of hot deployment considered&lt;em&gt; safe&lt;/em&gt; by application servers is redeployment of full applications. This is a fairly brute force tactic for getting around the limitations and pitfalls of Java classloaders.&lt;br /&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;br /&gt;&lt;div&gt;Other technologies do a much better job of implementing micro hot deployment. The likes of PHP and Ruby on Rails, for example. Even within the Java camp, scripting based solutions such as Grails, based on Groovy, have tackled this problem head-on.&lt;br /&gt;&lt;br /&gt;Unfortunately, Java frameworks have been pretty slow to follow suit. Tapestry 5 now promises that application classes will be reloadable on the fly in production, not just development, and Wicket has a reloading filter which can be used to hot-redeploy pages. But these are the exception, not the rule, and most Java frameworks are less ambitious in this department.&lt;br /&gt;&lt;br /&gt;Solving the hot redeployment is something that Java application frameworks need to get right if they want developers to stay with the platform in the long term. This means working with classloaders, which can be a tricky business. But tricky does not mean impossible.&lt;br /&gt;&lt;br /&gt;Impala tackles the problem of micro micro hot deployment for Spring-based applications. It allows for the division of the application into modules which can be reloaded separately. One of the important principals that it recognises is that in terms of frequency of change, not all application artifacts are created equal. Let's start with the most frequently changed parts of an application:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;configuration flags&lt;/span&gt;: application specific properties which allow for switchable behaviour of the system at runtime. A trivial example would be a flag &lt;span style="font-style: italic;"&gt;testMode &lt;/span&gt;which would be switched off in production.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;UI templates: &lt;/span&gt;without any changes to the structure of the application, changing these can change the way the application appears.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;infrastructure configuration: &lt;/span&gt;here we're talking about resources such as database connection pools, which existing independent from any application classes.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;business rules: &lt;/span&gt;parts of the application which carry out the business logic of the application. These can, for example, be changed without having to change the domain model of the application.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;domain model: &lt;/span&gt;we're moving closer to the root of the dependency graph here - changes to domain model objects typically can have downstream effects on all of the items listed above.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;shared utility classes: &lt;/span&gt;these are units of code which are shared by different parts of the application, that don't relate directly to the domain model or business processes of the application. Since they haven't been packaged into separate third party libraries, they are technically still part of the application.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;third party libraries: &lt;/span&gt;these tend to change much less often than the artifacts of the application itself.&lt;/li&gt;&lt;/ul&gt;Impala recognises the different life cycles of the different types of artifacts within an application. For example:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;it is possible to reload the core of the application (domain model plus shared utility classes) and all of the business components without reloading any of the third party classes. This is important, because one of the things that takes Java apps so long to start is the need to load classes from third party libraries. Typically, the number of third party classes used, directly or indirectly, is much larger than the number of application classes.&lt;/li&gt;&lt;li&gt;it is possible to reload one of the business components without reloading the application core or any other business components&lt;/li&gt;&lt;li&gt;it &lt;span style="font-style: italic;"&gt;will be &lt;/span&gt;possible to reload infrastructure configurations without reloading the core of the application, and &lt;span style="font-weight: bold; font-style: italic;"&gt;vice versa&lt;/span&gt;. Note that the latter is possible because infrastructure components don't depend directly on the core application classes.&lt;/li&gt;&lt;li&gt;it is possible to reload &lt;span style="font-weight: bold;"&gt;tests &lt;/span&gt;without having to reload any of the application classes they are testing. This can dramatically cut down the time to write integration tests.&lt;/li&gt;&lt;li&gt;configuration flags and UI templates are less of a challenge to reload dynamically. The former can be done via reloadable configuration files, while the latter is usually supported by good web frameworks or servlet containers.&lt;/li&gt;&lt;/ul&gt;Micro hot deployment is about finding ways to minimise the granularity of artifact reloading, so that only artifacts that have changed, and those which depend on them, have to reload when changes are made. The benefits for improving developer productivity are obvious, and their are important potential benefits for live updates of in deployment environment, too.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-1627975045579370054?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/1627975045579370054/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=1627975045579370054' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/1627975045579370054'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/1627975045579370054'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2007/09/rationale-of-micro-hot-deployment.html' title='The Rationale of Micro Hot Deployment'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-4195754338111608147</id><published>2007-09-14T10:55:00.000+01:00</published><updated>2007-09-14T11:21:08.489+01:00</updated><title type='text'>Impala's non-Maven approach to simpler builds</title><content type='html'>One of the goals of Impala is to have a pure work out-the-box feeling. If you download the distribution, you should be able to set up a new project with just one or two commands. Once you've done this, the project structure should be ready for you. The build infrastructure should be just &lt;span style="font-style: italic;"&gt;there&lt;/span&gt;. As long as you obey the project structure conventions, then you should be able to plug in an existing build system into your new project.&lt;br /&gt;&lt;br /&gt;All of this is behind the ideas that drive Maven. Maven defines a standardised folder locations, and an existing build infrastructure which you can just plug in and use. All of these ideas are great, but I don't want the project to depend on Maven. I'm still trying to decide whether I should make the project structure conventions conform to those of Maven. The advantage is that Maven users would be able to simply &lt;span style="font-style: italic;"&gt;Mavenize &lt;/span&gt;their project by adding a POM xml. The disadvantage is personal - I don't particularly like the Maven project structure conventions. I wouldn't have chosen them for myself.&lt;br /&gt;&lt;br /&gt;Right now I'm pretty close to having a pure out-of-the-box ANT based build system ready for Impala. It's taken quite a lot of time, but it's starting to feel much more &lt;span style="font-style: italic;"&gt;right&lt;/span&gt;. Basically, the build will be enabled using the following combination:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;a &lt;span style="font-style: italic;"&gt;build.xml&lt;/span&gt; in the project root directory. The build.xml needs to have a property called &lt;span style="font-style: italic;"&gt;impala.home&lt;/span&gt;, which defines where the Impala install files have been dumped to on the file system&lt;/li&gt;&lt;li&gt;a set of other project-specific properties which need to be specified, either within the &lt;span style="font-style: italic;"&gt;build.xml&lt;/span&gt; itself a properties file&lt;br /&gt;&lt;/li&gt;&lt;li&gt;a set of imports of build scripts sitting in the impala.home folder&lt;/li&gt;&lt;/ul&gt;Here's an example:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;?xml version="1.0"?&amp;gt;&lt;br /&gt;&amp;lt;project name="Build" basedir="."&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;property name = "workspace.root" location = ".."&amp;gt;&lt;br /&gt;  &amp;lt;property name = "impala.home" location = "${workspace.root}/../impala"&amp;gt;&lt;br /&gt;  &amp;lt;property file = "build.properties"&amp;gt;&lt;br /&gt;  &amp;lt;import file = "${impala.home}/project-build.xml"&amp;gt;&lt;br /&gt;  &amp;lt;import file = "${impala.home}/download-build.xml"&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/project&amp;gt;&lt;br /&gt;&lt;/pre&gt;Note that the &lt;span style="font-style: italic;"&gt;clean&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;compile&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;jar &lt;/span&gt;and &lt;span style="font-style: italic;"&gt;test&lt;/span&gt; targets typical in a build system are found in project-build.xml. This file in turn relies on your project structure conventions to find the resources it needs. Similarly, adding &lt;span style="font-style: italic;"&gt;download-build.xml&lt;/span&gt; adds support for obtaining dependencies, for example from a Maven ibiblio repository. You can make this build file the master build file for a multi-project build, simply by adding an import to &lt;span style="font-style: italic;"&gt;shared-build.xml&lt;/span&gt; and adding the &lt;span style="font-style: italic;"&gt;project.list&lt;/span&gt; property, as shown in this example:&lt;br /&gt;&lt;pre&gt;&amp;lt;?xml version="1.0"?&amp;gt;&lt;br /&gt;&amp;lt;project name="Build" basedir="."&amp;gt;&lt;br /&gt;&lt;br /&gt;   &amp;lt;property name = "workspace.root" location = ".."/&amp;gt;&lt;br /&gt;   &amp;lt;property name = "impala.home" location = "${workspace.root}/../impala"/&amp;gt;&lt;br /&gt;&lt;br /&gt;   &amp;lt;echo&amp;gt;Project using workspace.root: ${workspace.root}&amp;lt;/echo&amp;gt;&lt;br /&gt;   &amp;lt;echo&amp;gt;Project using impala home: ${impala.home}&amp;lt;/echo&amp;gt;&lt;br /&gt; &lt;br /&gt;   &amp;lt;property file = "build.properties"/&amp;gt;&lt;br /&gt;   &amp;lt;import file = "${impala.home}/project-build.xml"/&amp;gt;&lt;br /&gt;   &amp;lt;import file = "${impala.home}/shared-build.xml"/&amp;gt;&lt;br /&gt;   &amp;lt;import file = "${impala.home}/download-build.xml"/&amp;gt;&lt;br /&gt;   &amp;lt;import file = "${impala.home}/repository-build.xml"/&amp;gt;&lt;br /&gt; &lt;br /&gt;   &amp;lt;target name = "get" depends = "shared:get"/&amp;gt;&lt;br /&gt;   &amp;lt;target name = "fetch" depends = "repository:fetch-impala"/&amp;gt;&lt;br /&gt;   &amp;lt;target name = "clean" depends = "shared:clean"/&amp;gt;&lt;br /&gt;   &amp;lt;target name = "dist" depends = "shared:all-no-test"/&amp;gt;&lt;br /&gt;   &amp;lt;target name = "test" depends = "shared:test"/&amp;gt;&lt;br /&gt; &lt;br /&gt;&amp;lt;/project&amp;gt;&lt;br /&gt;&lt;/pre&gt;with the extra property in build.properties:&lt;br /&gt;&lt;pre&gt;project.list=wineorder,wineorder-hibernate,\&lt;br /&gt;   wineorder-dao,wineorder-merchant,wineorder-web&lt;br /&gt;&lt;/pre&gt;I'm looking forward to getting all of this work done, so I can get back to what Impala is really supposed to be doing, which is supporting dynamic Spring modules. But all of this functionality is terribly important for making the whole experience as painless as possible for end users.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-4195754338111608147?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/4195754338111608147/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=4195754338111608147' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/4195754338111608147'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/4195754338111608147'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2007/09/impalas-non-maven-approach-to-simpler.html' title='Impala&apos;s non-Maven approach to simpler builds'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-5080271611461139705</id><published>2007-09-13T10:14:00.000+01:00</published><updated>2007-09-13T12:03:54.812+01:00</updated><title type='text'>Simple dependency management, Impala style</title><content type='html'>I've been spending a bit of time working on a simple dependency management system for Impala. You're probably asking: why don't you just use something like Maven or Ivy? Aren't they supposed to be doing that job for you?&lt;br /&gt;&lt;br /&gt;Well, the problem is that I've decided I &lt;span style="font-style: italic;"&gt;don't &lt;/span&gt;want &lt;a href="http://impalablog.blogspot.com/2007/09/impala-ant-and-transitive-dependencies.html"&gt;transitive dependency management&lt;/a&gt;. What I do want is a simple way for users of the project (including myself, of course) can easily find and download the dependencies they do need. In a funny way, Maven does come to the rescue. It defines a standard format for repository jar entries, which goes like this:&lt;br /&gt;&lt;pre&gt;[base url]/[organisation name]/artifact name]/[version]/[artifact name]-[version].jar&lt;br /&gt;&lt;/pre&gt;For example, I can hold of the Spring framework jar into using the URL&lt;br /&gt;http://ibiblio.org/pub/packages/maven2/org/springframework/spring/2.0.6/spring-2.0.6.jar&lt;br /&gt;&lt;br /&gt;Thankfully, Maven also defines a standard format for source jars.&lt;br /&gt;&lt;pre&gt;[base url]/[organisation name]/artifact name]/[version]/[artifact name]-[version]-sources.jar&lt;br /&gt;&lt;/pre&gt;Okay, so I don't want transitive dependencies, then what do I want?&lt;br /&gt;&lt;ul&gt;&lt;li&gt;an easy reliable way to get hold of dependencies without having to go to each and every individual project web sites&lt;/li&gt;&lt;li&gt;source jars that match the downloaded binaries, so that I can easily attach source for debugging&lt;/li&gt;&lt;li&gt;a simple way of saying where the downloaded files should go&lt;/li&gt;&lt;/ul&gt;Impala uses the concept of a project-specific repository. A project specific repository will have a simple structure consisting of parent folders and subfolders as shown below:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_3D_qDW2IOvQ/RukYrKTaKDI/AAAAAAAAAAU/ZswdGvIIoFE/s1600-h/repo.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_3D_qDW2IOvQ/RukYrKTaKDI/AAAAAAAAAAU/ZswdGvIIoFE/s320/repo.JPG" alt="" id="BLOGGER_PHOTO_ID_5109642382007740466" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now, all I need is a simple mechanism which says how individual artifacts are added to this repository. The mechanism Impala uses is a simple text file, which has entries such as below:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;main from commons-logging:commons-logging:1.1&lt;br /&gt;main from commons-io:commons-io:1.3&lt;br /&gt;main from log4j:log4j:1.2.13&lt;br /&gt;main from org.springframework:spring:2.0.6 source=true&lt;br /&gt;main from cglib:cglib-nodep:2.1_3&lt;br /&gt;test from junit:junit:3.8.1&lt;br /&gt;test from org.easymock:easymock:2.2&lt;br /&gt;test from org.easymock:easymockclassextension:2.2&lt;br /&gt;&lt;/pre&gt;For each artifact, I say optionally whether I want to include source (overriding whatever the default setting happens to be).&lt;br /&gt;&lt;br /&gt;I still need to do the work of figuring out what the dependencies are, but once I've got there, life is pretty peachy. You get the best of both worlds - simplicity and control.&lt;br /&gt;&lt;br /&gt;I still need to do some tweaks to get the mechanism fully ship shape, but it's basically working pretty well. Another feature is that you can specify multiple source locations, including your local Maven repository, so if the artifact you need happens to be lurking on your file system from a previous download, you don't need to waste time trying to get it from the net.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-5080271611461139705?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/5080271611461139705/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=5080271611461139705' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/5080271611461139705'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/5080271611461139705'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2007/09/simple-dependency-management-impala.html' title='Simple dependency management, Impala style'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_3D_qDW2IOvQ/RukYrKTaKDI/AAAAAAAAAAU/ZswdGvIIoFE/s72-c/repo.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1375633167426904536.post-4195707866593374962</id><published>2007-09-05T20:08:00.000+01:00</published><updated>2007-09-13T11:57:57.519+01:00</updated><title type='text'>Impala, ANT and transitive dependencies</title><content type='html'>Any project needs a build environment. For a project like Impala, which is trying to provide a simpler environment for Spring development, the choice of build tool is important.&lt;br /&gt;&lt;br /&gt;ANT has been around for an awful long time, but it's not exactly the most sexy software around these days. For a while it was the only show in town. Nobody likes writing build scripts, and the one thing that ANT does make you do is write build scripts for your projects.&lt;br /&gt;&lt;br /&gt;These days, the obvious other choice is &lt;span style="font-weight: bold;"&gt;Maven&lt;/span&gt;. Maven's two selling points are thus: it saves you from having to write build scripts, and it is supposed to handle dependency management for you. Of course, it cannot do everything. You need to tell Maven what libraries you want to use. Maven in turn will find a whole bunch of other libraries that you don't necessarily know about, which the libraries that you &lt;span style="font-style: italic;"&gt;do &lt;/span&gt;want to use themselves depend on. This is called transitive dependency management. The problem, though, is twofold. Maven relies on dependency information put in POM XML files. This information is only as good as the person editing the POM. It's not foolproof. Secondly, even if the POM is accurate, it may be more complete than it needs to be. How does it deal with optional dependencies? If these are included in the POM, but not needed for the parts of the library that you are using, then you get a bloated repository. And the one thing I can't stand is bloat.&lt;br /&gt;&lt;br /&gt;There are other things I don't like about Maven. Frankly, it tries to do too much, without necessarily doing anything very well. Lots of people I speak to have complained about this. It entails a lack of control over your build environment, which scares me. The horror stories you hear about don't seem to happen with ANT. It's a pain, but one way or another, you know you are going to be able to get the job done.&lt;br /&gt;&lt;br /&gt;A second option is &lt;span style="font-weight: bold;"&gt;Gant&lt;/span&gt;,&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;based on Groovy. Gant is built on ANT too, but uses a Groovy DSL to make ANT scripting easier. It seems much better for complex scripting, because you can use proper language features such as iteration and conditionals much more easily than with ANT. Two problems with Gant, though. There's more setup involved, because it requires Groovy and Gant to be installed (as well as ANT, perhaps). Also, it's a bit slow. Groovy is &lt;span style="font-style: italic;"&gt;much &lt;/span&gt;slower to compile than Java, which has a noticeable impact on build times.&lt;br /&gt;&lt;br /&gt;For these reasons, I'm back to ANT. If I need to do anything complex, like handle dependency management, or iterate through projects, I'll write a custom task for that. It's easy enough. ANT is not pretty, but it is effective.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1375633167426904536-4195707866593374962?l=impalablog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://impalablog.blogspot.com/feeds/4195707866593374962/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1375633167426904536&amp;postID=4195707866593374962' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/4195707866593374962'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1375633167426904536/posts/default/4195707866593374962'/><link rel='alternate' type='text/html' href='http://impalablog.blogspot.com/2007/09/impala-ant-and-transitive-dependencies.html' title='Impala, ANT and transitive dependencies'/><author><name>Phil Zoio</name><uri>http://www.blogger.com/profile/06867992322338887577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_3D_qDW2IOvQ/SOXR4r9UKwI/AAAAAAAAABo/bZuxNL9Kd0E/S220/Photo+54.jpg'/></author><thr:total>1</thr:total></entry></feed>
