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. The Lounge
  3. Separation of Concearns

Separation of Concearns

Scheduled Pinned Locked Moved The Lounge
csharpcssasp-netdatabasewpf
18 Posts 9 Posters 0 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.
  • T Offline
    T Offline
    ToddHileHoffer
    wrote on last edited by
    #1

    So this week I was tasked with updating an old asp.net webforms application. It was a basic change to a page that lets a user search a db and make updates to the line items returned in the grid. I just needed to add a few drop down lists to search on and couple more columns to be displayed / modified in the grid. As it turns out all of the code was in the code behind of the search.aspx page and it was great! When I opened the class each section of code for page was in its own region with an explanation of what it did. Anyway, I made all the changes and had it done in about two hours and my user was thrilled. Currently I have been learning MVVM and separating the concerns like a good soldier. Now, I'm wondering if in the future I am asked to make some changes to a MVVM application, will it be so easy when all the code is all over the place because everything has been seperated? My simple changes that took two hours would have required me to change the model, view, viewmodel, data layer, validation and commands. Just wondering, is SOC really any value to me a developer who works on small projects by himself, rather than on large projects in a team...

    I didn't get any requirements for the signature

    H E M realJSOPR N 6 Replies Last reply
    0
    • T ToddHileHoffer

      So this week I was tasked with updating an old asp.net webforms application. It was a basic change to a page that lets a user search a db and make updates to the line items returned in the grid. I just needed to add a few drop down lists to search on and couple more columns to be displayed / modified in the grid. As it turns out all of the code was in the code behind of the search.aspx page and it was great! When I opened the class each section of code for page was in its own region with an explanation of what it did. Anyway, I made all the changes and had it done in about two hours and my user was thrilled. Currently I have been learning MVVM and separating the concerns like a good soldier. Now, I'm wondering if in the future I am asked to make some changes to a MVVM application, will it be so easy when all the code is all over the place because everything has been seperated? My simple changes that took two hours would have required me to change the model, view, viewmodel, data layer, validation and commands. Just wondering, is SOC really any value to me a developer who works on small projects by himself, rather than on large projects in a team...

      I didn't get any requirements for the signature

      H Offline
      H Offline
      Henry Minute
      wrote on last edited by
      #2

      I couldn't care less about your problems. I have separate concerns of my own. ;P

      Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus!

      T A 2 Replies Last reply
      0
      • T ToddHileHoffer

        So this week I was tasked with updating an old asp.net webforms application. It was a basic change to a page that lets a user search a db and make updates to the line items returned in the grid. I just needed to add a few drop down lists to search on and couple more columns to be displayed / modified in the grid. As it turns out all of the code was in the code behind of the search.aspx page and it was great! When I opened the class each section of code for page was in its own region with an explanation of what it did. Anyway, I made all the changes and had it done in about two hours and my user was thrilled. Currently I have been learning MVVM and separating the concerns like a good soldier. Now, I'm wondering if in the future I am asked to make some changes to a MVVM application, will it be so easy when all the code is all over the place because everything has been seperated? My simple changes that took two hours would have required me to change the model, view, viewmodel, data layer, validation and commands. Just wondering, is SOC really any value to me a developer who works on small projects by himself, rather than on large projects in a team...

        I didn't get any requirements for the signature

        E Offline
        E Offline
        Ennis Ray Lynch Jr
        wrote on last edited by
        #3

        The problem in comparison is that when a well written asp.net page is compared to a MVVM page there isn't a lot of improvement. The solution is that most ASP.NET pages are not well-written. MVVM makes it slightly harder to right total crap without violating MVVM (in which case it is no longer MVVM)

        Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. I also do Android Programming as I find it a refreshing break from the MS. "And they, since they Were not the one dead, turned to their affairs" -- Robert Frost

        T 1 Reply Last reply
        0
        • T ToddHileHoffer

          So this week I was tasked with updating an old asp.net webforms application. It was a basic change to a page that lets a user search a db and make updates to the line items returned in the grid. I just needed to add a few drop down lists to search on and couple more columns to be displayed / modified in the grid. As it turns out all of the code was in the code behind of the search.aspx page and it was great! When I opened the class each section of code for page was in its own region with an explanation of what it did. Anyway, I made all the changes and had it done in about two hours and my user was thrilled. Currently I have been learning MVVM and separating the concerns like a good soldier. Now, I'm wondering if in the future I am asked to make some changes to a MVVM application, will it be so easy when all the code is all over the place because everything has been seperated? My simple changes that took two hours would have required me to change the model, view, viewmodel, data layer, validation and commands. Just wondering, is SOC really any value to me a developer who works on small projects by himself, rather than on large projects in a team...

          I didn't get any requirements for the signature

          M Offline
          M Offline
          Marc Clifton
          wrote on last edited by
          #4

          ToddHileHoffer wrote:

          Just wondering, is SOC really any value to me a developer who works on small projects by himself, rather than on large projects in a team...

          Well, you were blessed by having well segmented code that was documented. In effect, the previous developer had done SOC, to the degree necessary for the task. I imagine how, if the code was not so nicely organized and documented, you would be writing a post about how nice MVVM would have been, as it would have at least provided some clarity as to where each concern of the code was! So, I don't really think it would have taken you that much longer if the code had been written in a more formal MVVM approach. Marc

          T 1 Reply Last reply
          0
          • H Henry Minute

            I couldn't care less about your problems. I have separate concerns of my own. ;P

            Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus!

            T Offline
            T Offline
            ToddHileHoffer
            wrote on last edited by
            #5

            Funny.

            I didn't get any requirements for the signature

            1 Reply Last reply
            0
            • T ToddHileHoffer

              So this week I was tasked with updating an old asp.net webforms application. It was a basic change to a page that lets a user search a db and make updates to the line items returned in the grid. I just needed to add a few drop down lists to search on and couple more columns to be displayed / modified in the grid. As it turns out all of the code was in the code behind of the search.aspx page and it was great! When I opened the class each section of code for page was in its own region with an explanation of what it did. Anyway, I made all the changes and had it done in about two hours and my user was thrilled. Currently I have been learning MVVM and separating the concerns like a good soldier. Now, I'm wondering if in the future I am asked to make some changes to a MVVM application, will it be so easy when all the code is all over the place because everything has been seperated? My simple changes that took two hours would have required me to change the model, view, viewmodel, data layer, validation and commands. Just wondering, is SOC really any value to me a developer who works on small projects by himself, rather than on large projects in a team...

              I didn't get any requirements for the signature

              realJSOPR Offline
              realJSOPR Offline
              realJSOP
              wrote on last edited by
              #6

              I view MVVM, and things of that ilk as merely guidelines. I've been kinda sorta doing it that way for years (object-oriented design kinda forces you to do it at least part of the way. Strictly adhering to techniques like that is IMHO a bad idea, but using it where it's practcal to the point that it doesn't hinder devlopment is okay.

              ".45 ACP - because shooting twice is just silly" - JSOP, 2010
              -----
              You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
              -----
              "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

              T L N 3 Replies Last reply
              0
              • E Ennis Ray Lynch Jr

                The problem in comparison is that when a well written asp.net page is compared to a MVVM page there isn't a lot of improvement. The solution is that most ASP.NET pages are not well-written. MVVM makes it slightly harder to right total crap without violating MVVM (in which case it is no longer MVVM)

                Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. I also do Android Programming as I find it a refreshing break from the MS. "And they, since they Were not the one dead, turned to their affairs" -- Robert Frost

                T Offline
                T Offline
                ToddHileHoffer
                wrote on last edited by
                #7

                Ennis Ray Lynch, Jr. wrote:

                The solution is that most ASP.NET pages are not well-written. MVVM makes it slightly harder to right total crap without violating MVVM (in which case it is no longer MVVM)

                Well, now that is a good point.

                I didn't get any requirements for the signature

                1 Reply Last reply
                0
                • M Marc Clifton

                  ToddHileHoffer wrote:

                  Just wondering, is SOC really any value to me a developer who works on small projects by himself, rather than on large projects in a team...

                  Well, you were blessed by having well segmented code that was documented. In effect, the previous developer had done SOC, to the degree necessary for the task. I imagine how, if the code was not so nicely organized and documented, you would be writing a post about how nice MVVM would have been, as it would have at least provided some clarity as to where each concern of the code was! So, I don't really think it would have taken you that much longer if the code had been written in a more formal MVVM approach. Marc

                  T Offline
                  T Offline
                  ToddHileHoffer
                  wrote on last edited by
                  #8

                  Marc Clifton wrote:

                  Well, you were blessed by having well segmented code that was documented. In effect, the previous developer had done SOC, to the degree necessary for the task. I imagine how, if the code was not so nicely organized and documented, you would be writing a post about how nice MVVM would have been, as it would have at least provided some clarity as to where each concern of the code was!

                  I agree. Messy ASP.Net is awful and messy MVVM is not very likely since by nature the code is clean if you adhere to the approach.

                  I didn't get any requirements for the signature

                  1 Reply Last reply
                  0
                  • realJSOPR realJSOP

                    I view MVVM, and things of that ilk as merely guidelines. I've been kinda sorta doing it that way for years (object-oriented design kinda forces you to do it at least part of the way. Strictly adhering to techniques like that is IMHO a bad idea, but using it where it's practcal to the point that it doesn't hinder devlopment is okay.

                    ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                    -----
                    You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                    -----
                    "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

                    T Offline
                    T Offline
                    ToddHileHoffer
                    wrote on last edited by
                    #9

                    John Simmons / outlaw programmer wrote:

                    I view MVVM, and things of that ilk as merely guidelines. I've been kinda sorta doing it that way for years (object-oriented design kinda forces you to do it at least part of the way. Strictly adhering to techniques like that is IMHO a bad idea, but using it where it's practcal to the point that it doesn't hinder devlopment is okay.

                    I agree.

                    I didn't get any requirements for the signature

                    1 Reply Last reply
                    0
                    • realJSOPR realJSOP

                      I view MVVM, and things of that ilk as merely guidelines. I've been kinda sorta doing it that way for years (object-oriented design kinda forces you to do it at least part of the way. Strictly adhering to techniques like that is IMHO a bad idea, but using it where it's practcal to the point that it doesn't hinder devlopment is okay.

                      ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                      -----
                      You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                      -----
                      "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

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

                      Blindly following rules without knowing why is called cargo cult programming :)

                      A while ago he asked me what he should have printed on my business cards. I said 'Wizard'. I read books which nobody else understand. Then I do something which nobody understands. After that the computer does something which nobody understands. When asked, I say things about the results which nobody understand. But everybody expects miracles from me on a regular basis. Looks to me like the classical definition of a wizard.

                      1 Reply Last reply
                      0
                      • T ToddHileHoffer

                        So this week I was tasked with updating an old asp.net webforms application. It was a basic change to a page that lets a user search a db and make updates to the line items returned in the grid. I just needed to add a few drop down lists to search on and couple more columns to be displayed / modified in the grid. As it turns out all of the code was in the code behind of the search.aspx page and it was great! When I opened the class each section of code for page was in its own region with an explanation of what it did. Anyway, I made all the changes and had it done in about two hours and my user was thrilled. Currently I have been learning MVVM and separating the concerns like a good soldier. Now, I'm wondering if in the future I am asked to make some changes to a MVVM application, will it be so easy when all the code is all over the place because everything has been seperated? My simple changes that took two hours would have required me to change the model, view, viewmodel, data layer, validation and commands. Just wondering, is SOC really any value to me a developer who works on small projects by himself, rather than on large projects in a team...

                        I didn't get any requirements for the signature

                        N Offline
                        N Offline
                        NormDroid
                        wrote on last edited by
                        #11

                        ToddHileHoffer wrote:

                        old asp.net webforms application

                        It's amazing how old technologies become :)

                        Software Kinetics - The home of good software

                        T 1 Reply Last reply
                        0
                        • realJSOPR realJSOP

                          I view MVVM, and things of that ilk as merely guidelines. I've been kinda sorta doing it that way for years (object-oriented design kinda forces you to do it at least part of the way. Strictly adhering to techniques like that is IMHO a bad idea, but using it where it's practcal to the point that it doesn't hinder devlopment is okay.

                          ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                          -----
                          You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                          -----
                          "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

                          N Offline
                          N Offline
                          NormDroid
                          wrote on last edited by
                          #12

                          Same here I can write an complex UI application (silverlight wpf) without the aid of MVVM.

                          Software Kinetics - The home of good software

                          1 Reply Last reply
                          0
                          • N NormDroid

                            ToddHileHoffer wrote:

                            old asp.net webforms application

                            It's amazing how old technologies become :)

                            Software Kinetics - The home of good software

                            T Offline
                            T Offline
                            ToddHileHoffer
                            wrote on last edited by
                            #13

                            Norm .net wrote:

                            It's amazing how old technologies become

                            I know! I still want to code asp.net webforms. I have released my first Silverlight 4 app and while the UI is quicker / suppierior, it is more work and more challenging to code.

                            I didn't get any requirements for the signature

                            N 1 Reply Last reply
                            0
                            • H Henry Minute

                              I couldn't care less about your problems. I have separate concerns of my own. ;P

                              Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus!

                              A Offline
                              A Offline
                              Andrew Rissing
                              wrote on last edited by
                              #14

                              Bah...not quick enough. You stole my joke. :-P

                              1 Reply Last reply
                              0
                              • T ToddHileHoffer

                                Norm .net wrote:

                                It's amazing how old technologies become

                                I know! I still want to code asp.net webforms. I have released my first Silverlight 4 app and while the UI is quicker / suppierior, it is more work and more challenging to code.

                                I didn't get any requirements for the signature

                                N Offline
                                N Offline
                                NormDroid
                                wrote on last edited by
                                #15

                                Tell me, I completed a Silverlight 4 to access our company database via WCF. It was a thrill and challanging project from a coding pointing of view if not design.

                                Software Kinetics - The home of good software

                                T 1 Reply Last reply
                                0
                                • N NormDroid

                                  Tell me, I completed a Silverlight 4 to access our company database via WCF. It was a thrill and challanging project from a coding pointing of view if not design.

                                  Software Kinetics - The home of good software

                                  T Offline
                                  T Offline
                                  ToddHileHoffer
                                  wrote on last edited by
                                  #16

                                  Agreed. It was actually challenging and fun. I used MVVM as much as I could, but I ended up with a few lines of code in the .xaml code behind. I gave up on RIA Services... I couldn't get it deployed on my server and it was just too much magic behind the scenes for me to feel comfortable with it. I ended up writing a few of my own WCF Service methods to call some LINQ to SQL classes. It took a bit more code but at least I felt like I knew how to secure it properly and could debug it if there was a problem.

                                  I didn't get any requirements for the signature

                                  N 1 Reply Last reply
                                  0
                                  • T ToddHileHoffer

                                    Agreed. It was actually challenging and fun. I used MVVM as much as I could, but I ended up with a few lines of code in the .xaml code behind. I gave up on RIA Services... I couldn't get it deployed on my server and it was just too much magic behind the scenes for me to feel comfortable with it. I ended up writing a few of my own WCF Service methods to call some LINQ to SQL classes. It took a bit more code but at least I felt like I knew how to secure it properly and could debug it if there was a problem.

                                    I didn't get any requirements for the signature

                                    N Offline
                                    N Offline
                                    NormDroid
                                    wrote on last edited by
                                    #17

                                    I went for the self hosted service option for WCF and abstracted the interfaces in an assembly so I could easy implement to a Windows service once the code was debugged. I love this kind of stuff, cutting edge with no help from the internet just research and a lot of headaches :)

                                    Software Kinetics - The home of good software

                                    1 Reply Last reply
                                    0
                                    • T ToddHileHoffer

                                      So this week I was tasked with updating an old asp.net webforms application. It was a basic change to a page that lets a user search a db and make updates to the line items returned in the grid. I just needed to add a few drop down lists to search on and couple more columns to be displayed / modified in the grid. As it turns out all of the code was in the code behind of the search.aspx page and it was great! When I opened the class each section of code for page was in its own region with an explanation of what it did. Anyway, I made all the changes and had it done in about two hours and my user was thrilled. Currently I have been learning MVVM and separating the concerns like a good soldier. Now, I'm wondering if in the future I am asked to make some changes to a MVVM application, will it be so easy when all the code is all over the place because everything has been seperated? My simple changes that took two hours would have required me to change the model, view, viewmodel, data layer, validation and commands. Just wondering, is SOC really any value to me a developer who works on small projects by himself, rather than on large projects in a team...

                                      I didn't get any requirements for the signature

                                      P Offline
                                      P Offline
                                      peterchen
                                      wrote on last edited by
                                      #18

                                      So, been earning a lot of Concs lately? :rolleyes: It's a tough topic indeed. My experience is similar to your doubts: 1. Separation of Concerns is important for making software maintainable. 2. Any attempt to formalize / enforce SoC for UI I have worked with creates a painful separation of functionality. I think this is specific to UI (at least, SoC is much easier for other topics), because a good UI is never passive enough to not need intricate deep coupling with the data model.

                                      FILETIME to time_t
                                      | FoldWithUs! | sighist | WhoIncludes - Analyzing C++ include file hierarchy

                                      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