denuno/Taffy — comment on commit de8986d8b57db2aa11c800031bb3157cfe2b9fdb
File:  line 0
By denuno:

Hi Adam!

There's nothing wrong with your thinking. Seems like a logical
separation. I just like flexibility, and the requirement of two objects
for a single object isn't always optimal.

It reminds me of the old "gateway" pattern Sean [now ;)] rails against.

With "my" way, you can still do two CFCs for a single "object" if you
like, but you don't *have* to.

I generally err on the side of flexibility, even if that flexibility can
be used for Evil. Mostly 'cause I'm beyond Good and Evil. An uncarved
block, if you will. ;)p

Seriously though -- especially in something that can be facade-like --
you don't know how the end user will want/need things set up. They
could have valid reasons for using one vs. two, and thus see the
requirement of two as inconvenient, if well-meaning.

Members and collections aren't always clear cut, I reckon.

Maybe we should try as hard as we can to keep them clear... avoid one
element arrays, per se... *shrug*

Don't get me started on set theory ('cuz it's crazy, yo!). ;]

:Denny

On 12/3/11 6:04 PM, Adam Tuttle wrote:
> Hi Denny,
>
> I'm not sure I agree with this change (of course, you're welcome to keep it in your copy), because it alters the way that Taffy breaks things down.
>
> Taffy purposefully separates collection handlers from member handlers because each should respond differently to each verb. A GET on the collection should return several records, while a GET on the member should return just one, and so on.
>
> The URL formats [that you mentioned in your comment](http://fusiongrokker.com/post/taffy-a-restful-framework-for-coldfusion#comment-DA9F6A04-C672-6D20-A4D7279292FC4FBF) are totally possible without this modification, it just requires two CFC's.
>
> Collection:
>
>
>
> Member:
>
>
>
> Let me know if that just wasn't clear, or if you still disagree with the philosophy of splitting them up. If you disagree, I'd be curious to talk to you about a few things.
>
> Adam
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/denuno/Taffy/commit/de8986d8b57db2aa11c800031bb3157cfe2b9fdb#commitcomment-766686