Re: Multi Step Search

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Multi Step Search

fr33dom

has anyone done anything similar to this in Cake before? or any other
application?

If the question is seen to be more of a generic one then fair enough.
but if anyone knew of a method within CakePHP to display a processing
screen while PHP performs a function behind the scenes it would be
much appreciated.

even a nudge in the right direction...

thanks,
mikee

On 29/10/06, Mikee Freedom <[hidden email]> wrote:

> hey bingo,
>
> had a look at it and it was useful in a way. however it seems the
> multi step was more in processing the data rather than any kind of
> display to the user. i've got a handle on how i am searching for the
> data and it is using the very handy findAll method with some creative
> use of bindModel, unbindModel and conditions.
>
> however, when my DB grows i think the request to the DB could take
> some time, and then i process the results at the controller /
> component level which will again soak up milliseconds.
>
> what i would like is the ability to display an intermediate screen
> while this processing goes on behind the scenes. i didn't really see
> mention of such functionality in that discussion.
>
> does this make sense?
>
> thanks for your help on this one.
>
> cheers,
> mikee
>
> On 29/10/06, bingo <[hidden email]> wrote:
> >
> > hi Mikee,
> >
> > read this post...this might give you some ideas
> > http://groups.google.com/group/cake-php/browse_thread/thread/c33b78642ee9d395/#
> >
> > Cheers
> > bingo
> >
> >
> > > >
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Multi Step Search

AD7six

Hi Mikee,

Here's one approach:
User submits form via ajax
using Js you display a "processing" message
Controller action processes the form and redirects* the user to the url

Here's another:
User submits the form normally
User is redirected to the url for their search results
--> If js is disabled, after rendering the results page for the first
time, process and cache the results page
--> If js is disabled after a sufficient number of seconds redirect to
the same url and display the results

--> If js is enabled on loading make an ajax request to process and
cache the results page - updating the contents of your page.

The results in all cases would be pretty similar, for the latter you
would need to sniff a little to know if js is enabled (could simply use
js to change a value in the submitted form).

* To 'redirect' from an ajax call you would use requestAction.

HTH,

AD7six
Please note:
The manual/bakery is a good place to start any quest for info.
The cake search (at the time of writing) erroneously reports less/no
results for the google group.
The wiki may contain incorrect info - read at your own risk (it's
mainly user submitted) :)
You may get your answer quicker by asking on the IRC Channel (you can
access it with just a browser here: http://irc.cakephp.org).

On Oct 30, 6:18 am, "Mikee Freedom" <[hidden email]> wrote:

> has anyone done anything similar to this in Cake before? or any other
> application?
>
> If the question is seen to be more of a generic one then fair enough.
> but if anyone knew of a method within CakePHP to display a processing
> screen while PHP performs a function behind the scenes it would be
> much appreciated.
>
> even a nudge in the right direction...
>
> thanks,
> mikee
>
> On 29/10/06, Mikee Freedom <[hidden email]> wrote:
>
> > hey bingo,
>
> > had a look at it and it was useful in a way. however it seems the
> > multi step was more in processing the data rather than any kind of
> > display to the user. i've got a handle on how i am searching for the
> > data and it is using the very handy findAll method with some creative
> > use of bindModel, unbindModel and conditions.
>
> > however, when my DB grows i think the request to the DB could take
> > some time, and then i process the results at the controller /
> > component level which will again soak up milliseconds.
>
> > what i would like is the ability to display an intermediate screen
> > while this processing goes on behind the scenes. i didn't really see
> > mention of such functionality in that discussion.
>
> > does this make sense?
>
> > thanks for your help on this one.
>
> > cheers,
> > mikee
>
> > On 29/10/06, bingo <[hidden email]> wrote:
>
> > > hi Mikee,
>
> > > read this post...this might give you some ideas
> > >http://groups.google.com/group/cake-php/browse_thread/thread/c33b7864...
>
> > > Cheers
> > > bingo


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Multi Step Search

bingo-2

hi Mikee and AD7six,

Actually I am also struggling with the same issue...i haven't found a
solution that I can easily implement...and also my courses are keeping
me busy to really try anything new...
...but another solution that I am trying to work on is using data live
grid ...Rico provides a data live grid...but it requires data to be in
XSLT format...on RSSsoft's blog you will find on how to convert data
into xslt...

One more simple solutuion would be to implement pagination....I was
able to get pagination working with my complex query...see the post
http://groups.google.com/group/cake-php/browse_thread/thread/c33b78642ee9d395/#

AD7six...are you aware of any sample implementation of rico's live grid
using cakephp...

Regards,
bingo


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Multi Step Search

fr33dom
In reply to this post by AD7six

Hey AD7six,

Thanks for your response, I would love to play around with Ajax but
for the moment I haven't the time to get my head around it. I would
like it to work in a non-JS environment anyway so am looking to start
there and I will ajaxify later on.

So, based on your non-JS answer:

> --> If js is disabled, after rendering the results page for the first
> time, process and cache the results page
> --> If js is disabled after a sufficient number of seconds redirect to
> the same url and display the results

The part I'm not quite clear on, is how do I render the results page
the first time (prior to processing) and then go about processing the
query and the second phase results page??

I know that might seem like a completely idiotic question but...

At the moment, I store the request in the session, render the action,
and then carry on with the processing after the render call. My
question is, will this first results page display on the user's screen
immediately and then the controller carry on with the processing
behind the scenes. or will it not appear until the processing is
complete? using $controller->render() that is.

or am i being daft?

thanks again mate,
mikee

On 30/10/06, AD7six <[hidden email]> wrote:

>
> Hi Mikee,
>
> Here's one approach:
> User submits form via ajax
> using Js you display a "processing" message
> Controller action processes the form and redirects* the user to the url
>
> Here's another:
> User submits the form normally
> User is redirected to the url for their search results
> --> If js is disabled, after rendering the results page for the first
> time, process and cache the results page
> --> If js is disabled after a sufficient number of seconds redirect to
> the same url and display the results
>
> --> If js is enabled on loading make an ajax request to process and
> cache the results page - updating the contents of your page.
>
> The results in all cases would be pretty similar, for the latter you
> would need to sniff a little to know if js is enabled (could simply use
> js to change a value in the submitted form).
>
> * To 'redirect' from an ajax call you would use requestAction.
>
> HTH,
>
> AD7six
> Please note:
> The manual/bakery is a good place to start any quest for info.
> The cake search (at the time of writing) erroneously reports less/no
> results for the google group.
> The wiki may contain incorrect info - read at your own risk (it's
> mainly user submitted) :)
> You may get your answer quicker by asking on the IRC Channel (you can
> access it with just a browser here: http://irc.cakephp.org).
>
> On Oct 30, 6:18 am, "Mikee Freedom" <[hidden email]> wrote:
> > has anyone done anything similar to this in Cake before? or any other
> > application?
> >
> > If the question is seen to be more of a generic one then fair enough.
> > but if anyone knew of a method within CakePHP to display a processing
> > screen while PHP performs a function behind the scenes it would be
> > much appreciated.
> >
> > even a nudge in the right direction...
> >
> > thanks,
> > mikee
> >
> > On 29/10/06, Mikee Freedom <[hidden email]> wrote:
> >
> > > hey bingo,
> >
> > > had a look at it and it was useful in a way. however it seems the
> > > multi step was more in processing the data rather than any kind of
> > > display to the user. i've got a handle on how i am searching for the
> > > data and it is using the very handy findAll method with some creative
> > > use of bindModel, unbindModel and conditions.
> >
> > > however, when my DB grows i think the request to the DB could take
> > > some time, and then i process the results at the controller /
> > > component level which will again soak up milliseconds.
> >
> > > what i would like is the ability to display an intermediate screen
> > > while this processing goes on behind the scenes. i didn't really see
> > > mention of such functionality in that discussion.
> >
> > > does this make sense?
> >
> > > thanks for your help on this one.
> >
> > > cheers,
> > > mikee
> >
> > > On 29/10/06, bingo <[hidden email]> wrote:
> >
> > > > hi Mikee,
> >
> > > > read this post...this might give you some ideas
> > > >http://groups.google.com/group/cake-php/browse_thread/thread/c33b7864...
> >
> > > > Cheers
> > > > bingo
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Multi Step Search

fr33dom

ok, I've thrown something together in the end. don't know if it is the
best method but it works for the time being. maybe someone else might
find it useful, or refine it.

1. search terms entered, search button clicked by user
2. search terms recorded to session
3. "Currently Processing" view output to users screen which includes a
hidden iframe
4. within iframe the processing action is called
5. once this action has completed it's work it outputs a simple
javascript call to reload the top frame
6. top frame outputs the returned search results.

I've also put a refresh on the top frame after a sufficient number of
seconds as a fail safe to the javascript call.

until i spend some quality time with ajax, this is what i'm going to
run with for now.

thanks again for the help fellas, much appreciated :)

cheers,
mikee

On 30/10/06, Mikee Freedom <[hidden email]> wrote:

> Hey AD7six,
>
> Thanks for your response, I would love to play around with Ajax but
> for the moment I haven't the time to get my head around it. I would
> like it to work in a non-JS environment anyway so am looking to start
> there and I will ajaxify later on.
>
> So, based on your non-JS answer:
>
> > --> If js is disabled, after rendering the results page for the first
> > time, process and cache the results page
> > --> If js is disabled after a sufficient number of seconds redirect to
> > the same url and display the results
>
> The part I'm not quite clear on, is how do I render the results page
> the first time (prior to processing) and then go about processing the
> query and the second phase results page??
>
> I know that might seem like a completely idiotic question but...
>
> At the moment, I store the request in the session, render the action,
> and then carry on with the processing after the render call. My
> question is, will this first results page display on the user's screen
> immediately and then the controller carry on with the processing
> behind the scenes. or will it not appear until the processing is
> complete? using $controller->render() that is.
>
> or am i being daft?
>
> thanks again mate,
> mikee
>
> On 30/10/06, AD7six <[hidden email]> wrote:
> >
> > Hi Mikee,
> >
> > Here's one approach:
> > User submits form via ajax
> > using Js you display a "processing" message
> > Controller action processes the form and redirects* the user to the url
> >
> > Here's another:
> > User submits the form normally
> > User is redirected to the url for their search results
> > --> If js is disabled, after rendering the results page for the first
> > time, process and cache the results page
> > --> If js is disabled after a sufficient number of seconds redirect to
> > the same url and display the results
> >
> > --> If js is enabled on loading make an ajax request to process and
> > cache the results page - updating the contents of your page.
> >
> > The results in all cases would be pretty similar, for the latter you
> > would need to sniff a little to know if js is enabled (could simply use
> > js to change a value in the submitted form).
> >
> > * To 'redirect' from an ajax call you would use requestAction.
> >
> > HTH,
> >
> > AD7six
> > Please note:
> > The manual/bakery is a good place to start any quest for info.
> > The cake search (at the time of writing) erroneously reports less/no
> > results for the google group.
> > The wiki may contain incorrect info - read at your own risk (it's
> > mainly user submitted) :)
> > You may get your answer quicker by asking on the IRC Channel (you can
> > access it with just a browser here: http://irc.cakephp.org).
> >
> > On Oct 30, 6:18 am, "Mikee Freedom" <[hidden email]> wrote:
> > > has anyone done anything similar to this in Cake before? or any other
> > > application?
> > >
> > > If the question is seen to be more of a generic one then fair enough.
> > > but if anyone knew of a method within CakePHP to display a processing
> > > screen while PHP performs a function behind the scenes it would be
> > > much appreciated.
> > >
> > > even a nudge in the right direction...
> > >
> > > thanks,
> > > mikee
> > >
> > > On 29/10/06, Mikee Freedom <[hidden email]> wrote:
> > >
> > > > hey bingo,
> > >
> > > > had a look at it and it was useful in a way. however it seems the
> > > > multi step was more in processing the data rather than any kind of
> > > > display to the user. i've got a handle on how i am searching for the
> > > > data and it is using the very handy findAll method with some creative
> > > > use of bindModel, unbindModel and conditions.
> > >
> > > > however, when my DB grows i think the request to the DB could take
> > > > some time, and then i process the results at the controller /
> > > > component level which will again soak up milliseconds.
> > >
> > > > what i would like is the ability to display an intermediate screen
> > > > while this processing goes on behind the scenes. i didn't really see
> > > > mention of such functionality in that discussion.
> > >
> > > > does this make sense?
> > >
> > > > thanks for your help on this one.
> > >
> > > > cheers,
> > > > mikee
> > >
> > > > On 29/10/06, bingo <[hidden email]> wrote:
> > >
> > > > > hi Mikee,
> > >
> > > > > read this post...this might give you some ideas
> > > > >http://groups.google.com/group/cake-php/browse_thread/thread/c33b7864...
> > >
> > > > > Cheers
> > > > > bingo
> >
> >
> > > >
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---