473,769 Members | 2,143 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1865
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*****@discuss ions.microsoft. com> wrote in message
news:F3******** *************** ***********@mic rosoft.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*****@discuss ions.microsoft. com> wrote in message
news:F3******** *************** ***********@mic rosoft.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**********@d iscussions.micr osoft.com> wrote in message
news:03******** *************** ***********@mic rosoft.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*****@discuss ions.microsoft. com> wrote in
message
news:F3******** *************** ***********@mic rosoft.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
2763
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. The problem is the article is in VisualBasic. I already get the collection to be recognized as a Data Source by the IDE. It populated the DataGrid correctly from the fields on the items object of the collection, but I can't get the DataGrid to...
3
7003
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 XmlSerializer will only serialize the collection items - with the default root as ArrayofMyItems etc. My custom collection class has some additional public properties that I would like to include in the serialization above the items element array (in
1
7165
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 decent amount of time looking thru code and really have not found anything that suits my needs. I simply want to pass in a filter expression use that that expression against the protected List (exposed by CollectionBase) object and return an array list...
6
1631
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 of the objects that fall completely or partially between two specified dates. The way I'm doing this at the moment is to iterate thru the entire collection on each query and pull out the valid objects, but this is hardly an optimal way to do it....
21
2104
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 string with comma delimited values. For example, if I were to render two text boxes. One with the Value Terry and the Other with the Value 'Burns' I would get the following value Terry,Burns.
3
2241
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 layer. The data is stored in memory (fetched from DB only once). The collection is dynamic in the sense that it can change. My personal opinion is that using dataset makes you code take much more memory than a custom collection. Datasets have...
6
2337
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 having to do a httpwebreqeust call.
19
4919
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 exception of custom Collection Classes. Background: I'm developing an A2K .mdb to be deployed as an .mde at my current job-site. It has several custom controls which utilize custom classes to wrap built-in controls, and add additional functionality....
6
5548
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 less resource heavy and can be passed lightweight to the presentation layer. Thanks, NJ
0
9583
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10210
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9990
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9860
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8869
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7406
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5297
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5445
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3560
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.