In the morning, wrote a "design mode-builder" mode http://www.cnblogs.com/insus/p/4179620.html. is in an ASP. NET environment, application and presentation design pattern (Builder). Now insus.net Download the source program from the last download link of blog post, it is not written well enough, now refactor it.
Problem point, the page has only one placeholder container, not all the generated parts are generated in a container, but for positioning, placed in several places, there can be left or may be right. The ID of the Placeholader will vary depending on the Web page.
Another problem, the part name _pageparts["header"],_pageparts["Content"],_pageparts["footer"] and so on. It appears in two categories at the time of development. It can be misspelled if you write it up.
In response to these two big questions, Insus.net decided to refactor the programs. Unified Part Name:
Refactoring Webpage class:
Refactoring Concrete class Newspages:
The same technique for refactoring concrete class Articlepages:
Xxx.aspx.cs:
And:
In the future, we can develop user controls and Web pages. Some classes do not need to make more changes. Dynamic loading and easy maintenance are achieved.
SOURCE program:
Http://download.cnblogs.com/insus/Refactoring/builder_refactoring.rar
Once the procedure is found to be unsatisfactory, it must be reconstructed.