Franc Stratton's .NET (TM) Web Application, OOP, and SOA Architecture & Programming Site

A site devoted to ASP.NET (TM), SilverLight (TM) and Browser-Based WPF (TM) Applications, IIS Services, and OOP Architectures

Home     Architecture Overview     WF/WCF/WPF     Data Store     Standards     .NET Security     Resources     jQuery     Silverlight     Developer Tips     Blog     Site Map      
N-Tier Architecture
Service Oriented Architecture
SOA Virtualization
Base Classes
BLL
DAL
Base Page
DALFactory
IDAL
Email
Application
Architectural Overview - Wisdom in Simplicity

 

"By three methods we may learn wisdom: First, by reflection, which is noblest; Second, by imitation, which is easiest; and third by experience, which is the bitterest." -- Confucius

 

The block diagram of the processes shown on the Home page Introduction to Wisdom-based Architecture allows the development team to utilize imitation, experience, and reflection to implement a sophisticated but simple design paradigm. This does not mean that the team should resist business process or technical change necessary for efficient and effective productivity gains. On the contrary, the wisdom-based system embraces meaningful change by abstraction and isolation of business process from UI, data access, and other tiers and services that make changes much easier with less maintenance.

 

Architects, Developers, Testers, and DBAs can analyze, design, implement, and deploy a pure Service Oriented Architecture (SOA), a pure Object-Oriented Architecture (OOA) in N-Tier Layers, or an SOA N-Tier Hybrid Architecture. Microsoft's Windows Communication Foundation (WCF) and Rich Internet Application (WCF/RIA) now make the SOA an easier reality since the Framework 3.0/3.5/4.0 and the Visual Studio (Team Systems - VSTS) 2008/2010 Integrated Development Environments (IDEs) wrap all application communication possibilities under this technology.

 

The Team Foundation Server (TFS) 2008/2010 with Windows SharePoint Server (WSS) on a Windows 2008 Operating System (OS) control the Software Development Life Cycle (SDLC or Application Life Management - ALM) process from inception through business and functional requirements to implementation and deployment. Project Managers and other application stakeholders can monitor the development process throughout all phases of the SDLC or ALM.

 

VSTS 2008 have development roles and IDE versions for Architects, Developers, Testers, and DBAs. This IDE also allows the development team to choose between two SDLC types - CMMI or Fragile. However, the IDE permits the team to create their own SDLC as well. VSTS 2010 wraps all these roles in to the Ultimate version. These are the recommended routes for most organizations that already have a well developed SDLC or ALM.

 

Utilizing much of the developer tools that Microsoft now offers, the following block diagram shows a Model-View-Controller controller application framework that has aspects of an OOP and SOA architectures combined:

 


 

 


ASP.NET Model-View-Controller Application and Services Framework

Model-View-Controller (MVC) is a framework methodology that divides an application's implementation into three component roles: models, views, and controllers:


     • "Models" in an MVC based application are the components of the application that are responsible for maintaining state. Often this state is persisted inside a database. For example, a web application might have an Order object instantiated from a Order class that the OrderBLL assigned to properties with data gleaned from a search result from the Order table.


    • "Views" in an MVC based application are the components responsible for displaying the application's user interface. Typically a user interface (UI) is created from the model data. For example, we might create a Client "Edit" view that presents textboxes, dropdowns and checkboxes based on the current state of a Client object populated from a Client table. For ASP.NET, the browser displays an HTML page, but for XAML-based pages, the browser displays a Windows-like form with the .XBAP page file suffix.


• "Controllers" in an MVC based application are the components responsible for handling end user interaction, manipulating the model, and ultimately choosing a view to render to display UI. In an MVC application the view is only about displaying information. The controller handles and responds to user input and interaction.


One of the benefits of using an MVC methodology is that it helps enforce a clean separation of concerns between the models, views and controllers instantiated in an application or a service. Maintaining a clean separation of concerns makes the unit testing of applications much easier, since the contract between different application components are more clearly defined and articulated.


This paradigm uses the Model-View-Controller (MVC) pattern to separate the user interface components of the dynamic Web application from the business logic and objects. Developers will best structure the Model-View-Controller paradigm for complex Web applications so that reuse and flexibility is assured. Code duplication wastes developer effort and adds unnecessary unit and QA performance testing.


The MVC pattern often focuses primarily on the separation between the model and the view, while paying less attention to the controller. In many rich-client Windows form scenarios, the separation between controller and view is less critical and is often, but should not be omitted. In a thin-client, web application, however, view and controller are inherently physically separated because the HTML presentation occurs in the client browser. On the other hand, the controller is part of the server-side portion of the application (code-behind file) separated from the client browser view by an intranet or the Internet.


This application architecture uses the Page Controller (.cs code-behind file for the .aspx or .xbap pages) to accept input from the page request, invoke the requested actions on the model, and determine the correct view to use for the resulting page. This separation of concerns isolates the dispatching logic from any view-related code. The block diagram above shows how the page controller relates to the model and view.


Creating a separate controller for each Web page (or collection of similar methods) can lead to significant code duplication since much of the commonly needed functionality would be rewritten for each code-behind page. Therefore, developers can utilize an abstract base class (BasePage) to encapsulate common functions like passing JavaScript snippets to the client browser HTML page. Each derived page controller (code-behind file) inherits this common functionality from the BasePage controller.


The Business Logic Layer (BLL) classes perform business rule data validation, assignment of properties, and data manipulation of fields fetched from the database through the Data Access Layer (DAL). These model classes route the view data from the controllers to the business domain DAL classes. Of course, Internet or intranet services do not require a controller nor a view since a service would not have any view or UI layer events to handle.


The domain BLL classes encapsulate business rules, policies, workflows, processes, validations, functionalities, operations, methods, objects, properties, and other entities necessary to meet business and functional requirements. The domain BLL classes can be specific to a large or small business area within the web application such as an OrderBLL that might handle the operations necessary for Order to meet business and functional requirements within this section of the web application. However, the OrderBLL may also instantiate and manipulate business objects like Orders or business workflows.