Cloud Technologies Mobile Technology Tools & Frameworks

EasyWeb

EasyWebEasyWeb.NET framework is a .NET based web application framework to facilitate web application development by means of providing a set of infrastructural API's.

In general, any ASP.NET based application implements server side validation, business logic invocation at the code behind files. This approach limits the re-usability of code developed, and leads to code redundancy. Every ASPX page should know the existence of the business components to serve the request. This leads to the tight coupling between presentation and business layers. Moreover, any infrastructural services like request Authorization, exception handling, and application logging code needs to be developed as part of the application.

Hence, The EasyWeb.NET is evolved, to overcome the above said limitations, and to provide infrastructural service API to facilitate the application development.

Response Handling Mechanism

This section explains various activities performed by the Front Controller to serve any web request in detail.

Authentication

The Authentication is performed by the IIS. IIS supports windows and form based authentication. This configuration is left to the application requirement. The IIS allows only authenticated users to invoke restricted resources.

Authorization

The Front Controller supports request level authorization mechanism, which can be configured in the RequestConfig.xml file.

Execution

The request execution comprises of three activities:

  • Command Processing (Business Logic)
  • Response Handling (Producing Views)
  • Commands and Command Group (An easy way to implement your business logic)

A command contains a set of execution statements to accomplish a specific task. For example: Business Validations, Business Calculations..etc which are specific to the functionality. The contract between the framework and command is imposed by an interface called Icommand. Any Class which implements this interface becomes a business component, and the component existence can be configured in the CommandConfig.xml file. The Command objects are singleton within the framework, which means any usage of the static variable should be dealt with carefully. The Command group provides an easy way to combine the available commands as a logical group. The name of the Command group to be executed for the request can be declared in the Requestconfig.xml file. Any static properties required by the command, specific to the command group can also be configured in the same file.

The Command factory class controls the execution of Command groups. This factory provides a Command context object as an input to all the commands. The Command context is an easy way to share information between commands, and it also collects the output produced by each of the commands.

The framework comes with a set of inbuilt commands to accelerate the application development. One can completely discard these inbuilt commands, and develop application specific commands based on the requirement.

Database Transaction Management

The Database connections are handled by the EasyWeb.NET framework. This eliminates the hassle of managing transactions at the application level. The application related database connection is exposed only to the commands through Command context. The connection can be used by the commands to perform Database related tasks.

Response Handlers (Produces view)

The Response Handlers are primarily responsible for producing views. Every request can be associated with a Response Handler, and it needs to implement a Response Handler interface. This interface provides two methods (Before Processing and After Processing), which are invoked during the execution life cycle of the request.

The Front Controller instantiates Response Handler configured for that request and invokes the Before Processing method. The Response Handler has an option to stop the execution of the current request at this point. This can be potentially used by the application to control the execution based on certain business conditions.

The Front Controller continues its execution by delegating calls to the Command Factory for processing command group. Upon successful completion, the Front Controller invokes After Processing event. This event would be useful to decide on the view to be rendered for the current request.

Internationalization

The EasyWeb.NET framework provides message resource API to support internationalized messages. This API can be used by the .aspx page to obtain internationalized messages. The source to the message resource can be developed based on the application requirement.

The EasyWeb.NET framework supports parallel development by means of Component Contract Model. The model ensures the component integrity by providing a set of interfaces to be implemented by the components at every layer.

Component Contract Model (Definition)

The Component Contract Model defines the contract between two disparate systems well in advance. The term "contract" means adherence to a specific standard. This model allows us to develop systems independently, and integrate them later.

For instance, developing Business Logic need not depend on the Presentation Logic.

Highlights

The EasyWeb.NET framework provides many features to the web application developer in order to develop applications efficiently. Some of the major features are listed below.

  • Provides inbuilt Resource Authorization mechanism
  • Separates business logic from presentation layer
  • Enables parallel development
  • Transaction Management
  • Allows developing reusable components
  • Supports web services
  • Provides Error Handling and Logging mechanism
  • Supports Component Unit Testing
  • Easy to Maintain

Architecture Overview

EasyWeb.NET extends the capabilities of .NET platform, and provides unique framework to rapidly develop web and web service applications. The framework has a front controller to serve all the incoming requests. The framework uses custom Http module feature provided by .NET to setup objects that are related to the request. For example: setting up the logger interface in Http context.

The *.web request lands in the Web Request Handler provided by the EasyWeb.net framework, and it obtains the appropriate response handler based on the request URL and starts executing it. The Front Controller performs authorization, and allows the valid request to be executed.

The Front Controller activities are listed below.

  • Obtain Request Object from Request Config.xml
  • Performs authorization for the requested resource
  • Instantiate Response Handler associated with a request
  • Invokes Before Processing method of the ResponseHanlder by providing Http Context as an input
  • Stops executing further, if the method return false.
  • Obtains Command Request instance from Command Factory.
  • Obtains Command Group from Command Factory.
  • Delegates command Group processing job to the command factory.
  • Obtains Command Response from the command factory and set it into Http Context.
  • Invokes After Processing method of the ResponseHandler.

To know more about this tool please mail us at: cssinnovations@csscorp.com