views:

152

answers:

3

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

+1  A: 

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
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.
Rahbee
A: 

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
Hey i have the same scenario...
Rahbee
A: 

Hi

I have the same scenario I am new to .NET, want to follow 3tier approach using ASP.NET Webforms or ASP.NET MVC,C#,and Oracle 10g. I like your explanations. Let's assume I'm stupid can you give an example where we can do the following: add personal details, view details, delete details and update/modify details with full details of code,physical, software components required, and configurations if any.

Thank you in advance

ephraim