Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Express Plugin #1
This plugin is in the works. The main challenge is improving performance through caching.
It turns out a gigantic amount of time is taken up in
Really stoked, Evan. Really. Discovering OJ for me has sort of been like finding the holy grail. I can't believe people still write HTML, myself included. I've wanted something like OJ for a very long time.
A server-side OJ setup seems to have so many implications: not only (i) no more HTML templating, but simpler unification of DOM-generating code, which is what so many people are going for all over the place. But also (ii), there have been a lot of people clanging together PhantomJS with Express middleware just because their pages are generated exclusively on the client side. Am I off-base in thinking that OJ on Node would be a big step in solving this cleanly?
What are you using for DOM in this Node version?
I'm really glad you like it man. I completely agree server-side is the way OJ was meant to be used. Though, if I may say, it's even better then you know=).
OJ doesn't need anything for server-side DOM manipulation since it can template directly to HTML and CSS! So server-side it directly creates html/css (for seo) and client side it does direct dom manipulation (for speed and event binding)
Just for you I created this example of OJ creating html / css directly:
The oj.toHTML and oj.toCSS methods are just special cases of oj.compile, with options set to only compiles html or css respectively. Server side this is done for you with the oj commandline tool (and soon with express!).
Jump on IRC freenode.net#oj at some point if you want to talk about it. I'd be glad to give you a demo of the oj commandline tool (npm install -g oj) or answer any questions!
Hey, really looking forward to checking it out! I'm still running through basic client-side usage, and looking forward to getting to know the codebase as I work with the API.
I hopped onto #oj but it looks like it's just me (dimadima) and @chanserv. Anyway, I'm on IRC 24/7 so I'll hang out in #oj. Looking forward!