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. Your Own Framework

Your Own Framework

Scheduled Pinned Locked Moved The Lounge
csharpdotnetwpfcomwindows-admin
30 Posts 20 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.
  • K Kevin Marois

    I just read [an article here](https://www.codeproject.com/Articles/1165750/Message-Sinks) on CP where the author says "For many years I've been building a library themed "things that should be built into the .NET framework, but aren’t"." I too have been compiling things I use regularly into my own framework. Everything from logging, registry stuff, app security, WPF things, Data related stuff, ZIP, messaging, etc.). In my WPF library I even subclassed the standad WPF controls and then in my WPF apps I use my version of the controls. For the most part, when I find myself using code repeatedly I start thinking about where in my framework to put it so that I can re-use it again later. So I'm curious... Do you do this? Create a library/framework of reusable code? If you, how do you put it all together? If not, how do you handle using/reusing common code?

    If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.

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

    I don't. The only things I reuse are tiny snippets that I write from memory.

    K M 2 Replies Last reply
    0
    • K Kevin Marois

      So if the BCL now contains a function that you created in the past do you then go back & refactor to use the BCL version?

      If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.

      C Offline
      C Offline
      Chris Maunder
      wrote on last edited by
      #6

      Sometimes, but not as often as we should. In some cases we've grown the system around our methods in a way that's different enough that using the BCL methods (or entire patterns) that are now available would mean more work than it's worth. Hence the rewrite. It's actually rare that a rewrite actually ever makes sense, but in this case it does.

      cheers Chris Maunder

      K 1 Reply Last reply
      0
      • L Lost User

        I don't. The only things I reuse are tiny snippets that I write from memory.

        K Offline
        K Offline
        Kevin Marois
        wrote on last edited by
        #7

        But that's got to mean an increase in testing time. I find that the benefit of creating my own library/framework is that once a component is written and tested I can use it freely in other apps with a high degree of confidence that it's going to work.

        If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.

        L 1 Reply Last reply
        0
        • C Chris Maunder

          Sometimes, but not as often as we should. In some cases we've grown the system around our methods in a way that's different enough that using the BCL methods (or entire patterns) that are now available would mean more work than it's worth. Hence the rewrite. It's actually rare that a rewrite actually ever makes sense, but in this case it does.

          cheers Chris Maunder

          K Offline
          K Offline
          Kevin Marois
          wrote on last edited by
          #8

          I can see the pro's and con's of both. For one, you KNOW you've written. It's tested and working, whereas new framework code could be troublesome. While on the flip side having framework code would mean less source you've got to maintain.

          If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.

          1 Reply Last reply
          0
          • K Kevin Marois

            I just read [an article here](https://www.codeproject.com/Articles/1165750/Message-Sinks) on CP where the author says "For many years I've been building a library themed "things that should be built into the .NET framework, but aren’t"." I too have been compiling things I use regularly into my own framework. Everything from logging, registry stuff, app security, WPF things, Data related stuff, ZIP, messaging, etc.). In my WPF library I even subclassed the standad WPF controls and then in my WPF apps I use my version of the controls. For the most part, when I find myself using code repeatedly I start thinking about where in my framework to put it so that I can re-use it again later. So I'm curious... Do you do this? Create a library/framework of reusable code? If you, how do you put it all together? If not, how do you handle using/reusing common code?

            If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.

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

            Kevin Marois wrote:

            So I'm curious... Do you do this? Create a library/framework of reusable code?

            I had a small library for WinForms, but have been doing mostly web-applications for the last years. Not really building a new library, since it would be outdated before it is started. The only interesting thing in the library was a virtualized datagridview that accepts an IDataReader for quick re-use.

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

            1 Reply Last reply
            0
            • K Kevin Marois

              I just read [an article here](https://www.codeproject.com/Articles/1165750/Message-Sinks) on CP where the author says "For many years I've been building a library themed "things that should be built into the .NET framework, but aren’t"." I too have been compiling things I use regularly into my own framework. Everything from logging, registry stuff, app security, WPF things, Data related stuff, ZIP, messaging, etc.). In my WPF library I even subclassed the standad WPF controls and then in my WPF apps I use my version of the controls. For the most part, when I find myself using code repeatedly I start thinking about where in my framework to put it so that I can re-use it again later. So I'm curious... Do you do this? Create a library/framework of reusable code? If you, how do you put it all together? If not, how do you handle using/reusing common code?

              If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.

              M Offline
              M Offline
              Mark_Wallace
              wrote on last edited by
              #10

              I think just about everyone does, don't they? I've got personal libraries for every language I've ever worked in.

              I wanna be a eunuchs developer! Pass me a bread knife!

              K B 2 Replies Last reply
              0
              • M Mark_Wallace

                I think just about everyone does, don't they? I've got personal libraries for every language I've ever worked in.

                I wanna be a eunuchs developer! Pass me a bread knife!

                K Offline
                K Offline
                Kevin Marois
                wrote on last edited by
                #11

                [Harold doesn't](https://www.codeproject.com/Messages/5349548/Re-Your-Own-Framework.aspx)... I think that any serious developer would understand the need for their own collection of code. For the last 15 year I've been doing .Net. Before that I was a FoxPro developer. I has a very large collection of resuable code that I later developed into a framework that i tried to market as FramePro. Never caught on as a selling point but I used it in many apps.

                If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.

                M 1 Reply Last reply
                0
                • K Kevin Marois

                  I just read [an article here](https://www.codeproject.com/Articles/1165750/Message-Sinks) on CP where the author says "For many years I've been building a library themed "things that should be built into the .NET framework, but aren’t"." I too have been compiling things I use regularly into my own framework. Everything from logging, registry stuff, app security, WPF things, Data related stuff, ZIP, messaging, etc.). In my WPF library I even subclassed the standad WPF controls and then in my WPF apps I use my version of the controls. For the most part, when I find myself using code repeatedly I start thinking about where in my framework to put it so that I can re-use it again later. So I'm curious... Do you do this? Create a library/framework of reusable code? If you, how do you put it all together? If not, how do you handle using/reusing common code?

                  If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.

                  OriginalGriffO Offline
                  OriginalGriffO Offline
                  OriginalGriff
                  wrote on last edited by
                  #12

                  Oh yes. When I write code, I write it with an eye to "generalization" so that it can be moved into a library - and I have have several just for C#, each containing different but related material - once it's shown to work and can be properly tested. If you don't keep libraries of "good code" then you will be re-inventing the wheel far, far, too much.

                  Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

                  "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                  "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                  K D F 3 Replies Last reply
                  0
                  • OriginalGriffO OriginalGriff

                    Oh yes. When I write code, I write it with an eye to "generalization" so that it can be moved into a library - and I have have several just for C#, each containing different but related material - once it's shown to work and can be properly tested. If you don't keep libraries of "good code" then you will be re-inventing the wheel far, far, too much.

                    Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

                    K Offline
                    K Offline
                    Kevin Marois
                    wrote on last edited by
                    #13

                    Agreed

                    If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.

                    1 Reply Last reply
                    0
                    • OriginalGriffO OriginalGriff

                      Oh yes. When I write code, I write it with an eye to "generalization" so that it can be moved into a library - and I have have several just for C#, each containing different but related material - once it's shown to work and can be properly tested. If you don't keep libraries of "good code" then you will be re-inventing the wheel far, far, too much.

                      Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

                      D Offline
                      D Offline
                      dandy72
                      wrote on last edited by
                      #14

                      I'm in the same boat. My "goodies" library lives inside a single DLL that doesn't have any external dependency, so I can very easily add it to any project. For years I went out of my way to have it target .NET 2.0 (what I've considered to be the lowest common denominator), but I've "upgraded" it to target .NET 4 last year or so only because 2/3.5 are no longer installed by default on the newer OSes. But, it still doesn't rely on anything from .NET 4; I could retarget it for .NET 2 and it would still compile. I don't use interfaces nearly as much as I should, but I make sure function signatures don't change from one version to the next...so in theory whenever I add/fix something in the DLL, I can drop in the replacement file and all my apps should continue to work. If it gets more complex than that, then it doesn't belong in my utilities library.

                      1 Reply Last reply
                      0
                      • K Kevin Marois

                        I just read [an article here](https://www.codeproject.com/Articles/1165750/Message-Sinks) on CP where the author says "For many years I've been building a library themed "things that should be built into the .NET framework, but aren’t"." I too have been compiling things I use regularly into my own framework. Everything from logging, registry stuff, app security, WPF things, Data related stuff, ZIP, messaging, etc.). In my WPF library I even subclassed the standad WPF controls and then in my WPF apps I use my version of the controls. For the most part, when I find myself using code repeatedly I start thinking about where in my framework to put it so that I can re-use it again later. So I'm curious... Do you do this? Create a library/framework of reusable code? If you, how do you put it all together? If not, how do you handle using/reusing common code?

                        If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.

                        M Offline
                        M Offline
                        Mike Prof Chuck
                        wrote on last edited by
                        #15

                        Yes I do. For Android (some .aar libraries) and C#. Couldn't do without it. Sometimes you have to find the edge of "how closely are these and those classes related to each other" and decide, whether to put them in one library together (which means more memory usage / download size, especially on mobile platforms) or to split them (which means, more references, maybe more builds, a bit more organizational work in the project structures). In most cases I prefer to do more, but smaller libraries, than to do one single dinosaur who "eats everything". It adds flexibility on the cost of a bit more time to set up a new project. But the setup is done once... the memory is used every time the app starts. Exception is my WinForms library, but the past showed, that indeed most of the classes in there are used in each of my winforms apps. I strictly divide code into "Business logic" - which means, code that "does the job of the app" and "everything else". As long as I have not made the "everything else" code as generalized as needed to be library-ready I consider it a prototype. I have finished platform (non-business) code of my app when I have succesfully outsourced it to a library project. not a minute sooner.

                        || You know nothing, Jon Snow. || My Android Label (mbar Software) on G+ || My Android Apps in Play Store

                        1 Reply Last reply
                        0
                        • K Kevin Marois

                          But that's got to mean an increase in testing time. I find that the benefit of creating my own library/framework is that once a component is written and tested I can use it freely in other apps with a high degree of confidence that it's going to work.

                          If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.

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

                          Perhaps, obviously I'm not really in a position to make a comparison. But I don't expect so, since it's not that I'm just refusing to reuse code, the problem is there isn't any opportunity for it. Except for those trivial snippets (such as, idk, inverting a permutation or something, that comes up occasionally), but I don't test those anyway. (inb4 public lynching) That's not where the bugs are, and the context they appear in will probably be tested anyway. You have some bigger reusable parts so it makes sense that it would make a difference in that case

                          1 Reply Last reply
                          0
                          • K Kevin Marois

                            I just read [an article here](https://www.codeproject.com/Articles/1165750/Message-Sinks) on CP where the author says "For many years I've been building a library themed "things that should be built into the .NET framework, but aren’t"." I too have been compiling things I use regularly into my own framework. Everything from logging, registry stuff, app security, WPF things, Data related stuff, ZIP, messaging, etc.). In my WPF library I even subclassed the standad WPF controls and then in my WPF apps I use my version of the controls. For the most part, when I find myself using code repeatedly I start thinking about where in my framework to put it so that I can re-use it again later. So I'm curious... Do you do this? Create a library/framework of reusable code? If you, how do you put it all together? If not, how do you handle using/reusing common code?

                            If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.

                            D Offline
                            D Offline
                            DanielBrownAU
                            wrote on last edited by
                            #17

                            Yes. I have a couple of libraries (being primary a SharePoint Developer), I’ve got a Common, Winforms, ASP.NET and SharePoint libraries (including unit tests) which I’ve built up over the years of consulting.

                            1 Reply Last reply
                            0
                            • K Kevin Marois

                              I just read [an article here](https://www.codeproject.com/Articles/1165750/Message-Sinks) on CP where the author says "For many years I've been building a library themed "things that should be built into the .NET framework, but aren’t"." I too have been compiling things I use regularly into my own framework. Everything from logging, registry stuff, app security, WPF things, Data related stuff, ZIP, messaging, etc.). In my WPF library I even subclassed the standad WPF controls and then in my WPF apps I use my version of the controls. For the most part, when I find myself using code repeatedly I start thinking about where in my framework to put it so that I can re-use it again later. So I'm curious... Do you do this? Create a library/framework of reusable code? If you, how do you put it all together? If not, how do you handle using/reusing common code?

                              If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.

                              J Offline
                              J Offline
                              Jorgen Andersson
                              wrote on last edited by
                              #18

                              Anything that can be generalized is added to the library. Some of it even ends up as articles. But the backlog seems to be growing, mundane things such as family, work and procrastination, tends to get in the way.

                              Wrong is evil and must be defeated. - Jeff Ello

                              1 Reply Last reply
                              0
                              • K Kevin Marois

                                I just read [an article here](https://www.codeproject.com/Articles/1165750/Message-Sinks) on CP where the author says "For many years I've been building a library themed "things that should be built into the .NET framework, but aren’t"." I too have been compiling things I use regularly into my own framework. Everything from logging, registry stuff, app security, WPF things, Data related stuff, ZIP, messaging, etc.). In my WPF library I even subclassed the standad WPF controls and then in my WPF apps I use my version of the controls. For the most part, when I find myself using code repeatedly I start thinking about where in my framework to put it so that I can re-use it again later. So I'm curious... Do you do this? Create a library/framework of reusable code? If you, how do you put it all together? If not, how do you handle using/reusing common code?

                                If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.

                                S Offline
                                S Offline
                                Single Step Debugger
                                wrote on last edited by
                                #19

                                I'm doing it even for a higher level stuff like search dialogs, connectivity, data handling etc. I'm lazy as fuck, so I reuse every single bit of code.

                                There is only one Vera Farmiga and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.

                                1 Reply Last reply
                                0
                                • K Kevin Marois

                                  [Harold doesn't](https://www.codeproject.com/Messages/5349548/Re-Your-Own-Framework.aspx)... I think that any serious developer would understand the need for their own collection of code. For the last 15 year I've been doing .Net. Before that I was a FoxPro developer. I has a very large collection of resuable code that I later developed into a framework that i tried to market as FramePro. Never caught on as a selling point but I used it in many apps.

                                  If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.

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

                                  Kevin Marois wrote:

                                  I later developed into a framework that i tried to market as FramePro

                                  The one thing I have resisted is trying to "market" my framework. I do leave it behind at every contract I have worked on. I know of at least 5 developers who have adopted it (ie snaffled the code from previous contracts) but I have never been tempted to publicise it. I agree that most serious developers create a suite of tools/snippets and concepts that become part of their infrastructure, but to me it is a very personal thing suited to the way a developer works and it's transferablility is quite limited.

                                  Never underestimate the power of human stupidity RAH

                                  1 Reply Last reply
                                  0
                                  • K Kevin Marois

                                    I just read [an article here](https://www.codeproject.com/Articles/1165750/Message-Sinks) on CP where the author says "For many years I've been building a library themed "things that should be built into the .NET framework, but aren’t"." I too have been compiling things I use regularly into my own framework. Everything from logging, registry stuff, app security, WPF things, Data related stuff, ZIP, messaging, etc.). In my WPF library I even subclassed the standad WPF controls and then in my WPF apps I use my version of the controls. For the most part, when I find myself using code repeatedly I start thinking about where in my framework to put it so that I can re-use it again later. So I'm curious... Do you do this? Create a library/framework of reusable code? If you, how do you put it all together? If not, how do you handle using/reusing common code?

                                    If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.

                                    H Offline
                                    H Offline
                                    HobbyProggy
                                    wrote on last edited by
                                    #21

                                    I do, and as soon as i figure out it needs to be enlarged or split i do so to keep it on point. Though it's not always easy since all dependend projects could be affected with the change.

                                    Rules for the FOSW ![^]

                                    if(this.signature != "")
                                    {
                                    MessageBox.Show("This is my signature: " + Environment.NewLine + signature);
                                    }
                                    else
                                    {
                                    MessageBox.Show("404-Signature not found");
                                    }

                                    1 Reply Last reply
                                    0
                                    • K Kevin Marois

                                      I just read [an article here](https://www.codeproject.com/Articles/1165750/Message-Sinks) on CP where the author says "For many years I've been building a library themed "things that should be built into the .NET framework, but aren’t"." I too have been compiling things I use regularly into my own framework. Everything from logging, registry stuff, app security, WPF things, Data related stuff, ZIP, messaging, etc.). In my WPF library I even subclassed the standad WPF controls and then in my WPF apps I use my version of the controls. For the most part, when I find myself using code repeatedly I start thinking about where in my framework to put it so that I can re-use it again later. So I'm curious... Do you do this? Create a library/framework of reusable code? If you, how do you put it all together? If not, how do you handle using/reusing common code?

                                      If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.

                                      B Offline
                                      B Offline
                                      Brady Kelly
                                      wrote on last edited by
                                      #22

                                      I have a tiny one for automating view and viewmodel comms, and lots of share code in base classes in my framework. So far I still just Copy-Paste the first steps from the previous project. It is a framework, but only within each new project and not yet ready as a proper stand-alone framework.

                                      Follow my adventures with .NET Core at my new blog, Erisia Information Services.

                                      1 Reply Last reply
                                      0
                                      • L Lost User

                                        I don't. The only things I reuse are tiny snippets that I write from memory.

                                        M Offline
                                        M Offline
                                        Maarten1977
                                        wrote on last edited by
                                        #23

                                        Same here. No external library, just code snippets.

                                        1 Reply Last reply
                                        0
                                        • K Kevin Marois

                                          I just read [an article here](https://www.codeproject.com/Articles/1165750/Message-Sinks) on CP where the author says "For many years I've been building a library themed "things that should be built into the .NET framework, but aren’t"." I too have been compiling things I use regularly into my own framework. Everything from logging, registry stuff, app security, WPF things, Data related stuff, ZIP, messaging, etc.). In my WPF library I even subclassed the standad WPF controls and then in my WPF apps I use my version of the controls. For the most part, when I find myself using code repeatedly I start thinking about where in my framework to put it so that I can re-use it again later. So I'm curious... Do you do this? Create a library/framework of reusable code? If you, how do you put it all together? If not, how do you handle using/reusing common code?

                                          If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.

                                          E Offline
                                          E Offline
                                          englebart
                                          wrote on last edited by
                                          #24

                                          Any technical (vs. business) code should always be a library. (Others touch on this as well) In addition, create a Façade (at the minimum) for any System or Third Party library that is not part of the deep core of the language or that is heavily used in the business layer. This protects business logic from platform upgrades or Third Party changes. A good example is email.

                                          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