How Evan Moran replaced CSS/HTML/JS with OJJS
codefellows.org
codefellows.org
One of my favorite features, is that any piece of the app can instantly become a reusable, extendable module for another app. Since it's 'just JS' it always ports. In this way I share UI widgets between web apps and mobile apps.
Generated CSS and HTML should be syntactically perfect, and JS has much better error handling than either CSS or HTML. With those traits, the resulting code can be better than a human could write on their own.
The concept of JSON syntax for DOM creation has been around a long time -- HAML, JsonML, jQuery... And although the JS syntax can be verbose, CoffeeScript object notation is available, and quite similar to HAML and SASS.
I hope we see a lot more of this.
That said almost every example on the site is just creating HTML and JS (not CSS), so it would be very easy for you to use OJ to create everything and then style everything with .css files like you always have. So use it however you want, but please don't think it is trying to force markup and formatting together!
What I was trying to say was that a lot of people focus on OJ's ability to create html/css and think that that is what it is for. They think that that means you can't CSS the way they are use to: with a designer created .css file. This isn't the case!
Instead OJ is about making reusuable website objects -- check out the plugin page: http://ojjs.org/plugins.html. You can make a YouTubeVideo in one line, but, just as importantly, the OJ plugin lets you change the video's volume or pause and play. In short, OJ creates web building blocks that can live edit what they create.