[HN Gopher] Understanding the .NET ecosystem: The evolution of ....
___________________________________________________________________
Understanding the .NET ecosystem: The evolution of .NET into .NET 7
Author : alexzeitler
Score : 96 points
Date : 2023-03-21 21:29 UTC (1 hours ago)
(HTM) web link (andrewlock.net)
(TXT) w3m dump (andrewlock.net)
| lp0_on_fire wrote:
| I love the new dotnet ecosystem and use it professionally but am
| I the only one who thinks two years isn't long enough for a "long
| term support" release?
|
| Obviously you'll be able to run older versions of the framework
| so long as the underlying OS supports it but depending what type
| of environment you're in this means you're likely going to have
| to update perfectly working applications every two years.
|
| Do I think that it will take a massive amount of work to update
| from dotnet 6 to 8, or 8 to 10 in a few years? Probably not, but
| that could change at any time depending on the whims of Microsoft
| on that particular day.
|
| I get that the current technical zeitgeist is that if you're not
| releasing a new version every other day you're falling behind but
| five years seems a bit more reasonable to me.
| rvdginste wrote:
| > but am I the only one who thinks two years isn't long enough
| for a "long term support" release?
|
| No, I feel the same. It really is a completely different
| mindset compared to .net framework. And I believe it is
| recommended to keep upgrading, even in maintenance mode. I
| noticed that Microsoft removes target frameworks from their
| nuget packages as soon as they are no longer supported. That
| could be problematic if you need a security update and are on a
| no longer supported target framework.
|
| An "enterprise" environment that is used to Microsoft products
| is not used to that.
| cm2187 wrote:
| I'd be curious to know what is the actual adoption of .net core.
| I.e. of all the actively developed applications (not just new
| projects), what is the .net core / .net framework split.
|
| I found that the upgrade process is not seamless. Asp.net core
| has little to do with asp.net MVC. Winform introduced all sorts
| of contraints. The BCL is full of small changes or features
| missing.
|
| People are less vocal than for the python schism, but I'd expect
| a lot of projects to be stuck on .net framework, not the least
| because of incompatible dependencies.
|
| Nullable reference type is another massive breaking change coming
| if they make it more than a compiler warning, which I suspect is
| the long term intention.
|
| Not breaking your users used to be a laudable goal of the .net
| team. I miss it.
| jve wrote:
| > Not breaking your users used to be a laudable goal of the
| .net team. I miss it
|
| Is it that bad once you are on .NET Core? Asking as someone
| still on Framework.
|
| Framework -> Core ofcourse is breaking, what did you expect
| when going cross platform and totally rearchitected?
| cm2187 wrote:
| I am sure cross platform is useful to some users but not to
| me. So to me it's all breaking changes for little benefits.
|
| I am not saying .net core is bad, just that the migration is
| a lot of work. And you need to disable all sorts of compiler
| warnings unless you are ready to rewrite pretty much all your
| code to make it nullable ref type friendly. And some day
| those warnings will be errors.
| starik36 wrote:
| I just ported a pretty large domain specific library from VB
| with .NET Framework 4.61 to C# with .NET 7. It took me probably
| 3 to 4 days to do with the assistance of Instant C# converter.
|
| There are lots of gotchas here and there and it does require a
| pretty reasonable understanding of both legacy and new
| frameworks.
| brushfoot wrote:
| .NET has been doing a lot of things right. My startup's codebase
| is nearly all .NET 7: landing page, web app, Windows service,
| API. The main non-.NET code is vanilla JS in the web app.
|
| I've been keeping a close eye on Next.js, which is very well
| done, but I love how versatile .NET is. With one language, I can
| write all of the above, and my dependencies are minimal thanks to
| .NET's rich standard library - a refreshing change from the
| NodeJS apps I've written and maintained.
|
| With native AOT, .NET can even be compiled to native binaries.
| Recently, I wrote a Windows password filter DLL in C#, which
| would have been unthinkable some years ago.
|
| It's a really enjoyable stack to work with. Kudos to Microsoft
| for what they've been doing with it.
| twodave wrote:
| Fortunately NextJS and .Net isn't strictly an either/or
| proposition. I've moved most of my new front-end development to
| NextJS at this point and use C# for most everything behind it.
| tiffanyh wrote:
| It's a tired thing to say, but the ".NET" naming is so confusing
| on what's what.
|
| Which is sad because there's so much to like about .NET
| yread wrote:
| Isn't Java world a lot more confusing? You have Java language,
| Java compiler, Java class library, Java Virtual Machine, Java
| bytecode, Java runtime environment, Java development kit
| (OpenJDK - is it open? how many forks are there?), Java SE, ME,
| EE, JavaBeans. What can you use where, what is the license, who
| made what, what role does Oracle play? So many questions in a
| universe where google doesn't exist to clear up confusion, no?
| pyjarrett wrote:
| 1. .NET "Core" ... I tell myself "C is for Cross platform."
| This is usually what people seem like they mean now when they
| talk about ".NET".
|
| 2. .NET "Framework" ... I tell myself "F is for Former." This
| is the older, Windows specific version.
|
| 3. .NET "Standard" ... I tell myself "S is for Specification."
| This is just the spec which defines what Core and Framework
| must implement.
| doodlesdev wrote:
| What about Mono and Unity?
| pyjarrett wrote:
| "Mono is an open source implementation of Microsoft's .NET
| Framework." [1]
|
| Unity looks like it uses its own fork of Mono, or IL2CPP,
| which is a fancy thing that converts the intermediate
| language produced by C# into C++ code, which it compiles.
| [2][3][4]
|
| [1]: https://www.mono-project.com
|
| [2]: https://docs.unity3d.com/2023.2/Documentation/Manual/o
| vervie...
|
| [3]: https://docs.unity3d.com/Manual/IL2CPP.html
|
| [4]: https://docs.unity3d.com/Manual/Mono.html
| kgwxd wrote:
| It's just .NET going forward (for now) if you don't need to
| worry about any old stuff.
| tiffanyh wrote:
| That's super helpful, thank you.
|
| Where it still gets a bit murky is:
|
| > " .NET has many different implementations, including the
| .NET Framework, Mono, and Unity. Each of these is a separate
| platform with separate Base Class Libraries (BCLs) and app
| models. .NET Core is another separate platform."
| starik36 wrote:
| I think .NET "Standard" is deprecated. Per this article.
| https://devblogs.microsoft.com/dotnet/the-future-of-net-
| stan...
|
| Though reading through it, I am still confused.
| justeleblanc wrote:
| > It's a tired thing to say,
|
| And yet, here you are, right on the dot. First comment on any
| .NET thread.
| Nuzzerino wrote:
| And in a thread about an article that explains the very thing
| commenter is "confused about"
| thenerdhead wrote:
| If you could rename it, what would it be and why?
| smcl wrote:
| Another good question would be - if you were Microsoft and
| wanted to plan a roadmap to take the .NET ecosystem forward
| from a couple of separate implementations (Windows-only .NET
| Framework, Cross-platform Xamarin) how would you go about
| this in a way that doesn't cause a big furore like Python
| 2->3 did?
|
| Because I imagine you end up with what MS did - define a
| standard that can be used for building common code between
| new/old, continue support for both, quickly iterate the new
| while it's still new, be very open about support timelines
| and document everything pretty thoroughly. You'd just end up
| with a different set of names for that standard (.NET
| Standard), and new implementation (.NET Core) that make sense
| to you, but probably still confuse some people.
|
| I don't think it's perfect, but .NET developers will (or
| _should_ ) all grasp the relationship between .NET
| Standard/Core/Framework (and now plain ".NET") pretty easily.
| T-zex wrote:
| Isn't it with .Net 7 it becomes simply .Net and confusion with
| Framework, Standard, Core is now gone?
| SketchySeaBeast wrote:
| Yes. Has been that way since 5.
| SketchySeaBeast wrote:
| Assuming you're not looking at legacy and are on .NET 5.0+ it's
| not confusing, it's just the one ecosystem, no core or
| framework stuff, just .Net.
|
| If you're before that, well, good luck.
| Anon4Now wrote:
| > no core
|
| Except the docs, which still say core all over the place,
| including the url's. ;-)
| [deleted]
| rbanffy wrote:
| I am mostly a Python person, but I must confess I'm impressed by
| both modern .NET and Java's Spring Boot. I architect for two
| teams, one using Java, the other using C#, for building services
| and the amount of boilerplate code, that used to be a huge
| turnoff for me, has been impressively reduced.
|
| There's still a lot, but it's now more or less comparable to what
| you'd expect you'd end up with on a similar app built on, say,
| FastAPI.
| nonethewiser wrote:
| Isn't there still lots of boilerplate, it's just generated for
| you?
| nirav72 wrote:
| Nope. Take a look at Minimal API in .net 6 and onwards.
| brushfoot wrote:
| The boilerplate is pretty minimal nowadays. In 2020, C#
| introduced top-level statements, which removed a lot of the
| ceremony.
|
| You used to have a class, and there would typically be a
| separate Startup.cs file. Today, this is a complete .cs file
| for creating an API: var builder =
| WebApplication.CreateBuilder(args); var app =
| builder.Build(); app.MapGet("/", () => "Hello
| World!"); app.Run();
| older wrote:
| "Hello world" is a one-liner Since .Net 6.
| cyral wrote:
| Been using .NET for years now for backend web development after
| having taken a break from C#. It is such an improvement over the
| old .NET framework. When I started building my first backend with
| it, I was surprised how much was included and "just worked". Need
| to add authentication? Few lines. OAuth? Also built in. Response
| caching? Yes. ORM? EF Core is pretty good. Need to use env
| variables to override your JSON config? You are going to have to
| build a... just kidding that works with one more line too.
|
| Coming from NodeJS, the amount of stuff that could be added with
| a single line from an official package was great. No more
| worrying about hundreds of unvetted dependencies.
| AbuAssar wrote:
| nestjs provides a comparable experience for nodejs as well
| sylens wrote:
| It really is like finding enlightenment after having to figure
| out which third party package is best for every little thing in
| Node. Visual Studio is a pretty powerful IDE as well.
| older wrote:
| Yes, since VS2022 became 64-bit app it is much more pleasant
| to use now.
| nonethewiser wrote:
| It better be at a 30GB install size.
| zip1234 wrote:
| A 2TB nvme drive is less than $200. If VS is saving
| significant dev time, people would install it even if much
| larger install.
| LelouBil wrote:
| Jetbrains Rider is great for .NET too, although I didn't try
| backend developement with it.
| alexzeitler wrote:
| I'm using it for backend work day in and day out and it's a
| joy.
| magicalhippo wrote:
| > ORM? EF Core is pretty good.
|
| We're moving to .Net, and I was surprised by how poor the
| built-in DB stuff is. It's like either assembly or Python, but
| nothing in the middle.
|
| That said I've also been impressed about how nice it is to get
| stuff going. I used C# back in the .Net 1.1 days and yeah
| massive difference in ergonomics.
| 0xDEF wrote:
| >We're moving to .Net, and I was surprised by how poor the
| built-in DB stuff is
|
| Right now EF Core is probably the best ORM that has ever
| existed. What exactly is missing?
|
| Although for performance you would probably reach for
| something like Dapper but that is not an ORM.
| magicalhippo wrote:
| Well that was my point, either you're writing a lot of code
| yourself ("assembly"), or you use EF ("Python").
|
| We're not used to something like EF, perhaps it would work
| for us. But debugging generated queries due to performance
| issues is something we'd like to avoid. For now the
| decision was made to not use EF.
| mattmanser wrote:
| You can easily echo them to the console or debug window.
|
| To be honest you should keep all ORM queries fairly
| simple if you can. Where clauses fine. Inserts, updates,
| deletes, ORMs save so much code, and so much pain when
| you add new properties/remove them.
|
| But if a query is more than a few includes or joins you
| should be handcrafting it with FromSQL() or loading it
| piecemeal using Load().
|
| And don't even think about using it to make complicated
| reports, that is not a good idea. Make a stored procedure
| or view.
|
| And that's especially true if you are using anything
| other than SQL Server. I've seen abysmal performance
| myself on MySQL/Maria on moderately complex EF queries.
| I've not really looked since EF 6, but it used to love
| making nested selects instead of JOINs, which were fine
| in SQL Server but terrible performance-wise in MySQL.
| Postgre I've never used with EF in anger so can't
| comment.
| bhubert wrote:
| I think you might find Linq2Db[0] to be the right fit for
| you then, which brands itself on being typesafe SQL in
| C#.
|
| [0]: https://github.com/linq2db/linq2db
| cyral wrote:
| EF Core when it first came out was pretty rough but they have
| been adding a ton, especially in .NET 7 and coming up with 8:
| https://learn.microsoft.com/en-us/ef/core/what-is-new/ef-
| cor... Most of the pain points for me are solved now. Like
| someone else mentioned, Dapper can fill the gaps.
| bottlepalm wrote:
| I'd kill for anything close to EF for Node. Selecting complex
| structures from a database in any of the existing JS ORMs is
| just painful.
| alexzeitler wrote:
| What would you like build-in db stuff to be like?
| magicalhippo wrote:
| Well I mean DataTable and friends can handle master-detail
| for example, but you gotta do a lot of plumbing to set it
| all up, especially with autoincs involved. Was kinda
| expecting it to be less work.
|
| Ideally I'd like to supply some selects, fill up some
| DataTables with master-detail data, manipulate it and
| commit changes.
|
| But yeah, maybe I gotta check out the latest EF stuff and
| see if I can't convince the others...
| edandersen wrote:
| DataTables are a construct from .NET Framework 1.1. You
| owe yourself (and would be doing your employer a massive
| favour) to check out EF Core.
| zip1234 wrote:
| EF Core: 1. load order and related line items 2. edit
| anything 3. call SaveChanges()
|
| Definitely check it out if you haven't recently!
| tester756 wrote:
| >It's like either assembly or Python, but nothing in the
| middle.
|
| Dapper seems to be in the middle and it is pretty popular
| magicalhippo wrote:
| Yeah, but from what I saw it doesn't help much with master-
| detail setups? Like, inserting or updating an order with
| order lines etc. We rely heavily on those.
| tester756 wrote:
| It is pure SQL, so it should, I think?
| tpmx wrote:
| Steve Ballmer _JUST LOVES_ .NET7! He CAN 'T GET ENOUGH OF IT!
| jiggawatts wrote:
| My big problem with .NET is that a lot of line--of-business apps
| were written using ASP.NET Web Forms, but there is no upgrade
| path other than "rewrite most of it".
|
| It feels like the pain everyone went through upgrading from
| Python 2 to Python 3.
|
| It also doesn't help that .NET Framework has its support cycle
| tied to the OS, and hence is 10+ years. This means that
| businesses can be lazy and just leave these old apps to fester
| and still be technically "supported".
|
| As web standards evolve, I'm seeing these web apps slowly break.
|
| It's actually a big problem and Microsoft doesn't seem to care
| much. It's only in .NET 7 that they've finally introduced some
| incremental migration features, but they're buggy and incomplete.
|
| As a random example of the issues: .NET Core 1.0 broke
| DataContract deserialisation because of a missing thing in the
| BCL. A decade later this is present now but they still haven't
| fixed the service client generator tool!
|
| Every time I've tried to migrate an app, it's one breaking issue
| after another with 3-year old GitHub issues that have no
| responses from Microsoft...
| [deleted]
| hdlothia wrote:
| I love c# and dotnet. I've been holding off on flutter and
| praying Maui becomes a real thing
| 0xDEF wrote:
| Northern Europe runs on C# and .Net. I am not joking. There are
| more C# jobs in Denmark than Python, Node.js, Ruby, and PHP
| jobs combined.
| o_bender wrote:
| It is surprising to me that C# and .NET is comparatively
| under-represented in North America where it was born. Nothing
| but good experience in developing and operating software with
| it, both desktop apps (Win/Mac) and backend services (Linux).
| solarkraft wrote:
| I like .Net and C#, but I've had a lot of experiences that
| were not good.
|
| I personally hated working with Visual Studio 2017. 2019
| was an improvement, but one so small it was still awful. I
| recently used it again (2021?) and was cynically surprised
| that they FINALLY got scrolling that isn't forcibly line-
| based. Why did they even bother _now_?
|
| This and some other small things that used to make the
| experience painful are now solved, but they still haven't
| really gotten on top of the freezes and crashes.
|
| Visual Studio being bad is one thing, it being the only
| officially supported IDE is the other. They should not only
| officially support third party efforts like Jetbrains
| Rider, in the past I've gone as far as saying they should
| discontinue Visual Studio in favor of it.
|
| Now for the nice part: Almost all "new .NET"
| announcements/tutorials focus on VS _Code_ , an IDE that
| sucks a whole lot less.
|
| On another note: Transforming a 20 line T4 template took
| 4-5x as long as the actual compilation on the last .Net
| project I've seen.
| teruakohatu wrote:
| Same in New Zealand.
| bitwize wrote:
| Both of those places used to have craptons of mission-
| critical Delphi code. Going to .NET seems a natural
| transition from that.
| solarkraft wrote:
| It's kind of hard for me to mentally square that with the
| amount/types of publications that exist for it, though of
| course it makes sense on further thought.
|
| What I mean is that I found it very hard to find
| "interesting" stuff built with it. You get the official
| documentation and that's it - for .Net Framework, anyway. Few
| blog posts about issues and their solutions, cool
| demonstrations or just general musings. It's like people
| don't care. And maybe they don't - it's just their job, after
| all, and they can't wait to go home to their wives and kids
| rather than think about some technology more than they have
| to.
|
| As a newcomer (forced through an apprenticeship) who does
| think about technology more than he has to I found this
| bewildering and demotivating.
|
| Microsoft seems to have realized this and seems to have put a
| reasonable amount of effort into building a community around
| the new .Net and making it seem exciting/interesting rather
| than something that's just in a really slow death spiral. Oh,
| and building things that one can easily get excited about.
| Non-nullable types come to mind.
| cjbgkagh wrote:
| I wouldn't hold your breath on Maui. I hold no hope for it.
| HideousKojima wrote:
| You should also give the Godot game engine a try, it's actually
| really good at making GUIs
| kgwxd wrote:
| I'm too old to believe that, even if it becomes a real thing,
| it won't die exactly like the rest and leave someone supporting
| a dead framework or doing a rewrite on the next doomed thing.
| Those kinds of things depend too much on the rest of the world
| sharing interest in keeping it alive. Apple and Google aren't
| going to do that unless it benefits them, and it gives them a
| EEE attack surface to use against MS.
| bitwize wrote:
| Avalonia _is_ a real thing and works quite well.
| pmoriarty wrote:
| As a fan of O'Caml, I have to ask: what's the status of F# on
| .NET?
|
| ...and is it used much compared to C#, or at is its use at least
| growing, or is it stagnating/dying?
| gaelian wrote:
| I have a side project where, for some years now, I've supported
| an app built using F# with Xamarin.Forms and the Fabulous MVU
| framework. Before .NET 6, things were generally pretty great,
| and I thought this was an impressive achievement considering
| how many moving parts the combination of .NET with F# + Xamarin
| + Fabulous entails.
|
| As .NET 6 and MAUI started to come on the scene, stuff went
| haywire pretty badly, tooling issues like breakpoints in Visual
| Studio no longer working in my project, obscure build errors,
| confusing build warnings, dependency hell particularly with
| Xamarin.Android NuGet packages and Xamarin.Essentials. I'm
| still not up to date with all NuGet packages because doing so
| breaks my app at runtime. I'm in this halfway point in regards
| to use of the PackageReference project type, this change hasn't
| been smooth for F# and Fabulous projects.
|
| Things are slowly getting better though, and I would say that
| my experience is probably not entirely typical due to the
| inclusion of Xamarin, which introduces a whole additional layer
| of crazy. I think if you were to use F# for backend web
| services for example, then your experience would probably be a
| great deal more palatable than mine. I don't think F# is
| stagnating or dying by any means, but I do feel that it is
| still a second class citizen to C#. I hope MS continues to work
| towards this not being the case, because with all the
| "batteries included" of .NET behind it, I think F# is a great
| functional-first language.
| pavelbr wrote:
| Seems to be about the same as it's ever been. Still being
| updated and worked on, and still very few people use it.
| pyjarrett wrote:
| > Still being updated and worked on
|
| It is, hands down, my best experience working in a functional
| language. I do hobby work in it, and it seems super nice, but
| I'm not sure where everyone is.
|
| > still very few people use it.
|
| Looking at a chart of GitHub and StackOverflow usage[1],
| OCaml/F# seem almost steady compared to the other functional
| languages, my suspicion is that Rust absorbed a lot of
| programmers looking for functional concepts in programming
| languages.
|
| [1]: https://tjpalmer.github.io/languish/#y=mean&weights=issu
| es%3...
___________________________________________________________________
(page generated 2023-03-21 23:00 UTC)