On Sat, Mar 26, 2011 at 7:24 AM, shelan Perera <[email protected]> wrote:
> Hi Devs,
> I was looking at the existing way of implementing new templates.Most of the
> current implementation is focused on adding a new template to display the
> articles and blog content (And also weblog related
> data.)using velocity scripts. It does not provide the ability to change the
> content editor interface.( Which includes adding new post , bookmark etc.)
> As i understood the current implementation is /roller-ui/authoring/editors.
> So i would like to know about the reusablilty of that for the HTML5 content
> editor.Specially an API which i can access through HTML5 as it is used with
> velocity scripts in the standard template implementation.Is the current
> implementation support for a custom editor to reuse?
> Thanks.

True, you cannot change the Roller editor via Velocity scripts.

There are two parts to Roller's UI:

1) Blog Editor and Admin UI - this is located at /roller-ui and is
implemented using Struts2 actions and JSP pages with the Struts2 tags.

2) Weblog Pages and Feeds - this is implemented as a Request Mapper, a
set of Servlets, Velocity templates, and infrastructure for running
Velocity templates.

To implement a mobile-friendly Blog Editor and Admin UI, you'll want to:
a) decide on the right subset of Roller features to make available.
You don't have time to rewrite the whole UI, so pick the most
important parts. That probably means posting/editing blogs and,
possibly uploading photos.
b) decide how to implement the Blog Editor and Admin UI. How does a
user get to the mobile interface, e.g. a special URL, perhaps? How
should the interface be implemented, e.g. Struts2 on server-side plus
Dojo on client side?

To implement a mobile-friendly themes for the Blog/Pages part of the
Roller, you'll want to decide when to show mobile version of a blog
page, e.g. use HTTP User Agent to determine if request comes from
mobile device. Might also want to allow user to opt for "full version"
of a blog, and save their preference in a cookie.

You also want to decide how a theme knows to provide mobile content.
One way to do this would be to add a method to one of the theme
objects to tell the theme that it is mobile. Each theme page could
then include logic to show the right content. Another, possibly better
way, would be to allow a theme to specify not only Weblog, Entry,
Search Index and TagsIndex pages, but also Mobile-Weblog,
Mobile-Entry, Mobile-Search-Index and etc.

After writing all that, I think both Editor/Admin UI and Blog/Feeds
theme this might be too much work for one GSOC project. You might want
to focus on either Blog/Editor UI or Blog/Feed pages. I'd recommend
Blog/Feed themes. I think its more important for Roller to be able to
show blogs to readers on mobile devices than it is to enable Roller
authors to write on mobile devices.

To put tother a proposal, you'll have to study how the RequestMapper
and associated Servlets work now to present a weblog via its theme and
proposed how to enable a blog to have a theme that shows full sized
pages for regular browsers and alternative pages for small devices.

Hope that helps...

- Dave





> On Tue, Mar 22, 2011 at 11:12 PM, shelan Perera <[email protected]> wrote:
>>
>> Hi All,
>> Sorry for being late in responding and i am back after my university
>> exams.:)
>>
>>>
>>> The problem, I believe, is that Roller does provide a way for a theme
>>> to detect that a request is coming from a mobile device and offer
>>> small format pages. There are probably a variety of ways to address
>>> this.
>>>
>>> One way, for example, would be to allow a theme to offer small format
>>> pages for the key theme "action" pages of Weblog, Entry, Day, Search
>>> Index and Tags Index. Roller's request mapper would detect that a
>>> theme comes from a small device and would call those pages instead of
>>> the built in pages.
>>>
>>> Another way would be to give themes a way to detect a mobile device
>>> and a way to forward to mobile theme pages. If a theme can detect that
>>> the request comes from a mobile device, it could use logic inside
>>> pages to change the appearance of the theme.
>>>
>>> I think I like the first idea better. What do others think? What's the
>>> best way to handle mobile themes? Maybe we should look at Wordpress
>>> and Drupal to see how they handle this.
>>>
>>> Either way, it would be nice to offer users a way to opt for the
>>> mobile or non-mobile theme. Sometimes users on mobile devices like to
>>> use the full-size theme.
>>
>> I also agree with the option to let the user to choose the template.We
>> need to check two things before we switch.
>> 1)Is it a mobile browser agent 2)Is that browser html5 ready? (at least
>> for the moment since some of the browsers does not provide full
>> functionalities of html5.)
>> In wordpress there are plugins which assist the task such as
>> mobipress[1].In Joomla most of the template providers target IPhone and Ipod
>> and offer a feature to admin so template render accordingly. Another thing i
>> have seen on some mobile browsers is ,we can give the browser agent mode
>> (Desktop / Mobile).So when mobile user agent is enabled at the browser
>> option level it first check whether there is a mobile version available for
>> the requested site.If so it will pick that.
>> In roller there is a way to add templates.What would be the possible
>> changes to the way it was done before.I feel that there is a requirement of
>> a separate rendering module for this.But i will more in the code and try to
>> understand how it behaves etc.
>>
>> Thanks
>> [1] http://mobilepress.co.za/
>>>
>>> Thanks,
>>> - Dave
>>>
>>>
>>>
>>> > In the mobile editing interface using html5 would be create , edit
>>> > drafts
>>> > and posts would be implemented and would be designed for convenient
>>> > experience.I have some understanding that it should be optimized for
>>> > user
>>> > interactions with touch input.
>>> >
>>> > HTML has capabilities such as,
>>> >
>>> > Client side database , Application cache, Geo Location etc, Most of the
>>> > features leverage its capability of offline features which could
>>> > be beneficial vastly in Roller like blogger applications where users
>>> > tend to
>>> > read , edit content.
>>> >
>>> > I would like to get some help , feedbacks and suggestions from the
>>> > community
>>> > to nourish the idea and make it more useful for roller.
>>> >
>>> > Thank you
>>> >
>>> > --
>>> > Shelan Perera
>>> >
>>> > Home: http://www.shelan.org
>>> > Blog   : http://www.shelanlk.com
>>> > Twitter: shelan
>>> > skype  :shelan.perera
>>> > gtalk   :shelanrc
>>> >
>>> >  I am the master of my fate:
>>> >  I am the captain of my soul.
>>> >         *invictus*
>>> >
>>
>>
>>
>> --
>> Shelan Perera
>> Home: http://www.shelan.org
>> Blog   : http://www.shelanlk.com
>> Twitter: shelan
>> skype  :shelan.perera
>> gtalk   :shelanrc
>>
>>  I am the master of my fate:
>>  I am the captain of my soul.
>>          *invictus*
>>
>>
>>
>>
>>
>>
>>
>
>
>
> --
> Shelan Perera
> Home: http://www.shelan.org
> Blog   : http://www.shelanlk.com
> Twitter: shelan
> skype  :shelan.perera
> gtalk   :shelanrc
>
>  I am the master of my fate:
>  I am the captain of my soul.
>          *invictus*
>
>
>
>
>
>
>
>

Reply via email to