Archive for the ‘Tools’ Category

Pluggable FlowExecutionStorage in SWF

April 3, 2005

Got a reply form Erwin on the ‘do what is best’ thing:

Interesting idea to have it automatically select request or session based
storage. I added pluggable FlowExecutionStorage strategies this morning
so this would be trivial to do.

Also, I implemented a “client side flow execution” storage strategy and it
is just encoding the entire flow execution in the flowExecutionId. No need
for any special handling in the views, the storage strategy is completely
pluggable!

Cool. I went camping this weekend so, STILL haven’t dug deep.

Spring Web Flow - PR1

March 31, 2005

Keith announced that Spring Web Flow PR1 is out. Read about it here. I’m going camping this weekend (weather should be awesome), so I won’t be able to give it a real look until next week. Maybe I’ll skip the gym :) .

phpWebSite

March 29, 2005

I just installed and played around with phpWebSite. I may be using it for the toastmasters website I’m managing. I like it quite a bit so far…check it out: http://phpwebsite.appstate.edu. Actually…its a lot like shadow :) .

Rules Engine

March 17, 2005

Just another comment about web flow. The scenarios and workflows in ATG are really considered rules engines. I wonder if it would be worth it to have a core rules engine for spring that the web flows is built on top of.

Spring Web Flow

March 17, 2005

Sounds like spring Web flow is seeing some major improvements. I’d really like to give this a look. It looks like the new stuff has moved to a kind of ‘context-injection’ where the context of the flow/flow environment is injected into the methods. Or maybe I’m just seeing it that way because of the article on TSS on The validity of IOC. Also it is sounding more like they should change the name…less a ‘web flow’…more a general flow technology. Its interesting how things tend to line up. I have recently been looking at ATG’s scenarios and workflows and they sound a lot like spring web flow.

I’ll definitely start playing with it soon.

Struts AutowiringRequestProcessor

March 10, 2005

It looks like the guys at spring are looking into the AutowiringRequestProcessor. It allows the struts actions to be automatically wired by spring. Previously the Spring support allowed you to include bean definitions for the actions and you would wire them yourself. This led to 2 seperate config files for the actions: one for struts and one for spring. With the AutowiringRequestProcessor, the spring config file for the actions is eliminated. The processor will instantiate the class and then have the spring container autowire it by name. So Actions need only indicate their dependency on a bean in the container by having a setter for it. It also implements a cache-by-class scheme so that only one instance of an action is loaded by the processor. In the current support one instance is created per mapping (so if you have 100 forward actions, 100 instances are created…in this version there would only be 1). This is perfect considering the thread-safe’ness of the Actions (or at least they should be written that way).
It also tries to be smart and check to see if there is a bean in the container whose name matches the action mapping. This is essentially what the existing DelegatingRequestProcessor does. I figured it would be nice to allow the flexibility of wiring the Action directly if you have more complex needs. I have never needed it…and may never need it. I just thought it was TOO easy to allow the flexibility. Following proper (at least what is seen as proper today) design, I should never need it…but (to quote a colleague of mine) “Somtimes you gotta write bad code”. This flexibility may not wind up in the final implementation…and I’m ok with that, I mean we do want to encourage good coding practices right.

Posted to Spring List about Nucleus

March 8, 2005

Posted this to the spring developer list to see if anyone has ever heard of Nucleus…I promise I’ll stop talking about Nucleus and ATG for awhile ;)

I’m on a project now that is using ATG Dynamo. While I don’t like
Dynamo so much, I do think there IoC container, Nucleus, while very
simple, is pretty nice. I especially like the way it handles
namespacing. I was just wondering if the list had any experience with
it/opinions on it? It has been around since 1997 and handles
constructor-based and setter-based injection. I still prefer
Spring…but I do think that Nucleus has some ideas worth looking at.

In a nutshell, the container is provided a list of folders to use a
its search path. The folders contain .properties files that hold the
bean definitions (one file per bean). The location of the file in the
folder + the file name (minus .properties) becomes the bean’s fully
qualified name. For example, if you have /com/foo/Test.properties,
then the container has a bean whose id is /com/foo/Test and the bean
is defined by the properties in the file. There is a special $class
property that identifies the class to instantiate, then the other
properties are injected into the bean. You can refer to other beans
in the container too:
dataSource=/com/foo/DataSource
If a bean definition is located in multiple folders in the search
path, the files are combined in memory…where properties defined
later will overwrite those defined earlier in the path.
There is also a lifecycle the beans can participate in, but they
require the use of Marker Interfaces.

Pretty much the entire Server is built on top of Nucleus. There is an
admin console that you can use to browse the container at runtime and
modify the values (configured and live) for the beans (even the beans
for webapps). I keep seeing it as a cross between JNDI, IoC
container, and JMX…at least conceptually. It sounds a bit in the
same vein as what is happening with Geronimo (at least from the very
little I’ve heard).

Again, just wondering what other people thought. I’d never heard of it
before 2 weeks ago even thought its been around for 8 years. I guess
that should be expected since it is proprietary and specific to ATG.
I really think it would have served ATG better to open source Nucleus
and Repository (their ORM framework…similar to hibernate). As it
stands there is a huge learning curve for developers coming
in…having it out there would have reduced that some…if people
picked it up and liked it that is ;) .
If interested, you can read the details at
http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG7.0/dynprog/index.html
Chapter 2.

ATG Dynamo - Nucleus

March 4, 2005

I just started Consulting 2 weeks ago. My first ‘gig’ is a pretty big J2EE’ish portal site. I say ‘ish because the chosen server is ATG Dynamo. I’d vaguely heard of it before…now I kinda know why. My first reaction to it was negative. I just questioned everything about it. The learning curve on it is huge (took me the first full week to understand what it was), it is REALLY expensive, and its not compliant (we’re using 6.3). I should clarify and say we are really using ATG Dynamo App Server + ATG Dynamo Application Framework + ATG Portal + ATG Commerce Module. Part of the confusion the first few days was that everything was refered to simply as ‘ATG’. So I have this love/hate thing going with it. There are some good parts and bad….I’ll spare you the bad and just cover the good.

Nucleus.
They have an IoC container they call Nucleus. They don’t sell it as an IoC but it really is. I would consider it more of a middle-weight container as it expects you to know a bit too much about the container itself. For example, they have the concept of having a scope set on the component (they call them components). Scope can be global (singleton), session or request. The last 2 indicate this is a web-only world and to get those components, you have to have a handle to the container and ask for the component in your methods (unless you are using strictly global scopes).

One thing I think Nucleus does really well is namespacing. The container reads properties files from a config directory (it can do xml too…but it seems that the properties files are preferred in ATG). There is 1 file per bean and the location of the bean in the heirarchy becomes the qualified name for the bean. So if you have com/foo/Bar.properties, then when you request the bean ‘com/foo/Bar’ from the container (or reference it) you’ll get the bean defined in that file. The class is actually defined in the file (under a special $class property), so it can really be of any type. There can be multiple (configurable) config folders for the container to search through and the definitions for the beans are all combined before applying them (properties defined for beans futher along the path overwrite those that show up earlier). Then there is a Globals.properties that just contains properties that will be applied to all beans (if the properties exist). Its sort of a cross between and IoC and JNDI.

They also have this ATG Control Center that they’re trying to sell as a full-fledged, everything tool. It does do a lot…but I think I’ll stick to my own IDE for the actual development. One of the neat things about it is the component browser (they call their IoC managed beans components). You can actually browse through the bean container at runtime and see all the components. It displays the configured values for their properties, the current ‘live’ (runtime) values for them and whether or not the component is currently running (instantiated). It will also show you what all config files had a part in the configuration as described above.

They also have their own ORM’ish technology they are calling Repository. It has the ability of persisting dynamic beans (HashMaps basically) or pojos. I haven’t been able to bring myself to read as much about this one…I keep hearing myself say “hibernate does that too…why don’t we just use hibernate”.

From what I’ve read, Nucleus has been around since 1997 and Repository since 1998…that impressed me. Seems it was a bit before its time and had some really smart people working under the hood. I’m not saying I like Nucleus over Spring (I don’t)…I do think there are some things that can be learned from it though.

I invite you to read about it here.