none
Best way to design an architecture for this specific problem RRS feed

  • Question

  • Hello,

    I need some insights regarding designing a simple solution. I need help from architecture point of view as to how the classes should be laid out, what design patterns shall be used and how the solution can be simple for the end consumer yet flexible and scalable.

    So here is what I have:
    1) There are three web services (that means three WSDLS)
    2) There is an application that needs to utilize the web services to do its job, and you can safely assume that its a front end to the operations supported by the web services.
    3) We need to build a middle tier that sits between the consumer application and the web services. The objective of it is to take requests from the consumer app and return it objects that the consumer application understands.
    4) This also calls for a seperate Entities solution that is referenced by both the middle tier solution and the consumer app solution.

    I need ideas to make a good solution out of this... anything will be highly appreciated!

    Thanks,
    Ron
    Saturday, February 13, 2010 8:51 PM

All replies

  • Hello Ron
    Suggest 3 tier approach as you have thought of
    1) Presentation tier with presentation entities (having presentation to service transformation entites)
    will invoke services layer and pass on service entities

    2) WCF tier (Service tier) with service entities, and service to business transformation entities

    Business logic layer with business entities
    Service tier will be exposed through Service Facade and take input as service entities and return service entities.
    WCF services will have Operation and Data Contracts. Data Contracts can be same as your service entities.

    3) Data access tier with Data entities and Data entitiy to Business entities transformation
    The transformation entities will own the responsibility to transform data from source layer to destination layer entity format.

    This will be a custom light weight entity based solution. If you want to get away with defining custom entity transformation, you can plan to use Entity Framework v4 which will reduce some amount of pain of transforming data access layer to business logic layer and vice a versa through its object relational capabilities.

    For 3 services, this may not be most apt. solution but as you have asked for solution with highest flexibility and scalability, this can provide you that.
    As you can scale each tier independently and have maximum flexibility through service entities approach.

    let me know if any questions.
    Regards
    Suds
    p.s mark helpful if helps or mark answer if solves problem.

    Monday, February 15, 2010 6:18 AM
  • Hello Ron,

    I can try to help if you can provide more details-

    1. Is this application already exist? Are you trying to refractor it?

    "There is an application that needs to utilize the web services to do its job, and you can safely assume that its a front end to the operations supported by the web services."

    2. This is an application ( or most like some bunch of classes) which facilitates the consumption of web services?

    3. Are you planning to expose the middle tier using web services and consumer application will access it using same webservices?

    4. Is that you who own the services? My point here is that if you want to design middle tier application for scalability or you can scale the services as well if needed.

    5. It would be great if you could some functional idea about your application? That would help us to give a concrete solution.

    Thanks,
    Gurmit
    Monday, February 15, 2010 5:27 PM
  • Hi,

    Look at the facade pattern. I think it comes pretty close to accomplishing what you are trying to do


    HTH
    Technocrat_Aspire

    Saturday, February 20, 2010 2:22 PM
  • Hey Sudhanshu, technocrat_aspire,

    Your solution was pretty much what I implemented minus the .NET 3.0/3.5 features. The Facade came as a good choice too. Implemented a Service Facade like Sudhanshu mentioned.

    Thanks guys!
    Sunday, February 21, 2010 12:48 AM
  • Hi Gurmit,

    I am sorry I couldnt answer your questions in details because in the meantime I had already drawn out the structure I settled with.
    So yes, I was not having control over the webservices and it made some things tough. Anyway, thanks a ton!

    Ron
    Sunday, February 21, 2010 12:50 AM