?
Solved

What Architecure pattern / pratice should I use?

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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

A short article about problems I had with the new location API and permissions in Marshmallow
The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Progress

765 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