Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Chris Langston 4 posts 24 karma points
    Jul 17, 2011 @ 05:01
    Chris Langston
    0

    Best Practices on designing and calling to a Business Logic layer.

    I’m building a website that is a classified ad style website where there could be hundreds of thousands of listings and various categories in which the classified ads will be placed.  All this information will be stored into a specific normalized database structure.

    In designing the architecture, I’d like to build it in such a way that I can easily separate the various areas so any number of UI’s can access the data (website via umbraco, smart phones, tablets, etc.).

    My initial front-end is going to be a website utilizing umbraco.  I’d like to hear from the umbraco community on a best practice for such an implementation.

    Should I build a separate WCF/Web Service layer that exposes the various classes and data that will be made available to the website?  Is this overcomplicating how umbraco should be used?

    What’s the best way to set this up? Should I create separate projects in Visual Studio and have the various layers talk to one another though REST/ Web Service type of messaging?

    I’ve been looking at various packages trying to determine if anyone else is doing such an implementation.  In so doing, I’ve installed the uCommerce Free version to look at their database structure, but I’m not sure how uCommerce is exposing the underlying data in the Umbraco UI.

    Interested in hearing suggestions/best practices from the experts.

    Thanks,

    Chris

     

     

     

  • Sebastiaan Janssen 5045 posts 15478 karma points MVP admin hq
    Jul 18, 2011 @ 11:33
    Sebastiaan Janssen
    0

    Well, if you do have many things trying to talk to the data then by all means, make sure to have a webservice or rest endpoint (whatever is most comfortable for you to work with). You can then bring the data into your site through either XSLT extensions or using Razor (again, whatever you're most comfortable with).

    For a similar situation I had last year, I just talked to the database using Entity Framework and created a few XSLT extensions to access it. I think uCommerce is actually using nHibernate in a similar way.

  • Lennart Stoop 304 posts 842 karma points
    Jul 18, 2011 @ 12:00
    Lennart Stoop
    0

    Hi Chris,

    In my opinion one of the major benefits of Umbraco is that it allows you to choose an architecture which best fits your application’s needs. Much depends on how strongly you want to integrate your data and business logic, but for larger projects I find creating an abstraction layer is always a great way to start with (by not taking into consideration which UI/CMS will be used).

    I strongly believe in a multi-tier approach and would certainly recommend creating a separate data and business tier, allowing you to unit test it as a whole – for this you could setup and reuse a class library and test project in Visual Studio.

    Once you have a solid API to work with you can still decide whether to implement the API directly or to expose it through a web service (which is useful when implementing the API becomes a challenge or when you need to centralize your data).

    Integration with Umbraco does not require you to setup a web service per se and you could just start creating user controls, dashboards, trees, etc. which can all utilize the API you have created. Depending on the location of your data, you can either have your API calling Umbraco’s API or vice versa.

     

    Grtz

    L

Please Sign in or register to post replies

Write your reply to:

Draft