Thoughts on the marriage of MVC and WPF?
-
With all the open web libraries out there... we find that we can create some very nice MVC projects (quickly) using them! WPF is my personal favorite Desktop framework but sometimes I find myself wishing I could use some of the open source web stuff in the WPF projects. Conceptually if a WPF project could easily bypass IIS but provide similar web services (gets and posts) then we know that MVC would be happy as it doesn't care who does the service. Assume now that we could use the controller model of MVC inside of a WPF project, host a browser and use ViewModels just like we do today in WPF. The project template would then look very similar to the MVC template but would be for desktop applications. We could easily combine WPF controls with the WebBrowser or many instances of the web browser (one for each control) and use the Controller model on them for the post backs. The first hurdle would be bypassing IIS and containing the equivalent HTTP support in a WPF project.... The second would be how to implement the controller base class as we know from MVC that it is a pretty intense component. Of course they always say start simple right? Thoughts? Or am I just going crazy?
-
With all the open web libraries out there... we find that we can create some very nice MVC projects (quickly) using them! WPF is my personal favorite Desktop framework but sometimes I find myself wishing I could use some of the open source web stuff in the WPF projects. Conceptually if a WPF project could easily bypass IIS but provide similar web services (gets and posts) then we know that MVC would be happy as it doesn't care who does the service. Assume now that we could use the controller model of MVC inside of a WPF project, host a browser and use ViewModels just like we do today in WPF. The project template would then look very similar to the MVC template but would be for desktop applications. We could easily combine WPF controls with the WebBrowser or many instances of the web browser (one for each control) and use the Controller model on them for the post backs. The first hurdle would be bypassing IIS and containing the equivalent HTTP support in a WPF project.... The second would be how to implement the controller base class as we know from MVC that it is a pretty intense component. Of course they always say start simple right? Thoughts? Or am I just going crazy?
I read that and my head exploded due to the over-complicating of things. Considering the limitations of HTML and the Web Browser control, the question that comes to mind is "why would you want to handicap yourself like that?"
A guide to posting questions on CodeProject
Click this: Asking questions is a skill. Seriously, do it.
Dave Kreskowiak -
I read that and my head exploded due to the over-complicating of things. Considering the limitations of HTML and the Web Browser control, the question that comes to mind is "why would you want to handicap yourself like that?"
A guide to posting questions on CodeProject
Click this: Asking questions is a skill. Seriously, do it.
Dave KreskowiakNo question that the concept is mind-blowing... however consider this: WPF never integrated (fully) the charting control, it's only available via some outdated toolkit. If you search for open charting tools there are zillions of them in browser world. But who wants to force a desktop application to also have a WebSite that hosts those charts? WPF is mostly in what I feel is a Sunset mode, there appears to be no further development happening from Microsoft. WPF has overcomplicated things too, just look at the DataGrid and compart that to JQUERY's DataTable, there's no comparison JQUERY is agile, WPF DataGrid is not. The web side is exploding with new frameworks that were inspired from the MVVM pattern. Just look into Angular. If there were a Hybrid WPF solution implementing MVC where the web site is hosted within the application, then we have the best of both worlds with everything being bindable to a single ViewModel on what MVC calls the "Server Side". We as WPF people don't loose anything but we gain everything "Web". This idea is not that different than those saying that there is a coming convergance of C# and Javascript!
-
No question that the concept is mind-blowing... however consider this: WPF never integrated (fully) the charting control, it's only available via some outdated toolkit. If you search for open charting tools there are zillions of them in browser world. But who wants to force a desktop application to also have a WebSite that hosts those charts? WPF is mostly in what I feel is a Sunset mode, there appears to be no further development happening from Microsoft. WPF has overcomplicated things too, just look at the DataGrid and compart that to JQUERY's DataTable, there's no comparison JQUERY is agile, WPF DataGrid is not. The web side is exploding with new frameworks that were inspired from the MVVM pattern. Just look into Angular. If there were a Hybrid WPF solution implementing MVC where the web site is hosted within the application, then we have the best of both worlds with everything being bindable to a single ViewModel on what MVC calls the "Server Side". We as WPF people don't loose anything but we gain everything "Web". This idea is not that different than those saying that there is a coming convergance of C# and Javascript!
Mr. Javaman wrote:
This idea is not that different than those saying that there is a coming convergance of C# and Javascript!
Introduce them to the thing called "WinForms", or "Rich GUI". It would be a step back to send all over TCP/IP and use scripting, without adding any value. It's a change what you propose, yes, but not an improvement.
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)
-
No question that the concept is mind-blowing... however consider this: WPF never integrated (fully) the charting control, it's only available via some outdated toolkit. If you search for open charting tools there are zillions of them in browser world. But who wants to force a desktop application to also have a WebSite that hosts those charts? WPF is mostly in what I feel is a Sunset mode, there appears to be no further development happening from Microsoft. WPF has overcomplicated things too, just look at the DataGrid and compart that to JQUERY's DataTable, there's no comparison JQUERY is agile, WPF DataGrid is not. The web side is exploding with new frameworks that were inspired from the MVVM pattern. Just look into Angular. If there were a Hybrid WPF solution implementing MVC where the web site is hosted within the application, then we have the best of both worlds with everything being bindable to a single ViewModel on what MVC calls the "Server Side". We as WPF people don't loose anything but we gain everything "Web". This idea is not that different than those saying that there is a coming convergance of C# and Javascript!
Indeed. There's absolutely no development at all[^].
-
No question that the concept is mind-blowing... however consider this: WPF never integrated (fully) the charting control, it's only available via some outdated toolkit. If you search for open charting tools there are zillions of them in browser world. But who wants to force a desktop application to also have a WebSite that hosts those charts? WPF is mostly in what I feel is a Sunset mode, there appears to be no further development happening from Microsoft. WPF has overcomplicated things too, just look at the DataGrid and compart that to JQUERY's DataTable, there's no comparison JQUERY is agile, WPF DataGrid is not. The web side is exploding with new frameworks that were inspired from the MVVM pattern. Just look into Angular. If there were a Hybrid WPF solution implementing MVC where the web site is hosted within the application, then we have the best of both worlds with everything being bindable to a single ViewModel on what MVC calls the "Server Side". We as WPF people don't loose anything but we gain everything "Web". This idea is not that different than those saying that there is a coming convergance of C# and Javascript!
Huh? Microsoft announced a couple of months ago or so that they were back on the WPF band wagon and making "a lot" of changes to .NET 4.6 or whatever its called. Also, big enhancements to Visual Studio 2015 in terms of WPF. Why would you want to run a "desktop app" inside of a browser? The browser environment is too limiting and performance sucks. Of course there is a lot more web stuff. New desktop apps are a drop in the bucket compared to web. The charting control? Come on man... that was a random side project that somebody at Microsoft did and it was never supported to begin with. If you want to do charts in WPF, get a WPF charting library. Yeah, there are a lot more web based ones obviously, and you have to pay for the good WPF ones, but they exist. People do desktop apps to AVOID all the web issues... we don't want no stinkin' web garbage in WPF :).
-
No question that the concept is mind-blowing... however consider this: WPF never integrated (fully) the charting control, it's only available via some outdated toolkit. If you search for open charting tools there are zillions of them in browser world. But who wants to force a desktop application to also have a WebSite that hosts those charts? WPF is mostly in what I feel is a Sunset mode, there appears to be no further development happening from Microsoft. WPF has overcomplicated things too, just look at the DataGrid and compart that to JQUERY's DataTable, there's no comparison JQUERY is agile, WPF DataGrid is not. The web side is exploding with new frameworks that were inspired from the MVVM pattern. Just look into Angular. If there were a Hybrid WPF solution implementing MVC where the web site is hosted within the application, then we have the best of both worlds with everything being bindable to a single ViewModel on what MVC calls the "Server Side". We as WPF people don't loose anything but we gain everything "Web". This idea is not that different than those saying that there is a coming convergance of C# and Javascript!
I won't bother responding to your other misleading WPF "shortcomings" but will at least provide a link contradicting your "Sunset mode" statement for those (real) "WPF people" out there: http://blogs.msdn.com/b/dotnet/archive/2014/11/12/the-roadmap-for-wpf.aspx[^]
-
With all the open web libraries out there... we find that we can create some very nice MVC projects (quickly) using them! WPF is my personal favorite Desktop framework but sometimes I find myself wishing I could use some of the open source web stuff in the WPF projects. Conceptually if a WPF project could easily bypass IIS but provide similar web services (gets and posts) then we know that MVC would be happy as it doesn't care who does the service. Assume now that we could use the controller model of MVC inside of a WPF project, host a browser and use ViewModels just like we do today in WPF. The project template would then look very similar to the MVC template but would be for desktop applications. We could easily combine WPF controls with the WebBrowser or many instances of the web browser (one for each control) and use the Controller model on them for the post backs. The first hurdle would be bypassing IIS and containing the equivalent HTTP support in a WPF project.... The second would be how to implement the controller base class as we know from MVC that it is a pretty intense component. Of course they always say start simple right? Thoughts? Or am I just going crazy?
I think you're getting confused about the technological terms you're using. "MVC" is a presentation paradigm where you separate the data domain, the presentation, and the interface between the two into their own separate concerns. There is probably nothing stopping you doing this in WPF already. When you reference "MVC" I think you actually mean a "web site" in general with support for rendering via html and the accessing of remote resources via http.
-
I think you're getting confused about the technological terms you're using. "MVC" is a presentation paradigm where you separate the data domain, the presentation, and the interface between the two into their own separate concerns. There is probably nothing stopping you doing this in WPF already. When you reference "MVC" I think you actually mean a "web site" in general with support for rendering via html and the accessing of remote resources via http.
No not confusing anything at all, but thanks for your response. And agreed the WPF MVC concept could be done today with the tools provided. There would still be view and viewmodel folders; however a new Controller folder would handle all "routing" requests. Of course WPF doesn't have a routing concepts because the view is routed automatically by WPF system. However, we see plenty of code for MessageBus and ICommands as well as RX implementation of event handlers.
-
With all the open web libraries out there... we find that we can create some very nice MVC projects (quickly) using them! WPF is my personal favorite Desktop framework but sometimes I find myself wishing I could use some of the open source web stuff in the WPF projects. Conceptually if a WPF project could easily bypass IIS but provide similar web services (gets and posts) then we know that MVC would be happy as it doesn't care who does the service. Assume now that we could use the controller model of MVC inside of a WPF project, host a browser and use ViewModels just like we do today in WPF. The project template would then look very similar to the MVC template but would be for desktop applications. We could easily combine WPF controls with the WebBrowser or many instances of the web browser (one for each control) and use the Controller model on them for the post backs. The first hurdle would be bypassing IIS and containing the equivalent HTTP support in a WPF project.... The second would be how to implement the controller base class as we know from MVC that it is a pretty intense component. Of course they always say start simple right? Thoughts? Or am I just going crazy?
Thanks for input, I must be crazy!
-
Huh? Microsoft announced a couple of months ago or so that they were back on the WPF band wagon and making "a lot" of changes to .NET 4.6 or whatever its called. Also, big enhancements to Visual Studio 2015 in terms of WPF. Why would you want to run a "desktop app" inside of a browser? The browser environment is too limiting and performance sucks. Of course there is a lot more web stuff. New desktop apps are a drop in the bucket compared to web. The charting control? Come on man... that was a random side project that somebody at Microsoft did and it was never supported to begin with. If you want to do charts in WPF, get a WPF charting library. Yeah, there are a lot more web based ones obviously, and you have to pay for the good WPF ones, but they exist. People do desktop apps to AVOID all the web issues... we don't want no stinkin' web garbage in WPF :).
It does sound like he has found a gun and decided to shoot himself in the foot, because I can.
Never underestimate the power of human stupidity RAH
-
It does sound like he has found a gun and decided to shoot himself in the foot, because I can.
Never underestimate the power of human stupidity RAH
No, I don't play with guns.
-
Huh? Microsoft announced a couple of months ago or so that they were back on the WPF band wagon and making "a lot" of changes to .NET 4.6 or whatever its called. Also, big enhancements to Visual Studio 2015 in terms of WPF. Why would you want to run a "desktop app" inside of a browser? The browser environment is too limiting and performance sucks. Of course there is a lot more web stuff. New desktop apps are a drop in the bucket compared to web. The charting control? Come on man... that was a random side project that somebody at Microsoft did and it was never supported to begin with. If you want to do charts in WPF, get a WPF charting library. Yeah, there are a lot more web based ones obviously, and you have to pay for the good WPF ones, but they exist. People do desktop apps to AVOID all the web issues... we don't want no stinkin' web garbage in WPF :).
Oh geez Sledge give me a break... I saw their list of "new features"... Tell me which one is your fav? I never said I wanted to run a desktop app inside of a web browser. What I was alluding to is hosting web browsers with better control inside of WPF applications. In addition, seeing that MVC is a far easier framework wondering why WPF hasn't gone that route. The Charting control? Yes... I mean even TFS 2013 shows charts all over the place. Want to impress some exec? Show them a graph, oh yeah, I forgot, just don't show it to them in WPF. Hey Sledge; "how come" you never have provided any articles here on CP?
-
Indeed. There's absolutely no development at all[^].
Oh Pete, you die-hard WPF lover, are you telling me that's a bonifide release?
-
Mr. Javaman wrote:
This idea is not that different than those saying that there is a coming convergance of C# and Javascript!
Introduce them to the thing called "WinForms", or "Rich GUI". It would be a step back to send all over TCP/IP and use scripting, without adding any value. It's a change what you propose, yes, but not an improvement.
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)
You may have forgotten that Rich GUI was one of the tenants of Silverlight, of course WPF being the superior cousin in many respects, never had RIA! WPF is not Rich GUI, it has too many gaps.
-
I read that and my head exploded due to the over-complicating of things. Considering the limitations of HTML and the Web Browser control, the question that comes to mind is "why would you want to handicap yourself like that?"
A guide to posting questions on CodeProject
Click this: Asking questions is a skill. Seriously, do it.
Dave KreskowiakYes head's do explode, especially when they realize the limitations of the WPF framework. Not that this idea would have done anything to plug those gaps, it could make things much easier than they are today.
-
Oh geez Sledge give me a break... I saw their list of "new features"... Tell me which one is your fav? I never said I wanted to run a desktop app inside of a web browser. What I was alluding to is hosting web browsers with better control inside of WPF applications. In addition, seeing that MVC is a far easier framework wondering why WPF hasn't gone that route. The Charting control? Yes... I mean even TFS 2013 shows charts all over the place. Want to impress some exec? Show them a graph, oh yeah, I forgot, just don't show it to them in WPF. Hey Sledge; "how come" you never have provided any articles here on CP?
Performance and all the enhancements to the debugger. MVVM is simple once you understand it. I admit it is kind of hard to understand at first, but once you do, its simple. You are going to impress execs with the charting control? The charts it makes looks ugly. You have to pay for the good charting libraries. 2D charts are fairly easy to whip out in WPF. I built a bunch of spark line charts in a couple of weeks. Nice production quality 3D web charts aren't free either.
-
Oh Pete, you die-hard WPF lover, are you telling me that's a bonifide release?
Yes I am. I know the people working on it and I know how committed to it they are.
-
Performance and all the enhancements to the debugger. MVVM is simple once you understand it. I admit it is kind of hard to understand at first, but once you do, its simple. You are going to impress execs with the charting control? The charts it makes looks ugly. You have to pay for the good charting libraries. 2D charts are fairly easy to whip out in WPF. I built a bunch of spark line charts in a couple of weeks. Nice production quality 3D web charts aren't free either.
No, it's not possible to impress execs with WPF charting. That's my point. System.Windows.Forms does a better job, but not the upscale "better" big brother. BTW, there are so many free charting solutions for web pages out there it's really not possible to figure it all out. I agree MVVM is simple. 3D charting is free... again my point on the missing parts of WPF.
-
Yes I am. I know the people working on it and I know how committed to it they are.
Ok bud what ever you say is true. I'm thinking it's a skeletal team doing skeletal things. Only time will truly tell us where WPF will go...