I would like request an issue about building programs insInternet which use data from the database. You will find many technologies and designs and I am attempting to hook it up all.

I am creating a desktop application with local database, and so i choose SQLServer CE + WinForms, but Let me bare this as general as you possibly can. I am not into other technologies (Java, etc.), but when you will find good quality solutions there, then you are thanks for visiting talk about them.

Let me request for the suggestions, opinions and good practices that you employ for building programs. Can you add or remove the listed layers? What technologies would you prefer?

Here would be the fundamental layers from the application:

1) SQLServer CE/SQLServer/Oracle/IBM DB2
2) LINQ to SQL/Entity Framework/NHibernate/ADO.NET
3) Data Transfer Objects
4) DTO-to-BM/Data Access Objects
5) Business Model
7) WinForms/WPF/ASP.NET

1) This is actually the classic relational database. So the initial question is whether or not to make use of saved methods and triggers or otherwise? I'm going to be using SQLServer CE, so no SPs for me personally, but I'm wondering if peaple are professional or against them. It appears simpler in my experience (more testable, more verifiable) To not put logic in to the DB. The company rules could be placed in the industry layer - maybe in certain kind of "framework".

2) This is actually the DB access layer.

3) DTOs - simple POCOs. Could they be needed?

4) Mapping between DTOs and BM. Hands coded, AutoMapper or possibly inheritance? Or possibly DAO - abstract objects for being able to access the database that return objects from BM?

5) Business objects that build the business design. I'd invest the company rules and validation here. But is layer needed? Or can you invest the company stuff into layer 3?

6) and 7) Building UI using BM.