On Wed, Sep 2, 2009 at 4:36 PM, Alfie
Kirkpatrick<alfie.kirkpatr...@ioko.com> wrote:
> While I don't have a lot of experience in this I agree that different
> devices have wildly different CSS and Javascript support and simple CSS
> adaptation will rarely be enough, but a component could adapt its markup
> for different devices in some scenarios.
>
> I had the same thought amount a similar approach to localization using
> tml names. Did you look into this? I think there may be a lot of issues
> due to page caching in T5 and other subtleties. For example, using the
> API you can locate a specific block in a page by name. How would it know
> which tml to use in this case?

Actually, this has been around since Tapestry 1.0.  You can have
Index.tml, Index_fr.tml, Index_de.tml and Tapestry will select the
correct one.  When it builds a page, it builds it for a particular
page class and localization of the page.

>
> So I think T5 helps separate concerns and assists in building
> multi-device apps (ie. it's a decent framework to do this in), but the
> framework itself could do more if this becomes something many web
> developers end up having to build for in future.

It adds a complicated dimension to an already complicated framework.
Tapestry 4 sunk under the weight of too many options making impossible
for tools, developers (and even committers!) to know what the correct
behavior would be under many circumstances!  I want to avoid that, but
I understand the need for "skinning" the application. Still, the right
way today is probably multiple pages (perhaps in different folders)
for different UIs, or completely seperate applications (sharing common
libraries for entities, database access, common logic, etc.).


>
> Regards, Alfie.
>
> -----Original Message-----
> From: Carl Crowder [mailto:carl.crow...@taptu.com]
> Sent: 02 September 2009 22:36
> To: Tapestry users
> Subject: Re: Supporting multiple devices, eg. browser + mobile + TV
>
> Thiago H. de Paula Figueiredo wrote:
>> Em Wed, 02 Sep 2009 18:10:56 -0300, Alfie Kirkpatrick
>> <alfie.kirkpatr...@ioko.com> escreveu:
>>
>>> Am wondering about ways to support this scenario cleanly in T5, where
>>> visual layout is very different per device but the page classes could
> be
>>> quite similar (clearly this depends to a large extent on whether
> devices
>>> have radically different page flows and layouts).
>>
>> CSS solves most of the solution. Take a look at media queries
>> (http://www.w3.org/TR/css3-mediaqueries/).
>> Regarding Tapestry itself, for issues that can't be solved by using
> CSS
>> itself, I would take advantage of the layout component pattern (some
>> parts of the template could be omitted or replaced) and having a
> service
>> and a component to tell me what kind of device did the request.
>
> This really isn't true unless you only support more modern phones. We do
>
> a similar thing and we've steered away from Tapestry to support lower
> end phones because they all have their own crap browser with their own
> stupid CSS misinterpretations.
>
> We have a list as long as your arm of idiotic things blackberry browsers
> do.
>
> I once tried to work out how best to do this. My main ideas were
> something similar to localisation where we had a "Home_nokia.tml" type
> thing. Also, overriding MarkupWriter to write DIVs with a certain class
> instead of P tags.
>
> I still believe Tapestry is the best framework to do it in based on the
> few I've encountered. It's something that is so fiddly for the crappier
> phones that however you choose to do it will be a pain in the arse.
>
> Alfie: let me know how you get on. We may be trying something similar in
>
> the future.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to