Solved

What Architecure pattern / pratice should I use?

Posted on 2011-09-18
2
229 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
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This is an explanation of a simple data model to help parse a JSON feed
This is about my first experience with programming Arduino.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

705 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now