> I would like to build a cffunction within a CFC that will
> work with either a Flash front end or a cfml front end. In
> other words, I do not want to have to worry about modifying
> the cffunction at all, and be able to call it from either
> Flash or a cfml template. (The functions themselves are
> mostly for db interaction.) Is this possible? I will be

Yes, if the method is marked remote, than Flash can access it.

> building my CFCs to initially work with the cfml front end,
> being mindful that the Flash front end is next. My main
> concerns are the returntype and access attributes in the
> cffunctions as well as the cfargument tags. If such front
> ends require different values for these attributes, can I
> make them dynamic and pass them in accordingly, or should I
> just create different cffunctions?

Why would CF require a different returntype than Flash? The CFC should be
the one to determine what returnType (or argument types) are used.

>
>  
>
> I'm operating on the following assumptions, which may or may not be
> correct: From what I can tell, any function that works with
> Flash Remoting requires an access value of "remote," whereas
> a cffunction interacting with a cfm template does not, and in
> fact will not work with an access="remote" value. Also , the

Not true. CF can easily call a CFC method with access=remote.

> Flash remoting app requires you to use cfargument tags before
> inserting them into the db, where the cfm front end does not,

Eh? This makes no sense. The CFARGUMENT tag simply _declares_ the variable
names, as well as help provide validation. You can write a method w/o
<cfargument> tags, but would not be wise.

> For example, for a db insert, can I create one cffunction
> with a returntype of any, an access value dynamically
> inserted (or "remote" if it'll work), and cfargument tags for
> all data passed in, and use it from both?

What exactly is the method doing?
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to