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.
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!
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.
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! :)
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.
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 enter, you have to write a page of documentation for ColdSpring 2.
- You can write multiple pages, for more chances to win.
- Entries can be submitted directly to the Trac Wiki, in Word or OpenOffice format and emailed to me directly (email below), or to the ColdSpring Google Group.
- Some pages are easier than others, so best to get in early (some are just ports/extensions from the existing documentation).
- Possible pages are the pages that are empty on the Wiki (unless you come up with some new section that is deemed to be an missing item).
- A documentation page must be approved on completion to be an entry (i.e. no 2 line entries, etc trying to game the system).
- The competition closes on the 31st of November (Australia time!), and the winner will be randomly selected from the entries, and a copy of ColdFusion Builder will be sent to the winner!
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 :) ).