Hacker News new | past | comments | ask | show | jobs | submit login

I have found you can get the best of both worlds by building a smarter model layer. For example, if your models are inherently versioned, you can just fork off a new version and then either commit it or discard it.

Meanwhile the view gets to have really rich two-way interaction with the model, which is a big win for keeping presentation logic and model logic separate.

As an example: whenever the value of one field alters the available choices for another field, it's better to capture that logic in the model. Then you can write a view that focuses only on how to display choices, not which choices need to be displayed.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: