by acak · 14y ago · 0 comments
And after seeing the C# love on HN on the poll for favorite programming languages last week, I realized there must be many enamored .NET programmers who would use and evangelize it more but only don't due to it being a closed platform.
Also, a lot of us have great ideas to make the platform we're using better - and with Microsoft announcing they'd make Json.NET, a third party JSON library, the default JSON serializer over their home-grown DataContractJsonSerializer in the next version of ASP.NET MVC, I wondered if Microsoft was considering the unthinkable: start accepting community developed features into their platform, and perhaps open source it to make the scope for community contributions even larger.
There's a long way to go to fully realize this vision (I'd like for .NET itelf to be open source ;-] ), but this is just incredible news.
For those who want to understand which parts of the ASP.NET stack are open source, check out this diagram on Hanselman's blog that was very useful to me.
http://www.hanselman.com/blog/VisualStudio11BetaInContext.as...
Finally! For those who haven't used it, DataContractJsonSerializer has the most absurd way of serialising dictionaries into JSON. Rather than producing {"k1": "v1", "k2": "v2"} it produces [{"Key": "k1", "Value": "v1"}, {"Key":"k2", "Value": "v2"}]
DataContractJsonSerializer is a hack that is built on top of an XML parser.
For the people who are unfamiliar with .NET there is a comparison of Json.NET to Microsoft's two JSON serializers here:
http://json.codeplex.com/ <- Json.NET homepage
Does anybody have insight on this topic? I'm currently building something that would benefit greatly from user contributions of code, but I'm wary about the legal implications (the project will be a commercial site, and while I have no problem publishing their code if I choose to integrate it into my site to enhance the user experience, I have no interest in publishing the core code for the rest of the site).
Can you further elaborate on that one? Because that's exactly what I would like to do.
1. The GC was poor. There's actually a couple of pieces to this one: it's non-compacting, so your app gradually slows down; and (because it's Boehm) it has to guess at what's a pointer, and sadly just doesn't do a good job, so you gradually leak RAM through no fault of your own. The new GC, which I think is called SGen, is a precise collector, so I assume that it fixes the memory leaks, but it's still non-compacting, meaning you're probably going to want to restart the process every once and awhile to prevent serious heap fragmentation.
2. Mono gradually became unstable the longer it ran. This grew exponentially worse as you added threads.
Both of these issues can be circumvented by having multiple processes in a load-balanced configuration and simply restarting them every once and awhile. Heck, IIS does that with App Pool recycling anyway, and it doesn't have these issues.
The FogBugz team still uses Mono to host FogBugz on Unix systems, I believe by going the reboot-every-so-often route, so I assume they've found ways of living with the above two constraints.