6 ms·
jQuery meets Markaby
This is for those who prefer to write markup with code, not templates. It's not the first implementation of this sort, but it is the latest.
- lucisferre 14y agoThis is great. There is definitely some friction getting templates into javascript without some sort of compilation step like the Rails asset pipeline. I'm doing a trigger.io app where I know I'll just want a few simple templates and I don't really want to add anything to the build process right now. This might be perfect.
- McLeopold 14y agoShameless plug: I've been working on the exact same thing. It works with nodejs out of the box. It's still in beta, but being actively developed. http://mcleopold.github.com/JavascriptHtmlr/ http://mcleopold.github.com/JavascriptHtmlr/ Someday I'll make it a jquery plugin as well...
- mlanza 14y agoNo worries. There are lots of flavors. I was just looking to scratch an itch. :)
- McLeopold 14y agoYou'd be surprised how may projects exist that are like this. But somehow template languages are always more popular and have more traction. I guess there are very few people who would rather have code produce markup than have markup allow code. Perhaps because large projects have their markup written by non-coders?
- draegtun 14y ago> You'd be surprised how may projects exist that are like this Yes there are a lot of these Builder libraries/modules available in many languages: * http://stackoverflow.com/questions/671572/cl-who-like-html-templating-for-other-languages http://stackoverflow.com/questions/671572/cl-who-like-html-t... * http://builder.rubyforge.org/ http://builder.rubyforge.org/ * http://groovy.codehaus.org/Builders http://groovy.codehaus.org/Builders * http://erector.rubyforge.org/ http://erector.rubyforge.org/
- mlanza 14y agoI prefer building in Markaby style. When I used to maintain a Radiant CMS site I'd sometimes need to generate content that I couldn't generate with the native tags. I'd end up having to teach Radius how to do something new. This interfered with "getting things done." Code doesn't get in your way. Don't get me wrong. Markup/templating languages are great for 80% of what you use them for. And I especially like that they sandbox the average user from doing anything dangerous. I just felt like in the 20% scenarios, tweaking the markup language was a painful hoop through which to jump.
- rsutphin 14y agoPlease note: there is another open source project named "buildr": http://buildr.apache.org/ http://buildr.apache.org/. It's a rake-based build tool for Java projects.
- mlanza 14y agoUgh. Thanks. For now, let's just say we're under a different namespace.
- malandrew 14y agoHow's the performance of this versus a templating system like _.template or handlebars? When you draw many elements on a page or are constantly redrawing elements with updated data, how does it perform?