3 ms·
It depends. Is your app CPU-bound? If so, then DCI probably isn't a great idea for you. In fact, building it in Ruby may not be the best idea. But if your ap
by rahoulb 14y ago
It depends.
Is your app CPU-bound? If so, then DCI probably isn't a great idea for you. In fact, building it in Ruby may not be the best idea.
But if your app is IO-bound (like most Rails apps), huge and it takes new developers weeks to get up to speed, then the gains from having a simple, modular code-base should save you developer-time (and hence salaries), which are much more expensive than CPUs.
Having said that, I tend to use SimpleDelegator instead of dynamically injecting stuff into objects.
EDIT: added 'ruby not being the best idea if CPU bound'
- mbetter 14y agoThis DCI stuff sounds like a quick way to make an app CPU-bound, if it wasn't already.
- rahoulb 14y agoRuby may be slow but my apps still spend more time waiting on complex database queries than anything else (unless I'm using the Jbuilder gem to build JSON outputs, in which case I might as well make a cup of tea waiting for a call to return)