Files
2012-02-21 01:15:00 -05:00

1 line
9.4 KiB
JSON

[{"user_id": 218, "stars": [], "topic_id": 9451, "date_created": 1298859502.9477029, "message": "I want a really basic in-browser templating system where I can do something like: \n\nvar articles = { emacs: [{name: 'foo', time: 'bar'}, {name: 'zot', time: 'zammo'}], vim: [{name:'a', time: 'b'}]}; \n\n<div>{% for section, article_list in articles %}<h3>{{ section }}</h3>{% for article in article_list %} <p>{{ article }}</p>{% endfor %} {% endfor %}</div>\n\nAny thoughts?", "group_id": 160, "id": 223315}, {"user_id": 969, "stars": [], "topic_id": 9451, "date_created": 1298860123.8560209, "message": "Use underscore templates", "group_id": 160, "id": 223356}, {"user_id": 969, "stars": [], "topic_id": 9451, "date_created": 1298860133.413064, "message": "they'll do exactly what you want", "group_id": 160, "id": 223358}, {"user_id": 209, "stars": [], "topic_id": 9451, "date_created": 1298859697.9932981, "message": "@justinlilly There was an attempt to recreate django forms in JS, I forget the name though", "group_id": 160, "id": 223326}, {"user_id": 209, "stars": [], "topic_id": 9451, "date_created": 1298859702.129616, "message": "** django templates", "group_id": 160, "id": 223327}, {"user_id": 218, "stars": [], "topic_id": 9451, "date_created": 1298859710.0162859, "message": "I don't really need django templates.", "group_id": 160, "id": 223328}, {"user_id": 209, "stars": [], "topic_id": 9451, "date_created": 1298859731.928478, "message": "yeah, but I figure the project got at least that far :)", "group_id": 160, "id": 223330}, {"user_id": 969, "stars": [], "topic_id": 9451, "date_created": 1298860161.8217139, "message": "(mustache would as well btw ... so would handlebars)", "group_id": 160, "id": 223360}, {"user_id": 218, "stars": [], "topic_id": 9451, "date_created": 1298859732.001349, "message": "I really just want the ability to address key and value of an object", "group_id": 160, "id": 223331}, {"user_id": 218, "stars": [], "topic_id": 9451, "date_created": 1298859751.244689, "message": "I looked at mustache, but didn't see its ability to reference the keys in an object", "group_id": 160, "id": 223333}, {"user_id": 218, "stars": [], "topic_id": 9451, "date_created": 1298859990.1367769, "message": "just going to rewrite the json to be mustache.js compatible.", "group_id": 160, "id": 223346}, {"user_id": 6396, "stars": [], "topic_id": 9451, "date_created": 1298881129.4857509, "message": "http://icanhazjs.com/", "group_id": 160, "id": 224267}, {"user_id": 6396, "stars": [], "topic_id": 9451, "date_created": 1298881049.9482591, "message": "@justinlilly I think icanhaz.js does this. Not sure about for loops but it certainly has attribute lookup.", "group_id": 160, "id": 224266}, {"user_id": 8490, "stars": [], "topic_id": 9451, "date_created": 1298894494.812067, "message": "Was jQuery.Tmpl not an option? It's pushed by Microsoft and jQuery so it's pretty decent I guess. https://github.com/jquery/jquery-tmpl", "group_id": 160, "id": 225078}, {"user_id": 8282, "stars": [{"date_created": 1298914907.423172, "user_id": 16058}, {"date_created": 1299154496.728318, "user_id": 5026}, {"date_created": 1321818932.6390581, "user_id": 40796}], "topic_id": 9451, "date_created": 1298903919.435895, "message": "anything depends on jquery has no future", "group_id": 160, "id": 225925}, {"user_id": 6396, "stars": [{"date_created": 1301367830.9650209, "user_id": 12817}], "topic_id": 9451, "date_created": 1298903978.0935409, "message": "[citation needed]", "group_id": 160, "id": 225930}, {"user_id": 8282, "stars": [], "topic_id": 9451, "date_created": 1298904491.6386149, "message": "community and distribution model... browsers became available to use resources of different platforms thanks to commonjs, node, npm etc", "group_id": 160, "id": 225969}, {"user_id": 16058, "stars": [], "topic_id": 9451, "date_created": 1298915073.114774, "message": "@azer, you can use jquery with node thanks to jsdom. But jquery is slow, I don't like it as much as rightjs. And using pure js is simpler now with ecmascript 5 (w/ shims for old browsers)", "group_id": 160, "id": 227583}, {"user_id": 16058, "stars": [], "topic_id": 9451, "date_created": 1298915450.9027879, "message": "@azer, BTW, icanhazjs is just a jquery wrapper for putting mustache into script type=\"text/html\" tags", "group_id": 160, "id": 227612}, {"user_id": 540, "stars": [{"date_created": 1299383968.5067101, "user_id": 6396}], "topic_id": 9451, "date_created": 1298923769.3374259, "message": "@myfreeweb, @justinlilly I wrote ICanHaz.js and yeah, it's really quite simple. It's just a little convenience tool for grabbing, caching and retrieving populated mustache templates. Mustache can do what you're talking about: http://mustache.github.com/mustache.5.html", "group_id": 160, "id": 228847}, {"user_id": 218, "stars": [], "topic_id": 9451, "date_created": 1298931186.652447, "message": "I was looking for expansion of a json object into key and val, but it seems like you couldn't do that. I'm also not accustomed to partials. That said, once it finished, things worked out pretty well.", "group_id": 160, "id": 229899}, {"user_id": 218, "stars": [], "topic_id": 9451, "date_created": 1298931150.2348001, "message": "I ended up going with mustache.js", "group_id": 160, "id": 229898}, {"user_id": 14356, "stars": [], "topic_id": 9451, "date_created": 1298941759.6954651, "message": "@justinlilly You may want to look at angularjs http://angularjs.org", "group_id": 160, "id": 230656}, {"user_id": 15500, "stars": [], "topic_id": 9451, "date_created": 1298988740.1439879, "message": "http://ejohn.org/blog/javascript-micro-templating/ would do what you want as well, really simple and versatile", "group_id": 160, "id": 234801}, {"user_id": 4935, "stars": [{"date_created": 1299715424.0387909, "user_id": 3795}], "topic_id": 9451, "date_created": 1299038863.0022709, "message": "there's http://akdubya.github.com/dustjs/", "group_id": 160, "id": 243192}, {"user_id": 19110, "stars": [], "topic_id": 9451, "date_created": 1299424647.3480921, "message": "I recently used jQote and liked it a lot. Simple and powerful. http://aefxx.com/jquery-plugins/jqote/", "group_id": 160, "id": 280291}, {"user_id": 7878, "stars": [], "topic_id": 9451, "date_created": 1299447951.8701589, "message": "I used jQuery template and jQote. Definitely prefer jQote.", "group_id": 160, "id": 281965}, {"user_id": 1855, "stars": [], "topic_id": 9451, "date_created": 1301997568.2455239, "message": "I recently used icanhaz.js since I really like mustache and the added jqueriness was a plus", "group_id": 160, "id": 539521}, {"user_id": 20536, "stars": [], "topic_id": 9451, "date_created": 1302271041.3632481, "message": "You could also check http://embeddedjs.com/ that has a the ability to load templates on the go, other interesting options are https://github.com/hij1nx/weld or http://api.jquery.com/category/plugins/templates/", "group_id": 160, "id": 590097}, {"user_id": 28442, "stars": [], "topic_id": 9451, "date_created": 1302377434.335892, "message": "if u like functional programming and MVC u need try to use backbone.js with underscore.js template function.", "group_id": 160, "id": 605023}, {"user_id": 8708, "stars": [], "topic_id": 9451, "date_created": 1302412158.0675969, "message": "Here is closure tempalte: http://code.google.com/closure/templates/docs/helloworld_js.html", "group_id": 160, "id": 607980}, {"user_id": 6604, "stars": [{"date_created": 1303495423.9876399, "user_id": 8765}], "topic_id": 9451, "date_created": 1302453111.1799519, "message": "http://akdubya.github.com/dustjs/ Dust.js is really good. Handlebars is really good. Mustache is really good. Underscore is really good. jQuery Templates is really good. Pick your poison.", "group_id": 160, "id": 610564}, {"user_id": 8765, "stars": [], "topic_id": 9451, "date_created": 1303495418.3072009, "message": "ICanHaz is great. It'd be cool if it was template language agnostic for playing with other tempting engines (though it's probably simple to do anyway)", "group_id": 160, "id": 783579}, {"user_id": 15507, "stars": [], "topic_id": 9451, "date_created": 1303603694.3013599, "message": "We ended up using Mustache due to its available support with other languages (e.g. PHP, Ruby). There were some instances that we needed to use a template outside of JavaScript.", "group_id": 160, "id": 792299}, {"user_id": 41744, "stars": [{"date_created": 1317553540.756536, "user_id": 40805}], "topic_id": 9451, "date_created": 1317508056.0462501, "message": "I find backbone.js to do a great job at separation of concerns; I dont like the idea to put any logic in templates, whatever the templating engine is; I prefer to maintain loops of conditional tests used for rendering in the views' render; I've crafted up yet another refactoring of the todos sample integrating these ideas using lazy loaded ICanHaz templates over there: http://www.cjandia.com/experiments/backbone.js/todos/", "group_id": 160, "id": 2256930}, {"user_id": 41744, "stars": [], "topic_id": 9451, "date_created": 1317508187.018208, "message": "(sorry, typo; read instead: \"...I prefer to maintain loops OR conditional tests...\")", "group_id": 160, "id": 2256943}, {"user_id": 3224, "stars": [], "topic_id": 9451, "date_created": 1319081127.694869, "message": "I prefer underscorejs too", "group_id": 160, "id": 2389706}, {"user_id": 43250, "stars": [], "topic_id": 9451, "date_created": 1320780541.2747979, "message": "I prefer the ECMAScript 5 shim to underscore https://github.com/kriskowal/es5-shim", "group_id": 160, "id": 2534696}]