MSDN Magazine Launch Issue - February 15, 2008 - (Page 101) Web Service Software Factory Modeling Edition G. DE GEEST AND G. VAN LOON eb Service Software Factory: Modeling Edition, also known as the Service Factory, is a collection of resources to help you model and build Web services for Windows® Communication Foundation (WCF) and ASMX in an easy and efficient way. The main difference from previous versions of the Service Factory is that this latest edition uses models whereas the previous release was based on wizards by way of the Guidance Automation Toolkit (GAT). The Service Factory now allows you to build a Web service by creating three different models: the data contract model, the service contract model, and the host model. We will first discuss these three models, and then we will show you how to customize the Service Factory. You Figure 1 Data Contract Model for Peedy’s Pizza Palace can find additional information at the Web sites listed in the “Online Service Factory Resources” sidebar. • DSL Tools for the three different model types The main disadvantage of using wizards by way of GAT for do• Designer Integration Service (DIS) to support cross-model ing code generation is that it complicates matters when you have references to change something in the generated code. Suppose you want to The Service Factory source also contains some interesting libraries rename an operation of a generated service—you have to either save that have features the current factories tools do not have. It could be your custom code and redo the entire wizard where you use the new interesting to reuse these if you are building your own factory: name or rename the operation in the generated code. Redoing the • A code-generation library that allows you to generate code in wizard is time-consuming; since the wizard has no memory, you separate files have to specify everything again. Changing the code generated by • A cross-model validation library to assist you in verifying crossthe wizard is not ideal either since you are back to working in the model references details while the goal of the wizard is to avoid this. Models provide • A Visual Studio mock objects library to help you easily unit a good solution to the problem because, in contrast to wizards, test your factory models are able to remember your input. As we mentioned, the Service Factory consists of three types of Building modeling languages that integrate into Visual Studio® was difficult in the past, but the Domain-Specific Language (DSL) Tools that ship with the Visual Studio SDK make it easier. The Service Factory now ships with three types of models built using the DSL Tools. Note that there are no models for data access and service security. The Data Access Guidance Package from the previous Service Factory release is now available as a separate factory called Repository Factory, and the Security Guidance Package is available as a separate package on the Service Factory community site. The new version of the Service Factory also serves as a good example for building your own Software Factories since it is using and combining all the tools that are available to build one: • GAT for the wizards used to generate projects and provide context menus Figure 2 Service Contract Model for Peedy’s Pizza Palace launch2008 101 W
For optimal viewing of this digital publication, please enable JavaScript and then refresh the page. If you would like to try to load the digital publication without using Flash Player detection, please click here.