« Return to Thread: How do you test your MG apps?

Re: Wondering if this is possible.

by Dan Wilson :: Rate this Message:

Reply to Author | View in Thread

I am afraid I don't understand your wishes then. If you aren't going
to be using ModelGlue Unity as a controller then why have it in there
at all?


When you say you need access to the coldspring configuration files,
which part of the config do you need? Are you using ColdSpring for
Dependency Resolution? Are you referring to the Reactor configuration
within the ColdSpring.xml file?


dw







On 11/1/06, Andrew Scott <Andrew.Scott@...> wrote:

> Dan,
>
> I agree, but as I first stated Sean Corfield blogged how to extend the
> reactor framework in this manner. The problem is I really don't give a rats
> arse about MG:U I need to get the coldspring configuration files stored with
> the MG:U framework.
>
> For example DSN settings or even beans that hold information.
>
> So I know it can be done, I just don't know how.
>
> I have done this which works, but is not really desirable.
>
> <cfset variables.ModelGlue_APP_KEY=GetFileFromPath(ExpandPath('.')) />
> <cfset variables.mg = application[ModelGlue_APP_KEY].framework />
>
> Now I could setup an event to call the webservice, but that is a façade I
> don't fancy doing. Especially when there is more work involved in setting up
> and event, with no views etc.
>
> So doing this
>
> <component extends="mgu"> is easy and better for my requirements.
>
> As I stated I have it working with my hack above, but I would prefer to
> extend the right component to begin with.
>
> The stupid thing is, I only need to get a handle to reactor and the config
> files, so I can return the data via a webservice.
>
>
>
> Senior Coldfusion Developer
> Aegeon Pty. Ltd.
> www.aegeon.com.au
> Phone: +613  8676 4223
> Mobile: 0404 998 273
>
>
> -----Original Message-----
> From: Dan Wilson [mailto:sipacate@...]
> Sent: Thursday, 2 November 2006 12:38 PM
> To: modelglue@...
> Subject: Re: Wondering if this is possible.
>
> Model Glue is a Front Controller framework. It works by calling a
> single file in a directory and passing parameters through HTTP. A
> special named parameter ( often named 'event') controls which section
> of the application to run.
>
> Thus, if you call a webservice on a CFC, you are going completely
> around the notion of Model Glue.
>
> There is nothing stopping you from calling a model glue style URL and
> having the result of the Model Glue process return the data you need.
> After all, the ModelGlue framework takes parameters and returns
> content. It can return any content you configure.
>
> For example, you can make a call to a model glue event handler that
> broadcasts a message, goes through your model layer, returns a JSON
> formatted string and then calls a layout event which sets the proper
> cfcontent / cfheader  for returning JSON.
>
> I've done this alot with the Model Glue framework as well as the
> MachII framework.
>
> Hope this helps..
>
>
> dw
>
>
>
>
>
> On 11/1/06, Andrew Scott <Andrew.Scott@...> wrote:
> > Ken,
> >
> > No it doesn't it shows you how to use events within ajax, which is so damn
> > simple it is not funny.
> >
> > The problem comes down to when you make that ajax call and it is not a
> MG:U
> > event is the problem that I am facing.
> >
> > So what that means is if I make a webservice call how do I get a handle on
> > the MG:U framework, can it be extended via the webservice class or is
> there
> > some other method to do this.
> >
> > Ken, I went through ajaxCFC and it has nothing close to what I am looking
> > for, but plenty of stuff that I am already doing within Dojo.
> >
> > So I'll ask the question again as some people really can't seem to read
> what
> > I am asking.
> >
> > Can a cfc remote call (Webservice) be called like this
> >
> > <cfcomponent extends="modelglueframework">
> >
> > So that I can retrieve the configs and other coldspring related objects.
> >
> >
> >
> >
> > On 11/2/06, Andrew Scott <Andrew.Scott@...> wrote:
> > >
> > > Thanks I'll check it out, but Dojo has everything I need for doing great
> > Ajax calls and binding.
> > >
> > >
> > >
> > > On 11/2/06, Ken Dunnington < ken.dunnington@...> wrote:
> > >
> > > > Andrew, have you looked at ajaxCFC ( http://ajaxcfc.riaforge.org/ )? I
> > > > haven't had a chance to use it, but it sounds like it would do what
> > > > you're looking for: integrate with MG:U and expose your model to Ajax
> > > > calls.
> > > >
> > > > Also, take a look at Ray's post covering Spry and MG:U. This would
> > > > apply equally well to Dojo:
> > > >
> > http://ray.camdenfamily.com/index.cfm/2006/8/22/Using-AJAX-with-ModelGlue
> > > >
> > > > On 10/31/06, Andrew Scott < Andrew.Scott@...> wrote:
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Awhile ago I saw a post where, Sean had extended the Reactor
> framework
> > > > > through a webservice / cfc.
> > > > >
> > > > >
> > > > >
> > > > > Now I am looking at the option to see if MG:U can be done like this
> > too. The
> > > > > reason being is that I am using a lot of Ajax calls via Dojo, and it
> > would
> > > > > be better to use cfc's / webservice for what I am doing. But I also
> > need to
> > > > > get a handle on the MG:U framework.
> > > > >
> > > > >
> > > > >
> > > > > What I have done for now, is when the application is created I am
> > storing
> > > > > this info in the application scope for my reference, but there must
> be
> > a
> > > > > better way of doing this. Reactor yes I can follow seans example,
> but
> > what
> > > > > about spring and MG.
> > > > >
> > > > >
> > > > >
> > > > > I am hoping this might be able to be achieved in some form or
> another,
> > or
> > > > > should I be using events for what I am trying to do to return data
> > back to
> > > > > the browser?
> > > > >
> > > > >
> > > > >
> > > > >  Senior Coldfusion Developer
> > > > >  Aegeon Pty. Ltd.
> > > > >   www.aegeon.com.au
> > > > >  Phone: +613  8676 4223
> > > > >  Mobile: 0404 998 273
> > > > >
> > > >
> > > >
> > > > --
> > > > It is by the fortune of God that, in this country, we have three
> > > > benefits: freedom of speech, freedom of thought, and the wisdom never
> > >
> >
> >
>
>
> --
> "Come to the edge, he said. They said: We are afraid. Come to the
> edge, he said. They came. He pushed them and they flew."
>
>  Guillaume Apollinaire quotes
>
>
>
>
>


--
"Come to the edge, he said. They said: We are afraid. Come to the
edge, he said. They came. He pushed them and they flew."

 Guillaume Apollinaire quotes

--^----------------------------------------------------------------
This email was sent to: ${recipient}

EASY UNSUBSCRIBE click here: http://topica.com/u/?b1drHn.${encoded_sub_id}.${EMC}
Or send an email to: modelglue-unsubscribe@...

For Topica's complete suite of email marketing solutions visit:
http://www.topica.com/?p=TEXFOOTER
--^----------------------------------------------------------------

 « Return to Thread: How do you test your MG apps?

LightInTheBox - Buy quality products at wholesale price