keep in mind that listeners respond to events.  In the traditional sense,
this is applied mostly to UI applications - as there are tons of events
triggered by use of a user interface.  That's not to say that there isn't a
concept of system events... but these aren't as applicable to CFML apps.
There is a concept of object instances (cfc instances) "broadcasting" so
that other instances on the same page (the ones that "listen") can respond.
This is known as instance based invocation and has some interesting
application in the world of CFML.  I've been doing quite a bit with it,
myself.

~Simon

Simon Horwith
CTO, Etrilogy Ltd.
Member of Team Macromedia
Macromedia Certified Instructor
Certified Advanced ColdFusion MX Developer
Certified Flash MX Developer
CFDJList - List Administrator
http://www.how2cf.com/


-----Original Message-----
From: Robertson-Ravo, Neil (RX)
[mailto:[EMAIL PROTECTED]
Sent: 05 September 2003 10:38
To: '[EMAIL PROTECTED]'
Subject: RE: [ cf-dev ] MVC issues


IMHO Listeners are not required or indeed apply to CFML etc : if we are
talking about a 100% pure CFML application and listeners in themselves are
not a required part of MVC design, they are just one of the many ways you
could implement MVC; they are more suited to Flash / Director where OOP
architecture is already in place via Lingo and ActionScript.

CFML by its very nature doesnt really cater for them, as its 100% totally
dicated by the user interaction.  The engine is not actively listening for
calls etc, it generally just accepting calls via means at our disposal
(cfc,cfml,ct,udf etc...).

I am not sure what you mean with "MVC logic in the database" as a simple
Stored Procedure can give you a certain degree of "MVC" (as long as you are
not using SQL Views ;-)!

MVC in CF is very young and I doubt you could get a 100% implemenation in
CFMX, never mind 5.



-----Original Message-----
From: Paul Johnston [mailto:[EMAIL PROTECTED]
Sent: 05 September 2003 10:34
To: [EMAIL PROTECTED]
Subject: RE: [ cf-dev ] MVC issues


Neil,

> M = model = Database tier and CFCs (I am not sure what
> replacement you could use in CF5...Custom Tags?  CFX?) V =
> View  = CFML pages with no logic in them whatsoever,
> everything in tags
>               and CFCs
> C = Control =     The control should really just be the bit
> of your app that
> decided which CFC to call, and
>                 which CFML to display.  Control should be
> something that you
>                 change very little on a day to day basis, it
> mediates between
>                 M and V.

Got that far thanks...

Thing is, take CF5 as an example (because this is much more of a theoretical
discussion even though I will be taking this further in CF5) at the moment,
I am implementing a lot of the MVC logic in the database, and using this
information to create an MVC structure around my code.

CF is still procedural, and MVC is pretty much an OO thing.  The concept of
listeners is quite complicated in CF5 (possible in CFMX though) and I want
to know if it's important, or whether or not the "snapshot" approach of MVC
development is going to be enough...

> In general, most CF developers probably still put too much
> code into CFCs than they should but that generally and
> probably an issue with CF itself; and something you cant or
> wont really get around at the moment.

That's a coding issue and not a methodology issue.

> The CF engine itself probably does much of the "controller"
> job I would say, but i'm not sure how cleanly it lets you
> implement MVC, in its purest form.

As with all programming, you have to tell the "black box" that runs your
program (whatever that is) to do something.  Of course, if I was
implementing MVC on an x86 processor in assembler it would be much harder
(thank God I'm not!)

Paul



--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]






-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to