OOPhoto Prototype - Understanding The Interface Before Defining The Domain Model

Posted July 7, 2008 at 9:33 AM by Ben Nadel

Tags: ColdFusion

The latest OOPhoto application can be experienced here.

The latest OOPhoto code can be seen here.

I have completed the prototype for OOPhoto - my latest attempt at learning object oriented programming (OOP) in ColdFusion. As I stated before, since I'm really trying to wrap my head around OOP, I am going to be keeping this application as small as I possibly can, while at the same time, trying to touch on several aspects of object oriented programming. In fact, as I was building this prototype and running through the different use-cases, I decided to eliminate the photo sorting; originally, I was gonna use some drag-n-drop functionality, but I decided that that was going to be too much overhead and more of distraction from OO rather than a benefit. Right now, I just want to get my head around the basic, which is hard enough - I can come back afterwards and add the bells and whistles.

Here are the use cases that I ran through:

  • Create a new gallery.
  • View a gallery using a given Jump Code.
  • Find a gallery using a keyword search.
  • Edit an existing gallery using a given Jump Code.
  • Delete a gallery.

Not very many different use cases and only a single persona to test. In my next OOPhoto post, I will start to get into the domain model for this object oriented program. For those of you not familiar with the principles of Interface Driven Architecture, it is crucial that we create a complete and robust prototype before we do any coding. Not only does this allow us to stay very agile, it allows us to get a much more complete understanding of what our domain model will be and the services that will need to be made available. Without a full prototype, it would be extremely difficult to be able to capture the full scope of the project.

I have tested the prototype in FireFox and IE 7. I tried to keep the CSS and XHTML as clean as possible; but, at the same time, I didn't want to lose sight of the primary goal of the project - learning object oriented programming. As such, I held the mark up to a high standard, but did not stress myself too much about the naming convensions and minutia of CSS optimization.


You Might Also Be Interested In:



Reader Comments

Jul 7, 2008 at 10:10 AM // reply »
34 Comments

Looks good, Ben. I am sorry to hear that the drag-and-drop tool is no longer part of the first version (though I completely understand why). Having messed around with sorting/rearranging items in a number of different situations, I was curious to see how you'd approach it.


Jul 7, 2008 at 10:37 AM // reply »
11,243 Comments

@Brian,

I probably would have just used some sort of "sortable" plug-ins for jQuery. The underlying sort action would have just resorted a hidden ID list:

<input type="hidden" name="lst_photo_id" value="1,5,8,2,4" />

This sort would have then been used to sort the photos on the back end. However, I just feel like it would have been a bit too much for my brain to deal with just now. It's already struggling to absorb all the great stuff the Brian Kotek and others have said in my previous posts.


Jul 7, 2008 at 10:53 AM // reply »
34 Comments

Yep, that would have been the easiest way to do it.

And by leaving it for the next version, you'll get to see how doing things in OO helps with refactoring.


Jul 7, 2008 at 10:55 AM // reply »
11,243 Comments

@Brian,

That is what I am hoping :)


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
May 22, 2013 at 5:35 PM
Script Tags, jQuery, And Html(), Text() And Contents()
This is still an issue 2 years later. jQuery is supposed to remediate these cross browser issues, no? I have been unable to find any statement from the jQuery team calling this behavior "by de ... read »
May 22, 2013 at 12:44 PM
Ask Ben: Query Loop Inside CFScript Tags
In cf10, if you call a function that has: local.result = {}; local.result.msg = ""; local.svc = new query(); local.svc.setSQL("SELECT * FROM..."); local.obj = local.svc.exe ... read »
May 22, 2013 at 12:29 PM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
@Ben: What version of Java are you using? Also, did you test users.id to see what Java reports as the data type? I wonder if it's not a Java primitive data type, but getting returned as something ... read »
May 22, 2013 at 11:47 AM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
@Dana, Awesome - so it looks like this bug was fixed in ColdFusion 10. Thanks so much for double-checking that. ... read »
May 22, 2013 at 11:37 AM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
When I c&p and run on cf10, I get: Selected User IDs: 1,4 User 1 selected: YES - YES User 2 selected: NO - NO User 3 selected: NO - NO User 4 selected: YES - YES User 5 selected: NO - ... read »
May 22, 2013 at 11:27 AM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
@Tom, Good thought, but no dice. Both of these still exhibit the same behavior: users.id[ users.currentRow ] users[ "id" ][ users.currentRow ] It's just something whacky happening with ... read »
May 22, 2013 at 11:07 AM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
Could your problem be that "users.id" is actually an ARRAY, not a single value? Perhaps try it again with "users.id[1]" (I only have CF8 here at work). ... read »
May 22, 2013 at 7:52 AM
Nested Views, Routing, And Deep Linking With AngularJS
Hi, Just a quick thank you. As it happens, for my own purposes, the pending ui-router work being done in native angular is likely the one I'll adopt, but your exploration, code and documentation of ... read »
InVision App - Prototyping Made Beautiful With Prototyping Tools