three-tier

Improving code readability for SQL commands

In one of my classes for a web application I am developing, I have some reasonably long SQL queries. When developing a three-tier application, what are the best practices to make this kind of code neater? Dim dc As New SqlCommand("INSERT INTO Choices VALUES ('" + _ SanitizeInput(strUser) + "', '" + _ ...

Three tier architecture question

Hello! I have an ASP.NET app with a three layer architecture: Presentation layer: ASP.NET Bussiness Layer: C# library. Data Access Layer: C# library with ADO.Net Entity Framework objects. Some methods on Bussiness layer would return ADO.NET entity objects but, data access layer is not visible at Presentation layer I can't do that. ...

Trying to return rows between a given id and the same id + offset, where should most logic go to determine how to retrieve the data?: BLL or DAL

Hi, In my database I have a table called ThingsInACircle. Every time a Thing is added to the ThingsInACircle, it gets added with a ThingId that is auto incremented. Imagine the Things in this table as being in a circle. SELECT Thing FROM ThingsInACircle WHERE ThingId = 10 is next to SELECT Thing FROM ThingsInACircle WHERE ThingId = 11....

ASP.NET Three Tier

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 s...

Architecture and packages

In a layered architecture, you have a presentation layer, logic layer and data layer. So far, I've been grouping classes into domain, service and dao packages. This represents the model with POJOs/JPA Entities, the business logic and data access layer. I suppose the domain and services could be grouped to form the logic layer but that...

Need help in GUI Layer while inserting value

Hi all, I am entering customer details in my web page, in that fields are Customerid, Customername, ProductName, Quantity, Rate, Total, Discount, NetTotal. If i enter quantity and rate in respective field in application. All the field should entered automatically and calculation have been done in BAL layer class. But whenever i am enteri...

Which is the best and appropriate way to write the code in Winforms ?

What is the best way to write the code ? (1) Like directly writing the code in the button_click() event. or (2) Make the function of that code which I write in button_click() event and write this function in one class and then that function I should call in the button_Click() event.Like is it called three-tier approach to write the c...

Where should configuration be placed?

I have an application structured as follows: dao domain main services utils I've made a class that reads the application configuration from an XML file. The question is where should it be placed? By reflex, I'd have placed it in utilities but utility classes have static methods and are stateless whereas this class uses an instance o...

Should Databases be used just for persistence

A lot of web applications having a 3 tier architecture are doing all the processing in the app server and use the database for persistence just to have database independence. After paying a huge amount for a database, doing all the processing including batch at the app server and not using the power of the database seems to be a waste. I...

How MVC (ASP.NET MVC) band 3-tier architecture can work together?

I am writing a design document and people on my team are willing to do the move from ASP.NET WebForm to ASP.NET MVC. This is great, but I have a hard time to understand how MVC workswith in a 3-tier (Data Layer, Business Layer and Presentation Layer) architecture. Can we say that the Model, View and Controller are part of the Presentati...

Model-View-Presenter and Three-Tier?

What is the difference between the two architectures: Model-View-Presenter and Three-Tier? I understand the definitions of each when read individually, but I can't readily see how they're different. Is it desktop vs web? I am currently developing a simple desktop application in Python to visualize a complicated data model via a GUI. ...

Looking for a non-trivial 3 layered asp.net example

Hi All I am looking for an example of an asp.net website(with source), implemented with 3 layer architecture and has some complexities like user authentication and user permissions, etc. . Does anybody know such an example? ...

Best way to deal with conflated business and presentation code?

Hi all, Considering a hypothetical situation where an old, legacy presentation library has been maintained over the years, and has gradually had more and more business logic coded into it through a process of hasty corrections and lack of proper architectural oversight. Alternatively, consider a business class or namespace that is not s...

DataAnnotations or validate manually in services?

Each time I start working on a new ASP.NET MVC web application, I'm not sure whether or not to use DataAnnotations validation. Something about it feels wrong. For example, let's say I have a UserService which is passed a CreateUserModel from the Create action of the AccountController. To ensure the user always supplies a name, I set the...

ASP.NET MVC Three Tier - what's everyone else doing?

When I start work on a new web application I tend to reach for the same tried & tested architecture of ASP.NET MVC, BLL (consisting of a set of services that contain all business logic) and a DAL (consisting of a set of repositories that facilitate the unit of work pattern over something like EF/*Linq to SQL*). The controllers talk only...

how to transfer business rules to new data base in 3-tire Architecture ?

hi , as we know that 3-tire Architecture consist of Presentation tier , business logic and data base tier the business rules (like : stored procedures , triggers ...) are stored in data base tier , so when we want to replace the data base engine (like ms sqlserver) with new db engine (like oracle) these rules must be transfer to new db...