I have recently decided I really like the Everything Engine, really really like...

But then I thought, what if I have to be able to display my Everything-based website on a mobile phone...

Here I got stuck.

I decided to look into Everything and see how much I could separate the presentation layer. The docs lead me to test with the Chatterbox like this:
#!/usr/bin/perl use Everything; initEverything('DATABASE') or die "Couldn't connect to database!\n"; my $node = getNodeById(287) or die "Can't get chatterbox node!\n"; my $nl = updateNodelet($node); # insertNodelet didn't work either print $nl;
Well that didn't work because the chatterbox calls to $USER and makes some other function calls which aren't in the namespace.

So reading the documentation I see that I can create $USER from EVERYTHING::HTML and also access the updateNodelet and insertNodelet functions but...

Ok this starts to get convoluted, so here's the question:

I see that PerlMonks now has the option to view a node in XML mode, I would be so ridiculously happy to write some code like this:
# filename = displayInMobilePhone.cgi use Everything; $chatter = getNode('chatterbox'); $loggedUsers = getNode('other users'); $chatter->makeXML; $loggedUsers->makeXML; ...other stuff... use Template; use XML::Simple; # or your personal choice $display = new Template(...); $xml = new XML::Simple(...); $chatterDATA = $xml->XMLin($chatter->{XML}); $usersDATA = $xml->XMLin($loggedUsers->{XML}); $display->parse('mobile.template', {chatter => $chatterDATA, users => +$usersDATA}); ....ta-da done!!!!!
Can I do this?

Please....?

Tosh

In reply to Life, the Universe, and an Everything question by tosh

Title:
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, details, 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, summary, 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.