Silverlight or WPF Application or WPF Browser Application for app running locally?
We are writing an app that runs on u开发者_StackOverflowsers laptops offline. It needs to store database in an Access database locally. We were wondering if the appropriate .NET technology was Silverlight?
Or should this be a WPF Application or a WPF Browser Application?
Writing to Access is a must in the app.
You should go with WPF. Silverlight is used to extend the functionality of a website. It's a plug-in model that allows you to use C# code to create animations and put programming functionality into your project. You can inject a Silverlight project into your existing web site, so think of it like Flash. In fact, there are many Silverlight vs Flash comparisons online, so you might want to check those out.
A WPF browser application is like an application converted to a website, hence the term "pages" as opposed to "windows." Both Silverlight and XBAP have limitations compared to WPF. If you want to make an offline application that accesses a local database, then WPF is the way to go. If you want to deploy your application as a web application whose pages the user can view using IE's back and forward buttons, XBAP can be used. Also, once you make updates to the XBAP project and publish the new version, the user will use that version, so no updates on the client side are necessary.
P.S. Greg said browser applications have a sequence of execution with a back-and-forth flow. Though I agree with that, WPF applications can certainly achieve the same thing. You can take advantage of user controls and treat each as if it is the primary window. All you need to do is to communicate information between the user controls when necessary.
If you are using the application locally, WPF Application is the choice.
Browser Applications are more suited to applications which have a sequence of execution - ie moving forwards and backwards through a workflow. In a Browser app, the primary window usually changes when the user clicks a button. This is different to most applications where the primary window stays the same.
Silverlight apps are suited for the web, and have security limitations for this reason - accessing local database with Silverlight will be difficult.
精彩评论