Metro 0.6 Released

When developing OSS software, one should endeavour to maintain backward compatibility with each new release while adding improvements and new features (and fixing bugs). The current Metro release (0.6) is a significant departure from previous releases. While it maintains backward compatibility for service and gateway methods, it also provides improved support for validation rules and contexts thanks to a huge contribution from Matt Quackenbush. The changes are designed to promote building rich business objects. I removed some of the setup dependencies which I was unhappy with, and now use "import" for ColdSpring and "include" for Transfer to simplify configuration. Lastly, I have also re-organized sample code and support documents. Here is breakdown of the items requiring modification to use Metro 0.6.

Package, Configuration and Support Documents Reorganization and Updates

I moved several files around and created new directories to try and better organize items. The config directory now contains configuration documents (ColdSpring and Transfer). I also created a new docs directory to house the SQL scripts and any other forthcoming support documents. Another important change is that the security, user, and work sample packages are located in the "model" directory. Here's the laundry list.

ColdSpring Configuration

Since Metro as a base library to build upon, it makes sense to leverage ColdSpring's <import /> tag to ease configuration. This should simplify the upgrade to Metro 0.6. Instead of specifying the Metro factory beans, transfer beans, beanInjector, TDOBeanInjectorObserver and other sundry dependencies, just use import to add those configurations.

<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<!-- import common configurations -->
<import resource="/metro/config/coldspring/util.coldspring.xml" />
<import resource="/metro/config/coldspring/lib.coldspring.xml" />
<import resource="/metro/config/coldspring/transfer.coldspring.xml" />
<import resource="/metro/config/coldspring/factory.coldspring.xml" />

<!-- define service beans -->
<bean id="WorkService" factory-bean="ServiceFactory" factory-method="getService">
<constructor-arg name="packageName"><value>work</value></constructor-arg>
</bean>

<bean id="UserService" factory-bean="ServiceFactory" factory-method="getService">
<constructor-arg name="packageName"><value>user</value></constructor-arg>
</bean>

<bean id="SecurityService" factory-bean="ServiceFactory" factory-method="getService">
<constructor-arg name="packageName"><value>security</value></constructor-arg>
<property name="UserService">
<ref bean="UserService" />
</property>
</bean>

Transfer Configuration

The transfer object definition files now reside under "metro/config/transfer" rather than in the package that they pertain to. Here's a snippet from the updated Transfer.xml file located in "tests/config".

<?xml version="1.0" encoding="UTF-8"?>
<transfer xsi:noNamespaceSchemaLocation="transfer.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<includes>
<include path="/metro/config/transfer/user.xml" />
<include path="/metro/config/transfer/security.xml" />
<include path="/metro/config/transfer/work.xml" />
</includes>

SQL Scripts

Everyone has their pet way of writing SQL DDL. During the course of this refactoring, I decided (don't ask why) that using an lower case field name convention would support the possible inclusion ofPostgres scripts in the future. Therefore the user and security scripts are updated to use that convention and now reside in "docs/sql". There is a sub folder for bothMSSQL and MySQL scripts.

Sample Packages

Previous versions of Metro included sample security, user and work packages at the metro root directory. They are now located in a model directory and as mentioned above, the Transfer configuration and SQL scripts are re-located, leaving only model components in those packages.

I do not anticipate changes of this magnitude in future releases and I hope that the benefits of upgrading to 0.6 outweigh any difficulties encountered.

1 response so far ↓

Redskins Jersey - Sep 21, 2011 at 4:19 AM

Fabregas free running, running, and he used his tactical awareness of a great help for us. Coach Guardiola said. Among the melon handsome imagination, Washington Redskins Jerseys Albert Haynesworth Jersey Brian Orakpo Jersey Chris Cooley Jersey Chris Horton Jersey Fabregas will play more events on the pitch middle midfielder role. During the Arsenal, Fabregas repeated muscle injuries. But in fact, Washington Redskins Jersey Clinton Portis Jersey Darrell Green Jersey DeAngelo Hall Jersey Devin Thomas Jersey he and Lionel Messi, as has a very strong muscles, so to adapt to the Barcelona game no problem. This makes Guardiola was very satisfied. His goal should be to go beyond the resume Harvey. Redskins Jersey Dexter Manley Jersey Mike Sellers Jersey Sammy Baugh Jersey Tim Hightower Jersey Guardiola said. Back to Barcelona, abregas is happy.

Leave a Comment

Leave this field empty: