freelanceprogrammers.org Forum Index » ASP
N-Tier Architecture doubt in ASP.NET
Joined: 03 Jun 2005
Posts: 2
N-Tier Architecture doubt in ASP.NET
hello,
I`m a bit new to n-tier architecture in asp.net. Normally I build
applications with a base class which contains the common functions
which is inherited in most of the code-behind files.
And I use a seperate DataAccess.cs namespace which contains all the
database related functions like public DataReader GetAllUsers() which
returns a datareader/dataset to the code-behind classes.
I use this methods in the DataAccess namespace from the codebehind
files to access data.
1) .aspx pages (presentation layer)
2) Codebehind and Base class files (logic)
3) DataAccess.cs (Data Access Layer)
(when I build the project all code compiled into a single .DLL file in
the /bin folder)
My doubt is, am I following the correct n-tier model?
Today I read an article in 4GuysFromRolla
http://aspnet.4guysfromrolla.com/articles/102302-1.aspx which
reccomends to use a separate business objects.
I`m really confused now
Can anybody advice me on this...... or please direct me to related article
Thanks and Regards,
Karthik Nataraaj
Joined: 07 Jan 2006
Posts: 5
N-Tier Architecture doubt in ASP.NET
What I do is:
1) .aspx pages & Codebehind files(presentation layer) (a dll)
2) Business lLayer (logic cs files) (another dll)
3) Data Access Layer (a dll or web service or remoting)
Eva
Karthik Nataraaj <natkarthik@...> wrote:
hello,
I`m a bit new to n-tier architecture in asp.net. Normally I build
applications with a base class which contains the common functions
which is inherited in most of the code-behind files.
And I use a seperate DataAccess.cs namespace which contains all the
database related functions like public DataReader GetAllUsers() which
returns a datareader/dataset to the code-behind classes.
I use this methods in the DataAccess namespace from the codebehind
files to access data.
1) .aspx pages (presentation layer)
2) Codebehind and Base class files (logic)
3) DataAccess.cs (Data Access Layer)
(when I build the project all code compiled into a single .DLL file in
the /bin folder)
My doubt is, am I following the correct n-tier model?
Today I read an article in 4GuysFromRolla
http://aspnet.4guysfromrolla.com/articles/102302-1.aspx which
reccomends to use a separate business objects.
I`m really confused now
Can anybody advice me on this...... or please direct me to related article
Thanks and Regards,
Karthik Nataraaj
---------------------------------
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
To unsubscribe from this group, send an email to:
AspNetAnyQuestionIsOk-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]
Joined: 03 Jun 2005
Posts: 2
N-Tier Architecture doubt in ASP.NET
hello Eva,
Thanks for your reply.
For example if we want to display all the users info in a datagrid,
from the code-behind file I would put
dgUser.DataSource = myDB.GetAllUsers();
myDB.GetAllUsers function would be in the DataAccess class which will
return a datareader/dataset to bind to the datagrid.
In this situation what is the use of the Business Layer? or how should
we code it in a n-tier architecture?
What code would you place in the Data Access LAyer dll file? I
normally place all the DataReader/DataSet methods which connects to
the database and returns a datareader/dataset.
how to create a seperate dll files for these layers? By using the
class library? If so, where to store the class library files? Inside
the "wwwroot" or "Visual studio projects" folder or anyother central
location?
I guess, most of the questions above would be basic questions, but
please guide me on this...
Thanks and Regards,
Karthik Nataraaj
On 6/3/05, Eva Li <evadli@...> wrote:
> What I do is:
>
> 1) .aspx pages & Codebehind files(presentation layer) (a dll)
> 2) Business lLayer (logic cs files) (another dll)
> 3) Data Access Layer (a dll or web service or remoting)
>
> Eva
>
>
>
>
> Karthik Nataraaj <natkarthik@...> wrote:
> hello,
>
> I`m a bit new to n-tier architecture in asp.net. Normally I build
> applications with a base class which contains the common functions
> which is inherited in most of the code-behind files.
>
> And I use a seperate DataAccess.cs namespace which contains all the
> database related functions like public DataReader GetAllUsers() which
> returns a datareader/dataset to the code-behind classes.
>
> I use this methods in the DataAccess namespace from the codebehind
> files to access data.
>
> 1) .aspx pages (presentation layer)
> 2) Codebehind and Base class files (logic)
> 3) DataAccess.cs (Data Access Layer)
> (when I build the project all code compiled into a single .DLL file in
> the /bin folder)
>
> My doubt is, am I following the correct n-tier model?
>
> Today I read an article in 4GuysFromRolla
> http://aspnet.4guysfromrolla.com/articles/102302-1.aspx
> which
> reccomends to use a separate business objects.
>
> I`m really confused now
>
> Can anybody advice me on this...... or please direct me to related article
>
> Thanks and Regards,
>
> Karthik Nataraaj
>
>
> ---------------------------------
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
>
> To unsubscribe from this group, send an email to:
> AspNetAnyQuestionIsOk-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
>
>
> [Non-text portions of this message have been removed]
>
>
> ________________________________
> Yahoo! Groups Links
>
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
>
> To unsubscribe from this group, send an email to:
> AspNetAnyQuestionIsOk-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Joined: 07 Jan 2006
Posts: 63
N-Tier Architecture doubt in ASP.NET
There are several variations on n-tier architectures
like religions (catholic, protestant, methodist, judaism) the
adherents of each insist theirs is the one true way.
A 100% perfect n-tier app may be 10 x as much work in hours as a a 80%
pure app for example so 100% "purity" may not always be the best goal
from a time and cost effectiveness and business ROI standpoint.
There is much written on n-tier apps and many good books -- but keep
in mind that n-tier apps have degrees of perfection and 100%
perfection may not always be practical, time-effective or even
efficient from a performance scalability standpoint.
Articles like
http://www.theserverside.net/articles/showarticle.tss?id=FallacyDataLayer
http://www.booch.com/architecture/index.jsp
http://www.charlescarroll.com/chaz/site/3758/default.aspx
http://www.charlescarroll.com/chaz/site/3644/default.aspx
will giev you an idea how complex the subjects and dbetaes concerning
architecture, data layers and teirs are.
So keep in mind that your data layer may be pretty good and not
perfect and "impure" by a small amount, but it may be practical and
fast and cheaper than building a pure but impractical version. But if
there are the same app written by 8 architects with 8 n-tier models
they may not agree among themselves which approach is best, just like
a Christian who may be a wonderful person might not admit a Jewish
person who belief Christ nevr came was right. This is not so cut and
dry that 4-6 emails on a list may defintively settle which is best or
more perfect.
But a app with tiers even imperfect tiers is still a great tool in a
programmers arsenal -- and the debate and strving for perfection is a
great way to improve your tiers and skills. But there are no absolute
answers at the high end.
On 6/3/05, Karthik Nataraaj <natkarthik@...> wrote:
> hello,
>
> I`m a bit new to n-tier architecture in asp.net. Normally I build
> applications with a base class which contains the common functions
> which is inherited in most of the code-behind files.
>
> And I use a seperate DataAccess.cs namespace which contains all the
> database related functions like public DataReader GetAllUsers() which
> returns a datareader/dataset to the code-behind classes.
>
> I use this methods in the DataAccess namespace from the codebehind
> files to access data.
>
> 1) .aspx pages (presentation layer)
> 2) Codebehind and Base class files (logic)
> 3) DataAccess.cs (Data Access Layer)
> (when I build the project all code compiled into a single .DLL file in
> the /bin folder)
>
> My doubt is, am I following the correct n-tier model?
>
> Today I read an article in 4GuysFromRolla
> http://aspnet.4guysfromrolla.com/articles/102302-1.aspx
> which
> reccomends to use a separate business objects.
>
> I`m really confused now
>
> Can anybody advice me on this...... or please direct me to related article
>
> Thanks and Regards,
>
> Karthik Nataraaj
>
> ________________________________
> Yahoo! Groups Links
>
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
>
> To unsubscribe from this group, send an email to:
> AspNetAnyQuestionIsOk-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Joined: 07 Jan 2006
Posts: 5
N-Tier Architecture doubt in ASP.NET
Karthik,
In my data access layer, I do the same thing as you did,
that is putting all the DataRader/DataSet methods.
In the business layer, I put more business logic. For example,
some times, I need to contruct more complex data structure
to return to my presentation layer more information.
perticular, some complex objects. So, my presentation
layer does not only comsume dataset. With those objects,
the presentation layer is easy to access methods, properties
exposed by the objects. When I use those objects across
pages, I just save the object to session.
Thanks!
Eva
Karthik Nataraaj <natkarthik@...> wrote:
hello Eva,
Thanks for your reply.
For example if we want to display all the users info in a datagrid,
from the code-behind file I would put
dgUser.DataSource = myDB.GetAllUsers();
myDB.GetAllUsers function would be in the DataAccess class which will
return a datareader/dataset to bind to the datagrid.
In this situation what is the use of the Business Layer? or how should
we code it in a n-tier architecture?
What code would you place in the Data Access LAyer dll file? I
normally place all the DataReader/DataSet methods which connects to
the database and returns a datareader/dataset.
how to create a seperate dll files for these layers? By using the
class library? If so, where to store the class library files? Inside
the "wwwroot" or "Visual studio projects" folder or anyother central
location?
I guess, most of the questions above would be basic questions, but
please guide me on this...
Thanks and Regards,
Karthik Nataraaj
On 6/3/05, Eva Li <evadli@...> wrote:
> What I do is:
>
> 1) .aspx pages & Codebehind files(presentation layer) (a dll)
> 2) Business lLayer (logic cs files) (another dll)
> 3) Data Access Layer (a dll or web service or remoting)
>
> Eva
>
>
>
>
> Karthik Nataraaj <natkarthik@...> wrote:
> hello,
>
> I`m a bit new to n-tier architecture in asp.net. Normally I build
> applications with a base class which contains the common functions
> which is inherited in most of the code-behind files.
>
> And I use a seperate DataAccess.cs namespace which contains all the
> database related functions like public DataReader GetAllUsers() which
> returns a datareader/dataset to the code-behind classes.
>
> I use this methods in the DataAccess namespace from the codebehind
> files to access data.
>
> 1) .aspx pages (presentation layer)
> 2) Codebehind and Base class files (logic)
> 3) DataAccess.cs (Data Access Layer)
> (when I build the project all code compiled into a single .DLL file in
> the /bin folder)
>
> My doubt is, am I following the correct n-tier model?
>
> Today I read an article in 4GuysFromRolla
> http://aspnet.4guysfromrolla.com/articles/102302-1.aspx
> which
> reccomends to use a separate business objects.
>
> I`m really confused now
>
> Can anybody advice me on this...... or please direct me to related article
>
> Thanks and Regards,
>
> Karthik Nataraaj
>
>
> ---------------------------------
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
>
> To unsubscribe from this group, send an email to:
> AspNetAnyQuestionIsOk-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
>
>
> [Non-text portions of this message have been removed]
>
>
> ________________________________
> Yahoo! Groups Links
>
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
>
> To unsubscribe from this group, send an email to:
> AspNetAnyQuestionIsOk-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
---------------------------------
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
To unsubscribe from this group, send an email to:
AspNetAnyQuestionIsOk-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]
Joined: 07 Jan 2006
Posts: 5
N-Tier Architecture doubt in ASP.NET
Hi All,
I have a Web service implemented using ASP.NET. I call
the service in my JavaScript file using XMLHTTP POST.
It works fine in my development machine. However, when
test this across machines, i.e. use the web app from another
machine, I can not get data back from my web service using
XMLHTTP. I`ve already tried the following:
1. Add to web.config file the following:
<webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
</protocols>
</webServices>
2. Enable ~{!0~}Access data sources across domains~{!1~} in internet IE
browser
Can any one help me?
Eva
[Non-text portions of this message have been removed]
Joined: 21 Jan 2006
Posts: 3
N-Tier Architecture doubt in ASP.NET
hi Karthik,
i think the Isssue Tracker will be good for you, see it in
www.asp.net
and if u can see Infragistics at
http://www.Infragistics.com
Karthik Nataraaj <natkarthik@...> wrote:
hello Eva,
Thanks for your reply.
For example if we want to display all the users info in a datagrid,
from the code-behind file I would put
dgUser.DataSource = myDB.GetAllUsers();
myDB.GetAllUsers function would be in the DataAccess class which will
return a datareader/dataset to bind to the datagrid.
In this situation what is the use of the Business Layer? or how should
we code it in a n-tier architecture?
What code would you place in the Data Access LAyer dll file? I
normally place all the DataReader/DataSet methods which connects to
the database and returns a datareader/dataset.
how to create a seperate dll files for these layers? By using the
class library? If so, where to store the class library files? Inside
the "wwwroot" or "Visual studio projects" folder or anyother central
location?
I guess, most of the questions above would be basic questions, but
please guide me on this...
Thanks and Regards,
Karthik Nataraaj
On 6/3/05, Eva Li <evadli@...> wrote:
> What I do is:
>
> 1) .aspx pages & Codebehind files(presentation layer) (a dll)
> 2) Business lLayer (logic cs files) (another dll)
> 3) Data Access Layer (a dll or web service or remoting)
>
> Eva
>
>
>
>
> Karthik Nataraaj <natkarthik@...> wrote:
> hello,
>
> I`m a bit new to n-tier architecture in asp.net. Normally I build
> applications with a base class which contains the common functions
> which is inherited in most of the code-behind files.
>
> And I use a seperate DataAccess.cs namespace which contains all the
> database related functions like public DataReader GetAllUsers() which
> returns a datareader/dataset to the code-behind classes.
>
> I use this methods in the DataAccess namespace from the codebehind
> files to access data.
>
> 1) .aspx pages (presentation layer)
> 2) Codebehind and Base class files (logic)
> 3) DataAccess.cs (Data Access Layer)
> (when I build the project all code compiled into a single .DLL file in
> the /bin folder)
>
> My doubt is, am I following the correct n-tier model?
>
> Today I read an article in 4GuysFromRolla
> http://aspnet.4guysfromrolla.com/articles/102302-1.aspx
> which
> reccomends to use a separate business objects.
>
> I`m really confused now
>
> Can anybody advice me on this...... or please direct me to related article
>
> Thanks and Regards,
>
> Karthik Nataraaj
>
>
> ---------------------------------
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
>
> To unsubscribe from this group, send an email to:
> AspNetAnyQuestionIsOk-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
>
>
> [Non-text portions of this message have been removed]
>
>
> ________________________________
> Yahoo! Groups Links
>
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
>
> To unsubscribe from this group, send an email to:
> AspNetAnyQuestionIsOk-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
---------------------------------
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
To unsubscribe from this group, send an email to:
AspNetAnyQuestionIsOk-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
----------------------
Apperciate your Help,
Mohamed Rady Hasssan
Solution Developer
Cell: 010- 49-79-444
rady.mohamed@...
Think Fast, Listen Too Much, Speak Too Slowly
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
[Non-text portions of this message have been removed]
Joined: 09 Jan 2006
Posts: 17
N-Tier Architecture doubt in ASP.NET
Hi N-tier architecture Champs,
I am new totaly new in N-Architecture Designing
but the conversation between Karthik Nataraaj [natkarthik@...] and Eva
[evadli@...]
helped me to understand the matter little bit
but Again that`s not completely clear
can anyone rectify me where and how i am going worng at
the following designing
[Presentation Layer]
||===>> All .aspx & Codebehind files comes under this.
||
||
[Business Logic Layer]
||===>> This section will deal with all complex business logic,
|| interact in between Presentation and (DL) Data Layer,
|| will not have any connection with Datasource. this is a Class library (.dll)
||
||
[Data Access Layer]
||====>> This section will supply unfiltered data to BL (BusinessLayer)
|| connection with Datasource will be made only in this layer.
|| this is a Class library (.dll)
||
||
[Database Connection Layer]
|| this is a simple Class library (.dll)
|| will fetch info from webconfig file and estabilsh a connection object.
||
||
[Data Source SQL]
Waiting for your expert comment.
Thanks
Arindam
Thanks & Regards
Arindam
Web Designer & Developer
---------------------------------
How much free photo storage do you get? Store your friends n family photos for
FREE with Yahoo! Photos.
http://in.photos.yahoo.com
[Non-text portions of this message have been removed]
Joined: 07 Jan 2006
Posts: 5
N-Tier Architecture doubt in ASP.NET
That`s waht I do with my applications. You are on the right
track. When you start to implement, there are considerations
about abstract and duplication.
Good luck!
Eva
Arindam <e_arindam@...> wrote:
Hi N-tier architecture Champs,
I am new totaly new in N-Architecture Designing
but the conversation between Karthik Nataraaj [natkarthik@...] and Eva
[evadli@...]
helped me to understand the matter little bit
but Again that`s not completely clear
can anyone rectify me where and how i am going worng at
the following designing
[Presentation Layer]
||===>> All .aspx & Codebehind files comes under this.
||
||
[Business Logic Layer]
||===>> This section will deal with all complex business logic,
|| interact in between Presentation and (DL) Data Layer,
|| will not have any connection with Datasource. this is a Class library (.dll)
||
||
[Data Access Layer]
||====>> This section will supply unfiltered data to BL (BusinessLayer)
|| connection with Datasource will be made only in this layer.
|| this is a Class library (.dll)
||
||
[Database Connection Layer]
|| this is a simple Class library (.dll)
|| will fetch info from webconfig file and estabilsh a connection object.
||
||
[Data Source SQL]
Waiting for your expert comment.
Thanks
Arindam
Thanks & Regards
Arindam
Web Designer & Developer
---------------------------------
How much free photo storage do you get? Store your friends n family photos for
FREE with Yahoo! Photos.
http://in.photos.yahoo.com
[Non-text portions of this message have been removed]
---------------------------------
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
To unsubscribe from this group, send an email to:
AspNetAnyQuestionIsOk-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]
All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help
China Wholesale - Electronics Products
Character Studio - Tutorials and Help







