WCF Architecture Recommendation for a startup RRS feed

  • Question

  • I am a seasoned developer primarily in mainframe technologies with VB 6/SQL knowledge that is quite rusty (over ten years out of it!). I am working on developing a software idea with the intent of starting my own business and I have spent the past two months tring to get up to speed with Microsoft's technologies. So much has changed since I last had to architect a system from scratch!

    Based on what I've read on various forums and in a few Wrox books, I think I know the basic framework that I want to use, but I would like some feedback from the seasoned pros in this forum if that is okay with you. My application will be a personal financial web application (Think Quicken or Microsoft Money, only with some features I will not reveal at this point) where users' data is stored on our central DB stores. I plan on additional UIs for backoffice support and analysis and would like to develop UIs for smartphones as well. With that in mind, I believe an SOA approach would be wise. I would like to expose the data (presumably stored in SQL Server) via WCF or WCF RIA Services (I am not sure which, but RIA sounds like the better fit so far) so that I can use those data services across multiple business objects. I think the business layer will also use WCF so that I can develop the various UIs and maintain consistent business behaviours across the UIs.

    The consumer-facing UIs will either be ASP NET MVC 3 or SilverLight. I am not sure which yet. A critical UI requirement will be that I need to show a data grid where every cell is editable. The back-end UIs will either be web-base (same technologies) or WPF.

    So, to sum up what I think is the general architecture:  DAL -> WCF (Using Entity Framework?) -> BAL -> WCF - ASP NET MVC/SilverLight/WPF.

    What do you think? Recommendations? I like this setup because it leaves each of the layers loosely coupled so I should be able to dynamically change out URLs and such while testing different components.

    I would also like this architecture to be efficient. I am concerned about transforming data numerous times between the layers. For example, data returned from SQL Server is formatted to be returned via the WCF Data Contract and is passed to the Business Layer, who also transforms the data to be sent to the UI via WCF and then the UI may transform the data for the user's experience. I am hoping to find away to leave the data in one format and pass it along without having to be coupled to the database or to expose the database directly to the business layer.

    Lastly, keep in mind I am doing this as a startup with NO cash and will not have a lot of money to buy servers/servicing applications, load balancers, etc. (I spent all I had on a new powerful laptop and a one-year MSDN license). I know Azure and the Cloud may have something for me...I will cross that bridge once I can develop a stand-alone proof of concept. I'd like to be able to run the software on one machine and then easily port it into a more robust hardware infrastructure once I see if my idea gains traction and I can justify the expense (my unofficial CFO is my wife).

    I am still scanning through other posts as well in order to glean insights that have been provided to others in the past. I would appreciate your suggestions and input. Thanks in advance!

    • Edited by Paul_M02 Tuesday, July 24, 2012 2:11 AM
    Tuesday, July 24, 2012 2:10 AM

All replies


    Hosting Layer

    Service Layer (WCF)




    Apriori algorithm [association rule]

    Friday, July 27, 2012 12:10 AM
  • Thanks Sukumar! That manual is pretty thick. It is going to take me a while to read through the whole thing! So far, it looks like this is what I need.
    Sunday, July 29, 2012 9:34 PM
  • Obviously you can't give too much information so it's difficult to make recommendations. But if you are looking at SOA then I would recommend staying clear of WCF, at least in the role I'm guessing you are thinking for it. Perhaps take a look NServiceBus or Azure Service Bus. I don't know how collaborative your "documents" will be? Perhaps take a look a CQRS (Patterns & Practices have just published a guide)?

    In general I like your thinking about choosing the right level of tech for the role in hand, too many people will argue against tech like RIA services but if you have specific needs they can be a great ROI.

    Be wary of the stuck record of n-tier/n-layer choose the most appropriate architectural style for your needs. Good luck.

    Monday, July 30, 2012 4:58 PM
  • The more I learn about SOA the more I am thinking of avoiding a proper SOA at this point. After reading some of the doco from the architecture guide I am really leaning toward using WCF as the data access point. I like this approach because I can hide the data storage mechanism from the business and ui layers, plus I gain the ability to reuse exposed contracts for some of the back-end systems. SOA seems to be above me right now and may come into being once I grow. At this point SOA seems like overkill.

    pkr2000, what do you mean when you say "Be wary of the stuck record of n-tier/n-layer choose the most appropriate architectural style for your needs"? What do you mean by "stuck"? Do you mean that I should not automatically assume that I will use an n-tier design?

    Monday, July 30, 2012 6:32 PM
  • Yes that's exactly what I mean. I'm not proposing CQRS for your design but I recommend you take a look at the Patterns & Practices guide because it is a good example of mixing different patterns.

    Tuesday, July 31, 2012 7:50 AM