C# - What Should Layers In Dotnet Application

Apr 19, 2010

I am using layered architecture in dotnet (mostly I work on web projects). I am confuse what layers should I use ?

I have small idea that there should be the following layers.

user interface
customer types (custom entities)
business logic layer
data access layer

My purpose is sure quality of work and maximum re-usability of code.

some one suggested to add common types layer in it. Please guide me what should be layers ? and in each layer what part should go ?

View 5 Replies


Similar Messages:

Interaction Between WCF, DAO And DTO Layers In An Application

Feb 25, 2011

how the WCF, DAO and DTO layers communicate with each other? I would appreciate if someone can specify which layer comes first and then how it interacts with the next layer

View 1 Replies

Design: ORM And Application Layers

Nov 4, 2010

While designing (and then implementing) a layered application:

Is it correct to use the same ORM objects accross all layers? (which would go against encapsulation).

Or the presentation, business and data layer should each have their own objects? (which would lead to lots of code repetition).

e.g. (just to illustrate the question): if one uses Linq to SQL in the Data Layer and Visual Studio's O/R designer to generate the ORM objects, are those objects supposed to be used in the Business and Presentation Layers as well.

i.e.: Are the objects associated with the entities that the application handles a crosscutting issue?

View 1 Replies

Architecture :: Modelling Application Layers?

Jan 26, 2010

I'm trying to create my first Asp.Net application from scratch. Tried to create this post in some of the other forums but I couldn't find a better place.

So, as the title says, I'm having trouble trying to model my application. I'm like an OOP newbie. I'll show my classes first and then I'll write my questions.

Model Layer

public class User
{
private int id;
public int Id { get { return id; } set { id = value; } }
private string login;
public string Login { get { return login; } set { login = value; } }
private string password;
public string Password { get { return password; } set { password = value; } }
}
Data Access Layer
public class BasicDAL
{
private SqlConnection connection;
//>>Returns a new connection to the database
public SqlConnection GetConnection()
{
//>>If connection is active close it before starting a new one
if (connection != null)
if (connecion.State != ConnectionState.Closed)
connection.Close();
connection = new SqlConnection("MyConnectionStringHere");
return connection;
}
}
public class UserDAL : BasicDAL
{
//>>Insert a new user
public void Insert(User user); { /* Insert into DB */ }
//>>Authenticate user login with its password
public void Authenticate(User user); { /* Authentication code here */ }
}
Business Logic Layer

[Code]....

So, model layer is pretty simple. Just a user representation. On the Data Access Layer I have a basic class with a GetConnection method. All DAL classes will extend this one.

My first problem lies on Business Logic Layer. With the above scenario, I've placed the same methods that I placed at the DAL. BLL methods would call DAL. As simple as that but I believe It is not the best way to do it, is it? How can I improve those classes?

Also, I have to "try..catch" blocks. That's because I can't find good places for it. I mean, if I place a try..catch on GetConnection method, for instance, how my ASPX page would get this error? How my ASPX page can tell the difference between "database offline" and "sql syntax error" when executing "userBll.Insert(newUser);".

My problem is mainly placing the exception handlers. I understand I would probably have to change return type of some methods. I didn't change because I believe that will have something with the exception handlers.

Btw, please assume I can't use TableAdapters and stuff like that. I would like to create all layers by myself.

View 3 Replies

Architecture :: Dropdownlist Values And Layers In Application?

Mar 13, 2010

Here is the scenario.

Every project has a Supervisor.

When I select the supervisor for a particular project, I'm using a dropdownlist.Table is like this

ProjectId | SupervisorId | ......
--------------------------------------

1 | 1

In my application, I'm binding a Collection of Supervisor type, which I'm feeling that it is an additional overhead. Becuase I only want his ID. So binding an object collection to the dropdown which seems no worth.

View 5 Replies

Visual Studio :: How Many Layers In LINQ Application

Apr 1, 2010

I have question about N-tier architecture. everyone about 3-Layer architecture these are:

1). UI Layer,

2). Business Layer,

3). Data Access Layer.

i already have worked on this.

Then i heard about LINQ to sql. how many layer an web application should contain.

As my knowledge. if i use LINQ to slq then i have to worked only 2-Layer:

- Data Acess/Business Layer: which contains only *.dbml files which is my database and

- UI Layer: which contains *.aspx files.

View 3 Replies

C# - N - Layered Application: One Class Library For All Layers Or For Each Layer?

Mar 3, 2011

N - Layered Application: One class library for all layers or for each layer?

View 5 Replies

How To Access Session Values From Layers Beneath The Web Application Layer

Apr 23, 2010

We have many instances in our application where we would like to be able to access things like the currently logged in user id in our business domain and data access layer. On log we push this information to the session, so all of our front end code has access to it fairly easily of course. However, we are having huge issues getting at the data in lower layers of our application. We just can't seem to find a way to store a value in the business domain that has global scope just for the user (static classes and properties are of course shared by the application domain, which means all users in the session share just one copy of the object). We have considered passing in the session to our business classes, but then our domain is very tightly coupled to our web application. We want to keep the prospect of a winforms version of the application possible going forward.

View 3 Replies

Installation :: Need To Install Dotnet Framework 2.0 If Dotnet Framework 3.5 Is Already Installed?

Jan 6, 2011

I have two questions, could anybody please answer to those:1) Do I need to install Dotnet framework 2.0 if dotnet framework 3.5 is already installed on the same server?2) Also do I need to install "ASP.NET 2.0 AJAX Extensions 1.0" if higher version is installed on the same server?

View 8 Replies

Use DotNet OpenID Together With Membership?

Sep 13, 2010

I would like to know if is possible to use DotNet OpenID together with ASP.NET membership. Or other way or allow OpenId account in ASP.NET membership.

View 1 Replies

Security :: Can Make Own SSL In Dotnet

Jun 4, 2010

can we make our own SSL or SSL macanism in SSL? Or please advice if there is any way that we can provide such security to web applicaiton without getting services from other companies ?

View 1 Replies

.net - Creating Websites Using Dotnet?

Dec 21, 2010

I am intend to create a web application and host it.But i want to develop something fresh in the internet world, buti feed the ideas are saturated for me though it is not.Any guys who have any idea can share with..[If u dont mind]Also refer me URL's that are already implemented with really good ideas.I tried but i was not creative enough to think something different :)

View 2 Replies

Multithreading In Dotnet Apps?

Sep 30, 2010

Multithreading in dotnet apps?

View 3 Replies

Create Web Chat With Dotnet Framework 3.5

Jan 19, 2010

I need to create chat application in asp.net.But I don't need to store chat messages in database. Only I retrieve user list from database. I have to create group chat also. I have to show list users but online user's image in green color offline user image in red color for differentiating people.

View 7 Replies

Convert Linq Code To Dotnet 2.0?

Mar 17, 2011

string pdfpath = Server.MapPath("images");
string imagepath = Server.MapPath("Images");
using (Stream inputPdfStream = new FileStream(pdfpath + "\NLI_Filled_out.pdf", FileMode.Open, FileAccess.Read, FileShare.Read))
using (Stream inputImageStream = new FileStream(imagepath + "\sign2.gif", FileMode.Open, FileAccess.Read, FileShare.Read))
using (Stream outputPdfStream = new FileStream(pdfpath + "\NLI_Filled_output.pdf", FileMode.Create, FileAccess.Write, FileShare.None))
{
var reader = new PdfReader(inputPdfStream);
var stamper = new PdfStamper(reader, outputPdfStream);
var pdfContentByte = stamper.GetOverContent(3);
iTextSharp.text.Image image = iTextSharp.text.Image.GetInstance(inputImageStream);
image.ScalePercent(24f);
image.SetAbsolutePosition(100, 130);
pdfContentByte.AddImage(image);
stamper.Close();
}

I have the above code in 3.5 using linq..i want to convert it into dotnet 2.0..

View 1 Replies

Web Forms :: Add New Admin Tab In Dotnet BlogEngine?

Jun 24, 2010

how i can add new admin tab in BlogEngine?and refer to sample page

View 2 Replies

Can Different Versions Of Dotnet Framework Co - Exist In Same Machine

Feb 8, 2010

can different versions of dotnet framework co-exist in a same machine ? will it have any impact while developing ? can we choose required framework within VS2005 IDE as and when needed?

View 7 Replies

Architecture :: What Is Component Based Development In Dotnet

Feb 19, 2010

1. Can you explain me what is component based development ? What I am already doing is using layers (user interface, custom types, data access layer and busines logic layer). For example for filling a drop down list with countries what I do is getting data from DAL using custom types in my BLL and BLL return a list of countries to user interface. Now in my opinion it is a plug-able component that I can use anywhere. Should it be called a component ?

2. What is a component a method ? or class or a assambly ?

3. Can components be like that (methods and assemblies) or they are services to embed ?

4. Actually I never have used services, if component can be in both ways (services & classes and assemblies) than what approach is better, should component be made in form of assemblies or services ?

5. Without being so technical any general rules on making re-usable components ?

View 2 Replies

Configuration :: How To Force Dotnet To Look For An Assembly In BIN Folder Instead Of GAC.

Dec 12, 2010

I had accidently moved a dll which sits in the BIN directory from my local machine to Production server. Later I realised that the same dll exists in the production server in it's GAC. Now I do not have ermissions to delete that dll from the bin directory on the production server. I am planning to use assemblybinding codebase and redirect attributes to make the application to search for the dll in the BIN directory instead of the in the GAC

I get the following error

The type 'myassembly' exists in both 'c:WINNTMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Filesdw82f12d83c45d61ceassemblydl3e45c2bc4�06e4169_8855cb01myassembly.DLL' and 'c:WINNTassemblyGAC_MSILmyassembly3.1.21.0__7780ffc6c71e90a4myassembly.dll

how I have use this assemblybinding attribute in Web.Config to point to the dll in the bin directory.

View 2 Replies

DotNet Get User Operating System (HTTP_USER_AGENT)?

Mar 14, 2010

I'm looking at building an exhaustive function that returns a friendly name for the Users Operating System.

I think I have most of the Windows stuff down, but I'm not sure about Linux, OSX, and others.

Does anyone know where I can find an exhaustive list of HTTP_USER_AGENT's

'Gets the users operating system
Public Shared Function GetUserOS() As String
Dim strAgent As String = HttpContext.Current.Request.ServerVariables("HTTP_USER_AGENT")
'Windows OS's
If InStr(strAgent, "Windows NT 6.1") Then : Return "Windows 7"
ElseIf InStr(strAgent, "Windows NT 6.0") Then : Return "Windows Vista"
ElseIf InStr(strAgent, "Windows NT 5.2") Then : Return "Windows Server 2003"
ElseIf InStr(strAgent, "Windows NT 5.1") Then : Return "Windows XP"
ElseIf InStr(strAgent, "Windows NT 5.0") Then : Return "Windows 2000"
ElseIf InStr(strAgent, "Windows 98") Then : Return "Windows 98"
ElseIf InStr(strAgent, "Windows 95") Then : Return "Windows 95"
'Mac OS's
ElseIf InStr(strAgent, "Mac OS X") Then : Return "Mac OS X"
'Linux OS's
ElseIf InStr(strAgent, "Linux") Then : Return "Linux"
Else : Return "Unknown"
End If

End Function 'GetUserOS

I basically want to return better results for Mac OS and Linux OS's. It's better in my opinion to say OSX Snow Leopard or OSX Tiger rather than just Mac OS X.

View 1 Replies

Develop IVR System In Dotnet / Which Type Of  Hardware And Software We Need

Jan 6, 2010

I want to develop IVR System for my company application. Actually I just need to Receive the calls and the IVR system have to give the repose accroding to customer choice and send SMS to customer.I have idea about SMS but don't about IVR IVR system with ASP.NET .

My Query is that

1. Which type of hardware and software we need?

2. Can we implement IVR in our company or we need to tie-up with other service provider?

2. Any 3-part components require for this ?

3. From where can I get an exact idea on IVR system development in .NET !!

View 1 Replies

DataSource Controls :: Connect Database.mdf File With Dotnet?

Feb 16, 2010

I don't know how to connect datbase.mdf file with dotnet.

View 2 Replies

Databases :: Convert Totalseconds To Hh:mm:ss By Converting It With Timespan Function Of Dotnet?

Nov 16, 2010

I have a column as totalsecond in my database i take a avg of tht totalsecond column for the particular parameter and condition and when i come on my aspx page i show that data as hh:mm:ss by converting it with timespan function of dotnet and show this in datagrid but while doing this calculation in DataGrid_ItemDataBind it take so much time and the user have to wait for long time for the result after clicking button show when there is large amount of data.

How can i reduce the time of waiting for the user with some coding logic that speed up the calculation time.

View 4 Replies

Web Forms :: Best Way To Work With Layers?

Mar 7, 2010

I have a form with mulptile panels hidden behind others. It is impossible to edit them in design mode without moving them to the side so that all panels are visible, so that is what I do. I use JavaScript to position the panels during runtime, but it is an innefecient way to do it.

Is there a way to make a panel or layer visible or invisible while working in design mode, kind of like autocad works

View 1 Replies

Architecture :: Using Linq To SQL, What Layers Should Use

Nov 18, 2010

I want to use Linq to SQL in my web projects. I mostly work in small and medium size projects. Please guide me what layers I should use ?

Previously I was using DAAB and was using 4 layers (business objects, business logic layer, data access layer and user interface).

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved