Enterprise Application Architecture study notes (a)
|
FREE Diabetes Recipes eBook! Click here to redeem. |
Martin Fowler that the “Enterprise Application Architecture” should be a household name, bought a can and some days has not picked up the point of view, and now finally turn to the book.
This book is divided into two parts, the first 8 chapters for the first part of the development of enterprise-class thing to be involved in the initial presentation, and also some general model to explain the advantages and disadvantages for the scene. The second part is a list of patterns, the classification of these models is presented in accordance with the first part of the enterprise should pay attention to aspects of the development to be divided. Now I only finished the first part.
What is the enterprise development
In the Introduction chapter, Martin on “Enterprise Application” argument is actually very interesting: a lot of people think “enterprise applications” is a big system, but in fact not all enterprise applications are large, even if they are to provide enterprises with a lot of value.
Martin on the grounds that enterprise applications are areas of concern to the business logic, the business logic is very complex, and systems for the telecommunications industry such as high throughput, high concurrency less attention.
Martin said: “Enterprise applications often have complex data-and lots of it-to work on, together with business rules that fail all tests of logical reasoning.”
Features for enterprise applications, Martin summarizes some common characteristics:
Persistent data: general enterprise applications, data persistence should be up (though this, looks like most of today’s systems are so)
a lot of data: data volume, this may be compared to today’s Web 2.0 site, a bit trivial, but it can also see what the industry
access data concurrently: concurrent access to data, not how I’d feel that I was doing the oil industry, software development, even if the user while online, but also one or two hundred people, not to mention high concurrency
Services: This is true, I think the general enterprise applications are closely related to the relationship between money, the transaction looks like a very common (personal feelings)
a lot of user interface screens: Many user interface, this is a system of densely packed interface, but some people say today’s Web 2.0 application interfaces more ah, that mass ah. But Web 2.0 is a multi-site interface, but most are the same, but the data is different, and enterprise applications in the piles is not the same interface
User technical level is not high: This comes on my heart, and enterprise applications are typically faced with other areas, and they told us a lot of IT staff not the same as thinking, this thing is too much trouble
integrate with other enterprise applications: integration with other systems, not to mention, I’m still worried it for this, and now is doing an integrated thing. If all systems are a development of the booing we said, now that other developed strange use of the technology, said the booing, each hoist the leather backing to pain.
Although a lot of features cited above, but only a few have more feelings, thoughts and feelings, or the most complex business logic, enterprise-class applications to do the biggest difficulty I think it should be a bunch of IT staff to talk to a bunch of other industry users to deal with, I remember just the work of breath, I went to the scene with the head of the customer about the hype, I felt like a fool, what is recovery, what is a distribution of remaining oil could not understand me, no way, then buy a few books that looks at the oil. There is also a feeling that the enterprise applications in the technology is relatively backward, everything is pay attention to safety. As well as in expansion, because the company money, the bottleneck in certain things when they are to buy more hardware to solve performance, there is little way of expanding horizontally, so it can try some very depressed wave structure (such as Zhao recently wrote about the Key / Value data partition databases, and several articles.)
Stratified
In the first chapter of the book, talking about is layered, to clarify some concepts: layer and tier distinction. Layer generally refers to the logical layer, such as we are talking about UI, BLL, DAL. Tier refers to the physical layer, usually as a developer we pay more attention to the logical layer, which is Layer.
Here is inseparable from the classic and bloody three-tier structure. Here are a table:
Hierarchical responsibility
Presentation layer to provide services to display information (such as window and HTML, the process user requests, HTTP requests, etc.
Domain layer logic, the real core of the system
Ah and database data access, messaging systems, transaction managers, and other parts of the system communications (not just operate the database, oh)
Nothing to say here is that the field level, at work, I do things that are Web, and most of the news or what, ah, forums and the like. Handle every day the three-tier structure at that time, why to do more business logic, lacks logic ah, but to “prove” that I am using the three-tier architecture, I also added a business logic layer, but in fact that layer only to a Proxy, the interface method call is passed directly back to the data access layer. Story enough, that time does not actually understand the meaning of layered, not to layer and layer, layer to layer by layer and responsibilities, division of the boundary layer will inhibit the change in the layer, Do not spread between layers. If the simple to just two, then two pictures.
But work is not the same, and now the system to do, write code that is where most business logic layer, so the floor will reflect the responsibilities out.
Martin also taught here a method to determine, and what that put business logic layer, which is the interface logic:
Add a layer of the same, such as you are now to be a web application, is not it already have a presentation layer, and then you add a presentation layer, this time with the console way to implement the presentation layer, the way you look at the use of HTML presentation layer, and methods to achieve the console between the presentation layer which duplicate code, the code will be repeated in the transfer to the business logic go.
Oh, this approach may be futile for you, really good to me, looks like has been so dry, most of our systems are B / S and C / S’s to be developed, so. . . . .
Organization’s business logic
The second chapter is how to organize the business logic. Martin summed up the three main modes: transaction script, domain model, table module.
In fact these three models is the corresponding process-oriented, object oriented oriented database. Amazing ability of Martin’s flicker.
Services script? Han is a transaction script? In fact, you often dry, assemble a SQL statement, put forward a query to return Gesha, this process way.
The domain model, that is in accordance with the responsibilities, build several classes, each responsible for only part of their duties, organic objects and objects grouped together.
Table module, in fact, engage in a class for each table, a single case of the class, responsible for operations related to the table.
I do not how to use a third party, for the first two, a lot of people on the conflict in the sense of transaction script, said that this is the process of the product. But in fact some simple applications, such as reports, business logic is very simple, straight, and do not often change, and that the script is a perfect transaction, ah, you do several objects tired.
A bit uncertain when the business logic, such as there is also based on what type of operation and then decide what the implementation of the code, you will not engage in a bunch of if else or switch out, and put forward a target level to deal with this right. However, when the domain model do you think the first point of duty to spend the question, what the object which is responsible for thought.
Mapped to the relational database
Chapter III, mapping to relational database, which is a big topic. This chapter length is relatively large, about a lot of practical problems to be faced in the development.
Said Martin, in the first few points before I get my question:
1, to support multiple databases, the better to do the project, and should be to ask for support Oracle, SQL Server, Sysbase, sometimes also support Access to do stand-alone applications. Even the same database, but also to support different versions, such as once in a field implementation, the old connection is not up, no way to debug the scene look at the last chant, and finally find the problem is that they use the database or Oracle 6, and our products When developed using the Oracle 10g, thanks to using a IBatis.Net, change it to ok.
2, the database already, to do this I believe that many enterprise-level development on both occasions, all for the legacy database development, there are a lot of historical data, can not require you to re-design, in particular, is depressed, some data tables designed and unreasonable, you can not change. Once I get a table, in fact, can be divided into three tables, but are placed in a table, forming a “flat” structure, I fail to understand why, do people who originally designed the database so food Why, the last question, because this form of data is usually collected by the sensor data, and then through a repository of specialized equipment, and embedded devices that keep the structure of this flat is better kept, my god.
3, offline applications, this is also a strong demand for many users, that if there back to leading a demonstration of the computer, are used before the PPT, the leadership want to see something else the data could not watch it now that you have the software, then demonstrate it with this software directly, but there always good to lead people to pull out of the bar network cable, or a business trip when the Rom internal network, ah this is relatively headache.
This is what I often encounter the above problem, to sum up.
Martin on the map to a relational database together to discuss this more, but I also think that is mapped to a relational database is the highlight of the daily development, so in this article it to this location, next article about some notes carefully .
Off-topic
Books do not look at is a waste, this book bought more than a year, or as good as new, sin sin. Experience indeed to who said that sentence, now is not the lack of books, is reading people.
Sorry, the comment form is closed at this time.


Comments
No comments yet.