Introducing my new company: CMD

Hello Internet! It gives me great pleasure to announce the start of my new company: CMD


Running MongoDB from Sublime Text 2

For last night's presentation at the CFUG about MongoDB I was running the demos right from Sublime Text 2. This was mainly to be able to increase the font but I was asked how I did it. (I generally use either the mongo shell or RoboMongo which is awesome!)

Here you can see how it was running: 

The way I pulled this off was to create my own Build System called MongoDB:

Now that you have a blank Build system, all you need to do is enter the following:

Of course, replace the path to mongoDB with whatever the path to your installation of mongoDB is! And finally all you have to do is hit the cmd+B buttion and it will then send the path to the current file to mongo. 

I got this working for Sublime Text 2 but in Sublime Text 3 it didn't work as expect the code is not exactly the same. You have to change the build script to the code below:

I can send commands to MongoDB too but it doesn't display anything in the Results pane which is a shame. So if you get it working in Sublime Text 3 let me know! 


cf.Objective() Sessions and voting

Quick Quick! Go over to the cf.Objective() Trello board and vote for some of the session there! There are some awesome topics that are going through for next year's conference and you only have till the 11th to vote what will make the cut! 

I doubt my presentations will make it, but make sure you vote for some excellent talks covering a range of topics (not just CFML!) 

Do it or be a equilateral triangle!

Presenting MongoDB at the UCFUG

It was my pleasure to be able to present to the largest turnout at the UKCFUG that we have had for a long time last night! 

Along with Grant Shepert from Mura we did a Google on Air to present MongoDB and "What is new in Mura 6.1", alas due to technical issues Grant couldn't join the Hangout and thus his portion of the video is missing but at least you can see my presentation for MongoDB


Announcing AOP/1

I am happy to announce that today I got the AOP/1 framework to Alpha state (Version 0.1)! The AOP/1 framework was inspired from talking to a client that was using DI/1 and I was describing how good it would be to have the ability to intercept methods, as you can with ColdSpring's AOP, but with less definitions (BTW, I know that ColdSpring 2 has radically trimmed down the syntax, which is awesome!). The main issue I have had with ColdSpring's implementation is that it is a great concept but very difficult to describe using the vocabulary (Advisor, Advice, AfterReturningAdvice,NamedMethodPointcutAdvisor,ProxyFactoryBean to name a few) to people.

Another side of it was that I wanted a much simpler way to do this, without having to always resort to looking stuff up in the manual. So I give you AOP/1!

Let's take a simple example. Using AOP/1 is very similar to working with Inject One ( see: Getting Started with Inject One ), since it is just an extension of DI/1, you would first, define your bean factory:

So far all the configuration is identical to DI/1. Let's take a concrete example. Let's say we have a service that reverses a string. This would be defined under /services/Reverse.cfc :

All pretty simple so far! Let's go and get it a full example of using it:

This would output:


Everything is fine so far, but what if we want to intercept these calls? Well that is where AOP/1 does the hard work for you. All you have to define is a CFC (in your services if you like, or manually passing all the settings you want) with one or more of the following methods: before, after, around and onerror. In this case we have a before method defined in our BeforeInterceptor.cfc:

Now all we need to do is as above, but just add the fact that we are intercepting:

And that is it! Now all the method calls to the ReverseService will first call the BeforeInterceptor.before() method. So if we now call continue as before and do:

We would now get:


I hope this is a useful framework for people out there, and it allows them to do much more de-coupled development! I would also really like to thank Sean Corfield for allowing this project to under the framework-one family banner!

You can Fork it, Clone it or Download it over at Github