MVVM VS WPF Browser Application? - wpf

How to use MVVM in WPF Browser Application?
I want to know how to use MVVM in WPF Browser application,
Is that really worthful when comapre with Silverlight?
Which technology is having higher performance for mvvm Silverlight or WPF?
I am going to have my Business layer using ASMX 2.0 (or) WCF
Please help me on this,
Thanks in advance.

A good place to start is by looking at the PRISM framework. It will allow you to implement the MVVM pattern in a WPF browser application. I have been using this technique for sometime without any issue.

Related

Host WPF Application(Caliburn Framework) Inside Winforms

We have an existing Legacy Winforms application which is old and hard to maintain. So we decided to re-write the application using WPF. Due to lack of resource, we plan to have a hybrid type, where new features will be developed in WPF and over the course of time will migrate everything from Winforms to WPF.
Now the problem is, how can we integrate WPF application that uses MVVM framework to be launched from Winforms application. I tried "ElementHost" control to host WPF application. But I dont know how to achieve it with MVVM framework. Tried with Caliburn.Micro and getting an null exception when the BootStrapperBase.Initialize() method is called.
Please advice.
After reading the Caliburn documentation see here, there is an option where we can pass “false” to the base constructor’s “useApplication” parameter.
This worked for me.
This launches the application. I tried playing around passing a reference to the WPF applicaton which contains event and method.

Convert Silverlight App to WPF

I need to convert a Silverlight App to WPF (to finally run it on Microsoft Surface 1.0).
I didn't write the original solution and it is quite big. I've never worked with Silverlight and I'm just a little bit familiar with WPF.
Can you offer some advice on completing this project?
Here's my current plan (high level view):
Recreate all Silverlight projects in WPF (User Control in Silverlight = WPF User Control Library ?)
References are not the same so I'll need to make some changes ... I think :)
Hope all controls are compatible with WPF ...
Have I missed something big? Is something wrong? Incomplete?
I'm open to all your suggestions and advice!
Any development tips ?
I recently converted a Silverlight app to WPF. You can find my notes on how I did it here:
http://robertsmyth.blogspot.com.au/2011/12/migrating-from-silverlight-to-wpf.html
Hope it helps you.
"User Control in Silverlight = WPF User Control Library ?" Not exactly.
which version of silverlight do you use? Most difficult issue I have faced while porting WPF to Silverlight was with converters. Silverlight 4.0 or lower doesn't support Ancestor RelativeSource Binding. But supported in Silverlight 5!
Hope this link will help you. WPF and Silverlight 2 Compatibility

Sharing Silverlight and WPF Models with MVVM Light

I have a Silverlight class library which is a model in my MVVM app. I am using MVVM Light. How easy is it reuse that model in a WPF app and use the MVVM Light framework. The framework has different dlls for WPF and Silverlight so I guess there is incompatability of sorts. I was wondering if anyone could talk me through the options. Cheers, Chris.
The suggested option is to use the Project Linker, this tool synchronizes code over multiple projects, allowing you to maintain a Silverlight and WPF dll with one codebase.
I hope you mean model means data in WPF and Silverlight. If that is the case, you can expose the data using a Service. It can be any service like web service, WCF service or WCF RIA service. Since a service can be multi tenented you can have a Silverlight as well as WPF client accessing the same service.
If you are trying to share the ViewModels between Silverlight and WPF using MVVM light, I would suggest you have a look at the MIX 2011 video of the presentation by the creator of MVVMLight library Laurent Bugnion. This is called Deep Dive MVVM and is a very good session. In short you can share ViewModels between WPF and Silverlight by adding the file from one project to another as a "LINK".
Hope this helps

WPF VS Silverlight

I had a few questions on WPF & silverlight?
When to use WPF? Some examples on
real time projects where WPF is used
When to use silverlight? some examples of real time projects where silverlight is used
What is the difference between
them?
Can WPF and Silverlight be used together?
How do WPF and silverlight differ from traditional asp.net applications (form based & MVC)???
Does Silverlight use WCF to do it's code behind stuff..like it provides an interface and uses web service to get the code behind?
WPF vs Silverlight will tell you what you want to hear...
WPF is a thick Windows client platform that has access to the full .Net Framework. Silverlight is a browser-based technology that has access to a subset of the .Net Framework
In short I would generally use WPF for form/window applications and use Silverlight for online things. Though these both can be used for either, that is how/when I would use it.
WPF and Silverlight both use XAML, so if you can code in one, you can pick up the other just as easy.
WPF is a client based platform while Silverlight is web based. WPF has the full .NET framework available while Silverlight has a streamlined "smaller" version of the framework.
The nice part is both use the same markup (XAML). Both also can work with the MVVM pattern for easy conversion from client to web app and vice versa.
I would read up a little on the web as these arethe basics of these 2 technologies.
WPF and Silverlight are conceptualy completly different things. They use same technology, but their purpouse is completly different.
WPF is thick client framework, that is supposed to replace WinForms in (I hope) nearest future. It has acces to full .NET framework.
Silverlight is Flash-like technology for rich internet applications and thin clients. It is complementary to standard ASP.NET technology. If you want to increase amount of eye-candy or give user much richer interaction options for your web, this is way to go.
They both use same visual-description technology (XAML) and same principles (DataBinding, Templating, Separation of visuals and code, etc..). But their intended usage is different.

Nettiers WPF MVVM

Can We use Nettiers in WPF?
or does codesmith have any template for code generation for WPF and MVVM design pattern?
i was using NetTiers And CodeSmith For Windows And Asp.net APplications.
Does it available on WPF applications?
please help me
I haven't come across anyone off the top of my head who has used .netTiers with WPF. But that doesn't mean that it's not possible. CodeSmith doesn't have any templates for WPF and MVVM design patterns. If you have have a pattern I would be more than happy to work with you on making that into a template. Please contact CodeSmith Support for more information.
Thanks
-Blake Niemyjski

Resources