473,403 Members | 2,284 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,403 software developers and data experts.

N-Tier Architecture

Lately i started to use microsoft code block and read about N-tier model..
I got some templates which implement custom collection for each database
table, I used to use DataTable and DataView in my programs so the Entity is
Datarow or Datarowview and the collection is the Dataview it self..

This way i was able to do all tasks without go back to the database, i was
searching with findRows or use RowFilter to search using "Like" and other
sql expression [i notes later in my first windows application that RowFilter
is really slow in preformance].

For what reason people need to implement custom collections and write all
this code to reimplement something already exist!!
thanx
Nov 19 '05 #1
4 1124
With Custom collection you can ensure that the whole group is of same
types. For example ClsCustomer type cam only be added in
CustomerCollection. Second i can write lot of central logic buisness
code to all the classes added in collection.

-------
Regards ,
C#, VB.NET , SQL SERVER , UML , DESIGN Patterns Interview question book
http://www.geocities.com/dotnetinterviews/
My Interview Blog
http://spaces.msn.com/members/dotnetinterviews/

Nov 19 '05 #2
But You will have to write alot of code.. and implement something like
RowFilter is really hard.. how could i search for a Customer in
CustomerCollection with a part of the firstname (Like) or range of date
(Between) in custom collection..
say i want to use (like) expression then i must loop on my collection
implement search kind of
str.indexOf(input.ToString());
to return this customer if index >= 0;
Is this efficient way (from preformance view) if i have 500 customers in my
collection and better than using implemented Datatable and Dataview
methods??
thanx
<sh**********@yahoo.com> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...
With Custom collection you can ensure that the whole group is of same
types. For example ClsCustomer type cam only be added in
CustomerCollection. Second i can write lot of central logic buisness
code to all the classes added in collection.

-------
Regards ,
C#, VB.NET , SQL SERVER , UML , DESIGN Patterns Interview question book
http://www.geocities.com/dotnetinterviews/
My Interview Blog
http://spaces.msn.com/members/dotnetinterviews/

Nov 19 '05 #3
I have an article which talks about custom entities in a fair amount of
details:
http://msdn.microsoft.com/asp.net/de...CustEntCls.asp

There's no doubt that you are right, you'll need to re-write a lot of the
code which the DataTables already have built-in. There are frameworks such
as CSLA.Net (http://www.lhotka.net/ArticleIndex.a...ea=CSLA%20.NET) which
provide a lot of that core functionality. Additionally, you can use Code
Generators such as CodeSmith (www.codesmithtools.com) to automatically
generate a lot of the code for you.

Let's not forget, you can still use your data layer to *gasp* access the
data. DataTable's SELECT might be good, but it's no where as good as SQL
Server's. w

Karl

--
-->
MY ASP.Net tutorials
http://www.openmymind.net/
http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!
"Islamegy®" <Is******@Private.4me> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Lately i started to use microsoft code block and read about N-tier model..
I got some templates which implement custom collection for each database
table, I used to use DataTable and DataView in my programs so the Entity
is Datarow or Datarowview and the collection is the Dataview it self..

This way i was able to do all tasks without go back to the database, i was
searching with findRows or use RowFilter to search using "Like" and other
sql expression [i notes later in my first windows application that
RowFilter is really slow in preformance].

For what reason people need to implement custom collections and write all
this code to reimplement something already exist!!
thanx

Nov 19 '05 #4
PJ6
Custom collections for each table violates the layer of abstraction that
needs to exist between the Object Oriented and Relational elements of your
project. It also over-complicates it and makes change management a
nightmare.

Do not put raw SQL in compiled code. The bulk of all business logic belongs
in the data layer - use stored procedures. Also it is generally better to
filter result sets servier-side.

Paul

"Islamegy®" <Is******@Private.4me> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Lately i started to use microsoft code block and read about N-tier model..
I got some templates which implement custom collection for each database
table, I used to use DataTable and DataView in my programs so the Entity
is Datarow or Datarowview and the collection is the Dataview it self..

This way i was able to do all tasks without go back to the database, i was
searching with findRows or use RowFilter to search using "Like" and other
sql expression [i notes later in my first windows application that
RowFilter is really slow in preformance].

For what reason people need to implement custom collections and write all
this code to reimplement something already exist!!
thanx

Nov 19 '05 #5

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

Similar topics

0
by: tstephan | last post by:
In the past we have used the classic nTier design with COM+, SQL Server and MFC. We are currently working on a new project with an opportunity to use .NET, ADO.NET, etc. One of the areas where I...
25
by: Stuart Hilditch | last post by:
Hi all, I am hoping that someone with some experience developing nTier apps can give me some advice here. I am writing an nTier web app that began with a Data Access Layer (DAL), Business...
1
by: Mike Lerch | last post by:
Pretty much, TSIA, but I'll expand a bit: I'm still trying to get my head around the n-tier approach to web design. It seems to me that when you use DataBinder.Eval in the ASPX that your tiers...
5
by: Ryan Ternier | last post by:
I know how this should be done in regards to nTier, but it seems a bit inneficient, and was wondering if there's a solution that I havn't thought of yet. (I'm switching this loop to For Each Row...
1
by: Dnx | last post by:
hi i'm a very beginner of visual studio .net 2003 and aspx/vb.net i have to create a project with an architecture ntier i understand the concept but in practical, i don't know where to begin... ...
0
by: Jon Vaughan | last post by:
Hello, I have an NTIER Model written in VB.NET, at the moment is running as a client / server. Pushing a pulling data from the client to the server is fine and is done via webservice calls. But...
0
by: Jon Vaughan | last post by:
Hello, I have an NTIER Model written in VB.NET, at the moment is running as a client / server. Pushing a pulling data from the client to the server is fine and is done via webservice calls. But...
3
by: Richard Coltrane | last post by:
Hello Im reading this article about the Gridview: http://msdn.microsoft.com/msdnmag/issues/04/08/GridView/ Whilst I realise that im not forced to use their methods I do find it confusing...
0
by: acnx | last post by:
I have an ntier application. I am trying to determine what is the best practice for handing errors in a datagrid. My datagrids are able to add, update and delete data. I am using a...
0
by: fra | last post by:
Ciao a tutti, č disponibile on line un esempio completo di progetto NTier da usare come base per lo sviluppo di una web application strutturata?? Intendo un esempio con gestione corretta dei vari...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
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...
0
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...

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.