Compound Theory

v2.0

Categories

  1. Transfer
  2. ColdFusion
  3. JRuby
  4. Java
  5. ColdSpring
  6. Squabble
  7. JavaLoader
  8. ColdDoc
  9. 2ddu
  10. AsyncHTTP
  11. OO Analysis and Design
  12. Flex
  13. Railo
  14. XML / XSL
  15. Hibernate
  16. ColdFusion Builder
  17. Fall
  18. Ubuntu
  19. XHTML / CSS
  20. Eclipse
  21. Git
  22. Oracle Database
  23. Usability / UI Design
  24. webDU
  25. cf.Objective()
  26. LWJGL
  27. cf.Objective(ANZ)
  28. Captcha
  29. MAX
  30. Melbourne CFUG
  31. Martial Arts
  32. Random Things
  33. Conduit

Recent Posts

Projects

Recent Comments

Speaking at cf.Objective() 2012!

I'm delighted to say that I'm speaking at cf.Objective() again this year!

I've got three sessions I'm presenting this year, two of which on my own, and one in which I'm paired with with Luis Majano.

cf.Objective()

I'll be talking about:

A/B Testing with Squabble

In which I extol the virtue of A/B testing, and why you should be doing it in your business, and introduce people to the A/B testing framework Squabble that we developed to use in the team I work with.

Getting closure on Closures

Where we will look at Closures, which are coming in ColdFusion Zeus. You probably already use these, and don't even know it. I'll explain what closures are, and how you can use them in simple ways, as well as more interesting use cases as well.

AOP Demystified!

This is the session I will be doing with Luis Majano, where we will talk about Aspect Oriented Programming, and give you examples with the two primary AOP frameworks - ColdSpring and Wirebox. Should be good stuff!

All up, it looks like it's shaping up to be a great conference program, so I look forward to seeing everyone there!

19 December 2011 07:41 PM 0 Comments

Custom Schemas in Coldspring 2

One of the most powerful new features in Coldspring 2 is the ability to create custom xml schemas that can be used within your XML configuration.

Rather than go into the details of how to write and configure custom schemas, here is an example of one that comes bundled with CS2 out of the box.

In Coldspring 1.x, if you ever wanted to create a standalone structure inside your XML configuration, you would quite commonly create it through a MapFactoryBean like so:

<bean id="myMap" class="coldspring.beans.factory.config.MapFactoryBean">
<property name="sourceMap">
    <map>
        <entry key="keyA" value="keyA value"/>
        <entry key="keyB" value="keyB value"/>
        <entry key="keyC" value="keyC value"/>
    </map>
</property>
</bean>

This is all well and good, but the issue here is that you specifically need to know the api of the MapFactoryBean.  If you get any part if the configuration of the MapFactoryBean wrong, you tend to get errors that may not be clear, or potentially no error at all, simply a result that is not desirable.

For example, if you misspell the sourceMap property, Coldspring will attempt to set the property, but it doesn't throw an error when it fails.

<bean id="myMap" class="coldspring.beans.factory.config.MapFactoryBean">
<property name="sourcMap">
    <map>
        <entry key="keyA" value="keyA value"/>
        <entry key="keyB" value="keyB value"/>
        <entry key="keyC" value="keyC value"/>
    </map>
</property>
</bean>

Therefore, all you will get back is an empty struct, and quite possibly a headache trying to debug exactly why this is happening in your code.

In ColdSpring 2, there is a nice, convenient util  custom schema, that exists to do things like create arrays, lists and other data structures for you.  It essentially is a simple wrapper around things like the MapFactoryBean, but the custom schema gives you a code completion and hinting when using an XML editor (that support XML Schemas), as well as better error messages when things go wrong.

So, for example, if I wanted to do exactly the same configuration as above, I would add the xml namespace for util in the head of my xml file, like so:

<beans xmlns="http://www.coldspringframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:util="http://www.coldspringframework.org/schema/util"
        xsi:schemaLocation="http://www.coldspringframework.org/schema/beanshttp://coldspringframework.org/schema/coldspring-beans-2.0.xsd
        http://www.coldspringframework.org/schema/utilhttp://coldspringframework.org/schema/coldspring-util-2.0.xsd "
>

Which would enable the <util:> namespace in my XML editor, and I could quickly type out:

<util:map id="myMap">
        <entry key="keyA" value="keyA value"/>
        <entry key="keyB" value="keyB value"/>
        <entry key="keyC" value="keyC value"/>
</util:map>

And we would have the same result as above, but if something went wrong with your syntax, the IDE should show you what it was, and if it didn’t, you would get a nice error from the XML validation letting you know exactly what it was.

Of course, the whole point of this post, is due to the extensible nature of ColdSpring, you can write your own custom XML namespaces, and register them with your XmlBeanFactory, to do things in very concise and easy to use manner inside your IDEs as well.

This is a very simple example of what can be done with Custom xml schemas. You can drastically change the nature of the BeanFactory as well as the contained beans through this mechanism, but this should hopefully give you a little bit of a taste of what can be done with this new functionality.

09 December 2011 08:30 AM 0 Comments

ColdSpring 2 is available on GitHub

This is something I did a while ago, but for whatever reason, totally forgot to announce publicly.

Thanks to the power of distributed version control, there is a copy of the Git repository for ColdSpring 2 on Sourceforge, as well as one on GitHub.

It goes without saying that GitHub really is the best place for Open Source projects to manage and allow for collaboration with other developers, so it makes sense to have a copy of ColdSpring 2 on GitHub as well.

So get your forks ready, and make some pull requests! :)
25 October 2011 12:38 PM 0 Comments

ColdSpring 2 Documentation Competition - Win a Copy of CFBuilder!

With the rewrite of ColdSpring , a whole load of documentation also needed to be ported, and in some cases, actually written for the first time, for existing functionality as well as new functionality.

Unfortunately it became a real sticking point with getting a release of ColdSpring 2 out of the door.

While the documentation isn’t quite complete, there is enough there to get people started, and it can be fleshed out on a case by case basis.

That being said - to help make the documentation complete as quickly as possible, there is now a competition to win a copy of ColdFusion Builder, and the way to enter is to write documentation for ColdSpring 2.

The rules are very simple: To make this more enticing, and also a whole lot easier, I’m offering each person who wants to enter my Skype and IM details.

Skype: mark_mandel
Gtalk & MSN: mark.mandel@gmail.com

I’m happy to have a 10-15 minute voice chat with potential entrants explaining a feature if they are new to it and/or guiding them in what I had in mind for the documentation page, and give whatever other advice they need via IM and email to help them complete their documentation page.

So not only is this a chance to help out the ColdSpring and ColdFusion community, it’s a chance to win FREE copy of ColdFusion Builder, and also it’s a great opportunity to pick my brain on ColdSpring 2 (which should hopefully be worth something as well  :) ).
25 October 2011 12:35 PM 1 Comment

ColdSpring 2 Alpha 1 Released

After a long 2 years of development, ColdSpring 2, Alpha 1 is ready for release!

It’s been a long road getting here, but with the rewrite of ColdSpring, means that ColdSpring 2 comes with a stack of new functionality that should help you out with all your dependency injection needs, and then some!!!

To give you a quick overview of some of the major new functionality that comes with ColdSpring 2:

XML Schema For ColdSpring

No more needing to guess what XML to write with ColdSpring, or use a not-quite-right-fit Spring.dtd or XSD to give you code completion and hinting with your XML.

Now with a XML editor that supports XML Schemas (Eclipse Web Tools Project jumps to mind) and a quick XML schema declaration at the top of your XML, you now get total code-completion, and built in help with your XML elements. Makes life much easier!

AOP Custom XML Namespace and AOP Expressions

This is one of my favourite features, as it just make Aspect Oriented Programming with ColdSpring and absolute breeze.

Gone are the days of ProxyBeanFactories and NamedMethodAdvisors. Now you have a simple scripting language for defining where you want Aspects to be applied, and what you want them to do.

For example, if I had the following XML:

<beans xmlns="http://www.coldspringframework.org/schema/beans"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:aop="http://www.coldspringframework.org/schema/aop"
   xsi:schemaLocation="http://www.coldspringframework.org/schema/beans http://coldspringframework.org/schema/coldspring-beans-2.0.xsd
   http://www.coldspringframework.org/schema/aop http://www.coldspringframework.org/schema/coldspring-aop-2.0.xsd"

   >


   <!-- AOP configuration -->
   <aop:config>
      <aop:aspect ref="timer">
         <aop:around method="timeMethod" pointcut="execution(public * *(..))"/>
      </aop:aspect>
   </aop:config>

   <bean name="timer" class="com.Timer" />

   <bean name="fooService" class="com.FooService" />

</beans>

What this says is, for the given pointcut, execution(public * *(..)), which translates to any method execution, which is public, and returns any variable, with any method name, and any number of arguments (i.e. every method), call the method timeMethod on bean timer around that method.

So when do call fooService.doSomething(). Our Timer Component, will be able to log how long it took, and as you can see, no need for complicated ProxyBeanFactories, target beans or anything of the sort. All nice and clean and concise.

This is by far, just the surface of what is possible with the AOP XML namespace and AOP expressions in ColdSpring. There are more configuration options, and many more different types of expressions that are possible.

ColdFusion 9 ORM Integration

Injecting other objects into your ORM Entities can be a tricky prospect, but ColdSpring 2 comes bundled with a stack of utility objects that make this much easier, as well providing you with additional functionality to help you out with common ORM tasks as well.

ColdSpring 2 comes with a BeanInjectorEventHandler, whose job is to intercept when Entities are loaded, and inject them with whatever dependencies are loaded.

To intercept when new Entities are created, ColdSpring 2 has a SessionWrapper object that provides an interface to the underlying Hibernate Session, from which you can request new Entities, list, save, delete Entites and much more.

The SessionWrapper also enables some more advanced configuration options above and beyond ColdFusion’s basic settings, including being able to set a default Hibernate Session Flush Mode, and implementing a strict transaction mode as well.

This is just a start to the ORM integration, there is plenty more bundled into ColdSpring 2!

Multiple Bean Scope Support

ColdSpring 2 has a totally new and reworked bean creation process, so that not only can it create transient and singleton beans, but it can also tie beans to request and session scopes as well. To do this, it has a new scope attribute which replaces the old singleton attribute on beans.

Therefore to define a bean as a singleton, you not define:
<bean id=fooService class=com.FooService scope=singleton>

To define a  transient bean:
<bean id=fooService class=com.FooService scope=prototype>

To define a request scoped bean:
<bean id=fooService class=com.FooService scope=request>

(And I’m sure you have the pattern by now) To define a session scoped bean:
<bean id=fooService class=com.FooService scope=session>

This gives us even more control over the life-cycle of our beans, to enable some very powerful capabilities in our applications!


There is a lot more to ColdSpring 2 than just the above, but hopefully that will give you enough of a view to entice you to take the framework for spin.

More details can be found in the Release Notes, ColdSpring website, and Trac site.

Also, if you are interested in going into the running for winning a copy of ColdFusion Builder, check out the ColdSpring documentation competition currently running to aid in fleshing out the rest of the documentation for ColdSpring

14 February 2011 06:26 PM 1 Comment

Speaking at cf.Objective() and Starting a Podcast

Lots of stuff I should have been blogging about, but haven’t managed to find the time.

First of all, I’ve been accepted to speak at cf.Objective() this year, which is a great honour.

I’m doing  talk on AOP For you and Me , which will be an extended version of the talk I did at Adobe MAX and cf.Objective(ANZ) , wherein I will talk not only about what Aspect Oriented Programming is, but also go more in depth into some real world examples.

I will also be presenting ColdSpring 2.0 Alpha 1 - What's New and Improved? In which I will discuss all the new doodads and whoogama-whatsits that come in this new version of ColdSpring , which is currently only 3 tickets away from code completion!




As per usual, I’m really looking forward to this conference. It’s always a fantastic time, and a great learning opportunity.

Also, my good friend, Kai Koenig and I, decided it would be fun to start up a podcast! (Well, he basically bullied me into it, but ssshhhh). We gave it a test run, and it was lots and lots of fun. We’re planning on talking about all sorts of Adobe stuff, ColdFusion, software engineering, and whatever else grabs our fancy.

We set up a website at http://www.2ddu.com/ , and will be posting updates there, and you can also follow the podcast on twitter @2dduPodcast . Our first installment is up there now, and please give us any feedback you have - we would love to have it.
18 May 2010 08:30 PM 1 Comment

Presenting ColdSpring 2.0 on CFMeetup.com

On 6pm US ET, Wednesday May 19 I will be presenting Dependency Injection Redefined - ColdSpring 2.0 to the CFMeetup Crowd.

For those of us in more southern parts of the world, that is 8:00am, the 20th of May, Australia.

This is the same talk I recently gave at cf.Objective() and WebDU .

Synopsis:
ColdSpring 2.0, codename Narwhal, is a complete rewrite of ColdSpring aiming is to provide a far more extensible architecture and many more features above and beyond what is currently provided with ColdSpring to date. These new features will give developers the capabilities to build and manipulate this Inversion of Control framework in fascinating and very powerful ways, thus saving them even more time when managing their dependencies and utilising functionality such as Aspect Oriented Programming.

In this presentation we will look at the new features of ColdSpring 2.0, both complete and envisioned, including functionality such as extensible schema support, events for bean life-cycles, enhanced AOP support, annotation support, and much more.

More details and rsvp can be found here .

Look forward to seeing you there!
03 May 2010 05:33 PM 2 Comments

ColdSpring Framework on Twitter

Just a note to let everyone know I set up a twitter account for ColdSpring.

It has automated updates for Git commits, and ticket events. It should be a good resource for helping people keep up to date with the going-on's of ColdSpring, and especially ColdSpring 2.0.

Follow coldspring_fw on Twitter!

29 April 2010 11:59 AM 0 Comments

ColdSpring 2.0 - Now On SourceForge

Up until recently, the goings-on of what has been happening in ColdSpring 2.0 has been fairly limited to my twitter account.

At cf.Objective(), I did a presentation entitled Dependency Injection Redefined - ColdSpring 2.0 Narwhal where I outlined what work had been done on ColdSpring 2.0, what was planned for the future, and where you could go for more information. (I'll also be doing this presentation at WebDU in a about a weeks as well).

The first thing to note, is that the code name for this project is Narwhal. Why Narwhal? Basically because they are awesome. They roam the ocean with a huge spike attached to their head, which can be used to impale, seals, penguins, and apparently also koalas. See - awesome. (Who really has reasons for code names?)

The next most interesting thing to note, is that much of ColdSpring's infrastructure is now hosted on Sourceforge, as it provides a large feature set for us to leverage. Here you can find the project page, which gives you access to the Git repository that contains the code for ColdSpring 2.0.  Sourceforge also provides hosting for the Trac install that is being used to host our documentation and tickets and milestones.  We are currently investigating options for integration with the current ColdSpring website.

I'm not going to go into new features in Narwhal, of which there are more than a few (I have to have some incentive for people to come to my my WebDu Talk!), but documentation has started on the Wiki, and will be expanding quickly in the future (If anyone wants to help with that, the more the merrier!).

You may also note that much of the documentation is also being generated automatically, in an attempt to alleviate some of the burden of authoring.  Now that there are XMLschemas being used, HTML documentation is being generated from them, and ColdDoc is also being used to generate API documentation for the underlying architecture.

It's still very early days for ColdSpring 2.0, but a Alpha1 does loom on the horizon. That being said, the Git repository is public, so feel free to pull it down, have a look at what is happening in the Unit Tests, what documentation is available, and feel free to discuss it on the mailing lists.  Just beware - this is still pre-Alpha, so the sand may shift under your feet as new code gets produced, bugs get quashed and new features get developed.  You have been warned!

More details coming soon!

Back from cf.Objective() 2010

I'm back home again from what I would like to say was, one of the best cf.Objective()'s I have ever been to, including the fact that I was incredibly ill for the last day of the conference. I only managed to catch two sessions in the afternoon, and otherwise was holed up in my hotel room either fast asleep, or feeling particularly sorry for myself.

There are many things I would like to prescribe the incredibly high quality of the conference to, but the the high calibre of the session presentations really stands out at the main contributor.  I believe that when the session quality of a conference is so high, the attendees are excited and motivated by new ideas, which directly translates into fantastic and thought inspiring hallway conversations, and everything continues to flow from there.

To make a few particular references to presentations I particularly enjoyed -

Easy and Flexible Validations for Objects - Bob Silverberg
I had not previously taken the time to look at Bob's ValidateThis framework, but let me just say this: It is slick!  I was very impressed by what was possible with very little configuration, and the the flexibility that was available. My hat is off to Bob for his work with this validation framework.

Continuous Integration with MXUnit, Ant and Hudson - Marc Esher
Marc is always a very entertaining presenter, and this presentation was no exception.  I've used Hudson with MXUnit before, but it was still fantastic to see Marc explain this technology in a very clear and easy to understand manner.  He also gets points in my book for using the Hudson Chuck Norris plugin.

Polyglot Programming - Barney Boisvert
If anyone has read Barney's blog, they should already know that he's a super smart fellow.  This presentation only solidified this fact, in which Barney dug deep into the very compelling reasons a developer should potentially look into developing with multiple languages at a time (something as web developers we are doing already).  Barney covered some really interesting points about language design, the intent of programming code and qualifying return on investment in regards to polyglot programming. All great stuff!

Running ColdFusion on the Amazon EC2 Cloud - Chris Peterson
This was a session I really wanted to attend, but unfortunately I slept through due to illness.  I wanted to make note of it, as I was told that Chris had a completely filled room, and I've been told it was a really interesting presentation all around.

Building Advanced Workflows with ColdSpring - Dan Skaggs
I don't believe I have had the opportunity to see Dan speak before this, but this presentation was an eye opener!  I came to this presentation with my 'ColdSpring Lead Developer' hat on to see what interesting things people were doing with ColdSpring, and came away with a new found respect for the framework itself, and the ingenuity that Dan was displaying in his use of it.  Dan walked us through how his company was using ColdSpring to dynamically configure application workflow and processing - which enables it to be both incredibly flexible in its implementation and amazingly easy to maintain. 


Bob Silverberg and I also did a two day Hands on ColdFusion 9 ORM Training before the conference.  Thanks to all our students who attended - we had a great time teaching the program, and we hope you guys got a lot out of it.  If anyone else is ever interested in taking the training course, please provide your contact details on the website so we can contact you at a later date.

All in all, a great conference all around.  See you all again next year!

Presenting and Teaching at cf.Objective() 2010

I'm a little behind the times on this blog post - but I am presenting and also teaching a course at cf.Objective() this year.

I will be presenting 2 sessions at the conference:

Dependency Injection Redefined - ColdSpring 2.0: Narwhal

ColdSpring 2.0, codenamed 'Narwhal', is a project that has been going on a little 'behind the scenes', except for the occasional tweet from either myself, or Chris Scott.

In this presentation, we'll look at some of the motivations behind the complete rewrite of ColdSpring for the 2.0 version, and some of the new features that will be available that should make dependency injection easier, and way more flexible than ever before.

I've had in my to-do list a reminder to write a long blog post on what is going on with Narwhal, which I should write at some point soon, so you have a good idea what to look out for.  That being said, Narwhal is taking shape nicely, and I think is going to be a very powerful addition to the ColdFusion framework landscape.

Advanced Java & ColdFusion Integration with JavaLoader 1.0

This talk will focus on the new features of JavaLoader 1.0, and how you can use them to integrate Java with your ColdFusion platform in some new and exciting ways.  If you are interested in JavaLoader 1.0, check out this previous blog post, it gives you a good run down on the new features it brings to the table.

We will also be investigating some of more common 'gotchas' with Java and ColdFusion integration, especially around ClassLoader issues, which should be useful for all involved.


Bob Silverberg and I are also going to be a teaching a 2 day training course, just before cf.Objective():

Hands-On ColdFusion ORM Training

This will be as very hands on session, where Bob and I will be going through building an application using ColdFuson 9's Object Relational Mapper from beginning to end.  This will include many best practices, discussions as well as theory about how the underlying Hibernate engine works with ColdFusion.  No ORM/Hibernate experience necessary.

More detail on the course can be found on our website, and also on the preconference page, where you can also check out all the other fantastic training content.

Don't forget that the early bird pricing for both conference tickets, and training finishes on the 29th of January, which is coming up soon!

cf.Objective() is looking to be a great conference. Hope to see you there!

Code Samples for Rapid OO Development with ColdFusion Frameworks

You can download the full code samples I used in my Rapid OO talk that I gave most recently at cf.Objective(ANZ) , and previously at cf.Objective() .

Before people ask, I don't tend to post slides, as they are generally only pictures, and tend to have no context without me talking next to them.

That being said, I'll have a chat with the CFMeetup crew, and see if they would like me to give the presentation there, so there is a recording for posterities sake, and for those who couldn't make those conferences.

ColdSpring News, CFConversations RoundTable and other cf.Objective() tidbits

While I am recovering from the Australian WebDU conference, a few days before that started I got off a plane after the end of the wonderful cf.Objective() conference.

I have to say, this year's cfObjective() was the best organised out of all the years I have been to.  As per usual, the content was stellar, the hotel was lovely, and it was an absolute pleasure to catch up with everyone at the conference.  I have to give a big 'congratulations' to Jared, Steven, Jim and the rest of the cf.Objective() crew for putting together such a smooth and professional conference.

I had the pleasure of doing two sessions, Rapid OO Development with ColdFusion Frameworks, which covered a variety of techniques on how to increase your development speed when building OO models, and I was very happy to see that it seemed to have been very well received.  I had one attendee let me know that 'Now I know why I'm using ColdSpring! I was using it before, but now I know why', which is an amazing thing to hear as a presenter, that you've managed to create an 'Aha!' moment for someone.

I also did my Introduction to Building Applications with Transfer ORM, which was a repeat of the session that I did last year.  Unfortunately Ray Camden couldn't make it to do his Transfer session, so I was called in at the last minute to take his place.

The big news that we announced at cf.Objective(), is that I will now be the lead developer on the ColdSpring project.  Since Chris Scott's major focus these days is the Swiz Flex framework, he decided it was time to pass on the reigns, and since I tend to talk to him regularly about Cold/Spring, have contributed code to ColdSpring , and know about running an Open Source project, he seemed to think I would be a good fit.  I'm pretty excited about the opportunity, and have discussed some great ideas with theColdSpring development group, of which Chris is going to stay on as lead architect.  I expect we will start off by building the infrastructure around the project, e.g. a centralised wiki, ticket tracker etc, and then move on to some more interesting items.

The obvious question there is, of course, what does this mean for Transfer? (I think I need to start writing down how many times I've been asked if it's 'Dead'.  Does anyone actually expect a 'yes' for an answer?), and quite frankly, I don't see this impacting on Transfer much at all, simply because this is going to be code that I would have probably ended up writing on ColdSpring anyway, but it is now a more formalised relationship.  When I run into a feature or a bug on an Open Source project, that I want to be implemented, my first natural reaction is to start looking into the code, and writing the feature.  This was first exemplified by my contribution toColdSpring of annotation based pointcuts.  There are several aspects of ColdSpring I wanted to improve on, so it was just a natural reaction for me to end up writing code for it.

As stated, the content at cf.Objective() was brilliant as per usual, with my own personal highlights being, Advanced ColdFusion Server Administration (Adam Lehman), Advanced ColdFusion 9 ORM (Terry Ryan) and ColdFusion Portlets (Adam Haskell).

Thinking about the content, I have a little confession to make, that I realised on the way back from cf.Objective() this year.  I have a tendency to go to the wrong sessions when at a conference. This may sound like a weird thing, but I realised the last few years I tend to go to sessions that I already know a lot about, just to see if they say something a little bit extra that I can add to my knowledge base.  Quite often I end up walking out feeling like I haven't added much to my repertoire.  Really what I should be doing is going (mostly) to sessions in which I know absolutely nothing about, which means I actually get the best return on the my investment in the conference.  While it may not be specifically applicable to what I'm currently doing, at the very least it will inspire me to do some interesting new things, and may give me some knowledge that I can then apply at some point in the future.  This is a philosophy I plan on applying to all future conferences that I attend.

Finally, I also had the opportunity to be part of a CFConversations round-table on the second night of the conference.  Brian Meloche, Andy Powell, Andy Matthews and I had a really good chat about the conference in general, our thoughts on some of Adobe's upcoming products, various other topics relating to ColdFusion.  It was lots of fun to do, and you can download and/or read more about it here.

Again, thanks to all the cf.Objective() crew, and look forward to seeing many of you again at cf.Objective(ANZ).