# App with lots of business logic

**URL:** <https://www.ruby-forum.com/t/app-with-lots-of-business-logic/190386>\
**Category:** Ruby\
**Created:** [June 18, 2010, 11:17pm UTC](https://www.ruby-forum.com/t/app-with-lots-of-business-logic/190386 "2010-06-18T23:17:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jcain](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/3d9bf3/32.png) [@jcain](https://www.ruby-forum.com/u/jcain)\
**Post date:** [June 18, 2010, 11:17pm UTC](https://www.ruby-forum.com/t/app-with-lots-of-business-logic/190386/1 "2010-06-18T23:17:13Z")

</div>

Hi, starting basically my biggest project to date (a Rails app). I  
wasn’t  
initially intimidated, but the more we talk about the process of how we  
get  
from A to B, the more I realize that it involves tons of conditional,  
overridable, partially applied until approved but maybe gets rolled back  
or  
overridden, messy rules, and very large (for me anyway) domain of  
information being collected, generated, queried and acted upon.

I’m usually pretty confident, because I work hard and I reflect a lot,  
and  
am able to anticipate and overcome quite a few hurdles due to that. But  
right now I’m really worried that any small mistake or poor decision in  
how  
I design or implement it could reverberate out and have an extremely  
negative impact on the project. Done right it will probably be very  
convoluted, done wrong it will be a nightmare.

I want to do it the right way, so that I can learn good principles, have  
something I enjoy working on and am proud of, and gain the confidence  
and  
capacity to continue to work on projects of this magnitude in the  
future.

What resources (especially books, but I’m open) would you suggest I read  
to  
prepare myself to handle the scope and complexity of this project?

---

<div class="post-metadata">

**Author:** ![jcain](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/3d9bf3/32.png) [@jcain](https://www.ruby-forum.com/u/jcain)\
**Post date:** [June 21, 2010, 2:41pm UTC](https://www.ruby-forum.com/t/app-with-lots-of-business-logic/190386/2 "2010-06-21T14:41:01Z")

</div>

Hi Josh,

It’s a Microsoft book, but reading Code Complete a couple of times has  
given me a good grasp on how to deal with challenges of any size in  
software design. I cant think of any other single book that covers the  
same material in a better way. In fact, before I read this, I was  
thinking about re-reading it again.

Cheers,  
Jason S.

---

<div class="post-metadata">

**Author:** ![jcain](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/3d9bf3/32.png) [@jcain](https://www.ruby-forum.com/u/jcain)\
**Post date:** [June 21, 2010, 3:34pm UTC](https://www.ruby-forum.com/t/app-with-lots-of-business-logic/190386/3 "2010-06-21T15:34:53Z")

</div>

I’d second Code Complete. Like the Pragmatic Programmer, it’s a really a  
book for teaching you ways of thinking. The code examples are brief and  
in Java or C++; I’m not sure why it was published by Microsoft Press, as  
there’s nothing Microsoft-specific in it.

Design Patterns in Ruby by Russ Olsen is also fantastic.

On Mon, 21 Jun 2010 21:39 +0900, “Jason S.”

---

<div class="post-metadata">

**Author:** ![jcain](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/3d9bf3/32.png) [@jcain](https://www.ruby-forum.com/u/jcain)\
**Post date:** [June 23, 2010, 9:24pm UTC](https://www.ruby-forum.com/t/app-with-lots-of-business-logic/190386/4 "2010-06-23T21:24:17Z")

</div>

Alright, I just ordered Code Complete. That book is very long, though,  
any  
recommendations for chapters that were particularly worthwhile, or that  
you  
might be particularly applicable for me would be appreciated.

I also picked up Patterns of Enterprise Application Architecture, I’ll  
be  
reading the sections on “The major approaches to organizing business  
logic”  
and “handling concurrency for data that spans multiple transactions”. I  
had  
a lot of difficulty with that last one on one of my early Rails  
projects,  
and think I’ve been scared to try again, which is probably where a lot  
of my  
fear for this project comes from.

And Analysis Patterns: Reusable Object Models, since the Party,  
Accountability, and Transaction patterns sound like they have a decent  
probability of being at the very least, insightful.

Also, from an off list suggestion, getting Kent Beck’s Test Driven  
Development: By Example. Started working on a short project for myself  
to  
try and get myself disciplined to red/green/refactor and got  
permission todo dev on the model first, using tdd/bdd, and make  
demands regarding others’  
practices to that end.

Thanks for all the suggestions.  
-Josh

---

<div class="post-metadata">

**Author:** ![jcain](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/3d9bf3/32.png) [@jcain](https://www.ruby-forum.com/u/jcain)\
**Post date:** [June 22, 2010, 10:52am UTC](https://www.ruby-forum.com/t/app-with-lots-of-business-logic/190386/5 "2010-06-22T10:52:54Z")

</div>

On 06/19/2010 06:16 AM, Josh C. wrote:

> I design or implement it could reverberate out and have an extremely  
> negative impact on the project. Done right it will probably be very  
> convoluted, done wrong it will be a nightmare.

Look at what approaches worked for other people. Martin F. has some  
pretty good articles[1]. These are all pretty good books.

Analysis Patterns: Reusable Object Models  
ISBN 0201895420

Patterns of Enterprise Application Architecture  
ISBN 0321127420

Enterprise Integration Patterns: Designing, Building, and Deploying  
Messaging Solutions  
ISBN 0321200683

Edward

1. [http://martinfowler.com/articles.html](http://martinfowler.com/articles.html)
