Talk:Ideas on RDF Web Applications
From n² wiki
Wrote this page ages ago, ended up writing my own home-brew framework. Here's what I don't like about it now, and how it could be better:
- User's Request data isn't bundled up cleanly - it's just passed in to the controller object. Should be kept separate
- conneg should be better - should have a system of fallback mimetypes for file extensions, not just one.
- Data retrieval should be separated more from the controller. It should be more of a filter process. I thought of putting in hooks for before_render filters etc, like rails et al, but really it should be more like a chain series of data fetchers, like unix pipes or jquery, with a DataFetcher able to use the data from the previous DataFetcher to construct queries, make remote requests, etc, before passing the data finally rendering the appropriate template, based on url params and conneg
<code>
switch($Request->method):
case 'GET':
switch($Request->uri):
case ('/Res/*'):
return $Response->TalisFetch('silkworm', 'cbd')->TalisFetch('schema-cache', 'rdfs:labels')->DBPediaFetch('foaf:homepage','augment')->render($template);
break;
endswitch;
break;
case 'POST':
switch($Request->uri):
case ('/Res/*'):
return $Response->POSTFetch()->SilkwormCollectionFilter()->TalisSendChange('silkworm','versioned')->render($template);
break;
endswitch;
break;
default:
throw new HTTPResponseException('405');
break;
endswitch;
</code>
--Keithalexander 13:54, 22 February 2008 (UTC)

