Ø Borland Eco
Borland, which provides "How fast provincial" components, known as the "ENTERPRISE CORE Object", which does not say its technical features before Microsoft: ECO (Enterprise Core Object), with its technical characteristics, with modeling tools TOGETHER seamless integration, has to admire Borland's efforts under the unified development process.
According to the definition of Borland in Eco, ECO is: Model Drive (MDA-Driven) Development Framework (Framework).
(Views: According to the author's view, the core issue of database applications is DAL, which is the topic of this article needs to be discussed)
Obviously, from MDA-Driven, Database Application and FRMEWORK these very shocking words are not difficult to see, it is the very powerful core competitiveness before Borland (of course, including IDE, Components, Cross Platform) In terms of aspects, a company can have so many excellent products, which is really respectful)!
Previously, developing database applications on the Borland platform is very convenient, component visual design can basically take a relatively simple application module. Nowadays, the last layer has finally launched their own O / R mapping solution!
With the author's point of view, under TOGETHER excellent Modeling tools, combined with the number of two strengths in Framework development (only by artistic, VCL Framework can take the Oscar Award in this field), the current ECO is absolutely steadily. Net O / R mapping first chair!
(Note: Objectspaces has not been released, not considered.)
Introduction to the specific development of ECO, you can refer to "Programmer, 2003.12, P99", "Programmer 2004.01, P97", "Programmer, 2004.02, P100".
Hereinafter, the author mainly analyzes the benefits of using ECO development and its insufficient, for reference.
advantage:
(1) Compared with the Typed Dataset (Type Dataset, it can be automatically generated in vs.net) has obvious advantages than the UML /
Except for free switching between code, ECO can support custom data types
And the type of calculation (friends who have experienced Delphi know this is an exception
Powerful weapon);
(2) IDE provides powerful design support, various tools, components, which is also the most good field of Borland;
(3) Integrate TOGETHER modeling tools, playing MDA to the 3rd place, please refer to the shortcomings analysis below;
(4) Introduce Object Constraints Language (OCL), the standard gets the official support of the OMG organization, claims: OO SQL (object-oriented SQL), a great gospel for unfamiliar SQL developers; shortcomings:
(1) The resource consumption is large, and the ordinary machine is difficult to experience its advantages; this, Rational XDE is done quite good;
(2) There must be a learning curve, such as: OCL (Object Constraints Language), although it is different from SQL, but it is still very simple from the syntax angle; as the author's own experience, it may learn XQuery (query language in XML) or Opath (Query language used in ObjectSpaces) should be more relaxed;
(3) Pure commercial products, only the Architect version contains this feature, and ObjectSpaces is directly included in .NET Framework, it is independent of the vs.net version, which can be used directly through .NET Framework SDK;
(4) Light excess MDA: DAL developers can generate a database script in ECO, whether DBA also needs to design in ECO?
For enterprise applications, the author consists of: MDA development mode is more applicable to development of various layers of DAL above, such as: System Architecture, Business Façade, Business Logic, and Even User Interface, for Data Storage, may not require MDA intervention.
Imagine that o / r mapping provides mapping relationships, it is to separate RDBMS with other layers. If all it is in one place, it is not a burden on developers (sometimes automation is not necessarily, the better, the better) ?
Another point: ECO claims that "code / UML two-way synchronization", but does not guarantee "code / field can be different", which loses flexibility to some extent!
(Tip: "Synchronization" in UML means that the design is "consistent", but in O / R mapping, it does not require this "consistency", only need to establish a correspondence between Dal and Schema. Borland moved traditional modeling ideas into DAL design, the author considered debatable. In this regard, other O / R mapping schemes have done more nature, highlighting the meaning of "mapping", not just simple "Synchronization".)
Ø Others
There are also some other technologies to implement O / R mapping or similar features. For some solutions to the author, Constructor, Grove is a good choice, constructor, "Model Driven Rad For .NET ", interested friends can visit the following sites:
http://www.dotnetbuilders.com
http://grove.911link.com
Said a lot, and it has come to the "Summary" time, the author is again bold advice: (1) Unlike the ADO.NET-based DAL implementation, O / R mapping has huge
Advantages, but also hide risk:
N The most serious problem is to conflict with the stored procedure!
As we all know, the essence of O / R mapping is a map, in this regard
Have a strict definition, is white, which is to convert table operation into object operation.
However, the flexibility of the stored procedure (incoming parameters, return results, etc.) have to make
It is temporarily excluded from O / R mapping home (at least in current, on
The presentation of OJB, ObjectSpaces, etc., other programs do not support stored procedures);
On the other hand, if we want to achieve a more complex data logic, it is not
Do not write the original in new Object Language (such as: OCL, OQL, etc.)
This can be packaged in a complex SQL statement in the stored procedure. And even if I write
Out of these data logic, it will feel very ugly or even.
In the sense, this also violates the original intention of o / r mapping)!
n The second problem is: In the O / R mapping environment, the system's execution efficiency will have a certain loss, even if Cache Management (disposable load profile) or delayed loading (also known as lazy loading, only in access entity) When you type data, you really connect the database. Fill data from ADO.NET is so fast!
If you think that the above risks are not a problem, the following is the truth of the author.
It is recommended.
(2) ECO is very good in large applications (generally referring to enterprise applications)
select;
(3) If it is an ordinary N-Tier application, ObjectSpaces is full;
(4) Want to learn O / R mapping friends, you can look at the OPF / OJB source code.
The implementation of these two programs is similar to ECO / ObjectSpaces;
(5) If you do not want to use ready-made O / R mapping, you can in the OPF / OJB base.
On need to cut on demand, or refer to the scheme proposed in "Designing your own persistence" below.
About the Author:
"Zhang Xuefeng, this article, is the senior development engineer of Bibo Global Development Center. He currently works in the Core / Eai department of China Shanghai Bibo Global Development Center, engaged in .NET technology research and related projects. You can pass xuefeng.zhang@bearingpoint .com Contact him. "