Re: relationship of sitemap and dispatch

48 views
Skip to first unread message

Matt Farmer

unread,
May 22, 2013, 11:14:28 PM5/22/13
to lif...@googlegroups.com
Hi there! There is indeed some overlap in the service they provide, but I'm confused as to what you mean by "main functions" of Sitemap? Are you asking how to use a DispatchPF or something else? Could you clarify what you're looking for?

Cheers!

On Wednesday, May 22, 2013 5:34:31 PM UTC-4, ti com wrote:
hi, i've been using lift for a little while. i want to know if there is overlap between dispatch and menu. like, what would it take to do the main functions of sitemap directly as a stateful dispatch partial function.

Rohit Pathak

unread,
May 23, 2013, 2:58:31 PM5/23/13
to lif...@googlegroups.com
Here is how it goes:

1. First lift checks if request is to be dealt with Stateless dispatch. If yes then serves immediately, else it moves on to point 2.
2. It checks if request is to be dealt with State-full dispatch, if yes then serves it in that particular fashion, else moves on to point 3.
3. Checks whether this request is a Comet/Ajax request. If yes then handles with Comet/Ajax handlers, else moves on to point 4.
4. Checks SiteMap to see if the request is valid or not. If yes then moves on else gives a 404 not found response.

Let me know if its still unclear.

David Pollak

unread,
May 23, 2013, 4:11:22 PM5/23/13
to liftweb
Thanks for the concise description of Lift's request handling order.

To the OP: The way SiteMap entries are handled are a special case of Lift's generic Request => Response handling. The special case is oriented to HTML page delivery where the other mechanisms (other than ajax/comet) are more generic ways of delivering pages.

Is it possible to extract a PartialFunction[Req, () => Box[LiftResponse]) out of SiteMap for composition elsewhere? Not to my knowledge... but if there's a use case for it, I can see that it'd be a nifty little feature.


--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
 
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Telegram, Simply Beautiful CMS https://telegr.am
Lift, the simply functional web framework http://liftweb.net

Jeppe Nejsum Madsen

unread,
May 24, 2013, 3:15:17 AM5/24/13
to lif...@googlegroups.com

Or check out the wiki:

https://www.assembla.com/wiki/show/liftweb/HTTP_Pipeline

/Jeppe
> --

ti com

unread,
May 28, 2013, 6:31:19 AM5/28/13
to lif...@googlegroups.com
wow thanks everyone. wow that pipeline looks scary ;)

basically we were thinking of making a differen sitemap, is it possible and how hard is it.



David Pollak

unread,
May 28, 2013, 12:46:55 PM5/28/13
to liftweb
The SiteMap is fixed at compile-time. You cannot change it. You should not change it.
--
Telegram, Simply Beautiful CMS https://telegr.am
Lift, the simply functional web framework http://liftweb.net
Reply all
Reply to author
Forward
0 new messages