Three layer or ddd,orm or ADO?

Source: Internet
Author: User

I would like to put this question to Bo asked, several times before the Bo asked questions such as the question, but the great God may be disdain to answer other people's low-level problems. So put in the essay, on the one hand to the ORM, the structure of some of the views written down, on the other hand, the main thing is to seek the great God to point the way.

Status reasons

The development framework of the company took a lot of time, the team encountered many problems in the development process, need to innovate, I also have a new development framework to do. There are a number of issues when choosing a schema and choosing a database access method.

Architecture

I do the net for some years, in fact, these years have seen a lot of architecture design, but the most used is the factory three layer, the basic code all rely on code generator, only the code generator has been improved many times. After the project is done more, the view of their own code, I think the BLL layer is really boring, and there is a I do not know that you have a problem: F12 can not directly locate on the DAL layer.

So I looked for ways to improve my existing architecture.

Occasionally, the home page of the blog is flooded with ddd articles, I went to look at a bit, want to find some examples of research, unfortunately, all involved in DDD, all are related to EF articles, I also notice that DDD solves some of my problems. But just don't like any orm.

Orm

I didn't resist ORM when I knew the ORM, actually, I've really looked at some ORM:

EntityFramework (EF), NHibernate (NH), Castle ActiveRecord (AR), Linq for SQL

I first focused on EF, and when I looked at it, I didn't even hear the concept of model one, I dragged it around and I finally looked at the things that vs gave me, and I was really stuck in my heart: I had OCD, I created classes, and if I couldn't finish controlling it, even if it was exactly where it was in the project, My heart is very uncomfortable.

What's more, I didn't find any EF that can switch profiles to meet the three database of Ms SQL, Oracle, MySQL, until I write, and if you don't touch ZF projects, it's hard to understand why I'm stressing database compatibility.

With NH's tangled degree not only in EF, I really can't stand hql and each table has an XML configuration problem, more important, the company has to use NH to do the project, but the last project run slow and snail-like, of course, this may not be written with the previous code for a reason.

Castle all of the sub-projects, we use two, Windsor, Castle nvelocity, so when ar in front of me, there is reason to learn, but NH has been so slow, ar exactly how, I dare not hasty decision.

LinQ for SQL I'm not going to say it.

Seeking Directions

Say so much, is to give some advice to you, what should I do, how to change my architecture, whether I want to choose ORM, or return to ADO to pursue speed.

Three layer or ddd,orm or ADO?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.