[ 
https://issues.apache.org/jira/browse/STANBOL-910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13577966#comment-13577966
 ] 

Reto Bachmann-Gmür commented on STANBOL-910:
--------------------------------------------

- Refactored back to provide the LdRenderer service. 
- Extracted the MBW ViewableWriter to an own bundle preventing clients to 
transitively depend on freemarker. 
- Added missing dependencies to viewable-ldtemplate
- SImplified viewable-ldtemplate by using LdRenderer

What remains to be done:
I haven't yet renamed viewable-ldtemplate, it the scope remains the same it 
should be renamed to rdfviewable-writer. If we will add additional rendering 
mechanism for RdfViewable they will have to be added to that bundle. 

However I'd rather suggest to merge viewable-ldtemplate with viewable-writer. 
The rare case in which one can safe a dependency (to ldtemplate) seems to me 
seems not to justify the maintenance of two separate single class bundle. 
Especially since RdfViewable should be preferred over Viewable as the first 
promotes creation of semantic REST services while the latter tends to lead to a 
tied coupling of application logic and presentation
                
> Refactor Viewable and LDpath Freemaker Template rendering
> ---------------------------------------------------------
>
>                 Key: STANBOL-910
>                 URL: https://issues.apache.org/jira/browse/STANBOL-910
>             Project: Stanbol
>          Issue Type: Bug
>            Reporter: Rupert Westenthaler
>            Assignee: Rupert Westenthaler
>
> Currently the o.a.s.commons.web.viewable module depends on LDpath. A 
> dependency that is IMO unwanted.
> The reason for that is that all Stanbol JAX-RS and Web UI modules do depend 
> on Viewable to render the Web UI. Because of that all such modules depend 
> also on LDpath without actually using it.
> In addition the LdRenderer (in o.a.s.commons.ldpathtempate) does not only 
> care about rendering LDpath based templates but also includes the 
> functionality of loading Freemarker templates provided by OSGI bundles.
> The refactoring will:
> * provide a BundleTemplateLoader: An OSGI service that implements the 
> Freemaker TemplateLoader interface. This service will be part of the 
> o.a.s.commons.web.viewable module and replace the current LdRenderer.
> * move Viewable and RdfViewable to the correct package 
> (o.a.s.commons.web.viewable). Deprecated sub-classes are kept in the current 
> package (o.a.s.commons.viewable) for backward compatibility.
> * create a new o.a.s.commons.web.viewable.ldpath module that provide JAX-RS 
> writer for LDPath baesd Freemaker templates. This will also allow the 
> Viewable module to no longer depend on LDPath
> * small adaptions to the o.a.s.usermanagement as this directly used 
> LDRenderer. This adaptions will replace LDRenderer with the TemplateLoader 
> service and the LdViewableWirter provided by the 
> o.a.s.commons.web.viewable.ldpath module module
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to