.
...net?
>>103278178
JVM fag here.Let's say I wanted to give this a shot..What's the best way to manage dependencies etc?What's the best way to bundle applications with a runtime so I don't have to install a runtime on the target machine?What's the state of aot compilation? What are the restrictions? Does it really work in real life projects or do I have to cope my way through it by creating fucking configurations etc?Thanks in advance .NET faggots
>>103279832>What's the best way to manage dependencies etc?NuGet works just fine.>What's the best way to bundle applications with a runtime so I don't have to install a runtime on the target machine?Docker. But yes, there is no "JVM" for .NET.>What's the state of aot compilation? What are the restrictions? Does it really work in real life projects or do I have to cope my way through it by creating fucking configurations etc?Still fairly restrictive, but honestly AOT isn't that meaningful of a gain.If you like Java, and have no issues with it, stick with it, it's fine. I like .NET because I mainly build server shit anyway, so desktop programming is a non-issue for me. I find .NET to have far less ceremony and weird FactoryFactoryFactory stuff than Java, but I still get a decent memory footprint, decent performance, and type safety, and I like LINQ. Entity Framework is great, but I've heard NHibernate does better with child collections, which I've found cumbersome with .NET.tl;dr - use what you like.
>>103278925spbp
>>103279832>dependenicesdotnet add ...>bundle app<SelfContained>True</SelfContained>>aot<PublishAot>true</PublishAot>900 FUCKING SECONDS. I HAVE TO WAIT 15 MINUTES BEFORE I CAN FUCKING POST. THIS IS INSANE.THIS WEBSITE BECAME SO FUCKING ASS
>>103278178I wish I had a job in a .NET shop.I wish I had a job at all to be honest, but in a .NET shop it would be a dream.And no, weirdly this is not some subtle attempt at humor, it's really how I feel.
>>103278178Thank you for posting my wife, .NET.
>>103279930>but I've heard NHibernate does better with child collectionsWho the fuck uses NHibernate in 2024? If EF Core is giving you bad performance with related data, just use Dapper and either use its related data mapping feature or QueryMultiple/QueryMultipleAsync.
>>103279930>Docker. But yes, there is no "JVM" for .NET.It should not be possible to be this retarded.
>>103280452I feel you. It was a wonderful time when I was able to work with it. Everything made sense and there was no faggotry "management" or "setup" code
>>103279930>Docker
>>103281926Go on and show us how to generically package a .NET app for all platforms.>>103282121Yes, that is my point.>>103281707Which ORM are you using?
>>103278925basted
>>103283135The anon you responded to asked>What's the best way to bundle applications with a runtime so I don't have to install a runtime on the target machine?not>how to generically package a .NET app for all platforms.and doesn't explain where>there is no "JVM" for .NET.came from.If this is your attempt to save face, it's backfiring.
>>103283177I accept that I misread - I misread the question as "how to bundle applications without having to install the runtime". So yeah I'm a retard.
>>103278178is gay
>>103283135>Which ORM are you using?I literally said which ones in the next sentence: EF Core and Dapper.
>>103284677Ah I'm retarded again. I meant Hibernate for Java.
I had a C# cli app at work on a dogshit third worlder computer and it had a startup lag. I rewrote it to Rust and it loads instantly.
>>103284739That's not a language problem, it's a jeet problem.
>>103284739JIT compiled languages need time to load the VM and framework assemblies and to compile code on startup. AOT solves this if you care about instant startup for things like CLI programs.
>>103280452What shop? It's free.
>>103278178I virtually attended .Net Conf last week. It was pretty neat. I zoned out when they went over MAUI and Aspire because I don't care about big frameworks very much. New lang features seem interesting. The new ref struct feature seemed vague to me, the new lock mechanism seems pretty awesome though and the partial modifier has been widened in scope which is awesome if you're into modular library development. I remember like first or second day there was this WMAF duo presenting MAUI and you could tell those two definitely are fucking each other behind the scenes. Kek.>>103279832>What's the best way to manage dependencies etc?NuGet.>What's the best way to bundle applications with a runtime so I don't have to install a runtime on the target machine?They're adding support for streamlined containerization but really just put a Linux subsystem on your machine and just compile everything out to the platforms you need it to work on.>What's the state of aot compilation? What are the restrictions? Does it really work in real life projects or do I have to cope my way through it by creating fucking configurations etc?So so. It depends on what you're doing. Let's say you're doing network stuff and passing data that is JSON serialized, you have to add some source generation in which is like coupling the class with a partial class JsonSerializatioContext or some shit like that, and then maybe add it so a Dictionary so you can easily reference it when serializing/de-serializing. Lots of libraries that depend on COM though are not AOT compatible, like NAudio, so you have to fucking do Win32 API shit since COM isn't AOT friendly. There is such a thing as COM source generation but I can't find much documentation.So yes it works, but more time is needed for libraries to catch up.
>>103278910
>>103278178Gets my bills paid.
>>103278178Be honest, /g/. Do you even NEED more?
>>103278178I only use this for game
>>103286909Something for the front end if it's a web application, but that's that.
>>103286989Blazor exists. You do not need more.
>>103287077I still have to meet anybody who seriously uses Razor or Blazor.
>>103287083I'm gonna blazor my shlong into your bussy if you catch my drift
>>103287119That's kinda gay anon. The reality is .NET has more widespread use than people want to admit, but not stuff like Razor, let alone Blazor.
>>103287213Razor is just the template engine for MVC. I guess you mean Razor pages, which was an improvement over MVC, but by the time it came out everyone was already dead-set on SPAs.
>>103287294Exactly. And Blazor is destined to the same fate.
>>103287083I've built three websites using Blazor. One server, two WASM. Being free from NPM is a wonderful feeling.
>>103287565If only people realized that.
>>103287600Yeah, unfortunately, Blazor just can't compete with JS's gigantic ecosystem. >>103287294>I guess you mean Razor pages, which was an improvement over MVCI wouldn't call it a flat out improvement - just a reorganization of features to make more page and form-centric websites less of a hassle to code. Unfortunately, you lose some of MVC's flexibility in the process. For example, you can't use the [Authorize] at a page handler level - you either a single [Authorize] attribute to the entire page, or do manual checks inside of a handler method's logic.