6 ms·
Why you should join the .NET Core and ASP.NET Core train
- transverse 9y agoYou should definitely like if you want telemetry auto-reported to Microsoft for every app you make! It doesn't get any better, folks. You don't even have to consent for it. See https://news.ycombinator.com/item?id=15439001 https://news.ycombinator.com/item?id=15439001
- romanovcode 9y ago1. It's the CLI tool that is spying, not the binaries you are generating. 2. `set DOTNET_CLI_TELEMETRY_OPTOUT=true` to disable spying.
- yawgmoth 9y agoOne of the things myself and others maintain about Python's Flask is that it's very easy to get up and running. I think ASP.NET Core really has nailed that same sort of streamlined approach. It's less confusing where things plug in and are extendable vs ASP.NET MVC (which I've had the fortune of using since version 3). The idioms make a lot more sense than they used to -- and it's great to see ASP.NET Core idioms expand to other .NET web technologies (e.g. Giraffe).
- matrix 9y agoLots of good points, but one thing still keeps me off this particular train: .NET does not (yet?) have the same level of availability of high quality free libraries that other major platforms do. Things like image processing, database DSLs, etc. I think this is in part because Microsoft provides such a comprehensive stack that it kind of discourages the kind of diversity that leads to the proliferation of libraries.
- maxxxxx 9y agoI love C# but I would start new projects on Java exactly for that reason. As soon as you need something special it's most likely available on Java but often not on C#.
- Retric 9y agoThere are a lot of ways outside of the C# sandbox so you can always just call Java code if you need it.
- maxxxxx 9y agoHow?
- Retric 9y agoCall a Web service, call a console application, read/save a file to disk, use a database, SOAP, etc etc.
- maxxxxx 9y agoSure. Not sure if it's worth going through that effort though. Especially if you need a tight integration with the Java library.
- Retric 9y agoYea, if you need to heavily leverage library X then use whatever it's written for. However, if you simply need a way to generate a few simple PDF's or something then that's a different story. Personally, I prefer to use the most productive language for a project I can get away with because the largest risk is you are simply never going to finish it.
- manigandham 9y agoJNI bindings work and allow C#/.NET to call into Java libraries without a problem. It's a standardized interface for Java interop, a good example is how Apache Ignite runs in the .NET version which launches a JVM process and communicates with it from the CLR.
- justboxing 9y ago> As soon as you need something special it's most likely available on Java but often not on C# Like what? Care to elaborate?
- steferson 9y agoExcellent point, I have developed in asp.net mvc for quite a while, but I am currently doing a asp.net core project, and it is a nightmare, there is absolutely nothing but the most basic libraries ported to core, even entity framework itself doesn't have lazy loading yet, which is the most basic feature anyone would want from ef. My current dragon to slay is doing things with pdfs and reporting on asp.net core, there is nothing truly open source.
- manigandham 9y agoThe Full .NET Framework are fully supported and not going anywhere, why don't you just continue using them? Do you need a cross-platform runtime?
- steferson 9y agoWe tried actually, but the oddest thing happened to us, we could not connect to our database that way. I even created a brand new .net core app and changed to target 4.7 as soon as the change is made we lose connection to database
- scarface74 9y agoVS 2017 has a template that lets you create a ASP.Net Core project using the .Net 4.6 Framework. You get all of the goodness of .Net Core Asp.Net and the compatibility of .Net 4.6
- rightos 9y agoTheir NuGet ecosystem is extremely rich. For example, see https://www.nuget.org/packages?q=image+processing https://www.nuget.org/packages?q=image+processing My experience is that LINQ pretty much beats every other way of interacting with a database I've ever seen. Core is likely a more restrictive right now - EF Core for example is still in a very weak state, but things are improving and in a few versions I fully expect it to be a solid product.
- jrs95 9y agoEntity Framework is a pretty fantastic ORM. The only thing that's ever come close for me is SQLAlchemy.
- rightos 9y agoEF6, yes, it really is the best thing going. But EF Core right now has some major issues with lazy loading and not supporting group by on the DB-side last I checked. I believe those are both scheduled to be fixed.
- jrs95 9y agoYeah, I wasn't referring to Core -- last time I checked, it wasn't quite there yet. I don't think it ought to be much longer, though.
- ajryan 9y agoLINQ to SQL is pretty poor in my opinion, plus it's no longer maintained and bugs aren't fixed[0]. [0]: http://www.aidanjryan.com/blog/2012/08/25/sqlmetal-bug-with-multi-rowset-stored-procedures/ http://www.aidanjryan.com/blog/2012/08/25/sqlmetal-bug-with-...
- barake 9y agoEntity Framework replaced LINQ to SQL years ago - it’s had multiple major revisions, and two major revs of the .NET Core version. The initial version in 2008 was a total mess. It wasn’t until a few years later that the XML definition and code generation junk was removed and it became useable.
- manigandham 9y agoThere are many high-quality libraries that can do pretty much everything you need. Is there a specific example of something you're missing? Also you're right that the standard framework libraries are very comprehensive, which in fact lessens the need for 3rd party dependencies in the first place. Stuff like LINQ and await/async is incredibly productive and unmatched elsewhere. Why rely on various outside libraries when you already have what you need?
- ajryan 9y agoWhen was the last time you checked out the open-source lib situation in .NET? I haven't had an issue with this in a long time (check out https://www.nuget.org https://www.nuget.org). On your second point, isn't that a good thing?
- MrDosu 9y agoI would argue quite the opposite. .NET has the most comprehensive set of high quality paid libraries i have worked with so far. Yes they can be expensive, but you get long term support and professional documentation. For a commercial product this is worth a lot.
- sorrymate 9y ago.NET Core feels very much simplified and has a lot of really wonderful Front End templates, specifically JavaScriptServices for their React + Redux, Vue, and Angular starter projects. They feel very much like a Node and React + Redux project but with a C# backend and TypeScript. I've found it to be really enjoyable having a type checker, server side rendering, webpack, and a great deployment story. All out of the box. You can see an example of something similar here: https://aspnet-core.azurewebsites.net/ https://aspnet-core.azurewebsites.net/ and https://github.com/kriasoft/aspnet-starter-kit https://github.com/kriasoft/aspnet-starter-kit
- partycoder 9y ago.NET documentation used to be top quality, but not anymore. Quality of MSDN articles has declined a lot, going from full, explicit documentation with examples, to just placeholders in many cases. PS: criticism of MS or .NET in HN even in reasonable terms is guaranteed -6 karma. But I have karma to spend.
- cjsuk 9y agoYou get downvoted to hell if you post something negative about MSFT after around 17:00 UTC. It’s open season between 09:00-17:00 UTC because they’re all in bed or commuting. Incidentally I agree with you although MSDN has been difficult to find the content in for a few years as the auto generated stuff takes precedence.
- partycoder 9y agoI would have like 100 additional karma or more if it wasn't for MS related downvotes. update: Downvoting started already.
- apk-d 9y agoThis keeps annoying me whenever I go looking for .NET classes reference. The documentation at docs.microsoft.com is severely lacking compared to msdn.microsoft.com. It lacks the detailed samples and insights usually present in the "Remarks" section on MSDN. The information it does have I can usually discover using IntelliSense and by navigating to the assembly metadata.
- yread 9y agoI only downvoted you because you complain of downvoting. That's boring. To stay on topic I find some of the new docs pretty nice where they have a more coherent story for example https://docs.microsoft.com/en-us/ef/core/querying/related-data https://docs.microsoft.com/en-us/ef/core/querying/related-da...
- jchannon 9y agoCheck out Botwin for a sleeker HTTP experience on top of ASP.NET Core pipeline https://github.com/jchannon/Botwin https://github.com/jchannon/Botwin
- rocqua 9y ago* .NET Standard is a set of APIs that all .NET platforms have to implement. This unifies the .NET platforms and prevents future fragmentation. * .NET Standard 2.0 is implemented by .NET Framework, .NET Core, and Xamarin. For .NET Core, this added many of the existing APIs that have been requested. This seems to support the narrative that windows is really fickle in what is 'the thing we are definitely going to support from now on'.
- manigandham 9y agoHow so exactly? If anything it's the opposite. The .NET Full Framework is not going anywhere, it'll be supported for a very long time from now.
- rocqua 9y agoI recall the criticism from yesterday's comments regarding the dropping of windows phone. There was a thread that harped pretty hard on the fragmentation of the Microsoft frameworks. I personally have no experience with any of this, so am just going of second hand information.
- eptakilo 9y agoI'm a junior dev and I have been meaning to master a framework really well. I really like the concept of .net core, I have decided to stick with it. But the documentation is scattered, it doesn't feel consistent. I wish they made that documentation as pleasant and well put together as Django's documentation. As a junior dev good docs are the biggest thing for me.
- pdwetz 9y agoIt's been a constantly moving target for the last two years. In theory, it should be getting more stable now with v2 of Core and hopefully all the docs and various tutorials/blogs/videos/etc will follow suit over the coming months. In the meantime, you'll probably want to filter out anything prior to 2017.
- dplgk 9y agoWhy not master django then? If you don't want to put up with BS, then python ecosystem is the way to go.
- bob1029 9y agoWe've hopped on the AspNetCore train a few weeks ago and its been a blast ever since. Just having working Swagger API documentation generation OOTB has been worth it for us. It has the perfect storm of REST API & SPA web app hosting framework features in my mind: - Annotation and convention based controllers. Binding of headers, body, and query params is so damn easy now. - Annotation-based Swagger API documentation. It just works if you follow the directions. No need to define metadata classes or any other nonsense. Response types, content types, headers, required properties, etc - its all annotations and its all easy. - Much better hosting of static content. We love how easy it is to build out a RiotJS SPA web app and backing RESTful JSON API service in one quick stack. - Flexibility with HTTP hosting: HttpSys, IIS, Kestrel, Roll Your Own, etc. - Pipeline and extension items are very easy to write now. We actually found it easier and faster to just hand-roll our token authentication pipeline item than to configure an existing provider. - DI is some intersection of magical and simple. Microsoft's built-in DI provider kicks ass. - Leverages open-source libraries where obviously appropriate by default. E.g. Newtonsoft.Json as it's the best JSON serializer ever written for .NET (or any language for that matter IMO). - Can host on Windows directly through full 4.6.x framework for access to DirectoryServices and Drawing or host on top of dot net core for cross platform (sacrificing windows-specific capabilities). - Windows service hosting features built-in (used to have to resort to TopShelf). I had to hack in a few things that we liked from the Nancy project (e.g. automatic URLACL setup for HttpSys hosting), but these were very minor QOL items. I think that every .NET/C# shop should take a VERY HARD look at this stack for any new development. Keep in mind that even though cross platform is marketed as a large part of this, you can reap 100% of the benefits on full 4.6 framework if you still need to operate in that domain.
- mustardo 9y agoSounds like stuff we have had on the JVM (without MS lock in) since ages ago http://www.dropwizard.io/1.2.0/docs/getting-started.html http://www.dropwizard.io/1.2.0/docs/getting-started.html And if you want terser code https://kotlinlang.org https://kotlinlang.org
- manigandham 9y ago
- RickJWag 9y agoI'm a long-time Java programmer, but I have to admit that .NET Core development is fun. I like it best on RHEL, or better yet on OpenShift for instant Kubernetes goodness. The Java guys better up their game, pronto. .NET Core 2.0 is capable, miles ahead of 1.0. If 3.0 jumps that much, it'll be a compelling platform.
- he0001 9y agoThe .net core platform is miles better than the old .net platform, so for everyone used to the old one, that's a major improvement. But it's still not good enough platform compared to many others and not interesting enough in others cases like compared to elixir.