views:

102

answers:

2

All,

Are there any design patterns that I can use for an food ordering application? I intend to use silverlight 3.0 with .net, c#

The concept of operations is as follows:

  1. application presents the menu (pictures and text) on the screen.
  2. patron selects what they want. For example, burger, fries and a coke.
  3. application will show the order on the screen for the patron to review.
  4. patron will be asked to pay for the order using a credit card.
  5. application will process the credit card transaction.
  6. application will print a receipt

I have read up on the model-view-modelview pattern. Is it appropriate for my app? What other design patterns should I look at?

Looking forward to your input.

best, Rohit

A: 

The fact that it's a 'food ordering app' should have little to do with how you design it. This sounds like a pretty simple that could be build with the following components:

  1. a UI layer (the view, which decides how to display stuff)
  2. a Data/BI layer (the controller, which handles the actual ordering, payment processing and other business intelligence)
  3. a set of interfaces for the two to communicate.
psychotik
A: 

I think this is an excellent opportunity to dive into MVVM! Like you imply, the application appears that it will do most of its work on the back end doing credit card processing and such, which in my opinion, is where MVVM shines. You have your business logic completely decoupled from the page (the View), so you don't have to worry about updating all of your controls with data returned from your back-end processing. You will just set properties on your ViewModel and Silverlight databinding will take care of the rest.

Since this app is not UI intensive, it should be a good way to learn exactly how to keep the ViewModel decoupled from the the View and why MVVM can be such an effective design pattern.

Steve Danner