0

I want to develop an application based on ASP.net and Oracle using three tier architecture where the data access layer will be kept on a totally different server(Linux). I posted a question before and some people suggested me to use General asp and NHibernate. Now before i start the web application, i want to be sure about that. Please share your idea in detail.

Thank you

  • Will your whole data access layer be on a different server or just your database be on a different server? – Odd Sep 30 '09 at 05:41

2 Answers2

1

I see 2 questions: what tiering and layering to use, and what technology.

tiering: I have two definition issues:

  • When you say "tier", do you mean physical layer? To me, a tier is a physical thing, i.e., a server (or set of servers), but sometimes other people use the same term for logical layers.
  • The data access layer is a software layer that you write in .NET, not the actual database (which you'll be running on Oracle/Linux).

In general, you have logical layers which you distribute over tiers. A way of distributing layers over tiers (and the one you are shooting for if I am reading your question correctly):

  1. browser: runs your UI
  2. web server: runs the presentation, business and data access layer
  3. database server: runs the storage "layer"

Communication: 1 <> 2: HTTP, 2 <> 3: native database format.

Technology: NHibernate is a good idea, but can be a bit challenging if you are new to the world of O/RM. If you do go for NH, check out the Fluent NHibernate effort; this lets you specify mappings between your entities and database tables in C# instead of using XML. If you find NHibernate a bit daunting to dive into, look at standard Microsoft solutions such as Entity Framework. The current version has some issues, but for simple systems those might not be to big a deal.

Have you considered using ASP.NET MVC? If so, S#arp architecture is a nice starting point (both for MVC and for NHibernate). Another suggestion is to look at CSLA, also an open source architecture. CSLA has not been designed with testability or separation of concerns in mind, but might be easier to grok.

tijmenvdk
  • 1,773
  • 10
  • 19
  • Actually my database will be in a linux server. And my Application will be in a Windows server. Now you clear? I tried ASP.net MVC, CRUD operation is ok here. BUT everything here is handcoded which is difficult for me. –  Sep 30 '09 at 06:53
0

You can use ASP.NET Webforms or ASP.NET MVC for the UI and additional layers for business logic and data access. Here's how my team's project is layered/tiered:

Tier 1: Windows Server 2003 (IIS)

  • ASP.NET WebForms UI & WCF Services
  • C# library for business logic
  • C# library for data access (built using Oracle Data Provider for .NET)

Tier 2:

  • Oracle database running on a Linux server

I hope that helps.

Kevin Babcock
  • 10,187
  • 19
  • 69
  • 89