|
I agree with what are you saying. I don't think
that it's a good idea to use a dynamic 'extends'. But what I do need is
to extend a cfc from a relative path.
<cfcomponent extends="../vehicles/car>
As the root of the appl. is not mapped, and as I
don't know the full-qualified name of the class (it would be something like:
mysite.mysite1.dir1.vehicles.car), how can I extend the car CFC ? Can I add
the mapping of the components programatically in the Application.cfm (placed in
the root of the application ) or something? I cannot add the mapping from the CF
administrator.
Lucian
----- Original Message -----
Sent: Tuesday, May 25, 2004 10:15
AM
Subject: RE: [CFCDev] component extends
object with relative path
I'm an ASP.NET developer but we (= the company I work for) only
use ColdFusion.
I know that we can go on for hours what web
programming language is the best. But, I' ve made up my mind.
I
think that components aren't just good enough to speak of an OO language.
The code examples of Ben Forta at http://www.macromedia.com/devnet/mx/coldfusion/articles/cf_aspnet06.html Are
trying to convince you to use CFMX instead of ASP.NET. But the comparison
isn't just valid.
So what I'm trying to do now is to develop the
ASP.NET way in CFMX. Maybe you are going to say that I don't have to mix up
both languages. But the rules are simple: eg: strictly divide your code to
a business logic part and a lay-out part, extensively use of components,
re-use of code, and some other tricks.
One thing I really bother
about is that you can't use an overridden or overloaded method, which I use
thoroughly in ASP.NET. ColdFusion just don't allow you (correct me if I'm
wrong) to use the same function name twice, although it has a different set
of arguments (overload) or I want to overrule a method from a base class
(override).
No matter what, the discussion about OO in CFMX is an
interesting one. And I'm not against CFMX, as long as you use the whole
package of it (and I'm not that far already...
;-)).
Greetz, jurgen
-----Original Message----- From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Stephen Milligan Sent:
dinsdag 25 mei 2004 8:50 To: [EMAIL PROTECTED] Subject: RE:
[CFCDev] component extends object with relative path
If you think your
architecture through carefully, you will probably find that not only is it
un-necessary to have a variable in the extends attribute, but that it
actually gives you a lot more control over the maintainability application
in the longer term. I believe that this is why it is implemented the wya it
is. Not to try to help you out, but because the underlying system on which
CFMX is built works in exactly this way with regards to extending
components. If it's good enough for Java, it's good enough for
me.
Can you explain why it's a huge negative point?
What other
object based systems have you worked with that allowed you to dynamically
specify which component/class/module you are extending?
I'm not sure
what you mean when you say "Another problem is the use of overloaded and
overridden methods" Can you explain what the problem is and what it
is you are trying to
do?
Spike
-------------------------------------------- Stephen
Milligan Code poet for hire http://www.spike.org.uk
Do you
cfeclipse? http://cfeclipse.tigris.org
>-----Original Message----- >From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED] On Behalf Of Jurgen
Stillaert >Sent: Monday, May 24, 2004 10:39 PM >To: [EMAIL PROTECTED] >Subject: RE:
[CFCDev] component extends object with relative path > >You can't
use a variable in the extends attribute. If you do, >an error like
"This _expression_ must have a static value." pops up. > >
> >That's a pitty. For development reasons, for me it's a huge
>negative point in the Object Based approach of
Macromedia. > >Another problem is the use of overloaded and
overridden >methods. I know the solution is to use optional variables,
but >that's just good enough. Someone knows another solution for
that? > > > >-----Original Message----- >From:
[EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED] On Behalf Of Lucian
COZMA >Sent: maandag 24 mei 2004 17:17 >To: [EMAIL PROTECTED] >Subject:
[CFCDev] component extends object with relative path > >
> >Hello all. > > > >I want to create a
cfc that extents another cfc located in a >relative path (non-mapped)
as shown below: > >/ >
models/porsche.cfc > vehicles/car.cfc > >I want that
porsche.cfc extends vehicles/car.cfc: ><cfcomponent
extends="../vehicles/car> > >I know that it doesn't work , but
is there a way of doing such >a thing ? > >I cannot use
full-package names (mysite.site1.vehicles.car), >as the path is unknown
and there is a whole lotta' mess in the >placements of the components
in the existing application . >Should I extract the class name from the
path and use it >dynamically in the 'extends' attribute (like:
>extends="#myClassPath#") ? > >On the same page, a related
question, is there any way of >adding programatically a mapping (not
using the Administrator) ? > >
> >Thanks, > >Lucian @ InterAKT
Online > > > >
> >
---------------------------------------------------------- You
are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the words
'unsubscribe cfcdev' in the message of the email.
CFCDev is run by
CFCZone (www.cfczone.org) and
supported by Mindtool, Corporation (www.mindtool.com).
An archive of the
CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
---------------------------------------------------------- You
are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the words
'unsubscribe cfcdev' in the message of the email.
CFCDev is run by
CFCZone (www.cfczone.org) and
supported by Mindtool, Corporation (www.mindtool.com).
An archive of the
CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
|