On 8 October 2010 03:34, Marnen Laibow-Koser <[email protected]> wrote:
> Colin Law wrote:
> [...]
>> The whole design process is iterative of course, but I think I would
>> rephrase your suggestion as follows:
>> First think (and preferably talk) about the underlying objects in the
>> system so as to get a first stab at the models required (not the code,
>> just what the models are likely to be), then define what you want the
>> user to do, and then figure out the code to make it happen.
>
> No, absolutely not.  There is no point in thinking about the models
> involved before thinking about the desired functionality.
>
>>  Round and
>> round ad nauseum.  That is not to say that I think this is the one and
>> only 'right' way to do it.
>
> No, of course there's more than one right way.  But I think yours is one
> of the many wrong ways: it is inappropriate to start considering
> implementation details before you know what the implementation should do
> for the end user.
>
> I'll turn the question around: why would you want to consider
> implementation before functionality?  What possible benefits could it
> produce?

Well of course you need some idea of functionality before anything can
be designed.  If I can bring back a quote from your earlier post:

> ... when I
> put together an application, I usually think first about how I want it
> to present itself to the user and what the user should be able to
> accomplish (and write Cucumber scenarios accordingly).  Only as a result
> of making those scenarios reality do I write model classes or anything
> else.

I am suggesting that there is a phase before considering in detail how
the application should present itself to the user.  For example to
take the ubiquitous shopping app, before considering how the logon
page should operate there is the decision that there will be users and
that there should be a page where the user can logon.  Similarly
before considering how precisely the user adds a product to his
shopping cart there is the decision that there will be products and
shopping carts.  It is at this stage that initial stabs at what the
models will be can be made (note that I am not suggesting writing any
code here, merely thinking about what the models will be).  It does
not seem feasible that one can write a Cucumber scenario for user
logon and then go from that to the idea that maybe one needs a user
model.  Is it not true that the concept of a User must exist before
one can write the scenario?   Note again that I am not suggesting
writing any code at this time, just thinking about what the models
should be.

Colin

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to