Posts Tagged 'Code'

Separation and Combination

Saturday, November 15th, 2008

"Saying Domains under heaven, after a long, long time together will be divided."

- "Three Kingdoms" in the Foreword

There are two keys on the keyboard C and V, and Ctrl + C and Ctrl + V is to use a computer almost every day, use drip, software engineers engaged in software development every day is the keyboard and mouse up, while the software development for the CV-based process-oriented era already had been abandoned.

Discussions with colleagues at a number of current development issues in a project, involving how the existing CV-based development model make an improved operation.

This stage, we develop performance management software, management software as the special, there will be a lot of similar form in the system flow, in order to interact with friendly when presented in these forms will be added some other information. If examination of the most common departments and personnel evaluation forms, the system looks almost the same, friendly interface for interactive presentation there will be some gaps. Take this link scoring run, in scoring areas, the user will use two pages, a display object by assessing List page, a display of each indicator for each person being assessment rate to the Detail page. Now the model is now testing sector development module, and so tested the latter, they used a CV employee modules, add modules, such as some staff positions where employees are members, departments and other information. Putting aside whether this CV approach object-oriented rules, if ugly, etc., just from the code maintenance point of view, such as List page want to add or remove a non-control field, at least two changes. Greater nightmare came, in the review, approval to use the List of environmental same page, so to modify the place for a long time more than that.

Way to bring this CV for the inconvenience, I have tried some of these together into a single extract a method from which to draw (extract Cheng method rather than the class of the framework of the class because there are many restrictions on the inheritance), but this kind of realization is not very elegant, will show the logic into the business.

The results of today's discussion with the basic way I have tried similar, to some extent only in the original model of a standard CV only.

Thought long ago to learn ASP.net MVC framework, the data binding directly to write. ASPX page, give me some ideas, though useless to the MVC framework, it also can present for display Grid, Grid table in front of a control which creates a first-class information (ascx), the control will set some parameters, according to these parameters to directly access the database and return need to display the information, so the source will change this ascx control on one to be able to have very little cost to adjust the display information, and second, can be part of the display logic separate from business logic, three years after control of the expansion is also more convenient to upgrade.

The next phase will try to do a Demo to achieve this idea.