[ 
http://opensource.atlassian.com/projects/roller/browse/ROL-1444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_13814
 ] 

Dolan Halbrook commented on ROL-1444:
-------------------------------------

One more thing to consider:

I've been using Spring MVC a lot and it allows you to easily merge content-type 
and view technology into a bundle.  This way you don't have the extra logic of 
determining this in the servlet.  

For example, you might define a base view like:

<bean id="vel-parent" abstract="true" abstract="true"
          
class="org.springframework.web.servlet.view.velocity.VelocityToolboxView">
        <property name="contentType" value="text/html"/>
        <property name="toolboxConfigLocation" 
value="/WEB-INF/velocity/toolbox.xml"/>
    </bean>

but you could easily create "feed " views like:

<bean id="sonDetail" parent="vel-parent">
        <property name="contentType" value="text/javascript"/>
        <property name="url" value="/views/html/jsonDetail.vm"/>
    </bean>

    <bean id="xmlDetail" parent="vel-parent">
        <property name="contentType" value="text/xml"/>
        <property name="url" value="/views/html/xmlDetail.vm"/>
    </bean>


However, i'm not sure how much Spring is welcome in the Roller project, not to 
mention Spring MVC.  I'm a big fan, but I understand it other methods are 
preferred.



> Output JSON from FeedServlet
> ----------------------------
>
>                 Key: ROL-1444
>                 URL: 
> http://opensource.atlassian.com/projects/roller/browse/ROL-1444
>             Project: Roller
>          Issue Type: Improvement
>          Components: Newsfeed Syndication
>    Affects Versions: 3.1.1, 3.2
>         Environment: n/a
>            Reporter: Dolan Halbrook
>            Assignee: Roller Unassigned
>
> It would be useful to me to have a JSON view of the feeds generated from 
> FeedServlet.  I'd be willing to do the work to make this happen and donate it 
> back, but as it is to make this happen I'd have to sublcass virtually all of 
> the FeedServlet and I'm trying to avoid too much customization -- it would be 
> much nicer to roll this back into Roller.
> Basically as I see it this would involve modifying the FeedServlet and 
> creating several .vm files (such as weblog-entries-json.vm) for the JSON 
> views.  Not sure how to handle the XSLT view yet.
> Does anyone see any good reason not to do this?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://opensource.atlassian.com/projects/roller/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to