The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Are nouns better than verbs?

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Jason Watkins

Posts: 51
Nickname: jasonw
Registered: Oct, 2003

Jason Watkins is a rails developer with PLANET ARGON in the portland metro area.
Are nouns better than verbs? Posted: Jun 27, 2006 9:21 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Jason Watkins.
Original Post: Are nouns better than verbs?
Feed Title: Jason Watkins
Feed URL: http://jasonwatkins.net/rss
Feed Description: blog.collect{ Thought.rand }
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Jason Watkins
Latest Posts From Jason Watkins

Advertisement

From Jim Greer’s interesting blog post, Don’t say CRUD, say FUC’D :

Of course you don’t just want to delete a trouble ticket. You want to know more. And that’s a sign that the operation shouldn’t have been on the TroubleTicket in the first place. You want to have a “TicketClosure”. Then you’ll realize that you want to store a resolution as well as the person who closed it and the date. Now you’ve got a very useful part of your domain model – the hint was that you were writing some thing that wasn’t CRUD – you needed a new noun instead of a non-standard verb.

Something really clicked for me here. Domain models are about storing and manipulating information that represents the world. Typically we do this with objects. There’s a tired metaphor that objects are the nouns, and their methods are the verbs. But maybe that perspective is missing something interesting. What if we start thinking purely in terms of nouns?

What if our domain modeling is just about accumulating history over time? What if it’s all just about the existence of facts and relationships? What if all we do is add nouns using standardized verbs, rather than having a vocabulary of verbs?

There’s something about this I like a great deal. Instead of having methods that let us ask about and manipulate an object’s hidden state, we enrich the relationship modeling to encode the history of events as facts directly.

What do we gain?

We have knowledge not just of “what is”, right now, but also a detailed history of “what was”, back then. We can query across this history in a standardized way, and compose novel ad hoc views of the information with standard operators.

What do we lose?

Perhaps simplicity. Sometimes it’s just simpler to say ticket.close! than to create a new TicketClosure object with the appropriate relations.

How do we balance this tradeoff?

I find it an interesting perspective that I hope to leverage in future work: looking for opportunities to turn a verb into creating an instance of a noun.

Read: Are nouns better than verbs?

Topic: Keeping Rails Opinionated Previous Topic   Next Topic Topic: Rails Live CD

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use