Solved

What Architecure pattern / pratice should I use?

Posted on 2011-09-18
2
234 Views
Last Modified: 2012-05-12
I am about to develop some software that will be for DeskTop, Web (Silverlight, HTML), and mobile devices.  I would if course like to use my Datalayer code for all of these environment, as you can see the only difference in the presentation is what it is aimed for.  So rather than spending the time and effort coding the datalayer for each interface.  Is there a pattern I could use which uses the Data layer.
0
Comment
Question by:IandINSW
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Assisted Solution

by:nixkuroi
nixkuroi earned 150 total points
ID: 36564322
Try WCF and enable REST requests.  This should let you connect with Silverlight and WPF and get serialized objects with regular WCF calls, and also make RST calls with HTML and get your data that way as well.  

Here's a resource page on setting that up.  
http://msdn.microsoft.com/en-us/netframework/cc950529

0
 
LVL 3

Accepted Solution

by:
smickle earned 350 total points
ID: 36565124
At the highest level, it sounds like you would benefit from a traditional 3-tier architecture. The three tiers in this pattern generally would consist of (from top-to-bottom):
  -Presentation
  -Business/Data Access
  -Data Source

Reference on the 3-Tier pattern:
http://en.wikipedia.org/wiki/Multitier_architecture

Note these are simply "logical" tiers and some people call them layers as opposed to tiers. Each one of these logical tiers would be responsible for it's own concerns, and ideally would separate it's concerns and dependencies from the tiers below it.

Just keep in mind that each tier in this architecture can be further broken down into sub-areas, depending on the overall complexity and avaiability of your application system and hardware/servers.

All your different clients such as Desktop, Web, Mobile, etc. would each have their own UI and UI logic that would live in the Presentation tier of the application.

Since you have a DAL you want to use for all, that would live in the middle tier where Data Access components belong.

For multi-targeting clients such as your software project, I find it very beneficial to take advantage of a Service-based design as nixkuroi mentions. This gives your client apps a Facade into your main application logic. Think of the Facade pattern as a generalized API into your app.

The whole design can get blown out to a lot of patterns when you break it all down. But to keep it simple at first, just think about the highest level of the 3-tier architecture pattern.

If you feel you want to dive into a flexible and maintainable architecture, research a few of these patterns that I often live by when I work on larger projects that require multi-targeted clients with shared data sources:
  -3-tier / N-Tier pattern
  -Presentation patterns
  -Application Facade pattern (Services/Services layer in middle tier)
  -Domain Model pattern (stripped down Business objects in middle tier)
 
Hope this helps you go in the right direction.

-Steve
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question