Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The biggest benefit of MVC, in my view, is the amount of reuse it encourages. When a view has no knowledge of what it has to do, you can reuse it an infinite amount of times. A table view is a table view, it shouldn't need to know what its displaying. A button shouldn't need to know anything about your app, because its just a button. This is what makes Cocoa/IB so powerful. In some instances, you don't even need to write a controller, you can just use a stock controller, like Cocoa's array controller.

I would also say that this is one of the biggest drawbacks of current client side web frameworks. Reusing views is much more difficult than it should be, especially if you want to do anything remotely custom or complex, since subclassing is essentially not possible and delegates are very infrequently used.



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

Search: