12 ms·
ASP.NET MVC, Web API, Razor and Open Source
- DrJokepu 15y agoThis is really great news. Open sourcing Razor means that it can be shipped with Mono, so the awkward getting-razor-working-with-mono rituals won't be necessary in the future.
- acak 15y agoIndeed - in fact they reached out to Miguel to submit a pull request. :-] http://www.hanselman.com/blog/ASPNETMVC4ASPNETWebAPIAndASPNETWebPagesV2RazorNowAllOpenSourceWithContributions.aspx http://www.hanselman.com/blog/ASPNETMVC4ASPNETWebAPIAndASPNE...
- obtino 15y agoIt's good to see that it's been released under the Apache License: http://aspnetwebstack.codeplex.com/license http://aspnetwebstack.codeplex.com/license
- noveltyaccount 15y agoAlso they're using Git, which is HN approved :)
- deleted 15y ago[deleted]
- acak 15y agoI am a developer who has leaned towards .NET over the last few projects and one of the things that used to nag me is that the platform is a closed one (and the licensing fees can be a decent part of the cost). I was fairly certain I would migrate off it if the project ever took off seriously. 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.aspx http://www.hanselman.com/blog/VisualStudio11BetaInContext.as...
- cameronh90 15y ago> 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 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"}]
- JamesNK 15y ago> DataContractJsonSerializer has the most absurd way of serialising dictionaries into JSON. 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/ http://json.codeplex.com/ <- Json.NET homepage
- lusr 15y agoFor a big old school company like Microsoft to accept patches from the community is huge. I always grudgingly accepted there must be some sort of commercial risk ("Microsoft used my code and made 10 million dollars, now I'm going to sue them") holding them back. 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).
- deleted 15y ago[deleted]
- ConstantineXVI 15y agoI'd pay to have a fully compatible .NET stack on OSX/Linux. Most of our backend code is C#; outside of having to use Windows I've actually found it very pleasant to work with. No need for a full MSVS port, just a working VM/library and build tools (+ maybe an IntelliSense daemon to plug into editors). It'd be interesting to see MS get back to their roots this way.
- zinssmeister 15y agothis is awesome news for the .Net community.
- jroseattle 15y ago> start accepting community developed features into their platform Guthrie has done a great job of making developers on the Windows platform feel included and involved. While Microsoft's product offerings slip, Guthrie continues to grow the community of developers, maybe not in quantity but most certainly in quality. Before Guthrie, an offering like today's announcement never would have seen the light of day.
- jinushaun 15y agoI'm not too familiar with what Guthrie has done for the .NET community, but Hanselman is a famous proponent of open source and making .NET as fun to code in as ruby and python. His coming to MS has changed the way I look at the .NET stack.
- jroseattle 15y agoYeah ScottH has done a great job. ScottG hired him, plus a bunch of other community advocates over the past few years. Some have since moved on, but MS really did a great job of listening to devs who build on MS platforms.
- Michiel 15y agoAnd let's not forget Phil Haack (http://haacked.com http://haacked.com), who is now working at GitHub. He used to be the program manager at Microsoft for ASP.NET MVC, the first part of the ASP.NET framework to be released under an open source license.
- facorreia 15y agoMicrosoft product offerings slip how? What I see is outstanding products being delivered such as Windows Azure, Windows Server 8, SQL Server 2012, System Center 2012.
- jroseattle 15y agoMore on the consumer side, not the data center.
- rufugee 15y agoI would consider paying for .net if it received first class treatment on Linux. As someone who has lived through the pain of hosting apps on Windows, I just refuse to do it in the future. I'd love to see Microsoft bring Mono into the fold and truly bring it to the level of the Windows .net implementation.
- dos1 15y agoWhat part of hosting apps on Windows was painful to you? I actually prefer to host my apps in Windows when I'm able and the technology stack supports it. I don't need to set up new apps often, but when I do, it's many orders of magnitude faster for me to get an app running on Windows vs. Linux. Linux works great as a server OS once I get everything set up and configured correctly. I never need to think about it again. However, I dread having to set things up on a new Linux machine. There's always some hardware that doesn't install correctly or some config file that needs twiddling. Sometimes it takes an odd sequence of commands that needs to be run in just the right order to get things going. Invariably I waste hours on the internet searching forums every time I do this, getting more and more frustrated the whole time. As far as Windows hosting goes, I find IIS 7 to be much easier to set up and customize than Apache in terms of hosting web applications. I find the uptime of Windows Server boxes to be functionally equivalent to their Linux counterparts. I also find it's much easier to administrate large groups of Windows servers because of the nice tooling. Things like Active Directory, SMS and SCOM make things pretty easy.
- rufugee 15y agoI currently run a company (on the IT side) with 100+ servers...a healthy mix of both Windows and Linux. To write-up the benefits I see of Linux over Windows would take a fairly long blog post...perhaps I'll do that soon. However, I will say that the last time I had a Linux hardware problem which wasn't related to a display driver issue (and in other words, not on the server) was in 2006. Our Linux servers are reliable, easily configured (admittedly....we know what we're doing) and have very high up times. Contrast that with our Windows servers which at this point we've had to resort to weekly reboot Windows to keep them performing. Personally, I also find it much easier to find help online with Linux when things do go wrong...and that Microsoft (wisely) makes the whole experience very painful unless you're willing to pony up for their more expensive "tiers" of software. As an example, even though DFS-R is included in Windows Server, try managing a real, live deployment given what you're provided with just Server. Unless you purchase SCOM, your will fail.
- stevear 15y agoAlso worthy to note that Microsoft's BizSpark program provides free production access to Microsoft tools and products-- not Express editions but versions like Visual Studio Ultimate, SQL Server Enterprise, Windows Server Enterprise, etc. You also get a couple thousand free hours on Azure if you want to go that route. For training you also get three months of Pluralsight which brings you up to speed on the relevant tools and platforms. I feel it's a really good time to be a Microsoft developer. The products are really solid, the skills are in demand and the barrier to entry is pretty much gone. I realize after writing the above I come off as a big time evangelist, but this is only because I have had such a good experience for the last decade building on their platforms. Never regretted going all in other than sometime feeling like a black sheep on this site. Good to know there are a lot of other .Net folk on this site. ;)
- vyrotek 15y agoYep. Our startup has been in the program for a little under 3 years now. It is great! Edit - May I ask why the downvote? Would you like more information on my experience or something? I only attempted to validate that this is a real program with real companies going through it.
- gfodor 15y agoWait until the bill comes.
- untog 15y agoThe program lasts for three years. Something to consider, sure, but three years can be a long time in startup-land.
- lancefisher 15y agoAfter three years, you get to keep some production licenses as well as all the software you downloaded for free. You get four Windows Servers and two SQL Servers. This really is a great program. You can read more here: https://www.microsoft.com/bizspark/About/Graduation.aspx https://www.microsoft.com/bizspark/About/Graduation.aspx
- notJim 15y agoI had a hell of a time trying to actually use the ASP.Net MVC sourcecode on a project a while ago. The problem was that while my own project compiled fine, many of the dependencies I was using were built against a signed version of the ASP.NET MVC DLL. Since the version of the DLL I was using wasn't signed (with Microsoft's key), those dependencies wouldn't work against the version I was compiling. If you compile everything from source, this isn't a problem, but I had a number of dependencies that had been distributed as DLLs, and for reasons now obscure to me (but likely due to time pressures), I wasn't able to replace all those dependencies with source. I guess the moral of the story is that if you're in .Net land and want to take advantage of this, make sure you do everything with source from the get-go.
- edwinnathaniel 15y agoI'm a long time Java developer who recently move to .NET. What I love about Java when it comes to this particular issue: open source, is how easy it is to get the source code, documentation, and to navigate around given 2 assumptions: 1) You're using Maven + Eclipse (haven't tried in other IDE) 2) The source code is available (in most cases, they are) in Maven repository Here's a simple example: I'm using Spring and Guava and occasionally I'd like to navigate to the method I use. All I have to do is hit F3 on the method call and Maven will download the source code JAR (and the documentation JAR as well) and voila: I can easily see the source code and navigate around. Ditto with the dependency of the dependency. I have to say that Maven + Eclipse provide massive productivity increase for me and my team. Now, I did .NET in the past briefly back when .NET was in 2.0/3.0 era. I recalled it wasn't obvious how to associate even the core .NET library (Collections, etc) via VS.NET. How easy it is to achieve a similar workflow in .NET these days?
- ghiculescu 15y agoResharper can do the same: http://www.jetbrains.com/resharper/ http://www.jetbrains.com/resharper/
- edwinnathaniel 15y agoReSharper can download source code over the internet or do I have to setup things manually? put them in the right place, etc?
- ctolkien 15y agoYou don't need ReSharper, you can step into the core .Net libs from Visual Studio and it will download what's required. If you want to step into the source code of other projects however, I don't think that scenario is handled yet. Perhaps a feature to be added to NuGet.
- TeHCrAzY 15y agoIts automatic. If it can't get the source, it will use its built in decompiler, and produce surprisingly readable source anyway (I force it to this mode by default, due to a flaky internet connection).
- chazandchaz 15y agoI can't believe all the .net love lately.
- jackfoxy 15y agoI've been strictly in management for a few years now, but I like to lead from the front, i.e. know the technology. It would be painful to trade in C# for Java and VS for Eclipse. Today I took a quick look at Scala and Clojure. I think F# for either of those is also not a good trade. There are a lot of things MS does right. The more MS opens up their technology, the better.
- edwinnathaniel 15y agoThat is strange. I'm the other way around: it is painful for me and my team to switch Java/Eclipse/Maven to C#/VS.NET/NuGET since NuGET isn't even close to Maven. Not to mention we have to deal with licensing, buying software tools, etc while in Java land almost all the high quality tools are free, easy to download, easy to install. Setting up a new machine is a breeze with SVN/GIT + Maven. A breeze.
- untog 15y agoNuGet vs Maven seems like a small issue when compared to VS vs Eclipse or even C# vs Java. In the latter two, MS wins hands down. I can cope with NuGet.
- edwinnathaniel 15y agoWith Eclipse, 99% I don't need a mouse to refactor, navigate, build, run unit-tests within Eclipse or outside, and packaged a rather large codebase and its dependencies (3rd-parties or not) and Maven contributes to that significant productivity gain as well. Eclipse recently also introduced an App-Store clone to download plugins and so far I haven't had the need to hunt down plugins from the world wide web (except for the exotic ones). Granted I'm new with VS.NET, I'm guessing that will not be the case. Somehow I'm probably still a long way to learn how to utilize VS.NET to the same level of productivity with Eclipse... and even longer time requires to surpass it...
- lusr 15y agoIf your entire complaint is that you want short-cut keys then look into the Tools | Options | Keyboard configuration. I find raw VS.NET pretty lame in terms of Intellisense, no "jump to file" shortcut, etc. so installing Resharper is a necessity for productivity. But at that point everything is indeed keyboard driven.
- tathagatadg 15y agoI've not written code on windows for years now, but today for started off with a .NET project - for an course assignment (.NET mandatory). I wasn't that bad - looks things can be completed fast enough here, however kept feeling itchy all the time that finally saying yes to closed source platform ... Came back home and now its open source. Thank you!
- zentechen 15y ago> I am a developer who has leaned towards .NET over the last few projects and one of the things that used to nag me is that the platform is a closed one (and the licensing fees can be a decent part of the cost). I was fairly certain I would migrate off it if the project ever took off seriously. Can you explain why? Is it because the only reason it's closed? You just hate MS.
- tlianza 15y agoWhat will be interesting to see is how well Microsoft acts as a steward of the project. I can't count how many bugs I've seen on Microsoft Connect sit untouched for years. Assuming they're not being fixed due to lack of development resources, perhaps this will help. If it's any other reason, including test resources, management resources, or overall project priorities - a move like this is unlikely to be significant. If we're just trading a list of ignored bug reports for a list of ignored pull requests, it'd be difficult to muster much excitement.
- zentechen 15y agoWay too many Microsoft haters. BE OPEN MINDED. C# is a tool, like computer, as long as used to solve real world problems, who cares who's behind it? It's like how Apple fanboys are saying Object-C is the most awesome programming language in the world, totally biased.
- zentechen 15y agoDown voted as expected. Hater, identify yourself or be a coward.
- ittan 15y agoThis is a good sign of things to come. Changes at Microsoft?
- eblackburn 15y agoI wonder if Phil Haack's exodus was the straw that broke the camels back? Perhaps this was just the leverage Scott Guthurie required to finally get what that team has craved for some time?
- josephcooney 15y agoI wish they'd open-source WPF, so at least if they won't fix the performance issues with it I could fix them myself (or at least coerce someone with enough skill to fix them for me).
- ksajadi 15y agoMeh.
- prezjordan 15y agoLooking for some HN insight here. I'm still a college student interested in startups. However, microsoft products really don't excite me. Can someone explain the benefits of C# to a Ruby on Rails coder?
- gecko 15y agoGood parts: C#, and the entire .NET stack, completely skewers Ruby from a performance perspective, while not putting your coding in a straight jacket like Java does. You'll also find what in my opinion are vastly more powerful debugging and profiling tools, awesome threading support (be sure to check out both C# 4.5's async/await keywords and the existing Rx library at http://msdn.microsoft.com/en-us/data/gg577609 http://msdn.microsoft.com/en-us/data/gg577609), better versioning, better IDEs if you're into that kind of thing, and more. Downsides: While this is gradually changing, I don't consider server-side Mono production-ready, so you'll be both developing and deploying on Windows. Deploying on Windows may prove expensive, but BizSpark (http://www.crunchbase.com/product/bizspark http://www.crunchbase.com/product/bizspark) will let you avoid that well past the point where you should either be successful or have VC, making it a non-issue. The community isn't as library-happy as the Ruby community, although that's definitely changing; one side-effect of that is that, where Microsoft anticipated your needs, life is beautiful, but where they haven't, things can get painful. I'd see my previous answer to this question at http://news.ycombinator.com/item?id=3405362 http://news.ycombinator.com/item?id=3405362 too.
- MatthewPhillips 15y ago> better IDEs if you're into that kind of thing, and more. With the caveat being you have to be into that kind of thing. Coding C# not-in VS (or MonoDevelop) is not fun.
- gecko 15y agoIt depends, actually. For stuff I write in my spare time, it's actually perfectly easy to write C# in Emacs and drive the compile with a short waf script instead of a solution. You'll pick up at least some csproj files if you grab packages from NuGet, but it's not horrible to manipulate them in nxml-mode, and again, it's easy to keep all of your own stuff in simple waf files. The downside of going this route, of course, is that using VS.NET or MonoDevelop can be a bit of a pain. When working on Kiln, I instead do most of the actual editing in Emacs, and use VS.NET as a solution manager/debugger/decompiler. Not ideal, but functional. You'd also have to go that route if you wanted to use Azure, I believe, since I seem to recall they want the solution file, not the assemblies.