Posts Tagged ‘ANT’

Build and deployment day

June 21, 2008 1 comment

Today was deployment day for a project I will be more than happy to see end soon.  Nothing in our deployment process is automated so we have to come in to the office on a weekend, or kick everyone out of the application one day during the week.  Then it’s time to take stock of database tables that have changed so we can script them to the production database.  Next we have to import data from any new lookup tables in development to production.  After that, it’s time to determine which ColdFusion files and CFCs have been added or updated and then moved into production.  After all that is done, it’s time to test everything to make sure it all still works.  Once again, this is a manual process so we have to test every process in production to make sure the new stuff works and old stuff still works.

Whew!!  Six hours later, I’m tired from all of that.  At CFUnited this past week, I attended at least 2 sessions that covered automating the build/deployment process with ANT. We are in the process of establishing a QA process(I know. I know, but we’re a small non profit), and I think this could be part of it.  I’ve been playing with ANT lately and if we can get Selenium up and running that might help automate the regression testing.

In the meantime, I have downloaded Selenium Core to my Mac and deployed it to my local CF server.  I’ve been recording test cases into a test suite as a means to get familiar with things.  If all goes well, I’d like to try it at work.


Great day at CFUnited ’08

June 19, 2008 Leave a comment

Great information to be had today at CFUnited ’08 Day #2.  Two sessions that stood out for me were Peter Bell’s Practical Code Generation and Marc Esher’s Automating the Build/Deploy Process with ANT.

Practical Code Generation

I’ve worked with scaffolders such as Model Glue and Fusebox 5.5 with mixed results and opinions.  Primarily scaffolding for me has been used to create a quick prototype.  It’s great for routine tasks like creating a DAO with just a bit of information about the DB.  However, as Peter pointed out, most of the generated code is highly modified and most likely tossed by the time we deploy.  Additionally each change requires changes to the generated code.  I really liked Peter’s concept that code should be able to be generated easily as the application changes.

After going through a bit of theory on code generation, Peter walked through his CF Template application which is an open source code generation CFC which uses metadata and templates to generate all the code.  What’s really cool about it is that it uses ColdFusion to generate ColdFusion.  Even cooler is that in theory, it could be used to generate code in nearly any language if that’s what floats your boat.

I walked away with some good ideas about how to try to use code generation and CF Template in my daily work.  We use Fusebox 4.1 in our daily work, with much of our older code not in CFCs.  I’m thinking that some of the older apps I work on written strictly using Fusebox should have files simple enough to use as a starting point to experimenting with code generation using CF Template.  I did a little surfing to find tutorials and documentation and came upon Brian Caufield’s wiki where he has created templates for generating many routine files we might use regularly.  He even provides a demo based on the CFArtGallery database which comes with ColdFusion.  I’m really looking forward to trying to make practical use of CF Template.

Automating the Deployment/Build Process with ANT

I was eager to attend this session even though it was the last session of a long day.  At work, I’ve been playing with ANT to do simple copy tasks, but have been reading about the myriad of tasks available.  Since we work in Fusebox 4.1, each new application requires a copy of the core Fusebox files.  I have been able to create a basic ANT script which copies the files to the set directory for use in a new project.  Ultimately, I would like to use ANT to do daily checkouts via ftp at the start of the day from the development server and a checkin  at the end of the day back to the development server.

Marc must have known I was coming because he essentially covered all the stuff on my wishlist.  It actually looks pretty simple to automate a lot of the routine tasks using ANT.  You can bet I’ll be working to integrate this into my daily work in the very near future.

The day would have been perfect with lots of new information and tips that could prove useful in my daily work.  However, at the end of the day, I had to put out a fire at work which was made that much worse by the fact that all the developers are attending CFUnited this week.  Oops.