From: Yaron K. <ya...@wi...> - 2013-08-09 13:06:37
|
Hi Josh, Let me say first of all that this seems like a misuse of properties. It looks like you're using properties strictly to make use of "Creates pages with form", i.e. so that pages will get created automatically with a form. But properties are supposed to provide information about the page they're called on, which doesn't seem to be the case here. Can't you store all this data in a more structured way? i.e., have "essay" pages that have an "author" field/property, etc.? Tied in with that is the idea of free-form annotation of properties - which is something you can do if you want, but Semantic Forms doesn't support it - even if you wrap each property tag in a template. -Yaron On Fri, Aug 9, 2013 at 5:04 AM, parkerjwik <jos...@ho...>wrote: > Hi, looking for some feedback on design pattern. Site has two basic types > of > pages: articles (content - unstructured/annotated bodies of text) and > topics > (containers for structured data) Topics have types, ie. property sets. And > articles link to topics. Topics then relate articles, by aggregating > references to given topic. So, couple of approaches considered, the first > rejected in favor of the second: > > 1. topics have single type, and articles look something like this: > > blah, blah [[person::joe]] wrote an essay, [[essay::fragglerock]] about ... > > Here, properties "person" and "essay" would automatically create topical > pages with there respective forms, via "creates pages with form" > metaproperty. Users can then edit topic pages later. The problem here is > that topics may have many types, eg. fragglerock is also a tv show(problem > of composition), joe is also an author(problem of inheritence/inference), > etc. (Note, this is not a just a name conflict problem that can be solved > with namespaces.) > > 2. topics have multiple types, and articles look something like this: > > blah, blah [[topic::joe]] wrote an essay, [[topic::fragglerock]] about... > > Here, topical pages are created and initially edited with a generic > form/template. it has a field/property type, which is gets one or more > values. Each value links to separate form to edit properties associated > with > that particular type. Still some issues with how exactly to handle > inheritence/inference, but multiple type problem is solved. > > The basic template pattern looks like this: (simplified for clarity) > > --------------------------------- > Some article > > blah, blah [[topic::joe]] wrote an essay, [[topic::fragglerock]] about... > > --------------------------------- > Property:Topic > > [[Creates pages with form::Topic]] > > --------------------------------- > Category:Topic > > [[Has default form::Topic]] > > --------------------------------- > Form:Topic > > {{{for template|Topic}}} > {| class="formtable" > {{{field > | type > | input type=dropdown > | values=Type A, Type B, Type C}}} > |} > {{{end template}}} > > --------------------------------- > Template:Topic > > {{#arraymap:{{{typ|}}}|,|x|{{add type|x|{{PAGENAME}}}} > }}<br> > [[Category:Topic]] > > --------------------------------- > Template:Add type > > {{#formlink:form={{{1}}} > |target={{{2}}} > |link text={{{1}}} > }} > > --------------------------------- > Form:Type A > > {{{for template|Type A}}} > {| class="formtable" > {{{field | X}}} > |} > {{{end template}}} > > --------------------------------- > Template:Type A > > [[X::{{{X|}}}]] > > --------------------------------- > Form:Type B > > {{{for template|Type B}}} > {| class="formtable" > {{{field | Y}}} > |} > {{{end template}}} > > --------------------------------- > Template:Type B > > [[Y::{{{Y|}}}]] > > --------------------------------- > > clear? good/reasonalble approach? better/alternative ways to acheive what i > am after? Thanks, Josh > > > > > -- > View this message in context: > http://wikimedia.7.x6.nabble.com/multiple-forms-for-single-page-a-good-way-to-implement-composition-and-inheritance-tp5010816.html > Sent from the Semantic Mediawiki - User mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Get 100% visibility into Java/.NET code with AppDynamics Lite! > It's a free troubleshooting tool designed for production. > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk > _______________________________________________ > Semediawiki-user mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semediawiki-user > -- WikiWorks · MediaWiki Consulting · http://wikiworks.com |