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. Other Discussions
  3. The Weird and The Wonderful
  4. I just can't take it no more!

I just can't take it no more!

Scheduled Pinned Locked Moved The Weird and The Wonderful
csharpcode-reviewcomgraphicsgame-dev
15 Posts 6 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.
  • S Sentenryu

    Now explain the difference between the constructor and the static method, keeping in mind that the static method is not a factory. thing is, the only way to have SOME control over how an object is created is using the constructor. AutoMapper and Serialization don't even know about your method.

    D Offline
    D Offline
    Duncan Edwards Jones
    wrote on last edited by
    #6

    That is the rub - auto-mapping and serialization of the business objects is the issue. Business objects shouldn't be persisted - there should be a specific shearing layer with its own classes for that (a repository or data access layer for example).

    1 Reply Last reply
    0
    • S Super Lloyd

      New PM! He has strong (& abysmal) opinions about development. That I just can't follow, that's bad.. :~ What to do!?! Some example All business class have all private constructor and private setter properties. They have a public static Create() method (mind you it's not a factory method, only create instance of that particular class) To set properties (when we pass the business object to the persistence layer) we use Automapper, which override the private attribute using reflection This afternoon we spend 2 hours to refactor 20 lines of code (in 2 method) that I had written (it was working) We had to stop because of time, but 3 classes, 6 methods, 200 lines of code later the new "improved" version was still not operational (improved version we have to duplicate at all time) And mind you this new "improved" version is not reusable. Only improve these particular 20 lines. I have to DUPLICATE the improved version for every single method I write... I just CAN'T DO IT! :(( :mad: :wtf: X|

      My programming get away... The Blog... DirectX for WinRT/C# since 2013! Taking over the world since 1371!

      Z Offline
      Z Offline
      ZurdoDev
      wrote on last edited by
      #7

      Quote:

      New PM! He has strong (& abysmal) opinions about development.

      Project Manager? The PMs I have worked with never knew anything about code. Their job was to manage the customer mostly.

      There are only 10 types of people in the world, those who understand binary and those who don't.

      P S 2 Replies Last reply
      0
      • Z ZurdoDev

        Quote:

        New PM! He has strong (& abysmal) opinions about development.

        Project Manager? The PMs I have worked with never knew anything about code. Their job was to manage the customer mostly.

        There are only 10 types of people in the world, those who understand binary and those who don't.

        P Offline
        P Offline
        PIEBALDconsult
        wrote on last edited by
        #8

        Right, sounds more like a micro-manager to me.

        You'll never get very far if all you do is follow instructions.

        1 Reply Last reply
        0
        • D Duncan Edwards Jones

          Sounds like she/he wants the business classes to be immutable[^] - not a bad idea if parallelism is likely/needed but overkill otherwise.

          S Offline
          S Offline
          Super Lloyd
          wrote on last edited by
          #9

          Just like Sentenryu, constructor will be just as good for immutability. Better, they are overridable if you create a subclass And before you said 'haha, this prevent subclassing', there is the 'final' keyworkd for that!

          My programming get away... The Blog... DirectX for WinRT/C# since 2013! Taking over the world since 1371!

          S 1 Reply Last reply
          0
          • Z ZurdoDev

            Quote:

            New PM! He has strong (& abysmal) opinions about development.

            Project Manager? The PMs I have worked with never knew anything about code. Their job was to manage the customer mostly.

            There are only 10 types of people in the world, those who understand binary and those who don't.

            S Offline
            S Offline
            Super Lloyd
            wrote on last edited by
            #10

            Haha, that must be it! ^^

            My programming get away... The Blog... DirectX for WinRT/C# since 2013! Taking over the world since 1371!

            1 Reply Last reply
            0
            • S Super Lloyd

              Just like Sentenryu, constructor will be just as good for immutability. Better, they are overridable if you create a subclass And before you said 'haha, this prevent subclassing', there is the 'final' keyworkd for that!

              My programming get away... The Blog... DirectX for WinRT/C# since 2013! Taking over the world since 1371!

              S Offline
              S Offline
              Sentenryu
              wrote on last edited by
              #11

              The only language I can think of that the create method would be useful is C++ for use with templates and pointers, but it would have to be an instance method, so you can take a Base* and create an instance of the right derived type. I guess it could be useful for the same reason on C# or Java, but i see less reason to use it on those languages.

              1 Reply Last reply
              0
              • S Super Lloyd

                New PM! He has strong (& abysmal) opinions about development. That I just can't follow, that's bad.. :~ What to do!?! Some example All business class have all private constructor and private setter properties. They have a public static Create() method (mind you it's not a factory method, only create instance of that particular class) To set properties (when we pass the business object to the persistence layer) we use Automapper, which override the private attribute using reflection This afternoon we spend 2 hours to refactor 20 lines of code (in 2 method) that I had written (it was working) We had to stop because of time, but 3 classes, 6 methods, 200 lines of code later the new "improved" version was still not operational (improved version we have to duplicate at all time) And mind you this new "improved" version is not reusable. Only improve these particular 20 lines. I have to DUPLICATE the improved version for every single method I write... I just CAN'T DO IT! :(( :mad: :wtf: X|

                My programming get away... The Blog... DirectX for WinRT/C# since 2013! Taking over the world since 1371!

                V Offline
                V Offline
                V 0
                wrote on last edited by
                #12

                Micro-manager ? Had my fare share of those. The funny thing is that I wouldn't mind (that much) if anything they'd said made sence, but mostly it's just jibberish and buzz words coming out... They shouldn't interfere with your coding though. Can you escalate?

                V.
                (MQOTD rules and previous solutions)

                S 2 Replies Last reply
                0
                • V V 0

                  Micro-manager ? Had my fare share of those. The funny thing is that I wouldn't mind (that much) if anything they'd said made sence, but mostly it's just jibberish and buzz words coming out... They shouldn't interfere with your coding though. Can you escalate?

                  V.
                  (MQOTD rules and previous solutions)

                  S Offline
                  S Offline
                  Super Lloyd
                  wrote on last edited by
                  #13

                  I think he is trying to teach me how to improve upon an ASP.NET MVC application using 1995 Java techniques! :~

                  My programming get away... The Blog... DirectX for WinRT/C# since 2013! Taking over the world since 1371!

                  1 Reply Last reply
                  0
                  • V V 0

                    Micro-manager ? Had my fare share of those. The funny thing is that I wouldn't mind (that much) if anything they'd said made sence, but mostly it's just jibberish and buzz words coming out... They shouldn't interfere with your coding though. Can you escalate?

                    V.
                    (MQOTD rules and previous solutions)

                    S Offline
                    S Offline
                    Super Lloyd
                    wrote on last edited by
                    #14

                    My boss said we can relocate you somewhere else if need be.... But I quite like the other people! And I found the way to cope, just ignore his gibberish! Luckily it's possible! ^^

                    My programming get away... The Blog... DirectX for WinRT/C# since 2013! Taking over the world since 1371!

                    V 1 Reply Last reply
                    0
                    • S Super Lloyd

                      My boss said we can relocate you somewhere else if need be.... But I quite like the other people! And I found the way to cope, just ignore his gibberish! Luckily it's possible! ^^

                      My programming get away... The Blog... DirectX for WinRT/C# since 2013! Taking over the world since 1371!

                      V Offline
                      V Offline
                      V 0
                      wrote on last edited by
                      #15

                      Then you´re a better man than I am ;-).

                      V.
                      (MQOTD rules and previous solutions)

                      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