Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

What Architecure pattern / pratice should I use?

Posted on 2011-09-18
2
Medium Priority
?
239 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 600 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 1400 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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.
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
Progress
Introduction to Processes

618 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