Bookmarkable URLs

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

Bookmarkable URLs

sergio_101

I am getting ready to start working in earnest on a blog for my radio show in Seaside. I have a few things I want to make sure I have worked out. 

What is the current state of bookmarkable URLs? How are people currently implementing them? While digging around on this, it seems hard to find current information on this. I want to be able to allow users to bookmark/share URLs and navigate to those URLs from shared links and google searches.

If this isn't worked out anywhere online, I would be happy to take any help from the list and make a proper blog posting about it.

Thanks!


----
peace,
sergio
photographer, journalist, visionary

Public Key: http://bit.ly/29z9fG0
#BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
http://www.codeandmusic.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Bookmarkable URLs

Paul DeBruicker
You have to make the urls and parse them yourself.  The way I do it is


WAAnchorTag>>bookmarkableUrl: aPath

self useBaseUrl;
      extraPath: aPathString


Then in a component where I want a bookmarkable url the component knows its
url & I set it with

html anchor
      bookmarkableUrl: self urlPath;
      callback: [self doSometing];
     with: 'do the thing'

I think the callback has to go after the #bookmarkableUrl: part but forget
for sure right now.

Then in my app's #initialRequest: method I parse the url to see if its for a
bookmarked thing and then do whatever that set of components need to render
and set them as the page to render.


I don't know how to make a general bookmarkable url facility in Seaside but
it would be nice to have.  But the above isn't too hard.  For your radio
show it could just parse


'shows/showId'
'artists/artistId/songId'
'year/month/day'

etc

And each show would know the 'shows/showId' path, each song would know the
song path and the date would know the date path.  

Or use Seaside-REST to do the parsing and rendering (instead of in
#initialRequest:) which is described in the  http://book.seaside.st site and
works great if you prefer it. But the bookmarkableUrl: will give someone
with a session a copy/paste-able url they can share that will get parsed.

Also use the cookie based session strategy rather than url based or else
people will be inadvertently sharing sessions. Do that with

|app|
app:=WAAdmin register: self asApplicationAt: self appName.
app preferenceAt: #trackingStrategy put:
WACookieIfSupportedSessionTrackingStrategy new

 

Hope this helps





sergio_101 wrote

> I am getting ready to start working in earnest on a blog for my radio show
> in Seaside. I have a few things I want to make sure I have worked out.
>
> What is the current state of bookmarkable URLs? How are people currently
> implementing them? While digging around on this, it seems hard to find
> current information on this. I want to be able to allow users to
> bookmark/share URLs and navigate to those URLs from shared links and
> google searches.
>
> If this isn't worked out anywhere online, I would be happy to take any
> help from the list and make a proper blog posting about it.
>
> Thanks!
>
>
> ----
> peace,
> sergio
> photographer, journalist, visionary
>
> Public Key: http://bit.ly/29z9fG0
> #BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
> http://www.codeandmusic.com
> http://www.twitter.com/sergio_101
> http://www.facebook.com/sergio101
>
>
> _______________________________________________
> seaside mailing list

> seaside@.squeakfoundation

> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
> signature.asc (849 bytes)
> <http://forum.world.st/attachment/5100517/0/signature.asc>





--
Sent from: http://forum.world.st/Seaside-General-f86180.html
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside