What is Software Factory?
The software factory developed by the Microsoft mode and practice team is not a public component and can be directly introduced into the project for use, it aims to solve the problem by providing an entire set of tools, methods, and patterns used to develop applications using specific technologies. It aims to provide guidance on how to best use specific technologies in an enterprise environment, each software factory contains the following parts:
- Application Block and library-the actual part of the software, built based on top-level target technology, aims to provide the infrastructure for pre-built best practices that comply with recommendations.
- Guide package schemes and templates-typical plug-ins of Visual Studio, used to generate initial solution templates and/or extend existing projects using features built using recommended best practices. Most implementations of these plug-ins depend on application blocks and libraries.
- Designer-added designer support for Visual Studio for some applications.
- Reference implementation-complete execution of slightly practical applications using all other assets in the software factory.
- Architecture guidance and patterns-comprehensive documentation on patterns and best practices for software plant use.
- Procedure topic-detailed step-by-step guidance on how to use each part of the software factory (or only guidance on how to use specific technologies in the way recommended by the software factory ).
The software factories provided by the model and practice team include:
Web Client Software Factory
Web Service Software Factory
Smart Client Software Factory
Mobile Client Software Factory
......
What is Web Client Software Factory?
The Web client software factory provides a set of tools to guide many developers to collaborate with ASP. NET to build large ASP. NET application tasks simultaneously. In the Web Client software factory, the following tools are provided:
- Application blocks and libraries-including Composite Web application blocks, Page Flow application blocks, and objectcontainercececontrol, and use the Enterprise Library for permission management, exception handling, logging, and data access.
- Guidance package Solution and template-provides a series of templates, including the Solution template, Business Module template, Foundational Module template, and Page Flow template.
- Designer-contains the Page Flow designer
- Architecture guidance and modes-for example, View-Presenter, Application Controller, Service Locator, and Dependency Injection
- Reference implementation-provides e-Banking reference implementation for a global Banking company
- ......
The Web client software factory asset diagram is as follows:
Install Web Client Software Factory
The following prerequisites are required for installing the Web Client software factory:
Install Guidance Automation Extensions
Install Guidance Automation Toolkit
Install. NET Framework 3.0 and Windows Workflow Foundation
Install Web Client Software Factory, official site: http://www.codeplex.com/websf
Use Web Client Software Factory
When using Web Client Software Factory, you can follow the process provided in the help document:
Create a Web Client Solution
After the Web Client software factory is installed, a new project template called "Web Client solution" is found in Visual Studio 2005, which is listed below the guiding package project type, as shown in:
The solution structure after creation is as follows:
The solution created using the Web Client software factory guide package is divided into two parts: the Shell project under the Modeles directory and the DevelopmentWebSite under WebSites. In fact, the purpose of the Web Client software factory is to create multiple independent modules for collaborative work to define a website. Therefore, these projects are only the first two of the projects you want to add to the application. The general layout of this solution is to create an independent module (Class Library Project) for each part of the site ). Each module is independent and compatible with directories of independent pages and source code files in the main website directory. The goal of this project layout is to allow multiple developers to independently process different parts of the site without interfering with each other, in addition, the module can be deployed independently by transferring the new library and the refreshed page Directory to the Deployment Server, without the need to redeploy all modules at the same time. At the same time, we can see that to integrate multiple modules under a site, it defines a top-level master page Default. master under the/Shared subdirectory, and the page created by the module uses this master page by Default.
The solution created by the Web Client software factory comes with the default start page. After running the above program, you can see the following interface:
Related Questions
Note that WCSF currently does not support Visual Stuido 2008. If Visual Studio 2008 Beta2 is installed on your machine, an error will be reported when running the Web application created by WCSF. You can download the file in the attachment, overwrite the file in the <installation directory> \ Microsoft Web Client Factory \ Microsoft Practices Library, or open the WCSF source code to find WCSFBuilderBase under WCSFExtensions. in the cs file, the modification method is TearDown:
public TItem TearDown<TItem>(IReadWriteLocator locator, TItem item){if (typeof(TItem).IsValueType == false && item == null)return default(TItem);return DoTearDown<TItem>(locator, item);}
Conclusion
The Web client software factory provides compelling solutions for developers trying to manage large websites built using ASP. NET. This software factory allows you to create modules associated with sub-directories in the site, in a pattern (such as View-Presenter and Application Controller) provides a framework that supports independent website development, testing, and deployment in a modular manner. It is worth studying carefully. Subsequent articles will detail the Composite Web application blocks and the View-Presenter mode.
Attachment:/Files/Terrylee/CompositeWeb.rar