Compound Theory

v2.0

Categories

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

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! :)
07 December 2011 11:19 AM 0 Comments

ColdDoc 1.0 Release (and a move to GitHub)

ColdDoc is one of those projects I don’t work without these days. No matter the project, I’ve always got a stack of CFCs in it, and I need a way to document what objects I have, and what methods they have on them. A great example being the ColdSpring 2 project.  I’ve got my local Jenkins install hooked up to generate the ColdDoc documentation on each run, and I usually run it locally often while developing, so I have an up to date reference of what methods are available to me, without having to dig into actual CFC code.

ColdDoc has been ready for 1.0 release for quite a while, but has yet to be formally pushed out into the wild.

With a little push from behind from @vanderwoud, I got my planned migration of ColdDoc to GitHub into gear, and all is now complete.

Now ColdDoc is hosted on GitHub, which is great, because it really is the best place to allow for community contributions, as well as the documentation ported over into the Wiki.

ColdDoc 1.0’s big new ticket item is interface support (although it doesn’t support multiple interface inheritance), as well as lots of little bug fixes.

So if you are ready to get your automated documentation on, grab a copy of ColdDoc, run it against your current code base, and see what comes out!

And if you have any contributions you would like to make to ColdDoc (and I’m sure there are some out in the wild), please issue a pull request against the repository.
25 October 2011 12:38 PM 2 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  :) ).