Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Semantic, modern mark-up. Text::Xslate is about a bazillion times faster than TT2 and is extensible and speaks TT pretty well if you like that syntax. Small, semantic bites of templates so that content is not required to be in large batches but can included or not in the batch size that's relevant or in the user prefs for that matter. (mem)Caching for output (where they don't contain logged-in/user-specific data). DO NOT detect browsers! It was always a mistake and will always be a mistake because it ties your code to the minor version changes of 4–10 browsers. Detect capabilities (see modernizr for example)--exploit known problems in CSS parsing and such--and suggest options when discovered. Someone comes to example.com with a screen width of 480px -- you can suggest (and remember, don't keep asking) they switch to example.mobi or m.expample.com or whatever and let them choose.

It's a mistake to attempt to use client side hacking to fix the site. Phones and pads are fast now yes, but not so fast that they need 1,000 times the download bits to use the 10% of relevant markup and includes and that bandwidth generally costs a lot more on mobile. Run apps on Plack + uWSGI. Because you mentioned LAMP: Not apache, probably nginx. Not MySQL, probably Pg and client side storage/SQLite where relevant. And maybe not even Linux. Just saying, OpenBSD and OpenIndiana and others exist. Think about your particular problem space and what ongoing sysadmin overhead will look like and what the history of support and bugfixing/security has been before you shop for an operating system.

There was an excellent write-up somewhere about how github does content with object caching and fetching and generation but I can't find it. :\

Have fun! You're actually in a really lucky, if confusing and maddeningly open, place right now. Tests will save you from your own design mistakes as much as code mistakes too. Get them in as soon as specs are done. Costs 2x up front but will save... who knows? 100x during the life of any app that outlasts its creators.

Update: PhoneGap and friends will make a full on mobile app (with access to the hardware) pretty easy if you do the content (html/JS) stuff right.


In reply to Re: Perl & Templating for a mobile future. by Your Mother
in thread Perl & Templating for a mobile future. by punch_card_don

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (5)
As of 2024-04-25 08:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found