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. Programming in different directions...

Programming in different directions...

Scheduled Pinned Locked Moved The Lounge
databasedesignquestion
28 Posts 14 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.
  • Sander RosselS Sander Rossel

    Thanks for the concern. I did make those interfaces because we needed them. The problem is that my boss does not find interfaces easier... He is all into base classes. So instead of using multiple interfaces he could implement or not (which was what I had made) he now made one base class with a dozen overridable methods X| We now have one class that does everything, so implementation is easier and requires less code... Which is his argument for doing it his way.

    It's an OO world.

    F Offline
    F Offline
    Fabio Franco
    wrote on last edited by
    #17

    Oh boy, why don't you tell him to write the whole application in a single class. Define Forms as internal classes, make all variables static/global and insert a global self-destruct button.

    1 Reply Last reply
    0
    • A Andy Brummer

      Fix the team issues first. Second:

      Naerling wrote:

      I want to make flexible and reusable software

      Many horrible systems have been born from that statement. I've created a few myself. Don't write a single line of code for changes that aren't needed right now. Stick with simple objects and only add interfaces if the class needs it to make the code simpler and easier to understand.

      Curvature of the Mind now with 3D

      F Offline
      F Offline
      Fabio Franco
      wrote on last edited by
      #18

      I couldn't agree more. But that depends. I've seen projects go downhill because all the unnecessary super uber architecture prevented the project from finishing on time. One of them has been there for 3 years and it's not finished. It should've taken over one year and it was planned to finish in 8 months. On the other hand, critical systems (take real-time banking systems for example), that have continuous evolution and scalability should have a very solid design from start. I haven't gotten there yet, but I always try to prepared myself for that when the day comes.

      A 1 Reply Last reply
      0
      • F Fabio Franco

        I couldn't agree more. But that depends. I've seen projects go downhill because all the unnecessary super uber architecture prevented the project from finishing on time. One of them has been there for 3 years and it's not finished. It should've taken over one year and it was planned to finish in 8 months. On the other hand, critical systems (take real-time banking systems for example), that have continuous evolution and scalability should have a very solid design from start. I haven't gotten there yet, but I always try to prepared myself for that when the day comes.

        A Offline
        A Offline
        Andy Brummer
        wrote on last edited by
        #19

        I think the same prinicples still apply. Start simple and add as little as possible each time you put the system into production. I've done high performance web services that are literally hammered with thosands of requests 24/7 with live updates to the servers, and having a flexable simple design was even more critical. Complicated systems are way to hard to troubleshoot when you run into an issue.

        Curvature of the Mind now with 3D

        F 1 Reply Last reply
        0
        • A Andy Brummer

          I think the same prinicples still apply. Start simple and add as little as possible each time you put the system into production. I've done high performance web services that are literally hammered with thosands of requests 24/7 with live updates to the servers, and having a flexable simple design was even more critical. Complicated systems are way to hard to troubleshoot when you run into an issue.

          Curvature of the Mind now with 3D

          F Offline
          F Offline
          Fabio Franco
          wrote on last edited by
          #20

          I agree with that, but to scale things that do not have a good design from start is very difficult. I don't mean create incredible design, just very flexible design that can be simple. This adds a little overhead of time, but it's worth it. On the worse case scenario, imagine a flat unlayered web site with no Entity classes defined. I've seen that, too simple and too bad. I had to scale it and it was very difficult. I think that there needs to be a balance, never too simple or without thinking on the future and never too complex. But a good design needs to be thought of since the beginning and decide it's complexity from there.

          P A 2 Replies Last reply
          0
          • F Fabio Franco

            I agree with that, but to scale things that do not have a good design from start is very difficult. I don't mean create incredible design, just very flexible design that can be simple. This adds a little overhead of time, but it's worth it. On the worse case scenario, imagine a flat unlayered web site with no Entity classes defined. I've seen that, too simple and too bad. I had to scale it and it was very difficult. I think that there needs to be a balance, never too simple or without thinking on the future and never too complex. But a good design needs to be thought of since the beginning and decide it's complexity from there.

            P Offline
            P Offline
            patbob
            wrote on last edited by
            #21

            "I think that there needs to be a balance, never too simple or without thinking on the future and never too complex. But a good design needs to be thought of since the beginning and decide it's complexity from there." Exactly. I've always found that I've attained that needed balance when I've gotten the behavior allocation correct, which takes thought. When correct, refactoring isn't too bad because it can be done without ripple effects throughout the rest of the code. That allows the design to be "simple" at first yet be easily refactored to fit future needs. By that metric, both designs are bad -- one has extra complexity that clearly isn't needed, the other is too simplistic in its behavior allocation to be easily refactored in the future.

            patbob

            F 1 Reply Last reply
            0
            • P patbob

              "I think that there needs to be a balance, never too simple or without thinking on the future and never too complex. But a good design needs to be thought of since the beginning and decide it's complexity from there." Exactly. I've always found that I've attained that needed balance when I've gotten the behavior allocation correct, which takes thought. When correct, refactoring isn't too bad because it can be done without ripple effects throughout the rest of the code. That allows the design to be "simple" at first yet be easily refactored to fit future needs. By that metric, both designs are bad -- one has extra complexity that clearly isn't needed, the other is too simplistic in its behavior allocation to be easily refactored in the future.

              patbob

              F Offline
              F Offline
              Fabio Franco
              wrote on last edited by
              #22

              That's exactly the idea I support.

              1 Reply Last reply
              0
              • A Andy Brummer

                Fix the team issues first. Second:

                Naerling wrote:

                I want to make flexible and reusable software

                Many horrible systems have been born from that statement. I've created a few myself. Don't write a single line of code for changes that aren't needed right now. Stick with simple objects and only add interfaces if the class needs it to make the code simpler and easier to understand.

                Curvature of the Mind now with 3D

                R Offline
                R Offline
                Rick Shaub
                wrote on last edited by
                #23

                Exactly. Create the ability to reuse code once you have the need by refactoring.

                1 Reply Last reply
                0
                • Sander RosselS Sander Rossel

                  Thanks for the concern. I did make those interfaces because we needed them. The problem is that my boss does not find interfaces easier... He is all into base classes. So instead of using multiple interfaces he could implement or not (which was what I had made) he now made one base class with a dozen overridable methods X| We now have one class that does everything, so implementation is easier and requires less code... Which is his argument for doing it his way.

                  It's an OO world.

                  J Offline
                  J Offline
                  jschell
                  wrote on last edited by
                  #24

                  Naerling wrote:

                  We now have one class that does everything, so implementation is easier and requires less code... Which is his argument for doing it his way.

                  As described however that is not OO programming. And worst case it is an anti-pattern. http://en.wikipedia.org/wiki/God_object[^]

                  Sander RosselS 1 Reply Last reply
                  0
                  • J jschell

                    Naerling wrote:

                    We now have one class that does everything, so implementation is easier and requires less code... Which is his argument for doing it his way.

                    As described however that is not OO programming. And worst case it is an anti-pattern. http://en.wikipedia.org/wiki/God_object[^]

                    Sander RosselS Offline
                    Sander RosselS Offline
                    Sander Rossel
                    wrote on last edited by
                    #25

                    Actually, my boss said the same thing last week... Our current application has a Class that does just about anything. My boss identified it as an anti-pattern and a God Object. I guess he did not learn from it :( I am currently on a bit of a quest to learn all about architecture. Those anti-patterns are interesting. Knowing what NOT to do is at least as important as knowing what TO do :thumbsup:

                    It's an OO world.

                    J 1 Reply Last reply
                    0
                    • Sander RosselS Sander Rossel

                      Thanks for the concern. I did make those interfaces because we needed them. The problem is that my boss does not find interfaces easier... He is all into base classes. So instead of using multiple interfaces he could implement or not (which was what I had made) he now made one base class with a dozen overridable methods X| We now have one class that does everything, so implementation is easier and requires less code... Which is his argument for doing it his way.

                      It's an OO world.

                      E Offline
                      E Offline
                      Euhemerus
                      wrote on last edited by
                      #26

                      Naerling wrote:

                      We now have one class that does everything, so implementation is easier and requires less code... Which is his argument for doing it his way.

                      :doh: He's obviously never studied/understood OOP principles! You DO NOT have a single class that does everything; that's basic OOP.

                      I'm too lazy to Google it for you.

                      1 Reply Last reply
                      0
                      • F Fabio Franco

                        I agree with that, but to scale things that do not have a good design from start is very difficult. I don't mean create incredible design, just very flexible design that can be simple. This adds a little overhead of time, but it's worth it. On the worse case scenario, imagine a flat unlayered web site with no Entity classes defined. I've seen that, too simple and too bad. I had to scale it and it was very difficult. I think that there needs to be a balance, never too simple or without thinking on the future and never too complex. But a good design needs to be thought of since the beginning and decide it's complexity from there.

                        A Offline
                        A Offline
                        Andy Brummer
                        wrote on last edited by
                        #27

                        Fabio Franco wrote:

                        On the worse case scenario, imagine a flat unlayered web site with no Entity classes defined. I've seen that, too simple and too bad. I had to scale it and it was very difficult.

                        The site I was talking about I had to use bulk loading on a separate thread and spawned 4-5 threads at startup using data readers with ordinal access for performance. The database used tables partitioned on the hour, and used hand coded serialization code to cache results in memcached. All the ORM tools were way to high level for the project. When you have 10 Gigs of hashtables for lookups, managing everything down to the level of choosing structs vs. classes is important. Moving from a more enterprisy layered design to something simpler allowed me to change implementations much more quickly and tune algorithms continuously to match each dataset.

                        Curvature of the Mind now with 3D

                        1 Reply Last reply
                        0
                        • Sander RosselS Sander Rossel

                          Actually, my boss said the same thing last week... Our current application has a Class that does just about anything. My boss identified it as an anti-pattern and a God Object. I guess he did not learn from it :( I am currently on a bit of a quest to learn all about architecture. Those anti-patterns are interesting. Knowing what NOT to do is at least as important as knowing what TO do :thumbsup:

                          It's an OO world.

                          J Offline
                          J Offline
                          jschell
                          wrote on last edited by
                          #28

                          Naerling wrote:

                          Our current application has a Class that does just about anything. My boss identified it as an anti-pattern and a God Object. I guess he did not learn from it

                          lol. But at least it gives you the opportunity. My opportunity came with a C++ class, one single class, that had over 200 data members, over 200 methods, over 20,000 lines of code and spanned at least 3 source files (not including the .h file.)

                          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