Welcome to weblogs.com.pk Sign in | Join | Help

Web Application Projects / Atlas / Spring

Last few days had been of full of fun!

We are having a refactoring week in our current project; in which we want to improve the overall code base before moving forward. One of the activities was to straighten out the projects in the solutions. We have two web applications as part of the current project; which are VS2005 based. (ASP.NET v2; lots of Object Data Source Controls; and some Atlas experiments. I proposed updating these projects to Web Application Project (WAP); as most of us are used to it in past.

Updating these two projects into WAP was quite an endeavor; we had to implement certain work-arounds for few things; considerably for the Atlas pages. Thanks to Scott Guthrie; who provided us the latest WAP-CTP which doesn’t has those WAP Beta 2 / Atlas CTP issues.

Yesterday; we were trying to find out the best way to accommodate the following requirements

  • Actual implementation should not be exposed; all the instances should be generated and retrieved through the central factory
  • Using Spring.NET for implementing AOP (Logging, Exceptions and other such concerns)
  • Data Gateways should have support for Object Data Source Controls (Visual Studio Designer); we havnt yet reached the point where we want to implement our own data source controls.

Here is what I have got so far; I am not happy about the skeleton gateway class, got any suggestions? (The code is closer to C#; but its not compileable)

Public Interface IFunctionality {
  Void SomeMethod();
}

Public Class SkeletonGateway : IFunctionality
{
  IFunctionality implementation;

  Public DesignerGateway() {} //For Visual Studio Designer
  Public DesignerGateway(IFunctionality implementation)
  {
    This.implementation = implementation;
  }

  Public Void IFunctionality.Method()
  {
    This.implementation.Method();
  }
}

Internal Class GatewayImplementation : IFunctionality
{
  Public GatewayImplementation() {}
  Public Void IFunctionality.Method()
  {
    //Actual Implementation
  }
}

Public Class CentralFactory
{
  Public Static SkeletonGateway GetGateway()
  {
    GatewayImplementation imp = new GatewayImplementation();
    IFunctionality fun = (IFunctionality)SpringHelper.GetWovenImplementation(imp);
    Return new SkeletonGateway(fun);
  }
}

Somebody, please draw its UML; I am more comfortable with code than UML <smile />

Published Wednesday, March 29, 2006 4:53 PM by khurram
Filed under:

Comments

# Khurram &raquo; Web Application Projects / Atlas / Spring

Thursday, April 06, 2006 4:02 PM by Khurram » Web Application Projects / Atlas / Spring
New Comments to this post are disabled