3 ms·
It's a bit distressing that a lot of the most interesting .NET things (such as mono[touch,droid] and asp.net MVC) are either black sheep or 3rd party projects.
by InclinedPlane 15y ago
It's a bit distressing that a lot of the most interesting .NET things (such as mono[touch,droid] and asp.net MVC) are either black sheep or 3rd party projects. .NET is a solid technology, but I fear it may end up having a limited lifespan due to being so heavily tied to windows, especially as the next generation of systems (tablets, non-traditional PCs, etc.) starts taking over the market.
- sofuture 15y agoI've been a staunch .Net defender for a long time, but have almost entirely thrown in the towel at this point. MVC is awesome, C# is awesome, F# is awesome... but, unfortunately Mono just doesn't cut it (Boehm GC? Really? s-gen is a nightmare too, before you counter with that) and Windows isn't a realistic option for a lot of people.
- lusr 15y agoCan you explain what your concerns are with Mono? I haven't used it but as .NET developer hoping to deploy some apps on Mono to cut costs I'd like to understand your criticism better. Are your concerns regarding performance, and within which area? Is it poor memory management and what consequences do you have in mind?
- sofuture 15y agoWe went guns-blazing from .Net on physical Windows servers to Linux/Mono/EC2. Mono performance is okay -- we still run a lot of C# utility stuff on Linux with it, no problem (build on windows, push to s3, servers self-deploy). Forget about web stuff though. Mono fastcgi is not production ready (lots of little things, the interplay of nginx and Mono's fastcgi server 'lost' some routes, particularly scriptmethods). Mod_mono is better... until you start getting OutOfMemoryExceptions. My understanding of the problem is that the Boehm GC is non-compacting, and thus, unless you (somehow) craft your application memory use patterns perfectly, will run out of memory if you churn through enough allocations. From the mono ASP.NET FAQ: Why does the memory consumed by the Mono process keep growing? Mono currently uses a conservative, non-moving, non-compacting garbage collector. This means that the heap is not compacted when memory is released. This means that applications can produce memory allocation patterns that will effectively make the process grow, just like C, C++, Perl, Python applications would. It is hence important to not get into patterns that would create these holes, for example such a hole could be created if you create a block of size SIZE, release it, and then create two blocks of size SIZE/2+1. ASP.NET in Mono is particularly vulnerable to this kind of memory problems because it is easy for developers to define APIs that transfer large blobs of data like entire image files, these would allocate a lot of memory that can easily be fragmented. A simple solution is to try to write your software in a way that large data blocks are not allocated, but instead your application handles them in blocks (like writing a "copy" command). So the new GC, S-Gen is available, but for us at least, ~6 months ago it was really buggy. Some of our code would inexplicably cause mono crashes in the allocator. We couldn't run our apps with it, at all. So ultimately we were left with restarting our webserver process every 30 minutes or so, or we could switch back to Windows web servers. Mono was decently performant, but going back to Windows we had a slight but noticable performance increase. Don't get me wrong, Mono is awesome for a lot of things, and it kicks fuckin' ass to run my C# on Linux. But the ASP.NET side of things is just not mature enough. It's possible I'm just a bad programmer and if I'd taken the time to re-architect our allocation patterns to play nice with Boehm this story would have a happier ending, but alas :) P.S. None of this stuff is fresh in my mind right now, so shoot me an email you have more questions or run into any specific situations or whatnot.
- lusr 15y agoVery interesting, thanks. I would want to deploy ASP.NET MVC3-based web applications so restarting the web server sounds like it'd be my only option (I'm not going to waste my time re-architecting things if it's eventually likely to run out of memory anyway). Then again, I haven't tackled switching away from MSSQL (aside from learning to use a new DBMS, I'm a fan of stored procs too so I'd have to learn a new SQL dialect), either. Since my time is probably worth more than Windows licenses, it looks like sticking to Windows is the logical choice for now. Thanks for the offer to pick your brain... I may take you up on it some time :)
- untog 15y ago* I'm a fan of stored procs too so I'd have to learn a new SQL dialect* FWIW, Postgres does stored procs, too. Different SQL though, of course.
- MartinCron 15y agoI really don't think the ASP.NET MVC can be classified as a black sheep. Neither are things like Linq or Entity Framework. Microsoft is still doing a lot of the interesting stuff in-house.
- InclinedPlane 15y agoMVC was developed skunk works style, as was Linq. And MS has only begun embracing MVC anywhere near fully lately. Meanwhile, Linq has been effectively abandoned in preference to the bloated entity framework. If Microsoft had their heads screwed on straight MVC would be the default ASP.NET web-site project type in Visual Studio and Linq would have gotten the love it deserved, even if it competed with EF. I fear that without Haack's leadership MVC will be mishandled and slowly die off. Edit: To clarify, I mean Linq to SQL. It was a decent, lightweight, highly usable ORM that has now been more or less deprecated in favor of EF. For now it's not so bad because Linq to SQL only just recently wandered off into the twilight, but eventually the lack of support will make it harder and harder to use and EF will be the only option.
- bradwestness 15y agoLINQ works /with/ entity framework, as well as with XML and generic collections. Entity Framework is not a replacement for LINQ. Also, I think it's a natural progression for the project to start out as a "skunkworks" system, and be gradually more mainlined as it matures. It's on version 3 now, and version 4 is right around the corner. I'd rather see it happen that way than have a huge release and a giant push onto a platform that isn't fully realized. Most "enterprise" organizations would never move onto a version 1.0 platform anyway.
- sofuture 15y agoLinq != Linq To Sql
- MartinCron 15y agoNote: I never used linq-to-sql, but in my experience EF (especially with the code-first stuff) is a decent, lightweight, and highly usable.