Chaining objects in Reactor, an idea

Posted At : August 14, 2008 11:36 AM | Posted By : Mark Drew
Related Categories: coldfusion, reactor, jQuery

I have been doing a fair amount of work recently with Reactor, and not so related to reactor, I have also been using JQuery.

This has led me to a little thought experiment I was going to propose to Doug Hughes for the project, which is the idea of chaining. This is something that JQuery does fairly well and Reactor does to some level.

The idea is this, that in any object that has setters, or functions that return "void", they should actually return the newly modified object itself ( the "this" scope).

"Why?" you might ask, well, here are a couple of examples from my code:

<cfscript>
      orm = getModelGlue().getOrmService();
      myObj = orm.createRecord("Element");
      myObj.setId("124");
      myObj.load();
      
      //do stuff with the object now    
   </cfscript>

Well, that is ok, but I would prefer to do the creating the object and loading it in one line:

<cfscript>
      orm = getModelGlue().getOrmService();
      myObj = orm.createRecord("Element").setId("124").load();
      //do stuff with the object now    
   </cfscript>

There we go, in one line. This could also go for doing all the setting of the other properties:

<cfscript>
      orm = getModelGlue().getOrmService();
      myObj = orm.createRecord("Element")
               .setId("124")
               .load()
               .setName("Elvis")
               .setAge("34")
               .save();
   </cfscript>

What do people think of this idea? It is fairly easily implemented, doesn't break any existing code and would remove a lot of <cfset>'s and if nicely formatted, make just as much sense.

EDIT: As an aside, Doug let me know (and I should have known really but its nice to learn a new thing every day) that you can shorten the loading even further:

<cfscript>
      orm = getModelGlue().getOrmService();
      myObj = orm.createRecord("Element").load(id="124");
   </cfscript>

Seeking a Senior Coldfusion Developer

Posted At : August 7, 2008 6:15 AM | Posted By : Mark Drew
Related Categories: coldfusion, jobs

A job has come up at my company Design UK for a Senior Coldfusion developer. Don't worry, you wont be working under me (well, kinda, you would be situated on the floor below!).

Before reading the description below, please note a couple of things: I AM NOT GOING TO TALK TO AGENTS. Why? We already have an agency we use, we get a better deal than because we have been using them for years. No. Dont call me. I am not hiring and I am not going to tell you who is. DONT CALL ME. Really. Don't.

Secondy, this role is based in Picadilly, London. No remote workers. Really. None. Sorry. You obviously need a UK residency and be within commuting time of London.

So, here goes:

Senior Developer We're looking for an enthusiastic, experienced, self motivated server side web developer to join our Technical Team. The role will involve building and supporting websites and web applications for our clients.

Experience We're looking for an experienced web developer to join our technical team. The ideal candidate would have 2-3 years experience ideally gained in a new media agency. The core of the role will be web programming but you will also be involved in the complete lifecycle of a project, from specifying technical solutions to providing on going support. So experience in writing specifications, estimating, planning, and dealing with clients are also important.

The main server side skills we are looking for are

  • ColdFusion (2 – 3 years + experience)
  • SQL Server
  • Frameworks (ModelGlue, ColdSpring etc.)

Knowledge of Java (Servlets, JSP, Struts & other web Java technologies) would be a definite advantage as would experience with object oriented programming, ANT, Application server deployment & configuration - JRUN & Tomcat and Subversion.

As well as Server side programming skills, you should be familiar with

  • XML
  • HTML, JavaScript, CSS

Knowledge of other programming languages and web development tools are distinct plus notably C, Python, Perl, Flash, PHP, ASP, MySQL, Apache, IIS, Client side libraries (Jquery, Ext etc.) Attitude wise we'd like

  • Enthusiasm and curiosity about the web and technology
  • Good communication & writing skills
  • Good technical background
  • Good problem solving ability
  • Flexibility

The renumeration is dependent on skills etc. I don't have the figure in front of me, but I am sure they will tell you when you send your CV ;)

So, you think you have what it takes? email : careers@designuk.com with your C.V.