DAL & BLL Guide against ORM

Which approach is better: 1) use a third-party ORM system or 2) manually write DAL and BLL code to work with the database?

1) In one of our projects, we decided to use the ORM DevExpress XPO system, and we encountered many small problems that wasted a lot of time. Amd still occasionally encounters problems and exceptions that come from this ORM, and we do not have full understanding and control of this black box.

2) In another project, we decided to write DAL and BLL from scratch. Despite the fact that this meant a lot, but the diverse writing of boring code, but this approach turned out to be more universal and flexible: we completely controlled the way the data was stored in the database, how it was obtained from it, etc. And all errors could be corrected in a direct and easy way.

Which approach is usually better ? Maybe the only problem is that we used ORM (DevExpress XPO), and maybe other ORMs are better (e.g. NHibernate)?

Should I use the ADO Entiry Framework ?

I found that the DotNetNuke CMS uses its own DAL and BLL code. What about other projects?

I would like to receive information about your personal experience : what approach do you use in your projects, which is preferable?

Thanks.

+5
source share
8 answers

Perhaps a little of both are right. You can use a product like SubSonic. Thus, you can create your own database, generate your DAL code (delete all these boring things), use partial classes to extend it with your own code, use stored procedures if you want, and, as a rule, do more things.

What am I doing. I find the right balance between automation and control.

, , , , . , .

+6

, ORM .

, . 60- 70- . , : , , ( , ). , Codd : , , , . , , , .

OO .

OO : , -, , OO () , , . Yup: . , ( ) , / , - , RDBMSes.

- , , ( ), . , , , , (, ORM , , ).

"", , , , : , . , , ; , , . , , , .

+7

Linq SQL , . , , Microsoft ( ), .

Linq to SQL , # . DevExpress XPO , - #. , Entity Framework . , , .

Linq to SQL (, ). SQLCommand SQLConnection . SQLDataSource CRUD, .

DALs , . -, - DAL, , SQL-, ..

, Entity Framework , Microsoft , . EF , StackOverflow Entity Framework, , , . , 2 .

nHibernate, , .

+4

NHibernate. , . , , .

1:

NHibernate ORM, () (, , ). , , , , , , " " .. NHibernate , , , .

2:

NHibernate , , NHibernate, . , , "--" .. NHibernate . , - NHibernate. - .

, , , NHibernate, , NHibernate, , . NHibernate ( DAL), , NHibernate , . , DAL DevExpress XPO ( BLL), NHibernate .

+2

. , . - .NET, DataTable. . PL/SQL , LINQ. ORM, . .

, , : ORM , ? , .

+1

, ORM , , , , . : .

- , . , ORM , .

+1

Bold Delphi . , , , . ECO . , ECO- - , , , , MDD (Model Driven Development). . , - 5-10 . , , .

, - , SQL, :

  • " ?"
  • " , SQL !"

...

  • 10000 , , . Bold ECO SQL- . . , , . .

  • , , , , , . SQL-, , .

ORM-, dot.net. , , ORM. . , , . . , . , . -, .

ECO. , 12 . 12 !

+1

I suggest you use the Code Smith Tool to create Nettiers, which is a good option for the developer.

+1
source

All Articles