OOP Principles question

2010-08-04 Thread Scott Stewart

I understand the black box principle of CFC's, make sure that your cfc's
can stand on their own as black boxes. When doing OOP based development,
does this paradigm

extend to  non-cfc ColdFusion files, IE: display and action pages.

 

Thanks

 

sas

 

--

Scott Stewart

CTT+ Technical Trainer

Adobe Community Expert - ColdFusion

http://www.sstwebworks.com http://www.sstwebworks.com/  (blog)

http://training.figleaf.com http://training.figleaf.com/ 

 

 



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335968
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: OOP Principles question

2010-08-04 Thread David McGraw

At some point your going to have to develop some uniqueness into your 
application that is project specific.  You can spend a lot of time on form 
generators, and generic and configurable work flow engines, but is the time 
worth it?

I even have some CFC's that are project specific.  What I try to focus on is a 
rock solid set of CFCs that stand on their own in any environment, for any 
project, then I have project specific cfc that inherit the core CFCs.

When it comes to display pages and actions pages, etc...

David R. McGraw
Oyova Software, LLC
http://www.oyova.com


I understand the black box principle of CFC's, make sure that your cfc's
can stand on their own as black boxes. When doing OOP based development,
does this paradigm

extend to  non-cfc ColdFusion files, IE: display and action pages.

 

Thanks

 

sas

 

--

Scott Stewart

CTT+ Technical Trainer

Adobe Community Expert - ColdFusion

http://www.sstwebworks.com http://www.sstwebworks.com/  (blog)

http://training.figleaf.com http://training.figleaf.com/ 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335969
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: OOP Principles question

2010-08-04 Thread Charlie Griefer

On Wed, Aug 4, 2010 at 3:22 AM, Scott Stewart sstwebwo...@bellsouth.netwrote:


 I understand the black box principle of CFC's, make sure that your cfc's
 can stand on their own as black boxes. When doing OOP based development,
 does this paradigm

 extend to  non-cfc ColdFusion files, IE: display and action pages.


I think the concept of modularity and code reuse extends beyond OO.  In
views, when you find yourself reusing code, you throw it into an include.
 If it needs attributes passed in, you throw it into a custom tag.

There's nothing that I think is particularly OO about it... it's just about
working smarter and not harder :)

-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335978
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: OOP Principles question

2010-08-04 Thread Dave Watts

 I understand the black box principle of CFC's, make sure that your cfc's
 can stand on their own as black boxes. When doing OOP based development,
 does this paradigm extend to non-cfc ColdFusion files, IE: display and action 
 pages.

In general, any program should have a defined set of inputs and
outputs, and CFML pages are no different.

However, dependencies are much more acceptable in CFML pages than in
CFCs. For example, includes, references to external scopes, etc -
that's all fine in CFML pages.

So, my overall advice here would be not to overthink display logic -
it's the least formal layer in an HTML-based MVC application.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335983
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: OOP Principles question

2010-08-04 Thread Sean Corfield

On Wed, Aug 4, 2010 at 7:50 AM, Dave Watts dwa...@figleaf.com wrote:
 So, my overall advice here would be not to overthink display logic -
 it's the least formal layer in an HTML-based MVC application.

I might go further and suggest not to overthink any aspect of your
design. The biggest obstacle I see for CFers learning OOP is a
tendency toward 'analysis paralysis' where the search for the perfect
OO design prevents them from getting any useful work done, for fear of
'getting it wrong'. The reality is there is no 'One True Way' in OO
and your design is likely to evolve anyway over time.

The Agile folks actually expect this to be the norm and their approach
is to do the simplest possible thing that works initially and then
refactor ruthlessly, making ongoing change part of your normal
process. That approach - as well as KISS and YAGNI - leads to simpler
designs that don't focus on obsessive reusability (until you need it).
Of course, the Agile folks tend to do everything under a TDD umbrella
so they write their specs in small, evolving chunks as executable
tests and code to those which helps solidify the concepts of what
you're trying to build without focusing on the implementation details
and tends to create more modular software anyway...
-- 
Sean A Corfield -- (904) 302-SEAN
Railo Technologies, Inc. -- http://getrailo.com/
An Architect's View -- http://corfield.org/

If you're not annoying somebody, you're not really alive.
-- Margaret Atwood

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335986
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: OOP Principles question

2010-08-04 Thread Scott Stewart

So what your saying is, design patterns, like music theory, exist so
you know when you're breaking them :)

On Wed, Aug 4, 2010 at 11:56 AM, Sean Corfield seancorfi...@gmail.com wrote:

 On Wed, Aug 4, 2010 at 7:50 AM, Dave Watts dwa...@figleaf.com wrote:
 So, my overall advice here would be not to overthink display logic -
 it's the least formal layer in an HTML-based MVC application.

 I might go further and suggest not to overthink any aspect of your
 design. The biggest obstacle I see for CFers learning OOP is a
 tendency toward 'analysis paralysis' where the search for the perfect
 OO design prevents them from getting any useful work done, for fear of
 'getting it wrong'. The reality is there is no 'One True Way' in OO
 and your design is likely to evolve anyway over time.

 The Agile folks actually expect this to be the norm and their approach
 is to do the simplest possible thing that works initially and then
 refactor ruthlessly, making ongoing change part of your normal
 process. That approach - as well as KISS and YAGNI - leads to simpler
 designs that don't focus on obsessive reusability (until you need it).
 Of course, the Agile folks tend to do everything under a TDD umbrella
 so they write their specs in small, evolving chunks as executable
 tests and code to those which helps solidify the concepts of what
 you're trying to build without focusing on the implementation details
 and tends to create more modular software anyway...
 --
 Sean A Corfield -- (904) 302-SEAN
 Railo Technologies, Inc. -- http://getrailo.com/
 An Architect's View -- http://corfield.org/

 If you're not annoying somebody, you're not really alive.
 -- Margaret Atwood

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335987
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: OOP Principles question

2010-08-04 Thread Sean Corfield

On Wed, Aug 4, 2010 at 9:27 AM, Scott Stewart webmas...@sstwebworks.com wrote:
 So what your saying is, design patterns, like music theory, exist so
 you know when you're breaking them :)

That's a good way of phrasing it :)

The key thing to remember about design patterns is they include a set
of 'forces' that indicate a particular pattern *may* be applicable in
your case as well as a set of 'trade offs' that show what the
downsides are and what problems you may introduce by using that
pattern. A lot of people forget about the 'cons' and see design
patterns as all fluffy and covered in unicorn dust...
-- 
Sean A Corfield -- (904) 302-SEAN
Railo Technologies, Inc. -- http://getrailo.com/
An Architect's View -- http://corfield.org/

If you're not annoying somebody, you're not really alive.
-- Margaret Atwood

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336003
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm