Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
sonoflight #1
Object Oriented Overkill ?
Hello all, I'm curious about my current development methods with CFMX 6+ and
your opinions. I wonder if it is possible to go too far with "objectifying"
things in Coldfusion. Take this simple example.
An application keeps track of current events in a database. I create a
component / class that represents an Event with all its methods like getTime(),
getDate(), and getDescription(). Now I create another component / class, an
EventSchedule. Whenever I need to get a list of all Events, I would create an
EventSchedule object and execute its method getAllClasses(). Now, the
EventSchedule method, getAllClasses(), returns an array of Event objects.
These objects were "filled" with their data using a query, looping through the
query and adding all the Event data. Now the page that needs a list of all
Events would create an EventSchedule object, call the method getAllEvents(),
and then the page would receive an array of Event objects for use. Thus being
able to loop through the array and calling the appropriate methods of each
object.
Is this overkill in object oriented design for ColdFusion? From a performance
/ execution standpoint? Anything I should consider or be worried about with
this methodology shown above? I know performance-wise, the server seems to be
taking somewhat of a hit when dealing with a bunch of objects, however the fact
that all data is encapsulated inside of an object is something that is very
desirable... no?
Thanks for your thoughts and discussion.
Britt Mileshosky
sonoflight Guest
-
3D object oriented lingo
When building a large, possibly templates based project, what would be a better approach? 1. parent-child scripts? 2. lots of behaviuors? In... -
Object Oriented Web Design
Hi all, I am looking at using Jscript classes and COM objects written in Java to implement OOD on the web. I was wondering if anyone knows of any... -
Complex Object Oriented Application
Hi I'm an experienced programmmer in C++ and Java but I'm a beginner in ActionScript I'm wondering about the posibilities of AscionScript as an... -
packages object oriented
Does anyone have a good hold of how to do object oriented programming in perl? Maybe a few lines of code as examples? EDUB -
oriented object programming
Greetings I have the following class: #!/usr/bin/perl package monParser; use HTML::Parser; @ISA = qw(HTML::Parser); -
mpwoodward *TMM* #2
Re: Object Oriented Overkill ?
sonoflight wrote:
It's always possible to have too much of a good thing. ;-)> Hello all, I'm curious about my current development methods with CFMX 6+ and
> your opinions. I wonder if it is possible to go too far with "objectifying"
> things in Coldfusion. Take this simple example.
Short answer, yes. From what you describe it sounds like you'd be WAY> An application keeps track of current events in a database. I create a
> component / class that represents an Event with all its methods like getTime(),
> getDate(), and getDescription(). Now I create another component / class, an
> EventSchedule. Whenever I need to get a list of all Events, I would create an
> EventSchedule object and execute its method getAllClasses(). Now, the
> EventSchedule method, getAllClasses(), returns an array of Event objects.
> These objects were "filled" with their data using a query, looping through the
> query and adding all the Event data. Now the page that needs a list of all
> Events would create an EventSchedule object, call the method getAllEvents(),
> and then the page would receive an array of Event objects for use. Thus being
> able to loop through the array and calling the appropriate methods of each
> object.
>
> Is this overkill in object oriented design for ColdFusion?
better off using a simple query object for this sort of functionality.
Unless you actually need that array of objects for some reason that's a
ton of unnecessary overhead when a query object would suffice.
Yes, definitely desirable but likely not necessary in that particular> From a performance
> / execution standpoint? Anything I should consider or be worried about with
> this methodology shown above? I know performance-wise, the server seems to be
> taking somewhat of a hit when dealing with a bunch of objects, however the fact
> that all data is encapsulated inside of an object is something that is very
> desirable... no?
situation. When you're dealing with *individual* objects all the
benefits of OO really kick in, but don't shy away from using a query
object when that's what the situation calls for.
Matt
mpwoodward *TMM* Guest



Reply With Quote

