[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip / qa] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


File: 1732362830511.png (14 KB, 1200x1200)
14 KB
14 KB PNG
.
>>
...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.
>>
>>103278925
spbp
>>
>>103279832
>dependenices
dotnet 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
>>
>>103278178
I 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.
>>
>>103278178
Thank you for posting my wife, .NET.
>>
>>103279930
>but I've heard NHibernate does better with child collections
Who 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.
>>
>>103280452
I 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
>>
File: froghd.png (89 KB, 5000x4390)
89 KB
89 KB PNG
>>103279930
>Docker
>>
>>103281926
Go on and show us how to generically package a .NET app for all platforms.
>>103282121
Yes, that is my point.
>>103281707
Which ORM are you using?
>>
>>103278925
basted
>>
>>103283135
The 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.
>>
>>103283177
I 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.
>>
>>103278178
is gay
>>
>>103283135
>Which ORM are you using?
I literally said which ones in the next sentence: EF Core and Dapper.
>>
>>103284677
Ah 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.
>>
>>103284739
That's not a language problem, it's a jeet problem.
>>
>>103284739
JIT 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.
>>
>>103280452
What shop? It's free.
>>
File: 1723952607436931.jpg (83 KB, 480x480)
83 KB
83 KB JPG
>>103278178
I 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.
>>
File: 1732266326992697.gif (2.78 MB, 720x405)
2.78 MB
2.78 MB GIF
>>103278910
>>
>>103278178
Gets my bills paid.
>>
>>103278178
Be honest, /g/. Do you even NEED more?
>>
>>103278178
I only use this for game
>>
>>103286909
Something for the front end if it's a web application, but that's that.
>>
>>103286989
Blazor exists. You do not need more.
>>
>>103287077
I still have to meet anybody who seriously uses Razor or Blazor.
>>
>>103287083
I'm gonna blazor my shlong into your bussy if you catch my drift
>>
>>103287119
That'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.
>>
>>103287213
Razor 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.
>>
>>103287294
Exactly. And Blazor is destined to the same fate.
>>
>>103287083
I've built three websites using Blazor. One server, two WASM. Being free from NPM is a wonderful feeling.
>>
>>103287565
If only people realized that.
>>
>>103287600
Yeah, unfortunately, Blazor just can't compete with JS's gigantic ecosystem.

>>103287294
>I guess you mean Razor pages, which was an improvement over MVC
I 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.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.