473,386 Members | 1,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Custom Collection and Filtering Data

As with most web applications speed is a huge deal to me in my applications.
My customers don't really care if my app is a true 3 tier application or not,
they just want it to be faster then it was yesterday. Because of this I try
to limit my calls to the database by using a loading lookup data for a
customer and then filtering down to what I need. (I have alot of recursive
logic because of alot of tree controls).

Here is my question. Why do people build their own filter methods for
custom collections instead of filling a dataset and then filtering the
dataset and reloading the custom collection to reflect what they need to see?
It seems like MS would have made their dataset filter method very fast, much
faster then anything I could do in a true 3 tier evironment.

Like I said before, I am looking for the fastest way to do things in vb.net,
while still making my apps manageable. I am not a zelot about true 3 tier
architecture because I can do alot of things a good bit faster if I mix SQL
into my business layer and execution speed is a big deal to me.

Any comments would be helpful.
Thanks,
Shawn Ramirez

Jun 30 '06 #1
3 1839
The solution most develpoer use is the Query Object design pattern
(http://www.martinfowler.com/eaaCatal...ryObject.html). The performance
you'll get depends on a lot of things - namely what exactly you are trying
to do and how your architecture is set up. It might be slower than a
dataset's built-in functionality (it's certainly more work for the developer
since you have to code more), but it's also more maintainable and readable.

Many developers, myself included, don't think DataSets have a place in a
medium-large application. Others, believe that they're ok in the Data Access
Layer - in which case you could use their powerful querying. The rest don't
know any different and use them as the only business layer they have. Why
not just use an OR Mapper is my question?

Thankfully, with the introduction of LINQ in 3.0, all of this will become
theoretical babble :)

Karl
--
http://www.openmymind.net/

"Shawn Ramirez" <Shawn Ra*****@discussions.microsoft.com> wrote in message
news:F3**********************************@microsof t.com...
As with most web applications speed is a huge deal to me in my
applications.
My customers don't really care if my app is a true 3 tier application or
not,
they just want it to be faster then it was yesterday. Because of this I
try
to limit my calls to the database by using a loading lookup data for a
customer and then filtering down to what I need. (I have alot of
recursive
logic because of alot of tree controls).

Here is my question. Why do people build their own filter methods for
custom collections instead of filling a dataset and then filtering the
dataset and reloading the custom collection to reflect what they need to
see?
It seems like MS would have made their dataset filter method very fast,
much
faster then anything I could do in a true 3 tier evironment.

Like I said before, I am looking for the fastest way to do things in
vb.net,
while still making my apps manageable. I am not a zelot about true 3 tier
architecture because I can do alot of things a good bit faster if I mix
SQL
into my business layer and execution speed is a big deal to me.

Any comments would be helpful.
Thanks,
Shawn Ramirez

Jun 30 '06 #2
Most of my filters are on sets with between 10 and 200 rows. Some get big
however with 1500 rows or so.

The thing is that sometimes I have to filter on 1 field sometimes I have to
filter on 2 and they may not be the same field everytime. So that
flexibilty is a big plus in my eyes.

I will look into the queryObject however. I try to keep an open mind on
this stuff.
If you don't use the DataSet do you use the DataReader to get your data in?

My big question on LINQ is will it be fast, faster then a dataset filter (or
now that I know about it, the queryObject).

Thanks for your time.

"Karl Seguin [MVP]" wrote:
The solution most develpoer use is the Query Object design pattern
(http://www.martinfowler.com/eaaCatal...ryObject.html). The performance
you'll get depends on a lot of things - namely what exactly you are trying
to do and how your architecture is set up. It might be slower than a
dataset's built-in functionality (it's certainly more work for the developer
since you have to code more), but it's also more maintainable and readable.

Many developers, myself included, don't think DataSets have a place in a
medium-large application. Others, believe that they're ok in the Data Access
Layer - in which case you could use their powerful querying. The rest don't
know any different and use them as the only business layer they have. Why
not just use an OR Mapper is my question?

Thankfully, with the introduction of LINQ in 3.0, all of this will become
theoretical babble :)

Karl
--
http://www.openmymind.net/

"Shawn Ramirez" <Shawn Ra*****@discussions.microsoft.com> wrote in message
news:F3**********************************@microsof t.com...
As with most web applications speed is a huge deal to me in my
applications.
My customers don't really care if my app is a true 3 tier application or
not,
they just want it to be faster then it was yesterday. Because of this I
try
to limit my calls to the database by using a loading lookup data for a
customer and then filtering down to what I need. (I have alot of
recursive
logic because of alot of tree controls).

Here is my question. Why do people build their own filter methods for
custom collections instead of filling a dataset and then filtering the
dataset and reloading the custom collection to reflect what they need to
see?
It seems like MS would have made their dataset filter method very fast,
much
faster then anything I could do in a true 3 tier evironment.

Like I said before, I am looking for the fastest way to do things in
vb.net,
while still making my apps manageable. I am not a zelot about true 3 tier
architecture because I can do alot of things a good bit faster if I mix
SQL
into my business layer and execution speed is a big deal to me.

Any comments would be helpful.
Thanks,
Shawn Ramirez


Jun 30 '06 #3
Ya, I use datareaders to map between my domain and data layer. Again, you
can use an OR Mapper too to do it.

LINQ will work as-is on any class that implements IEnumerable. I can't say
for sure, but ya, it probably won't be as fast. That said, there's also a
new IQueriable (I think that's the name) interface that will allow for much
more specifalized and tuning. I have no doubt that filtering a class that
implements this interfaces will be really fast.

Don't forget that there will be a LINQ for datasets also. I'm sure datasets
will implement IQueriable too. It seems strange to through LINQ onto of
datasets (which already have their own query language - SQL), but I guess
the point is to make it unified...

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Shawn Ramirez" <Sh**********@discussions.microsoft.com> wrote in message
news:03**********************************@microsof t.com...
Most of my filters are on sets with between 10 and 200 rows. Some get big
however with 1500 rows or so.

The thing is that sometimes I have to filter on 1 field sometimes I have
to
filter on 2 and they may not be the same field everytime. So that
flexibilty is a big plus in my eyes.

I will look into the queryObject however. I try to keep an open mind on
this stuff.
If you don't use the DataSet do you use the DataReader to get your data
in?

My big question on LINQ is will it be fast, faster then a dataset filter
(or
now that I know about it, the queryObject).

Thanks for your time.

"Karl Seguin [MVP]" wrote:
The solution most develpoer use is the Query Object design pattern
(http://www.martinfowler.com/eaaCatal...ryObject.html). The
performance
you'll get depends on a lot of things - namely what exactly you are
trying
to do and how your architecture is set up. It might be slower than a
dataset's built-in functionality (it's certainly more work for the
developer
since you have to code more), but it's also more maintainable and
readable.

Many developers, myself included, don't think DataSets have a place in a
medium-large application. Others, believe that they're ok in the Data
Access
Layer - in which case you could use their powerful querying. The rest
don't
know any different and use them as the only business layer they have. Why
not just use an OR Mapper is my question?

Thankfully, with the introduction of LINQ in 3.0, all of this will become
theoretical babble :)

Karl
--
http://www.openmymind.net/

"Shawn Ramirez" <Shawn Ra*****@discussions.microsoft.com> wrote in
message
news:F3**********************************@microsof t.com...
> As with most web applications speed is a huge deal to me in my
> applications.
> My customers don't really care if my app is a true 3 tier application
> or
> not,
> they just want it to be faster then it was yesterday. Because of this
> I
> try
> to limit my calls to the database by using a loading lookup data for a
> customer and then filtering down to what I need. (I have alot of
> recursive
> logic because of alot of tree controls).
>
> Here is my question. Why do people build their own filter methods for
> custom collections instead of filling a dataset and then filtering the
> dataset and reloading the custom collection to reflect what they need
> to
> see?
>
>
> It seems like MS would have made their dataset filter method very fast,
> much
> faster then anything I could do in a true 3 tier evironment.
>
> Like I said before, I am looking for the fastest way to do things in
> vb.net,
> while still making my apps manageable. I am not a zelot about true 3
> tier
> architecture because I can do alot of things a good bit faster if I mix
> SQL
> into my business layer and execution speed is a big deal to me.
>
> Any comments would be helpful.
> Thanks,
> Shawn Ramirez
>
>
>


Jun 30 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: SammyBar | last post by:
Hi, I'm trying to bind a custom collection class to a data grid, following the guidelines from the article http://msdn.microsoft.com/msdnmag/issues/05/08/CollectionsandDataBinding/default.aspx....
3
by: Anthony Bouch | last post by:
Hi I've been reading using the XmlSerializer with custom collections. I've discovered that when serializing a custom collection (a class that implements ICollection, IList etc.) the...
1
by: Erik | last post by:
I have a base collection class that I use to derive all my collections from. It derives from CollectionBase. I have added custom Sorting and now would like to add Filtering. I have spent a...
6
by: Mel | last post by:
I have a large collection of custom objects, each representing a period in time with each having a start datetime and an end datetime. I frequently need to query this collection to return a subset...
21
by: One Handed Man \( OHM - Terry Burns \) | last post by:
When using a custom control. In order to check and see if values have changed one has to implement the IPostBackDataCollection interface. The values returned for the control seem to be simply a...
3
by: JimGreen | last post by:
We are designing a WinForm application ( three tiered) There is a debate in our group as to whether we should pass datasets or our custom collections from business layer to the user interface...
6
by: kbs | last post by:
Hi, I'm looking for some good examples that illustrate how to code a web service that exposes a custom collection so that the properties of the collection are accessible on the client without...
19
by: Jamey Shuemaker | last post by:
I'm in the process of expanding my knowledge and use of Class Modules. I've perused MSDN and this and other sites, and I'm pretty comfortable with my understanding of Class Modules with the...
6
by: npaulus | last post by:
Hi, DataSets are usually resource heavy. Instead of having to pass them from my middle tier to my presentation layer I was wondering if anyone has developed a custom collection object that is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.