News for hackers. Stuff that matters.
Re:The M in MVC: Why Models are Misunderstood and Unappreciated by lifeisstillgood on Tuesday July 26, 2011 @05:36AM (#2806652)
I am concerned by the tendancy to throw everything into one in-process model. (by in-process I mean that we are calling a ruby function calculatePrice in the same model / whatever instead of calling out to a web api and getting back a price)   

It's usually cleaner to think about web service calls - not  put everything into same model

even though you can cleanly seperate functions within a single model the tendancy to make an inprocess call not an api call is always high.    So removethe tempation.

Have a thin model, a thin view and a thin controller all doing just one (rest-ful) thing and call between them

the overhead in creating objects from passed in Json is far lower the trying to unstitch logins, transactions, funny bits of business logic from one monolithic model 

(not that I am saying you would end up with a monolithic piece of spagetti but I have seen some indark corners of the enterprise world, even in projects which have all the right buzzwords)

Re:The M in MVC: Why Models are Misunderstood and Unappreciated by Swannie on Tuesday July 26, 2011 @09:26AM (#2807170)
I struggled to comprehend what you are trying to say.

It sounds like you're saying "Make everything a service and that will solve all your problems". But in doing so, you abstract the complexity from the core of the problem, to some other layer. Sort of like SOA, meaning you end up with some orchestration language (BPEL?). You've ended up with a kitchen full of self-replicating spaghetti.