Can Prism and ASP.NET Web Parts work together? - wpf

We are trying to pick a modular programming solution at my work. The choice right now is Prism or ASP.NET Web Parts.
One Boss person asked if you could wrap a Prism Module in an ASP.NET Web Part so they can be used anywhere (kind of a "can I have my cake and eat it too" kind of question.)
While I don't think this is a feasible solution, I don't really know.
Anyone out there that knows some about both Web Parts and Prism that could hazard an explanation as to if this could or could not work?

The latest Prism version only supports WPF & Silverlight. It does not provide any default support for the ASP.Net programming model.
If you (or your boss) are looking for guidance for decoupled applications with ASP.Net, you can probably check ASP.Net MVC which shares many of the Prism core concepts (presentation patterns, containers, areas/regions). Specifically, p&p developed a guidance about developing Web Apps which you can find here and download from here.
I hope this helps.

Related

PRISM to angular migration feasible or not

I have an old project which has been done by someone in Silverlight with PRISM. I want to migrate front-end to angular2. Is it feasible? Because I am totally un-aware of PRISM. Is PRISM works on traditional old form submission or with webservices? I am familiar with angular2 and dont know much about PRISM.
please guide.
As far as the technical aspects are concerned, these are different frameworks and your team will have some learning curve if you dont already know angular2.
Yes PRISM works with services and it help you design Windows Presentation Foundation (WPF) desktop applications in conjunction with MVVM pattern. PRISM is about separation of concerns and loose coupling and helps you design applications using loosely coupled components that can evolve independently.
To me, migration is more of a strategic decision, if you have healthy customer base and your app is going to stay for quite some time then at some stage you have to leave the older technologies and move towards the trending ones.

WPF Desktop application and design patterns

I have to develop a desktop application and the back end will be SQL Express.
I am new to wpf.
Any design patterns i can use? any sample application for wpf with db?
Please help me.
Prism 4 is by Microsoft Patterns and Practices team and it advocates MVVM, Dependency Injection, and modular application development. The book (which I bought and read) is now free online. The book covers several design practices and should be a fairly good start to everything you would need to know to write maintainable, testable, flexible applications in WPF. Prism is also a framework which aids in modular app development and MVVM. It is also fairly popular.
Prism 4.1
^ Seriously, read this book. It takes 2 days max.
As per my suggestion MVVM pattern would be nice if you use in your application. Because it has many ways to reuse your code.
You can find tutorial on the same at below links:
http://msdn.microsoft.com/en-us/magazine/dd419663.aspx
http://www.codeproject.com/Articles/126249/MVVM-Pattern-in-WPF-A-Simple-Tutorial-for-Absolute
http://wpftutorial.net/MVVM.html
Let me know if you need more help.
You can use MVVM design pattern, It will help you to Reuse of code, Flexibility and Customization, Separation of the UI design and development , Testing ...
Refer these article to understand the MVVM pattern and also for sample WPF application..
http://www.codeproject.com/Articles/278901/MVVM-Pattern-Made-Simple
http://msdn.microsoft.com/en-us/magazine/dd419663.aspx
http://msdn.microsoft.com/en-us/library/gg405484%28v=pandp.40%29.aspx

Entity Framework Code First n-tier example (not ASP)

I am new to Entity Framework but have spend a lot of time reading through the snippets of the code, Julie Lerman book, Scott Gu's blog...
I think I have come to understand a lot, but now am at a point when all needs to be tied together in quite complex layered project.
Since I have no background in developing for the web, and all examples that I could find are either simple console applications or are using ASP & MVC I have the hard time understanding the (ASP) examples posted - what is applicable in developing desktop application using WPF and MVVM?
In short, is there any layered example that is not simple console application or ASP.NET, that has CRUD elements?
This might help:
Microsoft Spain - Domain Oriented N-Layered .NET 4.0 Sample App

Silverlight for RIA

We currently choosing platform for RIA App. I looks at number of possibilities and so far.
Best UI I've seen so far was done on Silverlight. ASP.NET is more common but it's not as dynamic. So here is my question:
Is Silverlight sufficient platform for RIA App ?
A year ago I started a job where I took over development of a Silverlight RIA app. We have since ported the app over to ASP.NET MVC and we are much happier overall. I wrote a blog post that goes over our reasons for switching here
Silverlight is great technology that is truly capable of some amazing stuff. However, in my humble little opinion, it's not quite the ideal platform for a rich web oriented application. HTML/CSS/JS still rule the day if you ask me.
Netflix uses Silverlight for playing movies instead of Flash probably because of .NET. It has a smaller market share but a lot of the demos seem to be very professional.
Why not javascript and HTML?

Is WPF and MVC same concepts?

I am new for both concepts.
1) I want to know that MVC and WPF is same concepts but WPF for desktop while other is for WEB ?
2) Will be easy to learn other one If i learn one of them ?
I think you probably meant "ASP.NET MVC" technology when you were talking about "MVC" (based on the tags of your question). Anyway, here are a few points that may clarify what is going on:
ASP.NET MVC is a technology for developing web applications based on the model-view-controller (MVC) pattern. You can twist it a little bit, but the framework is specifically desgined to work with this pattern.
WPF is a technology for developing windows applications. You can use various different design patterns when writing WPF applications, but the most popular one these days is called model-view-viewmodel (MVVM). You could also use the MVC pattern (organization of components) when writing WPF applications, but that wouldn't work as nicely as more native approaches.
So, regarding your questions:
They are not the same concepts - the technologies are different and the usual patterns (ways of organizing code) used with the two technologies also differ.
Learning one technology may make it easier to understand the other one slightly, because they are both .NET GUI frameworks and share some concepts. However, I don't think this will help a lot.
MVC (model-view-controller) is a design pattern, and is not specific to a particular technology set.
WPF (Windows Presentation Framework) is Microsoft's windowing library, and can be used in an MVC-designed system. However there's nothing to enforce this and MVC pattern usage can certainly be abused with WPF.
MVC is a widely used pattern and familiarity with it is going to be useful regardless of the technology set used (whether it's web-based, WPF, Swing etc.). Note that MVC is usually associated with GUIs, but there's no particular restriction and the pattern can be used wherever a model and its changes need to be reflected to different consumers with different views on that data.
No,
WPF and Silverlight are much more closely related than WPF and ASP.NET MVC. Silverlight is a seperate runtime and is basically a subset of .NET; Silverlight uses XAML markup for the UI, which supports a subset (and some web-specific) features from WPF and .NET.
ASP.NET MVC is Microsoft's implementation of the MVC pattern. What differentiates MVC from WebForms ("classic" ASP.NET web-development) is that MVC assists in using best-practices and giving the developer a high-level of control of the output of the application--WebForms was more RAD (Rapid Application Development) driven, making it easy to begin to work with--but putting some concerns about best-practes, pattens, and control to the wayside.
As for which is easier: MVC will likely be quicker to start with, but doing full-blown web-development requires a set of technologies (HTML/CSS/JavaScript/.NET) whereas WPF keeps your required knowledge more focused (XAML/WPF/.NET).
No. MVC is a pattern while WPF is a Microsoft technology.
You could with some effort likely use the MVC pattern in WPF but more popular in WPF is MVVM nowadays. MVC itself is not restricted to web only.
Grz, Kris.
2) Will be easy to learn other one If
i learn one of them ?
Shure: They both can be programmed using c# or vb. And they both can be programmed using Visual Studio.
But the same is true for any technology that incorporates .NET technology (Winform, ASP.NET, Silverlight...)

Resources