{"id":51654,"date":"2021-02-11T03:01:47","date_gmt":"2021-02-10T17:01:47","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=51654"},"modified":"2021-02-11T18:59:11","modified_gmt":"2021-02-11T08:59:11","slug":"appml-acronyms-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/appml-acronyms-tutorial\/","title":{"rendered":"AppML Acronyms Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/JSON\/Acronym\/index.htm\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"AppML Acronyms Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/JSON\/Acronym\/acronym_appml.jpg\" title=\"AppML Acronyms Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">AppML Acronyms Tutorial<\/p><\/div>\n<p>After yesterday&#8217;s <a title='AppML Primer Tutorial' href='#amlpt'>AppML Primer Tutorial<\/a> we went looking for an apt inhouse web application that allows an interface to these new AppML framework concepts.  Do you remember <a target=_blank href='https:\/\/www.rjmprogramming.com.au\/ITblog\/acronyms-lookup-wikipedia-tutorial\/' title='Acronyms Lookup Wikipedia Tutorial'>Acronyms Lookup Wikipedia Tutorial<\/a>?<\/p>\n<p>We first thought we&#8217;d be working in the client half of this web application but found it was much better to just add a new input element (ie. textbox) placeholder, just, here, and do the bulk of the changes needed in the serverside PHP that is Ajax called from the client HTML.<\/p>\n<p>What most pointed us in the right direction here, with the code, was <a target=_blank href='http:\/\/webdevable.com\/w3schools\/appml\/appml_data.html' title='AppML Data'>AppML Data<\/a> whereby that &#8220;<font color=blue>customers.js<\/font>&#8221; web server JSON file arrangement of yesterday, can be localized via PHP (where $pageContent is JSON results for acronym query from third parties, thanks and $appml is true for user flagging they want the AppML output report look) &#8230;<\/p>\n<p>&lt;?php<br \/>\n<code><br \/>\n if ($appml) {<br \/>\n   $mytitle=$selname;   \/\/ incoming acronym to look up<br \/>\n<br \/>\n   $aml=\"&lt;!DOCTYPE html&gt;<br \/>\n&lt;html lang=\\\"en-US\\\"&gt;<br \/>\n&lt;link rel=\\\"stylesheet\\\" href=\\\"style.css\\\"&gt;<br \/>\n&lt;title&gt;Customers&lt;\/title&gt;<br \/>\n&lt;script src=\\\"\/\/www.w3schools.com\/appml\/2.0.3\/appml.js\\\"&gt;&lt;\/script&gt;<br \/>\n&lt;body&gt;<br \/>\n<br \/>\n&lt;h1&gt;\" . $mytitle . \"&lt;\/h1&gt;<br \/>\n<br \/>\n&lt;h4&gt;Thanks to &lt;a target=_blank title='AppML via W3Schools, thanks' href='\/\/webdevable.com\/w3schools\/appml\/appml_howto.html'&gt;W3Schools&lt;\/a&gt;&lt;\/h4&gt;<br \/>\n<br \/>\n&lt;table appml-data='<font color=blue>appis<\/font>'&gt;<br \/>\n&lt;tr&gt;<br \/>\n  &lt;th&gt;Meaning&lt;\/th&gt;<br \/>\n  &lt;th&gt;Frequency&lt;\/th&gt;<br \/>\n  &lt;th&gt;Since&lt;\/th&gt;<br \/>\n&lt;\/tr&gt;<br \/>\n&lt;tr appml-repeat=\\\"records\\\"&gt;<br \/>\n  &lt;td&gt;{{lf}}&lt;\/td&gt;<br \/>\n  &lt;td&gt;{{freq}}&lt;\/td&gt;<br \/>\n  &lt;td&gt;{{since}}&lt;\/td&gt;<br \/>\n&lt;\/tr&gt;<br \/>\n&lt;\/table&gt;<br \/>\n<br \/>\n&lt;script&gt;<br \/>\n  var <font color=blue>appis<\/font>=\" . (str_replace('\"JUNKJUNK',\"'\",str_replace('\"sf\": \"' . $selname . '\", \"lfs\": ', '\"records\":', str_replace(\"\\n\",\"\",str_replace(\"}]}]}]\", \"}]}]}\",substr($pageContent,1)) ))) ) . \";<br \/>\n&lt;\/script&gt;<br \/>\n<br \/>\n&lt;\/body&gt;<br \/>\n&lt;\/html&gt;<br \/>\n\";<br \/>\n<br \/>\n    echo $aml;<br \/>\n    exit;<br \/>\n }<br \/>\n<\/code><br \/>\n?&gt;<\/p>\n<p>So, you can check out <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/JSON\/Acronym\/getacronymdata.php--GETME\" title='getacronymdata.php'>the PHP changed<a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/JSON\/Acronym\/getacronymdata.php--GETME\" title='getacronymdata.htm'>getacronymdata.php<\/a> called by <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/JSON\/Acronym\/getacronymdata.html----GETME\" title='getacronymdata.htm'>the minor changes<a> of <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/JSON\/Acronym\/getacronymdata.html----GETME\" title='getacronymdata.htm'>getacronymdata.htm<\/a>&#8216;s <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/PHP\/JSON\/Acronym\/\" title=\"Click picture\">acronym web application<\/a> to see (or try) this all for yourself.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/appml-acronym-tutorial\/'>AppML Acronym Tutorial<\/a>.<\/p-->\n<hr>\n<p id='amlpt'>Previous relevant <a target=_blank title='AppML Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/appml-primer-tutorial\/'>AppML Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/AppML\/index.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"AppML Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/AppML\/appml_primer.jpg\" title=\"AppML Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">AppML Primer Tutorial<\/p><\/div>\n<p>There are hundreds and perhaps thousands of Framework type applications out there that create HTML output.  Some set to a Framework the handling of data, and today we&#8217;re trying out one called AppML where we are going to use the <a target=_blank title='AppML first tutorial' href='http:\/\/webdevable.com\/w3schools\/appml\/appml_howto.html'>W3Schools<\/a> Two Step first tutorial as per &#8230;<\/p>\n<blockquote cite='http:\/\/webdevable.com\/w3schools\/appml\/appml_howto.html'><p>\nAppML Explained:<br \/>\n&lt;script src=&#8221;https:\/\/www.w3schools.com\/appml\/2.0.3\/appml.js&#8221;&gt; adds AppML to your page.<br \/>\n<br \/>\nappml-data=&#8221;customers.js&#8221; connects AppML data (customers.js) to an HTML element (&lt;table>&gt;).<br \/>\n<br \/>\nIn this case we have used a JSON file: customers.js<br \/>\n<br \/>\nappml-repeat=&#8221;records&#8221; repeats an HTML element (&lt;tr&gt;) for each item (records) in a data object.<br \/>\n<br \/>\nThe {{ }} brackets are placeholders for AppML data.\n<\/p><\/blockquote>\n<p>Tokenizing this way (or you could call it substituting) gels with our thinking nearly as much as adding global data attributes as ways to make your HTML more intelligent, and more like that &#8220;protocol with glasses&#8221;, XML.<\/p>\n<p>All it took to create today&#8217;s &#8220;pretty swish&#8221; table of a <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/AppML\/index.html\" title=\"Click picture\">web application<\/a> was &#8230;<\/p>\n<ol>\n<li><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/AppML\/index.html_GETME\" title=\"index.html\">index.html<\/a> HTML<\/li>\n<li><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/AppML\/style.css_GETME\" title=\"style.css\">style.css<\/a> CSS<\/li>\n<li><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/AppML\/customers.js_GETME\" title=\"customers.js\">customers.js<\/a> JSON<\/li>\n<\/ol>\n<p> &#8230; that JSON serving as a flat file data source.   Interesting, huh?!<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d51643' onclick='var dv=document.getElementById(\"d51643\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/framework\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d51643' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d51654' onclick='var dv=document.getElementById(\"d51654\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/json\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d51654' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>After yesterday&#8217;s AppML Primer Tutorial we went looking for an apt inhouse web application that allows an interface to these new AppML framework concepts. Do you remember Acronyms Lookup Wikipedia Tutorial? We first thought we&#8217;d be working in the client &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/appml-acronyms-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,12,37],"tags":[56,69,3560,281,462,576,3563,664,849,932,997,3559,3304,1319,1480],"class_list":["post-51654","post","type-post","status-publish","format-standard","hentry","category-ajax","category-elearning","category-tutorials","tag-acronym","tag-ajax","tag-appml","tag-css","tag-framework","tag-html","tag-javascript-object","tag-json","tag-object","tag-php","tag-programming","tag-substitute","tag-token","tag-tutorial","tag-xml"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/51654"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=51654"}],"version-history":[{"count":5,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/51654\/revisions"}],"predecessor-version":[{"id":51659,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/51654\/revisions\/51659"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=51654"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=51654"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=51654"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}