Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Perl & Templating for a mobile future.

by CountZero (Bishop)
on Jan 15, 2013 at 20:24 UTC ( #1013452=note: print w/ replies, xml ) Need Help??


in reply to Perl & Templating for a mobile future.

Just to open the discussion.

I see that many websites offer the "classical" site for the usual PC/laptop/netbook browsers at say "www.XYZ.com" and mobile devices optimized versions at "m.XYZ.com" or "mob.XYZ.com" or such. Is this due to lack of reliable browser recognition? Or is it lack of knowledge from their programmers and web-designers?

I have also seen sites that have a button saying something like "On a mobile device? Click here" and then you are shown a mobile device optimized web-page at the same URL (they probably store a cookie on your site to make sure to send you the right version). Again this makes me doubt the reliability of recognizing the kind of device you are using to view the website.

In theory, just switching the CSS might be sufficient to be able to switch between a "normal" and "mobile" version, but alas proper use of CSS is even less common than properly written HTML. CSS 2.1 has rules for different media types, one of which is "handheld".

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

My blog: Imperial Deltronics


Comment on Re: Perl & Templating for a mobile future.
Re^2: Perl & Templating for a mobile future.
by punch_card_don (Curate) on Jan 15, 2013 at 21:07 UTC
    I see that many websites offer the "classical" site for the usual PC/laptop/netbook browsers at say "www.XYZ.com" and mobile devices optimized versions at "m.XYZ.com" or "mob.XYZ.com" or such. Is this due to lack of reliable browser recognition? Or is it lack of knowledge from their programmers and web-designers?

    This is an old strategy. Rudimentary device/browser detection and two completely separate websites, one for pc and one for mobile. Nightmarish for content management - essentially two parllel sites to maintain. Plus, administrators would strip down the pc site for mobile, meaning mobile users got a crappy, incomplete version of the site.

    Objective today is to provide as close to the same content as possible on both. And to have as little duplication as possible. These were the objectives of approaches like Progressive Enhanvcement and Responsive Design. But those move sooooooo much processing to the client side. I'm already seeing articles announcing the death of Progressive Enhancement.

    I figure a good compromise that optimizes the balance between the solid footing of server-side processing, minimal duplication, and unlimited custom formatting for devices is good old Templating and dynamic generation. Serve it all prep'd and don't rely on the device too much.

    But, then sniffing is key.

    Or - the Perl world has developed a much better idea, and I'd looooove to read about it.




    Time flies like an arrow. Fruit flies like a banana.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1013452]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (14)
As of 2014-10-21 12:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (103 votes), past polls