JavaPolis (day two)

Conferences, Flex, Java 1 Comment »

JavaPolisThanks to the free pass I got from Christoph Rooms at Adobe, I made it to the JavaPolis conference in Antwerp today. I visited the event last year and certainly didn’t want to miss it this year. There is a strange and attractive atmosphere of collective geeky-ness and it is oh so cool. The fact that there are people here from all over the globe proves that this is an interesting conference for every (Java) developer out there. Just like last year, this event seemed professionally organized. At the entrance, every attendee received a backpack with a shirt, a notepad and a conference magazine. There are several boots from vendors that give you interesting information on their products, reductions and of course tons of swag. There are also free drinks for everyone, dinner at noon and fruits and candies.

I arrived pretty late but just in time for the first session and found Peter Elst there as well. Up was a session on Flex for a full house. I think there were easily 500 people in the room. James Ward and Bruce Eckel (that’s right, THE Bruce Eckel) were pair presenting and did an excellent job at it. They thoroughly explained the advantages of using Flex as a presentation tier and showed some sample applications. Later on they walked us through an example on how to connect to JSP pages to fetch data and how to consume the Flickr API. The Java crowd seemed to like it and it gave me a confident feeling that we as a development team are using the right technology (Flex) for the right job (interactive user interfaces). Having Bruce Eckel over to present was probably the best move Adobe could make to convince a Java crowd.

Next session was on JavaFX by Jim Weaver. I hadn’t seen it in action before so this was my chance of getting to know it. Unfortunately I was not really impressed. The technology seemed to be ages behind on what we are doing today with Flex for RIA development and I can only imagine hard core Java developers wanting to use this. Of course their is a strong programming language behind it - just like C# is for Silverlight - but the whole thing feels like a desperate attempt to catch up with Adobe in the RIA space. I have the same feeling with Silverlight btw.

Last session was Erich Gamma on Jazz. He talked about how agile development teams are working today and how there still are many pain points in bringing all project information together. This being SCM, bug tracking, project management, iteration plans… Jazz attempts to bundle all this info in a single application that makes it easier to access project information for the whole team.


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

SmartSketch is not responding

Flash 3 Comments »

SmartSketch not responding

I got this message today when starting Flash 8. Didn’t know this name was still used internally. It reminded me of the time I wrote my thesis on Flash.

Here are some interesting links on Flash history:


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

Templates in Prana’s application context

ActionScript, Flex, Prana 10 Comments »

With the latest release of the Prana Framework came some great new features. One of them is support for templates in an application context. It came to our attention that when defining services, most of the application context was actually doing the same thing, namely defining let's say a remote object, but each time with a different service class.

Consider the following:

XML:
  1. <object id="serviceLocator" class="org.pranaframework.cairngorm.CairngormServiceLocator" factory-method="getInstance">
  2.   <property name="assetService">
  3.     <object class="mx.rpc.remoting.mxml.RemoteObject">
  4.       <property name="destination" value="GenericDestination"/>
  5.       <property name="endpoint" ref="remoteGateway"/>
  6.       <property name="source" value="ApplicationDomain.Services.AssetService"/>
  7.     </object>
  8.   </property>
  9.   <property name="packageService">
  10.     <object class="mx.rpc.remoting.mxml.RemoteObject">
  11.       <property name="destination" value="GenericDestination"/>
  12.       <property name="endpoint" ref="remoteGateway"/>
  13.       <property name="source" value="ApplicationDomainDomain.Services.PackageService"/>
  14.     </object>
  15.   </property>
  16.   <property name="userService">
  17.     <object class="mx.rpc.remoting.mxml.RemoteObject">
  18.       <property name="destination" value="GenericDestination"/>
  19.       <property name="endpoint" ref="remoteGateway"/>
  20.       <property name="source" value="ApplicationDomainDomain.Services.UserService"/>
  21.     </object>
  22.   </property>
  23. </object>

We're defining our ServiceLocator here with 3 services. You can quickly see that there is a lot of repetitive code in there, and we only have defined 3 services. Adding other services makes the application context really big and harder to read. (On a sidenote: notice the support for inner object/bean declarations).

The problem was solved by introducing template definitions. It allows you to create a template object and set some variables in it, using ant style parameters. You can then create a new object, tell the container that it must be based on a template and pass in the necessary parameters.

Here's an alternative application context to the previous one, but this time using a template for the remote object definition.

XML:
  1. <template id="remoteObject">
  2.   <object class="mx.rpc.remoting.mxml.RemoteObject">
  3.     <property name="destination" value="GenericDestination"/>
  4.     <property name="endpoint" ref="remoteGateway"/>
  5.     <property name="source" value="ApplicationDomain.Services.${serviceClass}"/>
  6.   </object>
  7. </template>
  8.  
  9. <object id="serviceLocator" class="org.pranaframework.cairngorm.CairngormServiceLocator" factory-method="getInstance">
  10.   <property name="assetService" template="remoteObject">
  11.     <param name="serviceClass" value="AssetService"/>
  12.   </property>
  13.   <property name="packageService" template="remoteObject">
  14.     <param name="serviceClass" value="PackageService"/>
  15.   </property>
  16.   <property name="userService" template="remoteObject">
  17.     <param name="serviceClass" value="UserService"/>
  18.   </property>
  19. </object>

So we create a new template using the "template" tag with inside of it the object definition. Notice that the object definition has a variable ${serviceClass} defined. This variables will be filled in by the container when instantiating objects from a template definition. In the service locator, we create our services and tell them that they are based on the "remoteObject" template. We pass in the correct parameter and off we go.

Of course with small application contexts that only define 1 or 2 services, it might not really be worth using templates, although it could improve readability.

Hope you find this a valuable addition to Prana. We are allows eager to find out about new ideas that could benefit us all. So if you have any, be sure to contact us.


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

Prana 0.3 released!

ActionScript, Cairngorm, Flex, Prana 1 Comment »

I'm proud to announce that Prana 0.3 has been released.

Some of the key features and updates:

  • major update to the core IoC container
  • support for templates in the application context (blog post)
  • support for initializing objects in the application context (Log example)
  • compliancy with Spring application contexts
  • event sequencing in Cairngorm (blog post)
  • several utilities

In the coming days, I'll post some more about the new features.

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

Changes in version 0.3 (24.11.2007)
-----------------------------------

General
* added Movie sample application based on article by Martin Fowler
* improved documentation
* moved Cairngorm related classes to org.pranaframework.cairngorm
* Cairngorm Store sample now has different configuration of service locator

Package org.pranaframework.cairngorm
* added support for event sequencing
* CairngormFrontController now checks for commands implementing the ICommands interface
* implementation of CairngormServiceLocator

Package org.pranaframework.errors
* added ClassNotFoundError for retrieving a class by name when class was not found

Package org.pranaframework.ioc
* added serializer to create an application context from an object
* added support for initializing object with IInitializingObject
* added support for templates in application context
* added support for <map> definitions, parsed to Dictionary
* added support for <list> definitions, parsed to ArrayList
* made container spring context compliant
* improved error handling when creating object from object definitions
* rewrote preprocessing of xml application context, now using chain of preprocessors
* fixed creation of object without id, id is now auto generated
* fixed order for object definitions so that they no longer need to be chronological

Package org.pranaframework.reflection
* added metadata introspection
* added "getFullName" method to Method class
* changed arguments in "invoke" method from ... to array

Package org.pranaframework.utils
* added "forName" method in ClassUtils for retrieving Class objects via class names
* added "getParentClass" method in ClassUtils that returns the parent class of a given class
* added "isSubclassOf" method in ClassUtils that returns if a class extends another class
* added StringUtils
* added DisplayObjectContainerUtils
* added MethodInvoker to support initializing objects from application context
* added "state" method to Assert class
* changed TypeConverter so that it can return Class objects


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

www.pranaframework.org

ActionScript, Flex, Prana No Comments »

Prana Framework

The Prana Framework now has a home at www.pranaframework.org!

Prana is an Inversion of Control (IoC) Container for ActionScript 3.0. It enables you to configure objects and components in a non-intrusive way by describing them in an external xml document and having them loaded at runtime.

At its core is a Spring-ish application context and IoC container. Though not a literal port of the Spring core, the xml dialect for the application context is aimed to be Spring compliant.

Further, the framework also contains utility classes for configuring and extending Cairngorm applications, a Reflection API and general utilities. In the future we’ll be looking into adding AOP support and Mock objects for FlexUnit, and we’re always open for suggestions.


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 Login