Mark Drew (Redux)- cf_etc...

a compendium of railo, cfml, cfeclipse and technology topics

Mark Drew (Redux)- cf_etc...

Entries Tagged as webdev

Common Development Patterns: Settings per Environment

September 30, 2010 · 5 Comments

I am thinking of doing a range of blog posts related to common development patterns that I have seen implemented. These are not exactly Design Patterns, but practices that I see and have implemented myself.

To kick of this series, I thought I would talk about your application's settings depending on environment. As a background I was working on a Galleon application that in development runs on Apache with MySQL and in Staging/Live it runs on IIS and MS SQL. Generally you want to keep your environments the same of course, but the main changes were simply table names, emails and URLs so all the code was fine.

One of the things that annoyed me was that before I could check in my code to SVN, I would have to change the settings.ini.cfm file, putting all the live settings in there.

[Read more →]

5 CommentsTags: coldbox · coldspring · webdev

Edge Web Hosting to the Rescue!

March 11, 2010 · 3 Comments

I am not sure if people know this (and yes, I shall get round to putting up a banner) but the guys at EdgeWebHosting have been hosting my site on a dedicated server that allows me to both maintain this blog as well as a bunch of small projects that I have for quite a while now. I have always got on with Vlad at all the conferences and the choice seemed good. 

So far the service has been stellar, no downtime etc. But normally, that is what you expect right? A true test really comes when things go wrong. 

And on Tuesday apparently they did. 

I woke up to find that I had a missing call from the USA. A bit confusing, but when I heard the voicemail, it was Dave, one of the support engineers at Edge Web Hosting that had spotted suspicious activity on my site. I wont go into all the details here of the exploit (lets say that it looked a lot worse than it ended up being and nothing was actually compromised) , but throughout Tuesday, they were the most on the ball company I have ever hosted with in keeping me up to date. 

(before you ask, it was a mis configuration I did to apache, for a quick job that I should have removed and was exploited. Let's leave it at that)

I can't recommend them enough, and even through emails updating me on the findings of the supposed intrusion including IM'ing for information etc. 

When was the last time YOU had service like that eh?

So all in all big thanks to the guys at Edge Web Hosting

 

3 CommentsTags: cfml · webdev

Visualization of CFEclipse's development history

February 10, 2010 · 2 Comments

I have created a video using code_swarm to show the history of CFEclipse's development history, I hope you enjoy it as much as I did! I am using this for other projects as a beautiful as well as useful way to see how a project progresses over time:

Edit: Since we moved CFEclipse from tigris.org back in 2006 I missed out the main people that worked on the Project such as Rob Rohan, Spike Milligan and Oliver Tupman (to mention a few!).

Part 1 (pre SVN with the initial commits etc!)

View Part 2  on youtube

2 CommentsTags: cfeclipse · cfml · codeswarm · webdev

Using Git with CFML

November 27, 2009 · 4 Comments

Today I was writing a little app that helps me keep up with my Todo list, since I wanted to have a web interface for some reporting into my tasks.

The issue is that my todo list is just a text file (and before you go saying there are various apps, I am happy with my text file ok? for various reasons which are not part of this post), so I built a nice web interface to it, but the problem is that since I can modify it, and whilst I was developing it I wanted a way to back this file up. I mean, whist I am coding this app, I might make mistakes and want to roll back. 

So I got thinking of a way to do this and realised I do this every day anyway, using git!. So, I thought, for every change I do to the file, why not check it into its repository.

I fiddled about with cfexecute, which to be honest I haven't used much previously but I couldn't change the working directory, so, thanks to Tim Blair's post I managed to do the following: 

 

<!--- since we have made modifications to the files, we need to commit them in git --->

 <cfscript>  

     // first of we set the command to call  

     cmd1 = "git add TODO.txt";  

     cmd2 = "git commit -m 'autobackup'";

     // the environment variable is empty  

     envp = arraynew(1);  

     // and we want to run from a given "root"  

     path = "/Volumes/iDisk/Documents/TODO";  

     dir = createobject("java", "java.io.File").init(path);  

     // get the java runtime object  

     rt = createobject("java", "java.lang.Runtime").getRuntime();  

     // and make the exec call to run the command  

rt.exec(cmd1, envp, dir);

rt.exec(cmd2, envp, dir);  

 </cfscript>

And that's it. Every time the file is changed, it is added to my git repo locally. Handy!

 

4 CommentsTags: cfml · webdev

Railo in a Software as a Service environment

September 11, 2009 ·

Straker, the makers of ShadoCMS and Zoom Flex have put up a great blog posting regarding using Railo in a Software as a Service environment.

They cover four areas such as Scalability, Security, Cost and Updates and even though it shows the Railo Server as a winner it is a overally fairly balanced article from the point of view of their requirements

Check out the full blog post on the Straker Blog

Tags: getrailo · railo · webdev

Scotch on the Road and CFObjective Presentations

June 10, 2009 ·

A few people have asked me to post my presentations, and I should have done so anyway straight after the conferences, but of course, since I did three presentations + a Mystery Theatre at cfobjective and four presentations at Scotch on the Road I have been falling behind normal work and blog postings.

So, here for your delectation are all the presentations for you to download... (apart from the Mystery Theatre 3000 since that has a naughty picture in it)

Tags: cfObjective · model-glue · presentations · railo · reactor · scotch on the rocks · webdev

UKCFUG Meeting: Little Fluffy Clouds!

February 06, 2009 ·

Next tuesday the UKCFUG is having a meeting about Cloud, Elastic and Virtual computing and how it can improve your deployments, expandability and reliability

Head over to the UKCFUG website to register for this event, it should be very enlightening!

 

Tags: coldfusion · ukcfug · webdev

Chaining objects in Reactor, an idea

August 14, 2008 ·

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>

Tags: coldfusion · reactor · webdev

Aptana moves into the shared hosting field

April 29, 2008 ·

Aptana, the people behind the Aptana IDE and Jaxer, have announced Aptana Cloud which describes itself as:
... a scalable Elastic Application Cloud™ featuring the most popular and widely adopted Web infrastructure, ready to use and ready to scale as you need it. Aptana Cloud also plugs right into your IDE to provide instant deployment, smart synchronization, and seamless migration as you scale. Aptana Cloud is ideal for developers who use scripting languages to create Ajax, Facebook, mySpace and all other sorts of Web applications.
Its nice to see a variety of players in this market apart from the usual gorillas of Google and Amazon. It would be interesting to see CFML applications deployed easily in this manner in my opinion. I also wonder if companies like Microsoft and Yahoo would get involved in this? They already have the infrastructure, of course, not sure how Windows servers would handle this! Aptana Cloud is currently in beta and there is a early access request form if you would like to get involved!

Tags: webdev

Front End Developer Job

April 22, 2008 ·

A friend of mine asked me if I knew anyone that would like to apply for the following job:
A small, relatively new company that has been set up as a sister company to a leading new media agency. Both companies work closely together and both have recently won new clients and have exciting growth and development plans and potential. Due to our size, culture and approach to client service we are looking for candidates who can demonstrate an ability to multi task, work under own steam from brief to completion and who are committed to delivering work that works. We would ideally like someone who can work on own initiative in Flash, Flash Lite 2 (nice to have), HTML, CSS, ASP. The emphasis would be on Flash but must have an eye to dynamic data driven content and applications, through to flash based sales presenters, banners etc. They will need an eye for design (though often design is provided), lateral thought, motion and interactivity when it comes to Flash. In an ideal world they would also have an understanding of .Net or at least what can be done with it. Must have lots of energy, passion and dedication to the job in hand. As a company we will be moving towards dynamic applications which may encompass Adobe Air, Flex etc. in the future. Salary level: circa £35K with possibility of share options
Don't send me details, you can email them

Tags: flex · jobs · webdev