News for hackers. Stuff that matters.
Re:Maria: An MVC framework for JS by ericingram on Saturday July 07, 2012 @11:56PM (#4213557)
Perhaps the most significant new pattern is that domain models communicate with a REST interface to the views. Usually you justify procedural coupling when writing controllers that interact with models, and it seems to make sense because controllers and models are often written in similar style and syntax. But still, it caused me a lot of pain in the past.

So now, the models only expose a REST API beyond the "class wall" (so to speak), which feels rather natural when called from views in template syntax. Client-side frameworks do it this way already, but I'm talking server side.

A great side effect of models speaking REST natively is, it becomes trivial to create a public API, just add authentication.

There's a few other things, like automatic request view routing.

There are no comments on this comment yet.