0

Code from my Intro to OO presentation to the DFWCFUG

ColdFusion

For those that caught my mini-presentation to the DFWCFUG before Mark Drew's CFEclipse presentation on Tuesday night, I took a basic procedural code application and modified it so that all database interaction was managed through objects.  

After the meeting for the ones that stayed around, I proceeded to take that application and turn it into a Mach-II application.  While this was certainly a step in the right direction, the framework still knew too much about the application and was doing things it had no business doing, such as instantiating DAO/Gateways in listeners and doing business logic, rather than acting more as a traffic cop like it should. 

Due to this I have added a fourth step in the application, which takes the Mach-II application, adds in the concept of a service layer which the framework accesses, and ties dependencies together using ColdSpring.   All the while the functionality of the application doesn't change.

I have packaged this application up with a SQL backup file and a README explaining how to set it up and with some description of what is going on in it.  Feel free to pull it down and play with it.  If you catch any glaring mistakes or have questions or suggestions feel free to contact me.

If anyone is interested, and since so few people caught the last half of this application going from a procedural app to a Mach-II app, then to using a service layer and ColdSpring, I would be more than willing to do this entire thing as a meeting topic one night if anyone is interested.  If so, please let me know.

You can download the zip file here.

 

tags:
ColdFusion
Cutter said:
 
Outstanding Dave! Sounds like a lot of fun. Did the UG record the preso over Connect? I have a few developers on staff that would benefit from each level, but it would be great to show 'em that beginning steps in action.
 
posted 405 days ago
Add Comment Reply to: this comment OR this thread
 
 
No, I sure didn't but I would be willing to do so. I actually only went from step 1 to step 2 in the meeting as the goal was to do it in under 10 minutes which I just barely made! I went from step 2 to step 3 (to Mach-II) after the main meeting for just a handful of people.
 
posted 405 days ago
Add Comment Reply to: this comment OR this thread
 
Cutter said:
 
I think your initial 10 min procedural-to-OO preso would be a great resource for a lot of junior/mid level developers who are interested in making the jump, with maybe a follow on video/preso with your next steps of converting to a Mach-II app (and showing how the addition of the service layer makes it easier to switch to another framework like Model-Glue would be cool too). If you ever do it please let me know. Like I said, there's a crew here that would benefit from your experience. (I'd do it myself, but I'm too busy fighting Subversion and Ant right now;)
 
posted 405 days ago
Add Comment Reply to: this comment OR this thread
 
 
Dave...
sudo apt-get install recordmydesktop
 
posted 405 days ago
Add Comment Reply to: this comment OR this thread
 
Charlie Arehart said:
 
Hey Dave, I've had someone point this out and recommend it as a great topic for the Online CF Meetup (http://coldfusion.meetup.com/17). For those that don't know, it's a virtual CFUG, and we do record all our meetings, so it would kill two birds with one stone (spreading the goodness of your talk to a wider audience, and getting a recording for others to watch)--plus, no need to wait until your next month DFWCFUG. We have been meeting weekly! :-)

We're booked for next week, and then will be on hiatus while at CFUnited, and perhaps doing live interviews from there. But we would be glad to schedule you for the first week of July, or whatever works for you. Any day and time you may prefer. Let me know if you may be interested.
 
posted 405 days ago
Add Comment Reply to: this comment OR this thread
 
CoolJJ said:
 
Dave,
great, thanks for this! This will be really helpful to me. You know what would be cool is adding another level 5 and showing how to integrate reactor or transfer into MachII. I just started using MachII myself and I think I'm starting to get the hang of it. Now I need to get my skills to the next level, coldspring + whatever ORM.

CoolJJ
 
posted 404 days ago
Add Comment Reply to: this comment OR this thread
 
Ilya Fedotov said:
 
Dave, I made a quick msSql script for our team to create the DB and table, since there is only mySql script in the zip file.
Might be useful to some. Again thanks for sharing this.

USE master
if not exists (select name from sysdatabases where name = 'dfwcfug')
Begin
   CREATE DATABASE dfwcfug
End

GO

USE dfwcfug
if not exists (select name from sysobjects where name = 'Attendee')
Begin
CREATE TABLE dbo.Attendee
   (
   AttendeeId int NOT NULL IDENTITY (1, 1),
   FirstName varchar(50) NOT NULL,
   LastName varchar(50) NOT NULL
   ) ON [PRIMARY]
   INSERT INTO Attendee (FirstName, LastName) VALUES ('Dave','Shuck');
End
 
posted 400 days ago
Add Comment Reply to: this comment OR this thread
 
 
Ilya Fedotov, thanks! I will add that to the downloadable zip file.
 
posted 400 days ago
Add Comment Reply to: this comment OR this thread
 

Search

Dave at work...