Earlier today I decided that it would be useful to have some simple query access to the Media Search application I posted recently; the following urls will now show useful results:
http://www.cincomsmalltalk.com/MediaSearch/MediaSearch.html?q=cloud
That will do a keyword search (across titles and content) for the audio and video content on our site. This one:
http://www.cincomsmalltalk.com/MediaSearch/MediaSearch.html?tag=cloud
will do a tag search (like clicking on a tag within the app)
As it happens, adding those kinds of public urls for a Web Velocity (Seaside) app is an easy thing. In my component, I added this method:
initialRequest: aRequest
super initialRequest: aRequest.
aRequest at: 'q' ifPresent: [:searchString |
self setupSearchQueryFor: searchString].
aRequest at: 'tag' ifPresent: [:tagString |
self setupTagSearchFor: tagString]
And that makes those urls public - which means that you can use them easily in any non-Seaside app - for instance, you can hook up a stock search field using a servlet to hit those urls.
Technorati Tags:
smalltalk, webvelocity