turnings :: daniel berlinger

passions :: perfections :: peoples :: stuffs

Missing refactoring…

leave a comment »

Crazy, Heretical, and Awesome: The Way I Write Rails Apps | James on Software:

To decouple the logging from the creation of the database record, we’re going to use something called a service object. A service object is typically used to coordinate two or more objects; usually, the service object doesn’t have any logic of its own (simplified definition). We’re also going to use Dependency Injection so that we can mock everything out and make our tests awesomely fast (seconds not minutes).

[Again, a missing refactoring from the last major project...]

Source: @brynary

About these ads

Written by Daniel

February 1, 2012 at 12:10 pm

Posted in code

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 535 other followers