Model-Driven Node: Part 10

I added an angular-based JSON editor to Model-Driven Node and replaced the jade UI. I'd thought the UI would take ten or twelve templates based on previous projects but presto... DONE in four hours. And then I realized that this was a real tool - a MongoDB Database Explorer. The

I added an angular-based JSON editor to Model-Driven Node and replaced the jade UI. I'd thought the UI would take ten or twelve templates based on previous projects but presto... DONE in four hours. And then I realized that this was a real tool - a MongoDB Database Explorer.

The JSONEdit editor is directive-based, the java equivalent of aspect programming for the DOM. Very powerful but to be used in singular, judicious ways.

Tool developers started shipping js-templated tools several years ago. I now believe that js-templating will seep into the enterprise application space (what Model-Driven Node is about).

One reason for typed languages like Java was to catch run-time errors but with js-templating you can catch those errors at GENERATION time.

Several years ago during a job interview, I was asked how I would become a better programmer. I answered, truthfully, "by writing less code". Of course, adherents of the Cult of Coding don't like that answer but it's a fact. Less code equals less bugs. Enforce predictabililty in your abstract design and restrict flexibility.

The classic beginner error is designing for too much flexibility.

You can see these principles in the JSON editor. The rules for JSON impose predictability and the editor does simple, clear manipulations, and that's it. The code is amazingly simple.

Source Code
Live System
Model-Driven Node: Part 2, The Dynamic Web
Model-Driven Node: Part 3, Object Graph Impedance
Model-Driven Node: Part 4, XSD Schema Extended
Model-Driven Node: Part 5, XJC Compiler
Model-Driven Node: Part 6, Project Scalability
Model-Driven Node: Part 7, Reference Implementation
Model-Driven Node: Part 8, Tags and Queues
Model-Driven Node: Part 9, URL Namespacing
Model-Driven Node: Part 10, ng JSONEditor