So really it comes down to this. What is your model? In traditional mvc fusebox this was a circuit where we broke up our functionality into different fuses so that code could be reusable. But since cfmx we have a new way of dealing with this same problem. Now we have the option of capturing all our business logic in a CFC which by the nature of which gives us a place to put related functions in an easily reusable fashion.
So if you are putting all your logic into cfc's then you will have defined those cfcs as your model. And calling them directly from the controller is not really any different than calling the model circuit and having it make the calls for you. Well except its a lot less work :)
And of course what I consider the real benifit of this move to cfc's to be, is that now this business logic is not only tied into your fusebox applications. They can be exposed to other cf applications using other frameworks. This also allows you the option to open them up to be consumed remotely by webservices and flex.
The truth of the matter is that if you ask "When should I use circuits over calls to the cfc directly" you are going to get the very famous "it depends" answer. And the reason for this is that MVC just like all other design patterns are just that, a pattern. They can be a guide for you to help you find best practices, but there are no hard and fast rules. So whatever you decide works best for you is going to be the right answer.
I hope that very long winded answer to a simple question will help to set your mind at ease over the "right-ness" of the solutions you choose.
Take care,
simeon
On 8/16/06, Marc Funaro <[EMAIL PROTECTED]> wrote:
So if you are putting all your logic into cfc's then you will have defined those cfcs as your model. And calling them directly from the controller is not really any different than calling the model circuit and having it make the calls for you. Well except its a lot less work :)
And of course what I consider the real benifit of this move to cfc's to be, is that now this business logic is not only tied into your fusebox applications. They can be exposed to other cf applications using other frameworks. This also allows you the option to open them up to be consumed remotely by webservices and flex.
The truth of the matter is that if you ask "When should I use circuits over calls to the cfc directly" you are going to get the very famous "it depends" answer. And the reason for this is that MVC just like all other design patterns are just that, a pattern. They can be a guide for you to help you find best practices, but there are no hard and fast rules. So whatever you decide works best for you is going to be the right answer.
I hope that very long winded answer to a simple question will help to set your mind at ease over the "right-ness" of the solutions you choose.
Take care,
simeon
On 8/16/06, Marc Funaro <[EMAIL PROTECTED]> wrote:
I truly am curious to know how big a difference there is among everyone, on
how they are calling their model when using CFCs. Hoping more people will
chime in on this one.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
