Also, Visual Studio is an insane IDE. Although, I recently did have some nasty bugs but updates are coming out pretty quickly.
Edit: Microsoft has also added many new videos to help beginners, these cover various topics https://dotnet.microsoft.com/learn/videos.
Being an early adopter sucks unless you're just testing it out. If it's your job then wait for it to stabilise and for the real-world bug fixes.
The next Long Term Support version of .NET Core will be 3.1. It should be out in November.
If you had to rank and list the top rough spots in the transition, what would they be? Entity-Framework changes are often cited, but what else is different enough?
So far I’ve done some WCF SOAP work, and an ASP.NET MVC 5 application. Figuring out what the latest frameworks and tools is a bit of legwork. Things aren’t always clear, and not always well integrated.
Figuring out authentication was not clear, whether to use Membership, Identity, where OWIN fit into the picture. If you need custom authentication finding details is hard. Ultimately I figured it out, but it’s clear as mud from a fresh eyes standpoint.
Then setting up DI, which container? Well I had Core DI available, figured that would be a good choice. Except I have to write a good bit of glue code to make it work.
I’m definitely enjoying C# as a language and the standard library. But the ecosystem is a bit clunky.
It just feels very clunky in comparison. I have to remember so many things, which I invariably can't so I have to look them up.
I find EF Core pretty straightforward.
If cost is a concern, there's Rider or even MonoDevelop.
That and I never got to develop successfully beyond Forms - which I wish was not in preview from designer standpoint. I know old tech, but frankly for older programmers I find it easier and quicker to get stuff up with.
.NET was always really solid tech. Microsoft has always had stellar developer technology. But the love affair with open source and the super villain role that Microsoft played, is what kept people away, not the tech itself.
I remember wanting to give a talk about how amazing C# was to a ruby group. I never did it, but it was definitely a quaint idea in 2011. But rubyists would’ve loved C#.
As a Rubyist, I'll admit that C# is the least bad of the C++/Java style of static OOP languages, but it was that it was always too tied to the .NET ecosystem and heavyweight enterprise tooling more than Microsoft's “supervillian role” with regard to FOSS that made it unattractive for lots of places where I would want to use Ruby. That's improved with Core, somewhat.
Now the Windows exclusivity of .NET is no longer a thing it's much, much more appealing (who wants to run Windows Server over a Linux server if they can avoid it?).
What we have seen over the years is:
1. Deploying on Windows became less popular, partly because it was much harder to manage at scale than Linux, and partly because of the price of licensing.
2. Mono was seen as a toy, and is often considered a critical risk by purchasers. This was even true after Microsoft bought Xamarin, and thus de-facto control of the project, and despite the fact that it was far easier to patch bugs in the open source runtime than in the closed-source .NET Framework (and we ran into several in each).
C# (and even more so F#) is a great language, but was hamstrung early on by Microsoft's approach to competition - I think had this been different early on, the world would look very different with respect to popularity for critical infrastructure vs the JVM. Whether it's late enough to salvage something for a large number of non-traditional-MS is debatable - it will be interesting to see how it plays out over the next few years.
- https://devblogs.microsoft.com/dotnet/announcing-net-core-3-...
- https://devblogs.microsoft.com/aspnet/asp-net-core-and-blazo...
- https://devblogs.microsoft.com/dotnet/announcing-f-4-7/
- https://devblogs.microsoft.com/dotnet/announcing-ef-core-3-0...
- https://dotnet.microsoft.com/download/dotnet-core (if you're on 2.2 you have until the end of the year to update to 3.1, which will be LTS)
- https://www.dotnetconf.net/ live now
Shame about the bad timing with the UN summit: http://webtv.un.org/
static State ChangeState(State current, Transition transition, bool hasKey) =>
(current, transition) switch
{
(Opened, Close) => Closed,
(Closed, Open) => Opened,
(Closed, Lock) when hasKey => Locked,
(Locked, Unlock) when hasKey => Closed,
_ => throw new InvalidOperationException($"Invalid transition")
};https://devblogs.microsoft.com/dotnet/performance-improvemen...
How could a mature standard library / frameworks have so much performance gains to be had?
And in 2.1 https://devblogs.microsoft.com/dotnet/performance-improvemen...
3.0 has new JIT capabilities like CPU hardware intrinsics; devirtualization; Span etc which in turn enable new techniques in the standard library.
Though 3.0 is a vast set of improvements compared to the previous two
IMO, .NET Framework should be relegated to the dustbin of history. There is no longer a reason to use it unless you are writing legacy code (which, granted, is a legitimate reason in many cases). For greenfield projects, I hope you're using .NET Standard and .NET Core.
I suspect that the CLI and the JVM are about as fast, about 2 to 10 times slower than C++. But that .nets libraries are more performant.
It's not a direct comparison, because the features aren't quite the same, but the Electron Teams app uses about 10x more memory than the relatively heavy WPF Skype for Business client that it's supposed to replace.
But now that .NET runs everywhere, it has to compete with projects that have been shipping performance improvements all along. Happily, since it's now open-source too, it can accept those changes from anyone.
This yields some constraints in whatever is possible changing. Want to add new IL instructions? No can do. Need to change the debugger API? No can do.
Please also see this: https://news.ycombinator.com/item?id=18364032
Also, is Java working on this too? I heard that they have Maybe, but that's pointless without non nullability.
There are some really good write-ups by the C# team on the creation of non-nullable types and how it's implemented but my google-fu is failing me on it.
It's obviously a bit a of hack involving annotations/attributes but for the end user the result is pretty seamless.
In other words: I used to have `null` problems. Then I used `Optional`, and now I have two `null` problems!
We've been using the server-side components for lots of internal apps. It's very fast and productive to work with, and a great option for internal/enterprise/LOB apps that don't have a lot of users and can handle an occasional reconnection/interruption.
Not knowing much about Blazor, what are you referring to here? The size of the WASM blob for your own code, or does Blazor have an associated runtime that's large? And what is considered "large"?
I'm really rooting for the project to gain some support. Right now I'd love to try porting our custom UI component at work to Avalonia, just to try it out. But that's time not well invested in something with little backing and potentially few customers for us.
I am not the biggest fan of HTML, but considering the maturity of that ecosystem, design tools and knowledge among designers, that could be a very valid move.
That's a big deal! Nice.
Azure has started investing heavily in offloading the task from CPU to GPU and FPGA. There are really good framework on .NET to achieve the same.
NVIDIA CUDA GPU - https://devblogs.nvidia.com/hybridizer-csharp/
GPU scripting and CUDA - http://www.aleagpu.com/release/3_0_4/doc/
FPGA - https://hastlayer.com/project, https://netfpga.org/site/#/
I hope Java gets this one day.. would be a cool feature
MS does this sort of thing a good amount, preserving backwards compatibility but enhancing the experience.
Anyone recently migrated projects from ASP.NET MVC to ASP.NET Core? I hope there is a gradual way, like this: https://www.hackernoon.com/how-to-migrate-project-from-aspne...
The largest change is dependency injection and Entity Framework. DI is insanely better and just more intuitive. EF is really a move from EF to EF Core which has quite a few differences that can introduce some road bumps.
In my opinion, I've gained the most from moving from HTML helpers in Razor to Tag Helpers. It's basically just components for Razor, but it allows us to make a really nice UI library and cuts down on so much of our markup without having to write a bunch of overloads for the same helper.
As far as MVC vs. Razor Pages, I'm still not in love with Pages. It feels a bit too much like ASP.NET Web Forms did. I still use MVC practices and it's almost the same exact experience. AJAX forms are a bit better this time around, but I'm really waiting until Blazor becomes more viable before I make a jump like that.
That isn't true. You can target .Net framework 4.0 onwards.
It's also possible to build an Electron wrapper around an ASP.NET Core web app: https://github.com/ElectronNET/Electron.NET
How you approach this is very dependent on where you're coming from (i.e. existing solution) but with WPF and Winforms now part of Core 3.0 you can then build a native, single exe by specifying the target architecture (ex: win x64) and then bundling the framework with your app. They do some trimming as well (i.e. tree shaking) to get the exe size down but have admitted it's still in early stages and sometimes drops required framework components. You can fix this by adding an explicit reference to the assembly in your project source though...
There are a million ways to get onto different platforms though, ranging from the above, to xamarin to electron (via blazor), to net-new apps, etc.
Using one of the enterprise frameworks, sure, those all have boilerplate, in any language, especially the older frameworks.
And for some tasks, the amount of boilerplate is tiny. I can write out a struct/class with property names matching my JSON, and watch as C# automatically data binds the JSON to a UI. The amount of boilerplate I need to do that in the browser is pretty much identical, or I can learn / figure out some fancy auto-binding toolkit that has its own boiler plate and learning curve.
You can be seriously functional in C#. Passing around lambdas and using functional techniques to manipulate data has been idiomatic C# for over a decade.
> I've also noticed that most C# programmers don't usually know another language
Stereotyping is not good. I <3 C#, but I've written embedded C, C++, JavaScript, Typescript, and Python.
If you go to most corporate dev places, you will find a significant population of single language devs. Same things happen with any popular corporate language. While I agree that learning multiple programming languages makes for better developers, blaming a language for being popular is hardly fair.
Heck the number of developers who have historically only worked in C/C++ was really high for multiple decades.
You also might need to find better C# programmers as I honestly don't know any C# programmers who only know one language or one editor. An awesome IDE is big perk to development. I don't think that should be considered a con.
.NET also has tons of "magic features" like Data Annotations & Attribute Tags for those who want some magic that reduces code & helps get stuff done faster.
JS & other languages reference it when looking to introduce new features.
C# is anything but dated. One could call it bloated as it is one of the most flexible languages with about 10 ways to do anything. That is a strength & a weakness of any language that positions itself as a Swiss army knife type tool that wants to be able to be used everywhere. With C# you can write a lot of nice fairly functional programming style code & OOP code which is a nice perk.
It's the most practical functional language that I've tried. Great for domain modeling and it can used in C# projects.
I also think that c# is too verbose so what I normally do: asp.net core mvc for routing, templating, authentication / authorization, data access etc and then reference an f# project that contains the domain logic. The best of both worlds.
If you're a C# dev who hasn't dug in to reflection yet, the gist is that all the things that the MVC, ORM, DI frameworks do, you can also do. This allows you to build custom frameworks which eliminate boilerplate.
.Net (and Java) run the Fortune 1000 so there will of course be lots of devs specialized in that. There's nothing wrong with being very good with 1 language and stack when you're paid to be productive for the company. Also you can definitely write C# with a simple text editor if you have to, and VSCode is pretty slim already, but why would you want to when there's such a powerful IDE available?
This sounds like a purity argument about how to be a "real programmer", but I would much rather work with people who are good at what they do and get things done instead.
Yeah, it requires more lines to achieve the same thing in other languages, that isn't a pro or con.
And myself personally, I started with Basic, and have used C++, C, Python, Java, JS and C# throughout my career, but I'm also sure you can find many more Python/Go developers who only know Python/Go
It'a unfortunate you don't like the language and I hope Microsoft and the open-source developers continue to add more features so that one day you'll find the joy may developers have found in using C#
I wrote a console application to splat some addresses in a hex file with version info and keys. Difficulty you want to be able to diff the files afterwards. Was pretty trivial.
But I definitely lean on the intellisense of the IDE fairly regularly, I don't think I would completely lost, but it would take me longer.
"talk to more C# devs from different kinds of businesses"
As a PHP dev who's done C#, Java, Perl, CF, VB and more... I'd rarely find any other PHP devs at our local MS and Java user groups. In a few cases, I was the first "PHP developer" some of these people had ever met.
Java/C# tend to be used in larger enterprises, and they tend to be used by people who are... somewhat more 'corporate' in their life. Go to work, do the job, go home - going to local groups/conferences and socializing with non-work tech folks is often not high on their priority list (family, etc may rank higher).
Maybe it's generalizing some, but it's also a lot of my experience over the past 20+ years. I've met some phenom tech/dev folks at pretty much every event I go to, and I meet more "professional" polyglots today than I did 15 years ago, but I found I had to make an effort to find them (beyond just going to my own favorite events).