Porting the Spring IoC core to Prana

ActionScript, Flex, Inversion of Control, Prana 2 Comments »

I decided that, for the benefits of Prana, it would be better to port the core of the Spring IoC container as much as possible instead of developing further on an own implementation. Although the XML dialect for the application contexts is already similar to that of Spring(.net), and hence familiar to a lot of developers, the core code isn’t.

When I started the Prana project I decided to create my own, much simpler, implementation because I was afraid that many developers would be scared away by the much bigger codebase of the IoC container. On top of that, the Spring core is a massive amount of code so it was easier for me to understand the ideas behind everything and create a much simpler implementation than to find my way through the jungle and port every line of code.

However as I progress in the development of Prana and get to know more about Spring, there are numerous reasons that the Prana core could actually benefit from being much more like that of Spring.

Here are the main motivations:

- Get started quickly as a Spring developer: Spring developers already know how the IoC container works and what is possible with the API. They don’t need to learn a new API to start working with Prana. That is with a few exceptions though, e.g. the async loading of application contexts.

- Make Flex developers familiar with Spring: If you don’t know Spring as a Flex developer, working with Prana will get you introduced to it and you will immediately know a great deal about the Spring IoC container. This is also true in my case since most of my Spring knowledge is purely theoretical.

- Implement new features more easily: The Spring Framework is under extreme active development and new features get added often. It will be easier to implement/port these new features if the core is already based on Spring’s core.

- Benefit from the Spring know-how: What I mean is that Spring has been out there for a couple of years and that it has proven to be a solid IoC container. The code that drives it has been tested by thousands of developers and many adjustments have been made to perfection it. Having an own implementation is like starting from scratch and it is much likely that somewhere down the road, we will make mistakes that have already been solved in Spring.

- Documentation: In open source projects, documentation is often brought down to a minimum which makes it very hard to attract developers and users. Spring already has numerous books and extended online documentation that can be used a reference and allows us to spend our (already limited) time on development.

- Making Prana a known IoC container: Being able to say that Prana is actually the Spring IoC container for Flex will most likely attract more developers because Spring is a name they trust. On the other hand, this is taking high aims, so we must make sure that Prana is actually as good as what Spring has to offer. Let this be an extra motivation to do a good job.

There are probably more reasons but these are the best ones I could think of. If you have any more you think are worth mentioning or if you are actually thinking about disadvantages, feel free to share them.

If you are interested in helping out or if you are curious to where this is evolving, there is a spring branch in the Prana repository. To get in touch, just drop me a note at info [at] herrodius.com or leave a comment here.

More Prana info: http://www.pranaframework.org


Add to Bloglines - Digg This! - del.icio.us - Stumble It! - Twit This! - Technorati links - Share on Facebook - Feedburner
 

Prana 0.3.1 Released

ActionScript, Flex, Prana 1 Comment »

I’m proud to announce that Prana 0.3.1 has been released. This is a minor release that contains some of the new features and improvements since version 0.3.

  • support for scope (singleton and prototype) on object definitions
  • support for factory objects

General info: http://www.pranaframework.org
Download: SourceForge Download Page

Happy holidays and enjoy this release!

Changes in version 0.3.1 (26.12.2007)

General
* improved documentation
* build file now handles releases

Package org.pranaframework.collections
* IMap and Map now have “get” and “put” methods to support data binding
* IMap now implements ICollectionView
* added MapViewCursor

Package org.pranaframework.config
* AppSettings no longer implements IEventDispatcher because Map now does

Package org.pranaframework.ioc
* added support for factory objects in ObjectContainer through IFactoryObject interface
* added ObjectDefinitionScope enum
* IObjectDefinition now has “scope” getter and setter
* added “scope” getter and setter to ObjectDefinition
* “isSingleton” in ObjectDefinition now alters scope property instead of having a private member
* ObjectContainer.getObject() is now able to return singleton or prototype objects

Package org.pranaframework.ioc.factory
* added “isSingleton” getter to IFactoryObject
* added AbstractFactoryObject base class for factory objects

Package org.pranaframework.ioc.factory.config
* added RandomNumberFactoryObject to return random numbers
* added FieldRetrievingFactoryObject to retrieve static or non-static fields from an object

Package org.pranaframework.ioc.parser
* added scopeAttributePreprocessor to XmlObjectDefintionsParser to set up scope attributes on object definitions

Package org.pranaframework.ioc.util
* added singleton and scope attributes to Constants

Package org.pranaframework.reflection
* added Field as a base class for all fields
* Accessor now extends Field instead of AbstractMember
* Constant now extends Field instead of AbstractMember
* Type now extends Field instead of AbstractMember
* Variable now extends Field instead of AbstractMember

Package org.pranaframework.utils
* TypeConverter.execute() can now return a class


Add to Bloglines - Digg This! - del.icio.us - Stumble It! - Twit This! - Technorati links - Share on Facebook - Feedburner
 

Flex Tools of the Trade

ActionScript, Air, Flex 6 Comments »

Flex
Following up on the FeWeb presentation I did on our Flex development, I thought it was worth compiling a list of the tools and technologies we use. This is certainly not a complete list of all tools out there, but just the ones we use in our day to day development.

All descriptions were taken from the tools’ sites.


Tools

- Flex Builder (Plugin): Adobe® Flex™ Builder™ 2 is an Eclipse™ based IDE for developing rich Internet applications (RIAs) with the Adobe Flex framework.
- Eclipse: an open source community whose projects are focused on building an open development platform
- Ant: a Java-based build tool. In theory, it is kind of like Make, but without Make’s wrinkles.
- Flex Ant Tasks: provide a convenient way to build your Flex projects using an industry-standard build management tool.
- ASDoc: a command-line tool that you can use to create API language reference documentation as HTML pages from the classes in your Flex application.
- Cruise Control: a framework for a continuous build process. It includes, but
is not limited to, plugins for email notification, Ant, and various source control tools.

Frameworks

- Cairngorm: a lightweight yet prescriptive framework for rich Internet application (RIA) development.
- PureMVC: a lightweight framework for creating applications in ActionScript 3, based upon the classic Model-View-Controller design meta-pattern
- Prana: an Inversion of Control (IoC) Container for the Flex Framework

Unit Testing

- FlexUnit: a unit testing framework for Flex and ActionScript 3.0 applications. It mimics the functionality of JUnit, a Java unit testing framework, and comes with a graphical test runner.
- Flex Unit Optional Ant Task: Allows you to hook FlexUnit into a Cruise Control cycle and extract test reports

Libraries

- Corelib: consists of several basic utilities for MD5 hashing, JSON serialization, advanced string and date parsing, and more.
- Flexlib: a community effort to create open source user interface components for Adobe Flex 2

Remote Gateways

- WebORB: facilitates connectivity between rich clients created with Flex, Flash or AJAX and server-side applications developed with .NET, Java, Ruby on Rails, PHP or XML Web Services.
- Fluorine: an open source .NET Flash Remoting Gateway.


Add to Bloglines - Digg This! - del.icio.us - Stumble It! - Twit This! - Technorati links - Share on Facebook - Feedburner
 

Flex coders, does Dependency Injection pay off?

ActionScript, Flex, Inversion of Control, Prana 5 Comments »

Niclas Nilsson, recently wrote a post on InfoQ about the benefits or the lack of benefits of using Dependency Injection (DI). In the post he summarizes a discussion that spanned multiple blogs, all with their own pros or cons of using DI. It is an interesting read to say the least. If you’re new to DI or even if you’re familiar with it and are pro or con, you will certainly pick up new motivations and ideas.

Bringing this into a Flex context, I was wondering how many Flex developers are actually using DI. Since I’m developing Prana, an Inversion of Control (IoC) container for ActionScript 3.0, and have talked about it with several people (mostly Flex developers), I know that DI and IoC are concepts that are still pretty unknown to many of them. There are also lots of misconceptions like: DI is only good for mocking while Unit Testing, it costs more time/money, DI is all about XML, it’s too complicated, it stimulates bad application design, …

So I’d like to hear from you. Are you as a (Flex) developer using any form of DI or IoC? Is it DI-by-hand or are you using any container (which one)? If you’re not using it, is that because you haven’t figured out what it is or are you convinced that it does not serve your needs? Feel free to share your thoughts, opinions and experience.


Add to Bloglines - Digg This! - del.icio.us - Stumble It! - Twit This! - Technorati links - Share on Facebook - Feedburner
 

Flex, Silverlight and AIR at FeWeb – presentation files

Air, Conferences, Flex, Microsoft 2 Comments »

Yesterday evening, the 5th annual FeWeb conference took place in Edegem. I did a session on our Edumatic product development with Flex and what tools we use on a daily basis. Below is a download link for those interested in my presentation files. The slides contain some useful links to the tools mentioned.

feweb-12-12-2007.ppt (273 kb)
feweb-12-12-2007.pptx (187 kb)

For a review of the conference I can recommend the following post by Peter Elst: FeWeb – Flex, Silverlight, AIR and more.


Add to Bloglines - Digg This! - del.icio.us - Stumble It! - Twit This! - Technorati links - Share on Facebook - Feedburner
 
WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in