Application in template, software development

zhaozj2021-02-16  54

Application in template, software development

Since the mid-1960s, in the 1970s, since the "Software Crisis" has been managerned, the software engineering has also managerged the entire 35 years; however, the form of hand-written software development is still so serious here, and more let Solution, everyone's work has been quite a period of time, there is no try to seek new solutions (many methods have been used by others); combine with the actual situation to talk about software development experience in the past few years, To communicate with more in the same way; the prerequisite should be prerequisite:

l template concept;

l Reconstruction method;

l OOP thinking about the confusion of the department manager and the official personnel?

Why do a developer feel tired? In fact, the problem is that a Copy-Paster is occupied by their minds, and not thinking about learning from others or trying to use a better way to solve their own confusion; the essence of software development is manufacturing Software, however, different manufacturing is different in software development is a fairly abstract process, however, there are many modes that have the same or common problem during the development process; even if it can't be said Software is done in a particular development mode, but finding these commonality, we can also reach the reuse of the code, and then a secondary reconstruction of the code, how to do this? It can be analyzed from the lower side:

A excellent developer will summarize many developments in the work; and use these development experiences to make certain analysis, it can be used to use the template to realize the reuse of code, without the need for each software development process. Copy-Paster or even reopening the code; especially in the project of multi-person cooperation, when the project manager has designed, after detailed design, the members have made each other (here, it is not in the rejection of agile development) Method, but it is necessary to do this to design the interface design, even if the screw, the level development mode also needs to define the interface of each module, and the interface chaotic will lead the result to the disaster merged by the software. It is not possible to mention "test first" at all; and the big direction, we narrow the problem range to a specific functional module, in fact, a small function module is like a software, including the square aspect Similarly, analyzing in an object-oriented manner, even if a small module can be analyzed as follows:

Function Module -> Separates into Interface Definitions between Objects -> Specific To Each Object;

As can be seen as follows, we divide a software development process into a lot of atoms (Object, object). Since you can win each object programming, then the template should be born, template update is some object collection. For this program, it is just a vectors of a multi-function object or multi-function module, however, the application of the template is not only this, since it is a template, it can share multiple applications, and from the Zhou Zicang, each development tool, or each OOP language supports reuse of component forms, then we can register with a template after establishing a complete template! Following multiple software sharing, so that the code is reused, and its advantages are not only the case, template, is a flexible small component, user (programmer) can customize template according to your needs. Function, expand the interface of the template, making the template's OO idea is completely reflected in each software! So how do you develop a template? This is what we all need, maybe, you have often used templates in your program, or introduce the concept of templates into your program, but you still have a further optimization of templates, let Let's analyze this process; the advantage of template to our procedure is: Flexible, code duplicate utilization, business rules clear, business rules are clarified ... It can be clear from it. Understanding a template is even an object! Or a Component! Since there are a lot of code repeated in the program, when we have not abundant, the design pattern is very transparent or not, it has not grasped the code reconstruction, business logic, Commercial rules, etc., the division of pseudo code or the model mechanism is still in the event of mature, it is difficult to do code regeneration applications, but at least we can feel that there are a lot of repetitions to let us Tired, even in a software, or there are many duplicated code in a cell, but we can't borrow Data Option Public Unit to make unified to guide (I don't advocate Data Option Public Unit to repeat the code) Centralized processing), we can actually make regular, easy repeated code, at least a clear concept in mind! In particular, the database is complicated; however, go back to see the code we have written, not only messy, no logic can be found, maybe it will also find the program, the traces of the Copy-Paster, which can be seen everywhere, should we Quiet down to organize these messy code? How to comploct the logical rules? It is imperative! Otherwise, a new "software crisis" will be generated; when we sort out our messy code, we will complain about the logical rules, and do code reconstruction, what should I do? Is it going to this? the answer is negative. Because we can't just do just a project, how do we bring our hard work harvest to the next software? There is no doubt that we "put" the result of our organizer "to" object ", use this" object "to handle this software to extend similar rules, questions, and this" object "to the next software. in! And this object is what we said; it is more than just a collection of code; it gives us a lot of inputs, output interface objects (Black Box, black box); what you want to say is, if a programmer At the end, I have understood OOP, and he is unable to construct such an "object."

Because the template is an "object"; does not understand OO, how to understand the template? What is talking about the construction template? We already know, what is the template is something, then let's take a look at it will contain or should you include what is inside? We all know that the object is an implementation of various business, logical rules, and it should provide us with some interfaces. We only change this object through these interfaces, otherwise this object will be a The object of "death" is not much for us; it can be seen that this "object" is a live entity; and it is a very abstract thing because it is just a conceptual component; As a rule carrier, it is not just a public code unit! It is not just a public code unit, otherwise we can complete our operations through a PUPLIC Unit without having to construct an object! Although it can only be referred to as a conceptual component, it will not be able to implement cross-platform, language operation; but it exists, it is necessary to implement a unity in some specification, while constructing template, We can't construct such a concept; but you should think of it, it will be available in other places! This is its meaning, so this "object" will also include some flexible rules, how to achieve flexible rules? Clearly, it is to provide us! However, like software, too many messages, procedures, events will increase the cost of software maintenance, the same, the interface is also, we can't increase or modify any air; if it is an interface, when it is determined, don't Think about it to change it! (This and agile method does not have any conflict); So, the advice here is: the code that carefully organizes, the logical rules to be realized, the templates that are constructed with skills and experience;

Of course, the template is not a constant, according to the form of a fast element method or a level development method, our template may also be a "object" at a moment, but we have changed it, it is not It is the reform, but it will change it in the form of Object Tree; the template should include something, it is already clear, but it is a rule carrier, it must take into account performance, efficiency And maintainability, scalability, etc., hope that some friends can be reminded: "Thinking for low-cost hardware can bring an improvement in the system performance"! If we can handle problems, don't be lazy; if this goal is achieved? Two aspects: Realize the reasonable refactoring and testing of code! Regarding the specific code reconstruction, the method of testing can refer to many existing information; we have mentioned that a template can be a "component" in a conceptual sense, so the template is registered; this article is mainly It is to think about introducing templates into your software development, no, it is during each software development;

转载请注明原文地址:https://www.9cbs.com/read-16690.html

New Post(0)