An Architect's View

CFML, Clojure, Software Design, Frameworks and more...

An Architect's View

Entries for month: December 2010

What do you want from Santa? Railo 3.2!

December 24, 2010 ·

Happy Holidays!

Whether you've been naughty or nice, you can read all about the new Railo 3.2 release with many community contributions and new core features!

Tags: coldfusion · oss · railo

Are Objects Bad? Revisited

December 20, 2010 ·

Michael Long posted a comment on my "Are Objects Bad?" post which I wasn't really sure how to answer effectively. Michael feels that if you're just working with functions, and grouping them so each file deals with specific concepts, you're starting down the road to OOP anyway so why not "bite the bullet" and use full-on OOP...

[

Tags: clojure · programming

Call for Speakers - cf.Objective() and OpenCF Summit

December 18, 2010 ·

Both cf.Objective() and OpenCF Summit have their call for speakers/proposals open at the moment. Bob Silverberg talks about the cf.Objective() CfP on his blog and you can read about the OpenCF Summit CfP on their blog.

The important thing to note in both cases is that there are calls open: suggestions and proposals. The suggestions page is where you make suggestions about topics you'd like to see at the conference. The proposals page is where you submit yourself as a speaker and describe your proposed topic. Even if you've submitted a suggestion for a topic you'd like to present, you still need to submit a proposal in order to be considered as a speaker!

You need to connect with either your Twitter or Facebook account in order to submit suggestions or proposals - welcome to the social media era! - and proposals are open until early January for both conferences. The OpenCF Summit blog has lots of background information on the "engage" application in use by both conferences, as well as doing a great job of explaining what the OpenCF Summit is all about (hey, you already know what cf.Objective() is all about, right?).

Tags: oss · opencfsummit · coldfusion · cfobjective

Seven Languages: Io, Day 2

December 16, 2010 ·

Unlike Ben Nadel, I don't intend to post my homework from each day of this exploration but I said in a comment on Ben's blog that I'd post some of my solutions. Today, I'm posting part of my Io Day 2 homework.

fibhelper := method( a, b, c,
   if( c <= 1,
      fibhelper( b, a+b, c-1 )
fib := method( n,
   fibhelper( 1, 1, n )
   writeln( "fib(", i, ")=", fib( i ) )

It's weird. This was one of the standard examples everyone always wrote in every new language they learned, back in the day. Yet faced with it yesterday, I drew a complete blank. I wanted to create an infinite lazy sequence of fibonacci numbers and then just walk to the Nth number. It actually took me a while to come up with the code above - and that was after several attempts at a straightforward loop. The recursive version is just the natural way I think, I guess!

I'll try to convert the recursive version into a loop and post that.

OK, now I have the recursive version, here's my iterative version:

fibr := method( n,
   f1 := 1
   f2 := 1
   for( i, 1, n-1,
      f := f1 + f2; f1 := f2; f2 = f
   writeln( "fib(", i, ")=", fibr( i ) )

Meanwhile, here's Ben Nadel's version of the Io Day 2 homework.

Tags: programming

Review: OOP in ColdFusion

December 13, 2010 ·

Object-Oriented Programming in ColdFusion by Matt Gifford
Packt Publishing 167pp $39.99

This book is a much-needed gentle introduction to ColdFusion Components and Object-Oriented Programming. The book assumes no background in CFCs or OOP so it starts by introducing the tag and script syntax forms of CFCs and, as the book unfolds, basic Object-Oriented techniques and patterns are introduced gradually with extensive code samples. The book doesn't go very deep - it's only 167 pages, after all - but it covers domain objects, data access and data gateway and service layers; it covers access control, inheritance, polymorphism and object relationships (composition, aggregation etc).

I have no complaints about Matt Gifford's grasp of the technical issues nor his ability to teach the topic - he's great! Packt's editors need to be called out for a number of very strange phrases in the text and a lot of inconsistencies in the language through the book, as well as inconsistent typography in examples (esp. capitalization). Having spoken to Matt at Adobe MAX, I know that these inconsistencies lie at Packt's door not his - and I've seen similar issues in other Packt books (John Farrar's two ColdFusion Tutorial books, for example). That said, it doesn't detract a great amount from the overall good points of the book (it's just a bit annoying).

If you're totally new to CFCs, this is a great book for you. If you're using CFCs already but find a lot of the terminology confusing, this is a great book for you as well. If you think you're doing OOP but haven't gotten your head fully around beans and DAOs and gateways and services, this book will have some insights for you as well (but perhaps not $40 worth). It's a really good introductory book - and it's long overdue!

My thanx to Packt for the review copy.

Tags: coldfusion

Are Objects Bad?

December 08, 2010 ·

I've had a number of people criticize me for 'pushing' OOP as the One True Way(tm). Some people have even raised the somewhat infamous "tablizer" OOP-is-bad page (sorry, I'm not going to link to it!). Whilst I am a big fan of OO as a good way to model the real world in software, I try to be pragmatic about what works and I don't believe in One True Way(tm). Heck, I've become famous (notorious?) for saying "It depends!" when asked about the 'right' way to do something!

[

Tags: architecture · coldfusion · programming