OOPhoto - Starting Off Procedural Then Moving To Object Oriented

Posted July 17, 2008 at 10:28 AM by Ben Nadel

Tags: ColdFusion

The latest OOPhoto application can be experienced here.

The OOPhoto code for this post can be seen here.

Over the past two weeks, I have been struggling to model the domain of OOPhoto, my latest attempt at learning object oriented programming in ColdFusion. After getting very caught up with analysis of the various layers of the OOPhoto application, it was suggested that I just start off by building the application in my old-school procedural manner first and then work on refactoring it into Object Oriented Programming (OOP). The idea is to get the most simple thing working first and then go back and see where it can be improved.

And so, that is what I have done. I now have a working application written in old-school, procedural programming. Please click here to play around with it.

I have to keep this post short as I have to work on some actual stuff, but there will be more on this soon; I just wanted to get this out there for people to play with. The application is quite simple, but the AJAX made it like 10 times harder than it needed to be. I don't regret the AJAX, though, as I think it will lend to a more robust understanding of OOP when I get to that point - not only do I have internal calls in the ColdFusion layer, I have external applications (the client) calling what will eventually be some sort of remote facade I assume.


You Might Also Be Interested In:



Reader Comments

Jul 17, 2008 at 5:07 PM // reply »
66 Comments

Nice job Ben, very cool.


Jul 17, 2008 at 6:59 PM // reply »
11,314 Comments

@Steve,

Thanks for the support. I am hoping to now start to re-factor it into object oriented programming styles.


Jul 18, 2008 at 11:19 AM // reply »
92 Comments

Ben, this is great! I'm glad you have decided to go this route as I think it will be easier now for you to make the jump piece by piece. It can really be overwhelming at first. It was the same for me. It might all make sense in your mind but once you are getting your hands dirty you don't know where to start.

Ask folks here questions as we are happy to help you out! You have had some great comments come through that also have helped me learn and reinforce certain ideas. Keep it going and don't get lazy! Keep us updated. :)


Jul 18, 2008 at 11:27 AM // reply »
11,314 Comments

@Javi,

Thanks for the encouragement. Yesterday, I posted the procedural style application. Now, I am looking forward to start refactoring. Gonna kick it off with some simple service objects.


Nov 13, 2008 at 1:39 PM // reply »
45 Comments

Ben,

Keep up the good work with posts like these. I am slowly catching up to certain standards used throughout the community. OO & MVC are my next big hoops to jump through. I'm looking through the code for the procedural version of OOPhoto now. It's all really clean so far.

José


Jun 11, 2009 at 4:32 PM // reply »
2 Comments

Ben, I know your a hard worker, you deserve that. Hope to read more from you. Your writing is inspiring, keep up the good work.


Sep 5, 2009 at 7:49 PM // reply »
9 Comments

Great Job! Keep up the good work!


Post A Comment

Comment Etiquette: Please do not post spam. Please keep the comments on-topic. Please do not post unrelated questions or large chunks of code. And, above all, please be nice to each other - we're trying to have a good conversation here.

Please review the following issues:

Author Name:


Author Email:

Author Website:

Comment:

Supported HTML tags for formatting: <strong>bold</strong>   <em>italic</em>   <code>code</code>







  • Help Wanted - Find Your Next ColdFusion Job
Ben Nadel's Company - Epicenter Consulting Recent Blog Comments
Jun 19, 2013 at 2:01 PM
Experimenting With The Amazon Simple Storage Service (S3) API Using ColdFusion
I have coincidentally been beating my head against the S3 API for the last week or so. One big "gotcha" I had to work around was file names and paths containing spaces. Remember to URL Enco ... read »
Jun 19, 2013 at 1:27 PM
Using Slice(), Substring(), And Substr() In Javascript
very good article. By the way IE supports negative values in substr or slice in verson 10. ... read »
Jun 19, 2013 at 11:33 AM
Filter vs. ngHide With ngRepeat In AngularJS
In your assessment, is it correct to say that given a list of say 500 items its more performant to use the `ngHide` method over the `filter` method? ... read »
Jun 19, 2013 at 10:18 AM
ColdFusion Path Usage And Manipulation Overview
Anyone happen to know if the file created by getTempFile will be automatically removed at any point? Nothing mentioned in the docs, and restarting CF doesn't remove them, so it seems it needs manu ... read »
Jun 19, 2013 at 9:41 AM
Working With Inherited Collections In AngularJS
I actually just ran into this same situation with a demo I was putting together. Your implementation of multi-lvl $scope's > Mine :) ... read »
Jun 19, 2013 at 8:17 AM
My Experience With AngularJS - The Super-heroic JavaScript MVW Framework
@Prateek, to match a word or text you should use .toContain('word') that's a jasmine reference. website is : http://pivotal.github.io/jasmine/ ... read »
Jun 19, 2013 at 8:10 AM
My Experience With AngularJS - The Super-heroic JavaScript MVW Framework
Hi Guys, Actually i am doing e2e test of angular js of my project but i am not getting one thing that is how to press enter key through the test when my form is filled as i am not using a button but ... read »
Jun 18, 2013 at 9:20 PM
Mapping AngularJS Routes Onto URL Parameters And Client-Side Events
I couldn't find examples of passing multiple arguments using the when() routing statement so figured out through trial and error that you can pass multiple arguments using the following format: .whe ... read »
InVision App - Prototyping Made Beautiful With Prototyping Tools