# How do you design your RoR web applications?

**URL:** <https://www.ruby-forum.com/t/how-do-you-design-your-ror-web-applications/114882>\
**Category:** Rails\
**Created:** [September 18, 2007, 2:41pm UTC](https://www.ruby-forum.com/t/how-do-you-design-your-ror-web-applications/114882 "2007-09-18T14:41:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jsn1](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7ea924/32.png) [@jsn1](https://www.ruby-forum.com/u/jsn1)\
**Post date:** [September 18, 2007, 2:41pm UTC](https://www.ruby-forum.com/t/how-do-you-design-your-ror-web-applications/114882/1 "2007-09-18T14:41:38Z")

</div>

Here is my question: how do you design your RoR web application?

- Do you use an OOAD approach? data model/ class diagram, use cases?
- Do you desing your web pages first?
- Do you start coding without desinging first?
- Do you use other tools such as Dreamweaver to create your pages, and  
from there convert them in rhtml code?
- Do you use any quality assurance and quality control process?
- Which other practical tips would you share that facilitate working  
with RoR?

Regards

---

<div class="post-metadata">

**Author:** ![jsn1](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7ea924/32.png) [@jsn1](https://www.ruby-forum.com/u/jsn1)\
**Post date:** [September 18, 2007, 4:37pm UTC](https://www.ruby-forum.com/t/how-do-you-design-your-ror-web-applications/114882/2 "2007-09-18T16:37:28Z")

</div>

On 9/18/07, Jose P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> with RoR?  
> Here are two articles that are very interesting:

> **[Is Design Dead?](https://martinfowler.com/articles/designDead.html)**
>
> The rise of agile methods (particularly XP) makes some people wonder if there's any role left for software design. I argue that this change shifts from planned to evolutionary design.

[http://wiki.pragmatus.com/index.php?title=Test\_Driven\_Development\_with\_Ruby](http://wiki.pragmatus.com/index.php?title=Test_Driven_Development_with_Ruby)

---

<div class="post-metadata">

**Author:** ![jsn1](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7ea924/32.png) [@jsn1](https://www.ruby-forum.com/u/jsn1)\
**Post date:** [September 18, 2007, 9:30pm UTC](https://www.ruby-forum.com/t/how-do-you-design-your-ror-web-applications/114882/3 "2007-09-18T21:30:45Z")

</div>

> Here is my question: how do you design your RoR web application?

Someone asked: “how do you design your RoR web application?”

To be honest, there’s no right or wrong way to create a new app. Some  
people starts from DB tables, some starts with html, and others starts  
with user cases. Whatever works for you is the best way. Here are some  
pointers.

===Coding

```
* keep your design modular. If things can be broken into small

```

pieces, do so. make them into plugin, gems. because doing so those  
building blocks can be reused later. if everything is big and chunky,  
less likely they’ll be reused.  
\* tests is the other half of the code, code without test is not  
complete. you should always write code with test code side by side.  
Some people even advocate write test first.

If you just keep in mind of 2 principles above, you’ll be doing very  
ok.

===Development lifecycle - Iterative  
Break big apps into iterations, each iteration with requirements from  
most critical down to nice to have. People call this agile  
development. In my example, my final goal for [groups.wuyaSea.com](http://groups.wuyaSea.com) is to  
create a full featured social network site. First release only have  
most essential features, user can discuss in forum, and write  
articles, and make friends. that’s it. No search (outsourced to google  
search), no photo sharing, no private messaging, not even tagging (now  
does). With capistrano, it’s easy to keeps on pushing out releases, I  
often push out new builds like 5 times a day.

Major reasons for doing iteration is to minimize risk, cuz bean  
counters like that.

```
* each release requires shorter timeline, less coding effort, and

```

more predictable in time and money.  
\* after you give each release to user acceptance testing, you’ll  
find out what features users use most of time, and what features users  
rarely touch. It’s known that in any app, 20% of code does 80% of  
work, so why write 80% of code nobody uses? In my case, the web is my  
user acceptance test.  
\* so release early, release often. In venture capital world, it’s  
called startup fast, fail fast. Think your startup will be the next  
facebook or youtube? think again, for every successful startup,  
there’re dozens failed ones you never heard of, so why waste 1 year to  
learn the truth if you can do it in 3 months?  
\* one side effect by releasing early is you get to earn that  
fabulous adsense dollars right away (although i haven’t earned a dime  
yet). Cash flow is always important for anyone who bootstraps.

Maximize your effort. User requirement changes, site traffic changes,  
life sucks, blah blah. there’s no one design that satisfy all the  
requirements. Changes are unavoidable, eventually rewrite may be the  
best solution. The best design is one that satisfy the most  
requirements with least cost, don’t over engineer something.

===Failing is learning  
I can tell you what i’ve done. When I was creating [groups.wuyaSea.com](http://groups.wuyaSea.com),  
i went through 2 prototypes, after a few months, each one becomes too  
rigid and unmaintainable, then throw it away, and start over. Current  
site is my 3rd implementation. Making webapp is like doing everything  
else in life, you learn by just doing it. keep cranking, if it fails,  
keep trying again.

hope that helps.

copy of this is also available at  
[http://groups.wuyasea.com/b1ogs/8/articles/9/how-do-you-design-your-ror-web-application](http://groups.wuyasea.com/b1ogs/8/articles/9/how-do-you-design-your-ror-web-application)

Person who asked this question may also like  
[http://groups.wuyasea.com/group/ruby-on-rails](http://groups.wuyasea.com/group/ruby-on-rails)

Dorren  
Dorren\_was\_here\_cuz\_goog\_keeps\_losing\_my\_favorites

---

<div class="post-metadata">

**Author:** ![jsn1](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7ea924/32.png) [@jsn1](https://www.ruby-forum.com/u/jsn1)\
**Post date:** [September 18, 2007, 9:43pm UTC](https://www.ruby-forum.com/t/how-do-you-design-your-ror-web-applications/114882/4 "2007-09-18T21:43:47Z")

</div>

Hi ALL, thanks for posting the tips and I’m sure that others will be  
able to  
benefit from the information.

-Conrad

---

<div class="post-metadata">

**Author:** ![jsn1](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7ea924/32.png) [@jsn1](https://www.ruby-forum.com/u/jsn1)\
**Post date:** [September 20, 2007, 2:42am UTC](https://www.ruby-forum.com/t/how-do-you-design-your-ror-web-applications/114882/5 "2007-09-20T02:42:44Z")

</div>

Excellent comments Dorren, you are applying the agile life cycle based  
on iteractions.

---

<div class="post-metadata">

**Author:** ![jsn1](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7ea924/32.png) [@jsn1](https://www.ruby-forum.com/u/jsn1)\
**Post date:** [September 20, 2007, 3:18am UTC](https://www.ruby-forum.com/t/how-do-you-design-your-ror-web-applications/114882/6 "2007-09-20T03:18:53Z")

</div>

Jose P. wrote:

> Here is my question: how do you design your RoR web application?

The best way to design is concurrent with delivering features. We  
start by asking our customers (in our specific case the marketing  
department) what the most important features are. We implement these  
quickly, using unit tests to avoid debugging.

That’s a big step towards a good design, because making code testable  
invariably decouples it and improves its design.

> - Do you use an OOAD approach? data model/ class diagram, use cases?

No, because we can go from simple to complex incrementally, in between  
delivering features.

> - Do you desing your web pages first?

No, because if we start with business user stories, we must implement  
a little of a web page, implement a little code, and deploy, in small  
cycles. So the web pages grow features incrementally.

> - Do you start coding without desinging first?

Abso-freakin-lutely.

> - Do you use other tools such as Dreamweaver to create your pages, and  
> from there convert them in rhtml code?

Our graphics department does that. The important part, for  
programmers, is the interactive features, and there are only so many  
of those.

> - Do you use any quality assurance and quality control process?

We use the unit tests to gate every commit, and we commit every 10 or  
15 minutes or so to Subversion. If the tests don’t pass, we don’t  
commit.

> - Which other practical tips would you share that facilitate working  
> with RoR?

We also use pair programming, including dual keyboards and such. We  
are “allowed” to solo, but the more important the feature, the more  
likely we are to pair.

The less important the feature, the less likely we are to do it!

–  
Phlip

---

<div class="post-metadata">

**Author:** ![jsn1](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7ea924/32.png) [@jsn1](https://www.ruby-forum.com/u/jsn1)\
**Post date:** [September 24, 2007, 4:05am UTC](https://www.ruby-forum.com/t/how-do-you-design-your-ror-web-applications/114882/7 "2007-09-24T04:05:27Z")

</div>

Phlip,

I do not understand how do you manage unit tests to avoid debugging  
when you say “We implement these quickly, using unit tests  
to avoid debugging”.

could you please explain how do you write code testable? do you first  
create the tests and then code?

thanks

wrote:

> Jose P. wrote:
> 
> > Here is my question: how do you design your RoR web application?
> 
> The best way to design is concurrent with delivering features. We  
> start by asking our customers (in our specific case the marketing  
> department) what the most important features are. We implement these  
> quickly, using unit tests to avoid debugging.
> 
> That’s a big step towards a good design, because making code testable  
> invariably decouples it and improves its design.
> 
> > - Do you use an OOAD approach? data model/ class diagram, use cases?
> 
> No, because we can go from simple to complex incrementally, in between  
> delivering features.
> 
> > - Do you desing your web pages first?
> 
> No, because if we start with business user stories, we must implement  
> a little of a web page, implement a little code, and deploy, in small  
> cycles. So the web pages grow features incrementally.
> 
> > - Do you start coding without desinging first?
> 
> Abso-freakin-lutely.
> 
> > - Do you use other tools such as Dreamweaver to create your pages, and  
> > from there convert them in rhtml code?
> 
> Our graphics department does that. The important part, for  
> programmers, is the interactive features, and there are only so many  
> of those.
> 
> > - Do you use any quality assurance and quality control process?
> 
> We use the unit tests to gate every commit, and we commit every 10 or  
> 15 minutes or so to Subversion. If the tests don’t pass, we don’t  
> commit.
> 
> > - Which other practical tips would you share that facilitate working  
> > with RoR?
> 
> We also use pair programming, including dual keyboards and such. We  
> are “allowed” to solo, but the more important the feature, the more  
> likely we are to pair.
> 
> The less important the feature, the less likely we are to do it!
> 
> –  
> Phlip
