Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

comment on

( #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 with a screen width of 480px -- you can suggest (and remember, don't keep asking) they switch to or 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

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

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

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

    How do I use this? | Other CB clients
    Other Users?
    Others surveying the Monastery: (3)
    As of 2019-02-17 09:40 GMT
    Find Nodes?
      Voting Booth?
      I use postfix dereferencing ...

      Results (96 votes). Check out past polls.