Hello everyone, see the comrades of this title, must be very concerned about enterprise-class application development. As an undergraduate student who has not graduated, it is difficult to say that everyone knows, but also in a specific project. Cognitive opportunities is still more, this book gives me a good theoretical basis, which makes me have a big knowledge, knowing the program can make this, originally translated it is the technology in the project group. Document, but the importance of this book determines that it is uniquely greedy, posted on the Internet, let all programmers friends to see, everyone improves, please refer to the shortage of translation, please refer to the face, I also prepared it all, my road has just begun, I hope everyone, I will give it a http://www.9cbs.net/develop/read_article.asp?id=18646 Introduction introduction to build a computer system is How difficult, I must know you must know. As the complexity of the system is increasing, the difficulty of software construction will grow geometric index level. Like all other travel, we can only learn from failure and success. This book is intended to express this idea, using text, hoping to help readers master these courses as soon as possible, can carry out with others Effective communication about this profile, first specify the scope of this book, then provide some background that supports this book involves the idea. Architecture // Architecture software always likes to introduce some words, expands their meaning, become the heads of the head, the biggest victims are archient, I always tend to think of the architecture as being A word that impressed and very nice, used to say that we are talking about a very very important thing. But I have a very realistic, so that I don't let my life don't gong. In this book, I mainly concentrate on the core part of an enterprise application, and how they are organized. Some of these modes are granted as architectural modes, because they represent important decisions about these parts, others help you understand the architectural mode of this architecture in the dominant architectural mode - is multi-level mode, It will be explained in the second chapter. This book is about how to lay a layering, and how to organize all layers. Some forms of multi-layer architectures are used in most well-known enterprise applications. However, in some cases, other methods, such as pipes, filters may be more effective. I don't involve these situations, but focus on the content of the multi-layer architecture because it is the most widely used. Everyone in Enterprise Applications // Enterprise Applications is written in software. We all call software development, the type of software is also a five-flowers, each has its own challenges and complexity. When I discussed my friends and some friends in the field of telecommunications. In some respects, enterprise applications are simpler than telecom software - there is no more threaded problem with headaches, and there is no problem with hardware and software integration. However, in other aspects, the problem is more serious. Enterprise applications often have a complicated data of massive, which also involve a lot of business rules, universal reasoning logic; although there are certain universal software technology and Mode, but most of them are only suitable in a particular area. In my career, most of the efforts are in an enterprise application, so my model is all about enterprise applications. But what do you want to ask me "enterprise application" to the end? I am hard to give a precise definition, but I can give you some relevant guidance: Let us start from the instance.
The so-called "enterprise applications" include these such as: salaries, patient records, price analysis, credit points, insurance, accounting business, and foreign exchange trade. Relative "non-enterprise applications" include: car oil oil, word processing, elevator controller, chemical plant controller, telephone switch, operating system, compiler, gaming enterprise-class applications often involve data lasting storage. Since the data is used everywhere in the program run, it must be kept for a long time and usually save for many years. During this time, the program that uses data will change frequently. Common cases, the life of the data is longer than the hardware system, operating system, and compiler to create their hardware systems. During this time, under the premise of not affecting the original information, in order to store new information, the structure of the data will also have a lot of changes. Even a fundamental change happens - In order to deal with a business, the company has installed a new application system, which must also be ported to the new application system.
Usually enterprise applications contain a large amount of data, a medium-sized system contains more than 1GB of data - organized to tens of millions of records. Managing these data has become the main part of this system. The earlier system uses the index file structure like IBM's VSAM & ISAM. Modern systems often use databases, most of which are relational databases. The design of the database design and data has become a professional branch of its own. Usually many people have access to data. For many systems, users may not exceed 100, but for web-based systems on the Internet, the user's increment rate is geometry. So many users ensure that they can access data normally from the system is a very important issue. But even if there is not so many users, how to ensure that two people will not access the same data at the same time --- This often leads to an error that does not happen. Excessive users have brought heavy pressure, and deal with transaction management tools only can only solve some, and usually apply developers, it is impossible to cover this problem. In order to cope with the increasing amount of data, a large number of UI interfaces are put into use, so even if there is hundreds of distant interfaces, it is not wonderful. User-level users and professional users are very different, they have few expertise. In order to meet the different needs, the form of performance is also a thousand words. Enterprise-level applications are not alone, they often need to be integrated with other enterprise applications all over the corner of the corner. These different systems are usually built in different techniques and using different technologies. Even if the mechanism of cooperation is different - COBOL data file, CORBA, message system. Enterprises will try their best to integrate their different systems through a universal communication technology. Of course, even if it is also difficult to complete the task. So companies will use several sets of unified integrated schemes at the same time. Even if the company has unified integrated technology, they often encounter a thousands of business handling methods, non-uniform data concepts. One department of the company may believe that customers are a person with a formal agreement with the company. Another department will count those people who have booled their contracts, although it has been released; there is still a department to sell product sales, service sales are excluded. I may feel that this is very simple, it is very good, but it is a hundred thousand records. When there is a very different mean in each field, the problem is arduous, and it is a serious challenge, even if the company Some people can distinguish between different fields. (Of course, all this is in secret changes, there will be no reminders), and the result data has to be read frequently, MUNGED, recorded in a variety of different grammar, semantic format. Next is the term "business logic". I found this term very weird because there is no logic more logical than business logic. When you implement an operating system, you do our best to ensure that everything is logical. But for the business rules that have given you, you will be helpless. Rules are usually very casual, it seems that there is no logic. Of course, what is the reason why they are: EG In order to take care of the customer's account cycle, some merchants will negotiate the annual endorsement than the practice for two days, which has won a business of nearly million dollars. It is that these special situations have emerged, resulting in the complexity of the business, not logical, and why business processing software is so difficult to generate. For some people, the term "enterprise application" implies this is a large system. But remember is not all enterprise applications that are large, although these applications bring huge wealth to the company. Many people always think that since it is a small system, it will not be hurt. To some extent, it is true that if a small system fails, it will not be able to incur for too many unsuspects like a large system. However, I think it is this kind of paralysis, Ignore the cumulative effects of many small projects.
If you can improve all the small projects in the company, then the accumulated effects of the company will be quite significant, mainly because the small project will always produce value that is not commensurate. In fact, by simplifying a large-scale architecture and operation process, it is also a very important job. Kinds of Enterprise Application // Enterprise Application Types When we are discussing: How to design an enterprise application, when you use what model, you can realize the difference between different types of enterprise applications, and then take the corresponding method to solve The problem is the most important thing. When people say "This should be doing this, when I should do it, my alarm began to ring. For me, the vast majority of the challenges (and interests) are: to the chest for a variety of different methods, know when to adopt what kind of method, rather than adopting other methods. In a wide range of methods, I only picked out three points. 1. Consider an online retail industry of a B2C (Business To Customer): People's hands push the trolley, browse shopping. For this system, we must handle the number of users with large capacity, so our solution must be both quite efficient in terms of resource utilization, and you must be upgraded - you can handle the increased load by adding hardware devices. The domain logic corresponding to this application is very simple: obtain orders, some relatively simple billing and delivery calculations, and notification of delivery. In order to make anyone easily face this system, we must build beautiful universal Web performance, which can be used in any possible browser. The data source includes a database that accommodates order data, may also include some communication - a inventory system for submitting the goods reserves and send information. 2. Compared with a system that automatically handles the lease agreement, in some respects, the latter is much simpler than the former - the user is very small, and it will not exceed 100 people at all times. However, there is more complicated on business logic. It is necessary to calculate each contract on the month, and it is necessary to deal with an incident such as an incident in advance, extension payment, and review the contract data of each volume. All this is a complex task, because most of the lease The severification of the competition of the industry, the complexity of the form is, which is already in the past. As such a complex business sector is challenging because business rules are very casual. When you design an operating system or a phone switch, you are at least in developing the entire processing process in accordance with a logical approach. Business rules have violated all logic, which is not surprising at any time. Such a system often has a more complex UI. At least this means: more about more HTML interfaces and more complex interfaces. Often this type of system is very large, and users will require a more complex manifestation. Only one HTML front end can provide far enough, so a more traditional fat client interface It is essential. However, complex user interactions also leads to too complex trading habits: Now in a general transaction, register a contract may take two hours. At the same time, we will also find a complex database program: there is a hundred tables, along with an asset assessment, and wrapped. 3. The third example is a simple fee query system in a small company. Such a system involves little users and very simple logic. It is also very simple to operate in the company via HTML. The only data source is a few tables in a database. But even such a simple system is not challenging. You must quickly construct this system. At the same time, you still have to remember: When people need to calculate the compensation order and join them into the salary book, understand the amount involved in taxes, submit a report to CFO, and a plane-reservation Web service connection ... all this will make the system bloated stand up.
If you try to use some of the two systems of the two systems mentioned, then slow down the development of the system, the complexity of the system will also increase, and the upgrade of the system is likely to have a lot of damage. This system may be small, but most companies have a lot of such systems, so the cumulative effect of excessive complex architecture will be very significant performance // performance is often difficult to talk about performance like this. It is usually very difficult. . why? Because any of the relevant performance recommendations will not be considered as fact until it uses it as a measure of the measure in your configuration. Due to the performance of performance, all kinds of design are adopted or refused, and once someone makes some measure in the application, all this will be in shape - this kind of situation I have seen too much. I have given a lot of guides in this book, including reduced remote calls to the lowest level - this is often a good suggestion that improves performance. Even so that you must also trade in your own application to confirm the adoption of these suggestions, similar, in order to be more common, the instance code provided in some occasions in this book, has to be sacrificed in performance. Optimizing your system can only be determined by you. But whenever you perform performance optimization, you must think about it, otherwise you will unintentionally make your code obscure. In this regard, there is an important inference: any obvious changes in the configuration may result in any performance-related facts. So if you upgrade your computer, hardware devices, databases, and so on to a new version, - re-perform performance optimization and make sure they are still playing. In many cases, a new configuration will make the situation change. In fact, you may find out the performance in the new environment in the new environment in the new environment. Another problem in discussing performance is: Many terms are being disserted. The most famous victim is "measurable", which is abused everywhere, what does it mean. For me a cynical person, most comments on will affect measurable things are concerned about the performance of the performance that is unclear. Of course, it is because they are threats in the future, and they are also very difficult by measuring. Below is the term I use: Response Time - The time consumed by a request from the outside world. This may be a UI action, like clicking a button, or calling the Server API. Relative to the processing, response sensitivity (response) means how fast the system accepts requests. This is very important for most systems because people will be very fragmented when they have a system responsive sensitivity, even if its response time is very good. If your system is in the entire request, then your response sensitivity and response time are the same. However, if you can point out before completion, you have received the request, then your response sensitivity is very good. Provides a progress bar when copying files to improve your UI response sensitivity, even if it does not increase the response time. Latency is the shortest time required to respond to any form of system, even if the work to be processed does not exist. Delay is usually a big problem in a remote system. If I have a program that requires a program, I don't do anything, but tell me that it has been completed (nothing to do), if this program is on my notebook, I will get an instant response immediately. However, if the program runs on a remote computer, I may have to wait for a few seconds, request and respond to the time spent on the line. As a developer using an application, it is usually necessary to delay. This is also the case, you must reduce your remote call to a minimum. Throughput, you have done the amount of task in a given time. When a file is measured, the throughput may be measured by the number of bytes per second.
For enterprise applications, typical measuring means is the amount of transactions per second, but related issues are this depends on your transaction complexity. For your specific system, you should pick a commonly used trading set. The system's load refers to how much pressure is affected by your system. Perhaps it can be measured using the number of online users. The measurement of load (LOAD) - The response time provides a context. So you may say that 10 people are 0.5 seconds, 20 people are 2 seconds. Load Sensitivity is to describe how the response time varies with load. A system with a 12-second response time is 0.2 seconds compared to one response time is 0.2 seconds than a response time, and 20 people rises to 2 seconds. A system's capacity pointed out the maximum efficient throughput and load of the system, which may be an absolute value, or the lowest point upgradeability that the response time can endure is measured: adding hardware devices on performance of. A upgradeable system allows you to get the improvement of the corresponding performance by adding hardware devices, and is multiplying through the number of servers. The problem is the decision of design, and the impact on all of these performance factors is not equal. For example, two software systems are running on a server: the flag of 20TPs is 20 Tps, and the camel has a capacity of 40 tps. That performance is better, which upgrade is better? But from this data we can't answer the upgradeability, we can only say that there is a higher capacity on a single server. Now if we add a server, we found that the flag can handle 35TPS, and the camel can handle 50TPS. The capacity of the camel is still higher, but the flagfish seems to be more obvious. Next, we continue to add a server and find that the flagfish is incrementing 15TPS each time, and the camel is incremented by 10TPS. Through this data, we will say that in the case of less than 5 servers, the flag is upgraded faster, although the camel has a significant capacity advantage. When building an enterprise-level system, considering hardware upgradeability rather than capacity or sensitivity of the load is meaningful. When you need better performance, upgradeability will give you an opportunity to choose, and you can easily implement it. Usually designers will do some complex things to increase capacity on a particular hardware platform, and by adding more hardware may be cheaper. If the camel spends much more expensive than the flag of the flag, it is quite equal to several servers, but if you only need the capacity of 40 TPS, these servers don't play it. Have to rely on better equipment, let our software better run - this complaint is very fashionable, when I have to update my notebook, I will join this camp. Come. Don't forget the new hardware equipment, always more than letting the software run on a less powerful system, the expenses are much more, similar, if you add more servers, add more procedures, add more procedures Member --- will provide an upgradeable system. Patterns // mode mode has a long time, I don't want to retro their history again. I will take this opportunity to tell me about the awareness of the model, and why it is very worthwhile to describe the design by using the mode.
There is no extensive definition that is widely recognized, but maybe we can talk from Christopher Alexander, from him to give every model fanatics: "Each Pattern Describes a Problem Which Occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice "[Alexander et al, pattern language]. Alexander is an architect, and what he talks is about buildings, but this definition is also quite applicable to software. The focus of the mode is a specific solution. A universal and efficient way to handle one or more repeated issues. Another way to see it is: it is a considerable number of recommendations. The art of creating models is to classify many suggestions into related independent boxes, you can refer to them, can be given more or less to discuss them separately. A key part of the mode is: they root in practice. You are observing people's behavior, paying attention to key role objects, and then looks for the core of the solution to find mode. This is not a simple process, but once you find some good patterns, they become very valuable things. For me, their importance is to write a book for your reference. You don't have to go through the book, you don't have to read everything in the book, and find which useful. As long as you think what you think can be realized, what kind of problem they are used, and how they are implemented. There is no need to make a good time. You just need it, when you encounter a problem, you can find the corresponding mode in your book. Only, you need to go to real understanding and solution. Once you need a mode, then you will then make sure how to apply it to your system. One of the most critical things in the mode is: You must not blindly apply, which is why the mode tool is caused by tragic destiny. I like to modify the model with "half-life", meaning that you often have to get them in your project. Every time I use the pattern: I will be modified here. So you will often see the same solution, but it is rarely the same. Each mode is relatively independent, but they are not isolated from each other. So often a mode will involve another, or a pattern often rely on another mode. If you have a Domain Model in your involvement, you just have to look at the class table inheritance. The boundaries between the mode are naturally very vague, but I have tried to keep each pattern and have a distinctiveness. So if someone says "using a Unit of Work" you can find it on the book, see how it is applied, no Go to read the whole book. If you are an experienced enterprise application designer, you may also find that most modes are very familiar. I think you don't have to be too disappointed (I have reminded you in the preamble). The model is not the original idea now, but all the results that have happened in the field through a large number of observations. The authors of the model don't say they in "create" a model, but "find" a model. Our roles are just aware of a common solution, find its core, and record the results into the model. For an experienced designer, the value of the pattern is not that it will instill what new ideas are infused, but promote communication with your thoughts.
If you and your colleagues know what Remote Facade, you can communicate, such as "This class is a Remote Facade". Also allow you to say to novices, "use a Data Transfer object to process", they will come to see this book. This mode constitutes a universal design vocabulary, which is why naming is so important. The structure of The Structure of the Patterns / / Mode Each author must learn from the predecessors. Some people are based on classic patterns, like [Alexander et al, pattern logage], [gang of four], or [posa]. Other people edit their own mode. I am trying to think about how to organize it is the best. On the one hand, I don't want GOF to be so broken, and on the other hand, as a reference book, I really need to include the chapter for the reference. Here is what I used in this book: The first item is a model name. The name of the model is really important, because the intent of the mode is to create a more effective communication for the creation of a word. So if I tell you that my web server is based on a Front Controller and a Transform View, you know these modes, you will have a very clear and clear understanding of my web server architecture. Then two connections are large: intention and infarction. The intentions will be summarized in one or two words. Symptom is a mode visual manifestation, often uses UML patterns. After using their behind-the-scenes, it is: as a short reminder - the mode is about what, you can recall soon. If you have "own this mode", you already know this solution, even if you still don't know the name of the corresponding mode, then the intentions and somewhere, that is, you have to figure out everything, they will tell you mode What is the stuff. The next section describes a problem with an excitation mode. Mode does not only solve this problem, but I think he is a problem that is the most exciting mode. How IT Works describes the solution. Here, I will arrange a discussion: how it works, I have encountered the difference, and the different implementations of the same implementation. Discuss asyWhere to any specific platform, I have reduced the platform details, you can see it. In the place you use, I will use the UML graph to help explain them. When To use it describes when the mode is used. Here I talked about how to select and use this solution rather than others. In this book, many models can be alternative, like Page Controller and Front Controller. No mode is in the four seas, so whenever I find a pattern, I sumly "when I don't do this", it is this problem. I often take me to another alternative mode. I like to add one or more examples. Each example is a simple example of using a mode, and some Java or C # code is clarified. The reason for choosing these languages is because most professional programmers can read these languages. You know that the example is not mode. So when using the mode, it does not necessarily look at this example - don't think it as a macro of the United States. I intend to make these examples as simple as possible, I think you can see the mode in a clear way. During this time, many of the various important issues I intend to neglect, when you use it, they will become very important, but these are specific to your environment, this is why you always have to do The reason for certain processing. One of this is that I have made every effort to ensure that each example is as simple as possible, and it is also necessary to clarify the core information of the model.