I'm only a few weeks into Pure ... and still learning.
I understand how to use both a HTML template and callback JSON data from a JS file.
I'm not happy using the sample JsonData "data.js" file because of it's repetitive use of variable keyword names.
It one has a long list .. then it requires lots of extra work and space .. plus it must slow down the system.
I would like to use multiple arrays .. such as:
yaxis = new Array();
yaxis[0] = new Array('#1,'a','b','c','d');
yaxis[1] = new Array('#2,'e','f','g','h');
yaxis[2] = new Array('#3,'i','j.','k','l');
etc ...
then callback thru the JsonData to populate the data via yaxis[yyy][xxx] .. instead of using directive variables twice ( once in the HTML template .. and once in the JsonData JS file.
I could post my current attempt .. but it is nothing more than your "Hello Bebow!" sample merged with the '
people.name / person.team' template.
So I have a question or two .. :
1.) Must the jsonData function that propagates the directives be included in the HTML template? ( Can it be migrated to another separate JS file? ) .. I tried with no luck.
2.) There was two distinct demos using $p().render(json,directive) and $().directives.render(json) .. I can't determine the difference .. except the latter had the data within the script. Is one Pure and the other JQuery . JS ?
3.) Is there more tutorials / samples that are simple I can't find? I have coded in a forgotten language ( WebSiphon ) in my past with fantastic results. This week its Pure .. and I'm just beginning to understand why it is perfect for my concept .. took a long time to find it thru understanding terminology. Please bear with me while I ask some of these questions. Thanks :)
Basically I am trying to build a infinitely expandable database via arrays instead of SQL ( since most servers require SQL administration )
Also .. I am trying to access data in only select areas of arrays .. instead of loading heaps of variables.
The JQuery interface seems to work great .. so that the page doesnt have to reload for every selection. Also .. given further commands .. memory extensive media .. such as audio and video . can be manipulated to 'Not' preload 100% .. and still be accessible upon returning without resetting the preloading. ( This is quite a feature )
I would be very happy to share anything I learn and all templates for a little help understanding.
Hope this description isnt too extensive.
Thanks to all .. it is a worthwhile project .. and I promise entertaining when finished! :)