|
|
|
|
|
by kyllo
4428 days ago
|
|
I agree that in most cases, it's reasonable (and cost-effective) to assume that your Rails app will always be a Rails app. However, it's not reasonable to assume that your Rails 3 app will always be a Rails 3 app. You will eventually have to upgrade--if not immediately for feature reasons then eventually for security reasons. And upgrading a Rails 3 app to Rails 4 is a non-trivial effort, there are a lot of breaking changes, some of which affect the models (e.g. strong parameters, no more attr_accessible). If you skip versions you will just accumulate more and more technical debt. I think that ideally, you would have your business logic in classes/modules that don't need to have code changes just because the app framework got a version bump. But generally speaking you're right, the decision of whether or not to put in the up-front work to decouple your business logic from your application framework, is like an investment decision with costs and benefits. Uncle Bob is saying it's always worth it, DHH is saying it's never worth it, but I think the reality is that it's sometimes worth it, depending on you and your project. |
|