Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Thoughts on the marriage of MVC and WPF?

Thoughts on the marriage of MVC and WPF?

Scheduled Pinned Locked Moved C#
csharpasp-netwpfwcfwindows-admin
28 Posts 7 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Your Display Name Here

    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!

    S Offline
    S Offline
    SledgeHammer01
    wrote on last edited by
    #7

    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 :).

    M Y 2 Replies Last reply
    0
    • Y Your Display Name Here

      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!

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #8

      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[^]

      1 Reply Last reply
      0
      • Y Your Display Name Here

        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?

        F Offline
        F Offline
        F ES Sitecore
        wrote on last edited by
        #9

        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.

        Y 1 Reply Last reply
        0
        • F F ES Sitecore

          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.

          Y Offline
          Y Offline
          Your Display Name Here
          wrote on last edited by
          #10

          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.

          1 Reply Last reply
          0
          • Y Your Display Name Here

            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?

            Y Offline
            Y Offline
            Your Display Name Here
            wrote on last edited by
            #11

            Thanks for input, I must be crazy!

            1 Reply Last reply
            0
            • S SledgeHammer01

              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 :).

              M Offline
              M Offline
              Mycroft Holmes
              wrote on last edited by
              #12

              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

              Y 1 Reply Last reply
              0
              • M Mycroft Holmes

                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

                Y Offline
                Y Offline
                Your Display Name Here
                wrote on last edited by
                #13

                No, I don't play with guns.

                1 Reply Last reply
                0
                • S SledgeHammer01

                  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 :).

                  Y Offline
                  Y Offline
                  Your Display Name Here
                  wrote on last edited by
                  #14

                  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?

                  S 1 Reply Last reply
                  0
                  • P Pete OHanlon

                    Indeed. There's absolutely no development at all[^].

                    Y Offline
                    Y Offline
                    Your Display Name Here
                    wrote on last edited by
                    #15

                    Oh Pete, you die-hard WPF lover, are you telling me that's a bonifide release?

                    P 1 Reply Last reply
                    0
                    • L Lost User

                      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)

                      Y Offline
                      Y Offline
                      Your Display Name Here
                      wrote on last edited by
                      #16

                      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.

                      1 Reply Last reply
                      0
                      • D 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 Kreskowiak

                        Y Offline
                        Y Offline
                        Your Display Name Here
                        wrote on last edited by
                        #17

                        Yes 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.

                        1 Reply Last reply
                        0
                        • Y Your Display Name Here

                          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?

                          S Offline
                          S Offline
                          SledgeHammer01
                          wrote on last edited by
                          #18

                          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.

                          Y 1 Reply Last reply
                          0
                          • Y Your Display Name Here

                            Oh Pete, you die-hard WPF lover, are you telling me that's a bonifide release?

                            P Offline
                            P Offline
                            Pete OHanlon
                            wrote on last edited by
                            #19

                            Yes I am. I know the people working on it and I know how committed to it they are.

                            Y 1 Reply Last reply
                            0
                            • S SledgeHammer01

                              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.

                              Y Offline
                              Y Offline
                              Your Display Name Here
                              wrote on last edited by
                              #20

                              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.

                              S 1 Reply Last reply
                              0
                              • P Pete OHanlon

                                Yes I am. I know the people working on it and I know how committed to it they are.

                                Y Offline
                                Y Offline
                                Your Display Name Here
                                wrote on last edited by
                                #21

                                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...

                                1 Reply Last reply
                                0
                                • L Lost User

                                  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)

                                  Y Offline
                                  Y Offline
                                  Your Display Name Here
                                  wrote on last edited by
                                  #22

                                  Oh but nothing has to fly over the intranet for these things. Look at Node or Express, host your own WebServer in your solution. None of this requires IIS.

                                  L 1 Reply Last reply
                                  0
                                  • Y Your Display Name Here

                                    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.

                                    S Offline
                                    S Offline
                                    SledgeHammer01
                                    wrote on last edited by
                                    #23

                                    *shrug* ChartFX is pretty impressive: http://www.softwarefx.com/sfxnetproducts/chartfx/wpf/features.aspx[^] It's not free though. If you're trying to impress execs, whats $1300? Regardless... I haven't seen free web charts that look that nice, but I haven't looked since I'm anti-web. 2D charts are easy to whip up in WPF. 3D charts... yeah, I'd spend the $1300... even as a "Mr. Smarty Pants" :), I don't get the 3D APIs. I've tried a few times, but gave up. You really need to understand 3D programming to use them. The great Sacha posted a few 3D chart articles on here though, but they are just starting points. Not fully fleshed out and polished like ChartFx.

                                    Y 1 Reply Last reply
                                    0
                                    • S SledgeHammer01

                                      *shrug* ChartFX is pretty impressive: http://www.softwarefx.com/sfxnetproducts/chartfx/wpf/features.aspx[^] It's not free though. If you're trying to impress execs, whats $1300? Regardless... I haven't seen free web charts that look that nice, but I haven't looked since I'm anti-web. 2D charts are easy to whip up in WPF. 3D charts... yeah, I'd spend the $1300... even as a "Mr. Smarty Pants" :), I don't get the 3D APIs. I've tried a few times, but gave up. You really need to understand 3D programming to use them. The great Sacha posted a few 3D chart articles on here though, but they are just starting points. Not fully fleshed out and polished like ChartFx.

                                      Y Offline
                                      Y Offline
                                      Your Display Name Here
                                      wrote on last edited by
                                      #24

                                      Hey Sledge, Take a look at this one: d3js.org[^] And then take a look here: Google Charts[^] Both free!

                                      S 1 Reply Last reply
                                      0
                                      • Y Your Display Name Here

                                        Hey Sledge, Take a look at this one: d3js.org[^] And then take a look here: Google Charts[^] Both free!

                                        S Offline
                                        S Offline
                                        SledgeHammer01
                                        wrote on last edited by
                                        #25

                                        I checked it out. Looks OK for the 2D charts. Google does have a 3D pie chart. Doesn't look "bad" or anything... just the 3D pie chart from ChartFX looks way cooler IMO. Better angle on the pie (which I'm sure you can maybe adjust in the Google API), but I like the "shine" on the ChartFX one, gives it pop -- impresses execs LOL. Also, they have a lot of other 3D charts that Google doesn't have. If I was "told" to use the google charts, I would LOL, but I'd push for something better. I'm just going off the pics of course. If I was evaluating ChartFX, I'd have to download the trial and mess around with it. Some libs look cool in screenshots, but its very difficult to reproduce in code or performance is bad, etc.

                                        1 Reply Last reply
                                        0
                                        • Y Your Display Name Here

                                          Oh but nothing has to fly over the intranet for these things. Look at Node or Express, host your own WebServer in your solution. None of this requires IIS.

                                          L Offline
                                          L Offline
                                          Lost User
                                          wrote on last edited by
                                          #26

                                          Mr. Javaman wrote:

                                          Oh but nothing has to fly over the intranet for these things.

                                          Aw, goody. You're still running in a limited environment, where the known and documented path would be the natural choice.

                                          Mr. Javaman wrote:

                                          host your own WebServer in your solution.

                                          And this webserver would work without TCP/IP? 'Cause that is what I was referring to, wasn't it?

                                          Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

                                          Y 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups