Need to build a WPF application with good architecture [duplicate] - prism

This question already has answers here:
PRISM + MEF + MVVM -- Not sure where to really start?
(2 answers)
Closed 2 years ago.
I am trying to start a WPF application towards self learning curve, i have explored quite about WPF and now its time for me to start an application for myself.
Many thanks to them who contributed excellent articles to public here in internet. I would like to start with MVVM + PRISM.
Can anyone guide me through this, which other articles can help me to furnish this kind of architecture. OR what would be the best architecture to choose among MVVM + Nhibernate, Prism, + IOC (spring.net, Unity, NInject)
Thanks in advance
Regards
krish

If you are planning to learn, Try out an client server application
In Server Side try using
EF Code First,
Repository Pattern
Service Layers & WCF
Try using Dependency Injection & Containers for them.
Use T4 for generating WCF client Proxies
Client Side use
Prism Modules & Regions
MVVM Pattern
Create or Use a Navigation Framework
Validation System
Custom selectors and Dialogs
Use Dependency Injection & Containers. Task Parallel Library for Service calls. Background Workers, Multiple Threads to deal with UI updations.

Related

StateChart Diagram Angular Component

I need a UI library with Angular components to display and edit state chart diagrams with data bindings, so the diagrams can be translated bidirectional between the visual diagram and the native statemachine model entities in my application. I have pored over pages of google search to no avail.
I must admit I am a newbie to Angular and my expertise is to the level of using standard components available from npmjs repository. So far, I have been comfortable using different ui components such as ngx-bootstrap, valour, etc. I do not have the competence or know-how to build new components using diagram libraries with JS/JQuery inside my angular project to realise the requirements. I would really appreciate if any UI Toolkit/Library available for this. Even reasonably priced commercial frameworks are acceptable for me.
Thanks in advance for any help.
I have already checked out free/open-source/commercial frameworks such as Telerik Kondo, SyncFusion, Ionic, JQWidgets, etc. I have pored over their documentation published for free. However, I always end up in either (a) they do not suit my needs, or (b) it involves developing this component myself. I know how it sounds, but my need is similar to needing a car; not design & build one myself. I do not have the ability to do it.
I need support for Angular 7 or 8 to be precise.

Can the Model View Presenter be used in a native desktop application?

I'm just starting out on GWT, and I came across the MVP (was actually trying to get ahead of myself..get a little motivation). I already have a desktop application that I want to modify, can a desktop application use the MVP? and if the answer is no, what components and or classes can be used to simulate having a model view presenter?
You cannot compare GWT and MVP: they are totally different things.
GWT is a toolkit that allows you to write desktop-like web applications in java.
Some years ago, Ray Ryan from google gave a talk at the Google IO where he presented an effective pattern to code web applications using GWT. This pattern is MVP. It was not invented by google, it was already there. It's just fit for purpose when you come to write desktop like web applications. At least, this is what Ray Ryan proposed in his talk.
As far as I know there are 2 most famous implementations of the MVP in GWT: Acticivties and Places (Google) and GWTP (Arcbees). You can also create one yourself as exercise, it is not too complex. The main concept is having the view as dumb as possible and put all the business logic in the presenter. The View and the presenter collaborate through an interface. Ok, easier said than done, I'll give you that. But you can google for more.
So yes, you can write a desktop application using MVP.

Would you start a customer's project using JavaFX 2+ for desktop GUI?

I'm interested in your opionion concerning JavaFX 2+ and it's role in the future concerning the creation of desktop applications.
Imagine to start a new customer's project that requires a desktop GUI component.
Would you recommend using JavaFX for a GUI component?
Do you still prefer to use swing?
What are the pros and cons?
Are there known barriers?
If you even started a customer's project using JavaFX, would you do it again?
Personally, I believe in JavaFX and the ability to create GUIs for a great user experience.
I'm looking forward for a good and interesting exchange of opionions.
I'm currently asking myself the same thing. Some months ago. I have built a small specialised dictionary application using Swing, JPA 2.0 (eclipselink) and SQLite.
I just started to port this to JavaFX2. I am very curious how it will turn out, and it might answer some of the same questions you ask (though still in a specific context of course).
If you like, I can keep you updated about the progress.

MEF vs. PRISM. What is the difference? What will be supported in the future?

What I want to create is a Silverlight app with a few tabs/modules that will all be separate DLLs.
I see PRISM has the Shell/Module concepts that seem directed towards doing UI and I find a nice demo (showing how to search digg/twitter).
But it sounds like MEF will be included in VS2010 so I would like to go with that option.
Can anyone somehow clearly explain the differences? (I am not a advanced programmer)
MEF and Prism serve two very distinct goals.
Prism is basically guidance for designing composite applications - where you have a shell and "regions" that are dynamically assigned, and integrated. It includes an IoC container (Unity) that it uses for it's injection.
MEF is a dependency injection framework - it's main goal is to "fill in" depedencies at runtime for an application. In this respect, it's filling the same goal as Unity does within Prism (and, in fact, you could pretty easily rework Prism to use MEF instead of Unity).
Prism fills a broader scope, in some respects, but is also really limited to GUI applications. MEF is just doing one thing (Dep. Injection), but geared to be more general purpose, for any type of application.
As for the lifetime of these products -there is no answer here, but this is kind of how they're being developed:
Prism was developed by the Patterns and Practices team. The goal isn't to necessarily make software, but to provide guidance. As such, they update (although somewhat infrequently) the Prism library and sample, but Prism isn't a core part of the framework shipped by Microsoft. It's really a third party library (even though MS funds a lot of it, most of the P&P people aren't MS FTE).
MEF, from the blog posts, sounds like it is planned to be integrated into the framework, and be used directly inside of MS projects. As such, it's getting heavy development, directly from Microsoft, and being used in their products.
I, personally, have read through the Prism documentation (and have the book), and have gone through the samples. It is very helpful to understand how to break apart an application, but it really is guidance more than a complete, usable framework. The samples are very good at doing what they're designed to do - educate an architect in how to design a composite application.
If your goal is to just keep a clean separation of concerns in a silverlight application, I'd focus more on learning MVVM than necessarily just using Prism.
If you want to use MEF, there are other good options. For example, the WPF Application Framework is an entire MVVM framework built on top of using MEF, and fairly nice.
Basically, MEF is a general-purpose extensibility framework:
If you are building extensible applications, extensible frameworks and application extensions, then MEF is for you.
whereas Prism is mostly for building GUIs:
The Composite Client Application Guidance is designed to help you more easily build modular Windows Presentation Foundation (WPF) and Silverlight client applications.
So MEF and Unity are basically the same...
Well, not exactly. MEF is more focused on extensions which aren't known at compile time, while IOC containers generally focus on dependencies which are known at compile time. The top answer to this question gives a good explanation of the differences.
Yes. Check these two posts for more:
http://blogs.msdn.com/gblock/archive/2009/12/02/mef-and-prism-to-be-or-not-to-be.aspx
http://blogs.msdn.com/dphill/archive/2009/12/09/prism-and-mef.aspx

MVP Taligent Programming Model for .Net

Has anyone created a .NET control architecture using the taligent programming model as follows?
http://www.wildcrest.com/Potel/Portfolio/mvp.pdf
As stated by IBM -
MVP will enable IBM to deliver a unified conceptual programming model across all its major object-oriented language environments
The question is how do you implement or map the IInteractor concept (Page 9) to a .NET interface? Currently the guess is to use the IInputElement interface as a the event source for all UI input controls.
If anyone has already implemented the taligent pattern in .NET, I would like to know if it is applies to both Silverlight and WPF. If so, does it apply to the union of their interfaces?
Finally this represents the unified abstract architecture and can displace PresentationFramework.dll. If you see this applies as a control architecture, please comment.
That depends on what you mean by ".net". The term covers many kinds of applications. Web apps, Web Services, Windows Forms apps, WPF apps, etc...
MVP is used a lot in ASP.NET Web apps. See:
http://msdn.microsoft.com/en-us/magazine/cc188690.aspx
The article How to: Implement the Model-View-Presenter Pattern of the MSDN patterns & practices section seams to be what you are looking for...
We have created a complete MVP framework for .NET, based on the Taligent ideas. It took us some time to get right but now we can create applications by writing business classes, creating a new form and drag-dropping the properties of a class onto the form.
The framework is very sophisticated and allows for the customisation of forms at runtime, as well as automatically hooking up validation in the business classes to edits on the form.
We also wrote an OPF (Object Persistence Framework) to complement it, so avoiding the need to manage database code as well.

Resources