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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. The Lounge
  3. Some things will always suck in .Net, I guess

Some things will always suck in .Net, I guess

Scheduled Pinned Locked Moved The Lounge
csharplinqjsonfunctionalhelp
30 Posts 17 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.
  • M Marc Clifton

    (note, things I haven't addressed are things I don't know much about)

    damir_tk wrote:

    I agree with you to the most part. But tell me - why do we have all new emerging technologies and fancy stuff, when even this what we have is not working properly?

    Ah, well, that's a good question, and frankly that's the reason I haven't touched WF or Entity Framework. Lack of trust, because I agree with you--a lot of what's coming out of MS is half-baked, even after the RTM.

    damir_tk wrote:

    If serialization is for small object, then why the whole Workflows in WF are getting serialized, and with their state as well?

    Because other programmers at MS use the tools/technologies available, without much thought? I see this even in non-MS devs: they reach for the "simple" solution because it's there, without thinking.

    damir_tk wrote:

    Why can't I load an assembly from anywhere on the disk, if we are beyond "dll hell", but only below the current executing folder?

    You can. You have to provide the fully qualified path. And there's a nifty event that fires that lets you resolve an assembly when .NET can't. I use it a lot. Very useful.

    damir_tk wrote:

    If I serialize an object, why can't I use it later on if I change the version of my assembly?

    How are you serializing? If I serialize a class to XML, it works fine. Otherwise, I think it's a good thing, sort of, because the serializer doesn't know what has changed in your assembly, it only knows that something HAS changed. I guess it's a safeguard.

    damir_tk wrote:

    and many of my classes are HUGE!

    Erm...that's an indication you are not controlling the serialization correctly. Sounds like you're relying on the automation too much.

    damir_tk wrote:

    Why is it possible to load multiple instances of the same dll any number of times into the app domain?

    IIRC, you can't. Once it's loaded in memory, you can load it again, but it knows and doesn't reload it. Are your experiences different?

    damir_tk wrote:

    Why can't it ever be unloaded from that or any other app domain?

    Wait a minute. I thought one of the tricks of an app domain is that it's the only way t

    D Offline
    D Offline
    damir_tk
    wrote on last edited by
    #21

    Thank you, you are very knowledgeable, I appreciate you discuss these with me in general. Just some of my thoughts on the above:

    Marc Clifton wrote:

    Ah, well, that's a good question, and frankly that's the reason I haven't touched WF or Entity Framework. Lack of trust, because I agree with you--a lot of what's coming out of MS is half-baked, even after the RTM.

    Agree.

    Marc Clifton wrote:

    Because other programmers at MS use the tools/technologies available, without much thought? I see this even in non-MS devs: they reach for the "simple" solution because it's there, without thinking.

    Agree.

    Marc Clifton wrote:

    You can. You have to provide the fully qualified path. And there's a nifty event that fires that lets you resolve an assembly when .NET can't. I use it a lot. Very useful.

    Not everything is that simple really. Try this: You have your project in c:\Projects\TestForMarc, and you have other assemblies that you want to load in c:\SomeAsms. Now you do LoadFrom("c:\ComeAsms\SomeAsm.dll");, meaning that asm is in the LoadFrom context. Now you are back in your AppDomain doing stuff, you serialize that asm and deserialize it there. Now, deserialization will call Load("ASM, [...]"), or something like this, where path is not presented, and what will happen is that if ASM is not in the LoadContext then you get an exception, even though you have it loaded in your AppDomain! List out the loaded assemblies, and it is there! Now it gets even worse - you rely on all mighty AssemblyResolve to save the day, but that will automatically load any that assembly that exists in the GAC or below the AppBase - and will do that automatically. After that, you will end up with two same assemblies in your current AppDomain, none of which you will be able to cast the types from.

    Marc Clifton wrote:

    Erm...that's an indication you are not controlling the serialization correctly. Sounds like you're relying on the automation too much.

    There are many classes and we put a lot of focus on implementing a correct design pattern to make a proper solution for every single architectural problem or enhancement. Now saying that, we use every possible way to declare, seal, inherit, override or whatever it takes to implement a correct solution for a specific problem - now throw in some need for serial

    M 1 Reply Last reply
    0
    • C Colin Angus Mackay

      I think it is funny and I'm from Scotland.

      Recent blog posts: *SQL Server / Visual Studio install order *Installing SQL Server 2005 on Vista *Tip of the Day - SysInternals * Meme My Blog

      D Offline
      D Offline
      damir_tk
      wrote on last edited by
      #22

      Well I guess no need to discuss different people and different customs, but also maybe you need to be mature enough to regard something ridiculous as that remark was. But this is not about that anyhow, but about you and somebody who dares to touch your God. So please, do not let me disturb you in your worshiping. End of discussion. Damir

      C 1 Reply Last reply
      0
      • D damir_tk

        I am not even going to reply to this or the next 2 posts under that one up there, as you are obviously not on top of this.

        S Offline
        S Offline
        Shog9 0
        wrote on last edited by
        #23

        damir_tk wrote:

        you are obviously not on top of this

        Heh. You chose a library to do your work for you, don't like how it works, and chose to whine about it. What's left to understand?

        Citizen 20.1.01

        'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'

        1 Reply Last reply
        0
        • D Dirk Higbee

          Paul Conrad wrote:

          Talk about being lazy.

          Looks like another peas halp do it for me, eh?

          Beauty is only a light switch away.

          P Offline
          P Offline
          Paul Conrad
          wrote on last edited by
          #24

          Possibly so.

          "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

          1 Reply Last reply
          0
          • M Marc Clifton

            (note, things I haven't addressed are things I don't know much about)

            damir_tk wrote:

            I agree with you to the most part. But tell me - why do we have all new emerging technologies and fancy stuff, when even this what we have is not working properly?

            Ah, well, that's a good question, and frankly that's the reason I haven't touched WF or Entity Framework. Lack of trust, because I agree with you--a lot of what's coming out of MS is half-baked, even after the RTM.

            damir_tk wrote:

            If serialization is for small object, then why the whole Workflows in WF are getting serialized, and with their state as well?

            Because other programmers at MS use the tools/technologies available, without much thought? I see this even in non-MS devs: they reach for the "simple" solution because it's there, without thinking.

            damir_tk wrote:

            Why can't I load an assembly from anywhere on the disk, if we are beyond "dll hell", but only below the current executing folder?

            You can. You have to provide the fully qualified path. And there's a nifty event that fires that lets you resolve an assembly when .NET can't. I use it a lot. Very useful.

            damir_tk wrote:

            If I serialize an object, why can't I use it later on if I change the version of my assembly?

            How are you serializing? If I serialize a class to XML, it works fine. Otherwise, I think it's a good thing, sort of, because the serializer doesn't know what has changed in your assembly, it only knows that something HAS changed. I guess it's a safeguard.

            damir_tk wrote:

            and many of my classes are HUGE!

            Erm...that's an indication you are not controlling the serialization correctly. Sounds like you're relying on the automation too much.

            damir_tk wrote:

            Why is it possible to load multiple instances of the same dll any number of times into the app domain?

            IIRC, you can't. Once it's loaded in memory, you can load it again, but it knows and doesn't reload it. Are your experiences different?

            damir_tk wrote:

            Why can't it ever be unloaded from that or any other app domain?

            Wait a minute. I thought one of the tricks of an app domain is that it's the only way t

            B Offline
            B Offline
            BillWoodruff
            wrote on last edited by
            #25

            Some of us suckers are praying for the "Clifton genius" to manifest itself in the form of the "ultimate" monograph (or book) on serialization ! Not that we are unhappy now, however, as we suck up what there is to be sucked : nay, we are grateful, even if our own ignorance prevents us from fully sucking all that could be sucked from what is in our suckers :) best, Bill

            "The greater the social and cultural distances between people, the more magical the light that can spring from their contact." Milan Kundera in Testaments Trahis

            1 Reply Last reply
            0
            • D damir_tk

              Well I guess no need to discuss different people and different customs, but also maybe you need to be mature enough to regard something ridiculous as that remark was. But this is not about that anyhow, but about you and somebody who dares to touch your God. So please, do not let me disturb you in your worshiping. End of discussion. Damir

              C Offline
              C Offline
              Colin Angus Mackay
              wrote on last edited by
              #26

              :confused:

              Recent blog posts: *SQL Server / Visual Studio install order *Installing SQL Server 2005 on Vista *Tip of the Day - SysInternals * Meme My Blog

              1 Reply Last reply
              0
              • D damir_tk

                Thank you, you are very knowledgeable, I appreciate you discuss these with me in general. Just some of my thoughts on the above:

                Marc Clifton wrote:

                Ah, well, that's a good question, and frankly that's the reason I haven't touched WF or Entity Framework. Lack of trust, because I agree with you--a lot of what's coming out of MS is half-baked, even after the RTM.

                Agree.

                Marc Clifton wrote:

                Because other programmers at MS use the tools/technologies available, without much thought? I see this even in non-MS devs: they reach for the "simple" solution because it's there, without thinking.

                Agree.

                Marc Clifton wrote:

                You can. You have to provide the fully qualified path. And there's a nifty event that fires that lets you resolve an assembly when .NET can't. I use it a lot. Very useful.

                Not everything is that simple really. Try this: You have your project in c:\Projects\TestForMarc, and you have other assemblies that you want to load in c:\SomeAsms. Now you do LoadFrom("c:\ComeAsms\SomeAsm.dll");, meaning that asm is in the LoadFrom context. Now you are back in your AppDomain doing stuff, you serialize that asm and deserialize it there. Now, deserialization will call Load("ASM, [...]"), or something like this, where path is not presented, and what will happen is that if ASM is not in the LoadContext then you get an exception, even though you have it loaded in your AppDomain! List out the loaded assemblies, and it is there! Now it gets even worse - you rely on all mighty AssemblyResolve to save the day, but that will automatically load any that assembly that exists in the GAC or below the AppBase - and will do that automatically. After that, you will end up with two same assemblies in your current AppDomain, none of which you will be able to cast the types from.

                Marc Clifton wrote:

                Erm...that's an indication you are not controlling the serialization correctly. Sounds like you're relying on the automation too much.

                There are many classes and we put a lot of focus on implementing a correct design pattern to make a proper solution for every single architectural problem or enhancement. Now saying that, we use every possible way to declare, seal, inherit, override or whatever it takes to implement a correct solution for a specific problem - now throw in some need for serial

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

                damir_tk wrote:

                I simply want to know why serialization has so many issues, why it is so limited, why so many issues on the assembly level, why remoting is so slow and should I go back to C++ binary tcp communication while this technology gets matured, and stuff like that.

                Well! Thanks for the reply. Sounds like you're doing some really neat stuff and I can see how the .NET framework is getting in the way with its issues. You remind me of something I realized a while ago--the people who are writing the framework appear to be thinking only in terms of a very limited problem domain. Step outside of MS's idea of how to use various components, and you run into problems. I agree, it is frustrating, especially since they don't go back and clean up their house, but keep adding facades to hide the mess. And thank you for helping me understand the issues better! Marc

                Thyme In The Country Interacx My Blog

                1 Reply Last reply
                0
                • P PIEBALDconsult

                  I second everything Marc said. Plus I never use the built-in serialization for my classes; I always write custom serialization. There is no substitute for the right way.

                  A Offline
                  A Offline
                  Alan Balkany
                  wrote on last edited by
                  #28

                  I've been using XML serialization, and the SOAP format seems very verbose, cryptic, and wasteful. I can accept that, but then I constantly ran into problems. For one I found a cryptic fix on the web that worked, but it makes me uneasy that I don't understand how or why it worked. Custom serialization will definitely be more work, but it will be worth it for the reliability and sanity.

                  1 Reply Last reply
                  0
                  • J Joan M

                    Between 1 and 3? Anyway, seconded!

                    [www.tamelectromecanica.com][www.tam.cat]

                    H Offline
                    H Offline
                    Hamed Musavi
                    wrote on last edited by
                    #29

                    Joan Murt wrote:

                    Between 1 and 3

                    Did you mean 01 and 11? :-D

                    "In the end it's a little boy expressing himself."    Yanni

                    J 1 Reply Last reply
                    0
                    • H Hamed Musavi

                      Joan Murt wrote:

                      Between 1 and 3

                      Did you mean 01 and 11? :-D

                      "In the end it's a little boy expressing himself."    Yanni

                      J Offline
                      J Offline
                      Joan M
                      wrote on last edited by
                      #30

                      Yess! :-D

                      [www.tamelectromecanica.com][www.tam.cat]

                      https://www.robotecnik.com freelance robots, PLC and CNC programmer.

                      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