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)
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
- Changing internal action of code without altering external behavior
Do so when principles of good object oriented design aren’t being upheld
- Hard to understand
- High Coupling
- Low Cohesion
- Too many switch statements
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.
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
- 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
- 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.
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
- 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
- Well defined purpose
- It should do only what it should do
- Through API’s instead of hard coded knowledge
- 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
- Logging (Poster Child)
Two central themes
- Grabbing method calls (Join Points)
- 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.