cf.Objective Day 3

Paul Kenney: Test driven Development with ColdFusion

Paul Kenney from Adobe took us through test driven development. Testing is one of those things that people (okay I) always nod their head and say “We totally should be doing that” and then do nothing about implementing. I was hoping to get some good incentives or strategies out of this session.

Paul started with the problems of testing. They basically boil down to:

  • Too little
  • Too late
  • Too difficult to run (not automated)

Tips

  • Programmer Tests (Unit Test)
    • Written by developer that writes the code
    • Written before the code that they test
    • Tests external behavior of components
    • Acts as a contact
    • No code without testing
    • Allow freedom to refactor
  • Refactoring
    • Changing internal action of code without altering external behavior
    • Do so when principles of good object oriented design aren’t being upheld
      • Duplication
      • Hard to understand
      • High Coupling
      • Low Cohesion
      • Too many switch statements
  • cfcUnit
    • Errors versus Failures
      • Errors you know
      • Failures occur when code does not act as expected

Charlie Arehart: Understanding, Improving and Resolving Issues With Database Procedure Caches

Charlie Arehart is a really polished speaker. I’m not knocking anyone else, but he’s just really smooth.

The main thrust of the talk was about getting optimized query plans through ColdFusion.

Points:

  • Remember that there is a Database Management System between you and the database
    • Database driver
    • Connection Pool
    • DB Page buffers
    • Query Plans – Prepared Statement plan
  • Use SQL Profiler
    • You can see Execution plans
  • DB Plan caching
    • Reduces the amount of processing DBMS does
    • Instead of computing new plan, it reuses old one.
  • Some of this data is available in perf monitor.
  • Use the DBCC stuff in SQL 2005
  • Performance Implications
    • Cache requires memory on CF
    • Not using it requires processor on SQL
  • MySQL can do some of this now
    • Couple Gotchas
  • SQL 2005 might not work if you are using compatibility mode
  • Prepared Statements can hurt sometimes
    • When selecting by NULLS

Ben Forta: Keynote Top Secret Scorpio

Ben went over the Adobe buy out and customer worries to start with. He then went into the marketing over view:

  • Developer Productivity
  • Integration
  • Management and Administration

Ben talked about three things to do with Developers and Eclipse

First was the ColdFusion Ajax Application Wizard. Much like the Flex application wizard it creates a simple application using Ajax. He also pointed out the ColdFusion Ajaz Debugging tool. You know how PHP programmers will grudgingly admit that ColdFusion does debugging much better than anything else out there. They’re going to have to say it some more; because this thing is awesome.

Second was the Eclipsed based ColdFusion Debugger. This feature has never really excited me. But seeing it in action, I can really see it being useful.

Third was the new integration of Flex Data Service into ColdFusion. It’s now being called LiveCycle Data Services.

  • New gateway for pushing data to LCDS from ColdFusion
  • LCDS is now part of the ColdFusion Install.
  • Data Services can be consumed by technologies other than Flex.

Lunch

Hal Helms: Object Oriented Modeling

I went to the wrong room, and wandered into this, but didn’t want to move because I had access to an outlet. Additionally, I’ve always wanted to hear Hal Helms talk.

This was a theoretical/philosophical discussion on the way to architect object oriented code around your data model. It was a very cool introduction about talking about this stuff better. The whole getter and setter model isn’t enough. Don’t think about objects in terms of data you can get out of them… Think objects in terms of what they do.

Hal starts at the UI and works down to the database. I guess, but I’m not sure, is that you have to shift your mind to thinking of the database as just a persistence layer to save object state. You have to ask yourself “What does it mean to be a <blank>?”

Hal’s Tiers of OO Applications

  • Data
  • Domain Model
  • Service Layer
  • Application Layer

A lot of this went over my through my fractured attention span. My brain is full.

But cool notes:

  • Favor composition over inheritance
  • Feel free to make mistakes
  • Separation of Concerns
  • High cohesion
    • Well defined purpose
    • It should do only what it should do
  • Low Coupling
    • Through API’s instead of hard coded knowledge
  • Design Patterns
    • They arose over time
    • Collected wisdom of the development world.

He finished up with a good example of why Inheritance is not the best pattern to use in many, many cases.

Chris Scott: Introduction to Aspect Oriented Programming with ColdSpring

Aspect Oriented programming is a relatively new comer to the programming world. It complements OO and controls wide reaching concerns. Chris Scott started talking about why we do it, before talking about how.

  • Cross Cutting Concerns
    • Security
    • Transactions
    • Caching
    • Logging (Poster Child)
  • Two central themes
    • Interception
      • Grabbing method calls (Join Points)
    • Introduction
      • Add functionality before, after, and around methods
      • Doing so is called Advising

This was another one that blew my mind.

He showed us an example of caching that was so robust, he took the database of a database application down, and it still worked. He also showed a great example of a use of custom metadata in CFC’s.

After this I was done. Chris Scott hurt my brain. This stuff was so cool and so powerful, I want to use it. I just don’t know where yet.

One thought on “cf.Objective Day 3

  1. I saw both of Chris Scott’s presentations on Sunday and some of the stuff he was doing with ColdSpring blew my mind. While he was using the RemoteProxy stuff with Flex, I can see how it would equally useful for AJAX development.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s