LightWire 0.6 RC1

Get it while it's hot! The main driver for this release was to be more ColdSpring compatible so for a good range of use cases you'll be able to switch seamlessly between DI engines allowing you to late bind the decision on what DI engine to use for a given project (for instance you might prototype with LW and then port to ColdSpring later or vica-versa).

There have been a couple of major API changes to LightWire as well as some improvements under the hood . . . Please note, due to API changes, this is NOT backwards compatible with 0.5 but updating your config beans should only take a minute or two and I think it is more than worth it for the benefits. This should be the last major API change. Find out more about the new API and the new features designed to make it very easy to interchange LightWire with ColdSpring for use cases not requiring AOP, remote bean proxies or autowiring . . .

First change is that while there are still getTransient(BeanName) and getSingleton(BeanName) methods, there is also a generic getBean(BeanName) method that returns the appropriate bean - transient or singleton. I like the old interface as it is just another marker as to the type of bean you want making your code even clearer, but I needed to support getBean() to make LightWire and ColdSpring switchable.

Secondly, I have decided to stop supporting comma delimited lists of dependencies and have renamed the methods (breaking the old API) so addMixinDependencies(BeanName:required, DependencyNameList:required) is now addMixinDependency(BeanName:required, InjectedBeanName:required, PropertyName:optional) (note "ies" becomes "y"). Same for addSetterDependencies() and addConstructorDependencies() becoming addSetterDependency() and addConstructorDependency() respectively. This allows for an optional property name if you want to inject "UserDAO" into a property called "DAO", etc. That was the main driver for this change.

To change old config files, search and replace Dependencies with Dependency and then just skim through all your dependency setting methods and make sure they don't include comma delimited lists of dependencies. If they do, just replace a single statement with n-dependencies with n-dependency statements each with a single dependency. I just did it for three projects with an average of 200-300 beans per. Took 2 minutes in total. Don't worry - this is likely to be the last API change that is not backward compatible going forwards.

Finally, Paul Marcotte is working on a simple script that will allow LightWire to use most ColdSpring XML config files. He is still playing with that, but expect an announcement from him shortly and a version 0.6.1 that includes his script in the framework - probably in the next few days.

You can get the code here.

Comments
John Farrar's Gravatar So, what is the difference now between lightwire and ColdSpring? They are more alike, but how are the different?
# Posted By John Farrar | 4/8/07 11:48 AM
Peter Bell's Gravatar They are still VERY different - it's just easier to port some projects between them now.

Here is summary of differencs as I see them, although there may well be additional benefits to CS I didn't mention (feel free to add them in the comments!):
://www.pbell.com/index.cfm/2007/4/5/LightWire-or-ColdSpring
# Posted By Peter Bell | 4/8/07 3:50 PM
4mmofans's Gravatar <a href="://www.mygamebay.com/World-of-Warcraft-Honor-Power-Leveling/index.html">wow honor power leveling </a>
<a href="://www.mygamebay.com/World-of-Warcraft-Honor-Power-Leveling/index.html">honor power leveling </a>
<a href="://www.mygamebay.com/World-of-Warcraft-Honor-Power-Leveling/index.html">wow honor powerleveling </a>
<a href="://www.mygamebay.com/World-of-Warcraft-Honor-Power-Leveling/index.html">honor powerleveling </a>
<a href="://www.mygamebay.com/World-of-Warcraft-Honor-Power-Leveling/index.html">buy wow honor </a>
<a href="://www.mygamebay.com/World-of-Warcraft-Honor-Power-Leveling/index.html">wow honor leveling </a>
<a href="://www.mygamebay.com/World-of-Warcraft-Honor-Power-Leveling/index.html">wow honor farming </a>
<a href="://www.mygamebay.com/World-of-Warcraft-Honor-Power-Leveling/index.html">cheap wow honor power leveling </a>
<a href="://www.mygamebay.com/World-of-Warcraft-Honor-Power-Leveling/index.html">cheap wow honor powerleveling </a>
<a href="://www.mygamebay.com/World-of-Warcraft-Honor-Power-Leveling/index.html">honor leveling </a>
<a href="://www.mygamebay.com/World-of-Warcraft-Honor-Power-Leveling/index.html">wow honor points </a>
<a href="://www.mygamebay.com/World-of-Warcraft-Honor-Power-Leveling/index.html">buy wow honor </a>
<a href="://www.mygamebay.com/World-of-Warcraft-Honor-Power-Leveling/index.html">wow profession power Leveling </a>
<a href=://www.mygamebay.com>wow gold</a><br><br>
<a href=://www.mygamebay.com>cheap wow gold</a><br><br>
<a href=://www.mygamebay.com>buy wow gold</a><br><br>
<a href=://www.mygamebay.com>cheapest wow gold</a><br><br>
<a href=://www.mygamebay.com>wow power leveling</a><br><br>
<a href=://www.mygamebay.com>wow powerleveling</a>
<a href=://www.mygamebay.com>cheap wow power leveling</a>
<a href=://www.mygamebay.com>wow gold guide</a><br><br>
# Posted By 4mmofans | 7/26/09 3:38 AM
links of london's Gravatar Thanks for your information!
# Posted By links of london | 7/27/09 12:02 AM
ed hardy's Gravatar Thanks for your information!
# Posted By ed hardy | 8/5/09 12:10 AM
pg's Gravatar <a href="://www.runescape360.com/">runescape item</a>,
<a href="://www.runescape360.com/">runescape account</a>,
<a href="://www.runescape360.com/">runescape gold</a>,
# Posted By pg | 4/1/10 5:24 AM
discount golf equipment's Gravatar hi guys, want a high quality life ? yes! you must link the following some usefulthing:
://www.golfclubs365.com
://www.golfequipment18.com
there are two <a href="://www.golfclubs365.com">Golf Clubs</a> stores,include kinds of <a href="://www.golfequipment18.com">golf equipment</a>,
<a href="://www.buyinggolfonline.com/">wholesale golf clubs</a>.
# Posted By discount golf equipment | 5/20/10 10:57 PM
Guojuicycoutureout's Gravatar ://www.outletfactory-coach.net coach factory outlet
://www.outletcoach20l2.net coach outlet online
://www.coachoutlet20l2.com coach outlet
://www.coachs2011.com coach outlet online
://www.juicycoutureoutlet2012.net juicy couture outlet online
://www.outletcoach20l2.net Coach outlet store online
://www.coachoutlet20l2.com Coach outlet online
://www.coachs2011.com coach outlet store online
# Posted By Guojuicycoutureout | 11/27/11 10:21 PM
BlogCFC was created by Raymond Camden. This blog is running version 5.5.006. | Protected by Akismet | Blog with WordPress