Obviously, one goal of SubSonic is abstraction -- the ability to deal with domain entities like ProductCollection() instead of writing SQL. Seems to me a real useful and differentiating idea would be the ability to "re-query" or filter collections after they have loaded from the database.
Yes, you can do this now with methods like FindAll using delegates. Workable, but heady stuff for some people. I would love to be able to use the same syntax that I used to query in the first place, to filter later.
Let's say I am querying a clothing catalog. I want to get all the Jackets. I would do:
ProductCollection myJackets = new ProductCollection.Where("Type", "Jacket").Load()
Now I have a collection of jackets. What if I just want leather jackets, without hitting the database again? I would have to do a Find() with a very different syntax, even though I am performing a very similar task. How about:
ProductCollection myLeatherJackets = myJackets.Where("Material", "Leather").Filter() or some such?
I would find this intuitive -- one syntax to express criteria. Non-trivial to implement, of course, but elegant to use.
The reason this comes to mind is that I became accustomed to the Filter property of a recordset back in the classic ASP days. It allowed for really "inexpensive" code, ie, minimizing database hits.
Thoughts?