News for hackers. Stuff that matters.
Re:.NET 8 by willsmith72 on Tuesday November 14, 2023 @11:30AM (#38265497)
I'd love to hear from some .NET fanatics, how would you convince someone to use that ecosystem over another?
Re:.NET 8 by elorant on Tuesday November 14, 2023 @11:36AM (#38265614)
I'm not a fanatic, just a long time user. The tooling and the documentation are superb. Plus the really long term support of everything. You can still compile and run applications that were build 20 years ago, even more.
Re:.NET 8 by dodyg on Tuesday November 14, 2023 @11:37AM (#38265636)
- It is a mature platform with yearly updates.

- New stuffs integrate nicely with existing features.

- C# and F# gets yearly updates.

- Somehow they manage to get the platform faster every year.

- Microsoft Orleans.

Re:.NET 8 by mathverse on Tuesday November 14, 2023 @11:40AM (#38265692)
Microsoft seems weird tho. They dont really support any recommended way to do .NET on Mac and you have to rely on Rider or half ass VS Code experience.
Re:.NET 8 by topbanana on Tuesday November 14, 2023 @11:46AM (#38265778)
What's wrong with Rider?
Re:.NET 8 by isbvhodnvemrwvn on Wednesday November 15, 2023 @05:47PM (#38283680)
It's not a Microsoft tool. For a supposedly fully cross-platform language it seems pretty bad to only support first-class developer experience on Windows.
Re:.NET 8 by Someone1234 on Tuesday November 14, 2023 @11:50AM (#38265848)
You're right. They did until recently, but it was bad. Now they seem to have moved attention to creating a great experience in VSCode but some of it may require a MSDN sub (they seem to be making the core experience free, with paid extensions to give more Visual Studio-like features in VSCode).
Re:.NET 8 by c0nfused on Tuesday November 14, 2023 @11:51AM (#38265858)
I believe that vs code is the way they want you to do .net on windows as well.

The tooling is all CLI based anyway so do what feels best. :)

Re:.NET 8 by Errsher on Tuesday November 14, 2023 @11:53AM (#38265905)
Is it "wierd tho" that Microsoft would have better support for development tools on their own OS than on a competitor OS?
Re:.NET 8 by mathverse on Tuesday November 14, 2023 @05:32PM (#38270779)
It's absolutely weird because that ship has sailed. The paradigm is to hook you into the platform which you can't do if you are hostile.
Re:.NET 8 by rahkiin on Tuesday November 14, 2023 @11:54AM (#38265911)
They support ‘dotnet’ cli, just not an IDE. But we’ve got Rider
Re:.NET 8 by Kuraj on Tuesday November 14, 2023 @02:50PM (#38268629)
Rider is so much better than Visual Studio or Code in my opinion, but I understand how the price could be a deal breaker.
Re:.NET 8 by SideburnsOfDoom on Tuesday November 14, 2023 @11:34AM (#38265581)
As a long-term happy .NET user; you should use what makes you happy.
Re:.NET 8 by willsmith72 on Tuesday November 14, 2023 @11:47AM (#38265800)
fair enough, I'm happy with what I've used through my career, but I've never been in a situation using .NET and only tried a hello world.

I think you can always learn something from trying totally different tech, so i'm game to try it for a personal project, but want to hear what people love about it so I can dig in the right direction.

Re:.NET 8 by SideburnsOfDoom on Wednesday November 15, 2023 @04:03AM (#38274709)
IDK, you can find many basic online articles about "what is C#" and "why C#".

What are you comparing C# and .NET to?

If you prefer loosely typed languages such as Perl, Python, JavaScript then you will find C# too picky about types. Personally, I prefer to have the discipline.

If you are doing low-level stuff where a GC is out of the question then you would prefer C++ or Rust.

But in the in-between space; for most web or business apps, it's very good.

Re:.NET 8 by Someone1234 on Tuesday November 14, 2023 @11:44AM (#38265747)
I love .Net, but context is key.

I may suggest .Net for new WebAPI development (minimalist or otherwise), typically with a deployment target of containers and or Linux. It is a strong web back-end language in a similar way to Java but with Linq support, async/await, and a better primary programming language (C#). It has strong integrations into corporate software and all popular DBMS. But, frankly, Linq is the magic that makes .Net special.

Otherwise, for new development, I'd pick something else for creating user interfaces. Like Electron on the desktop and a popular TypeScript based JavaScript framework De jure on the web (utilizing WebAPI in .Net behind the scenes).

Re:.NET 8 by wccrawford on Tuesday November 14, 2023 @12:17PM (#38266248)
Any tips or tutorials for a PHP dev who wants to pick .NET up after a couple decades of not using it? I looked at the project templates in Visual Studio 2022 just for web apps and the options made my head spin.

My wife has worked QA for a number of .NET teams and it just seems like something I should at least keep my thumb on, but I've had nothing but frustration with it so far, even just trying to figure out what template to start with.

Re:.NET 8 by artimaeis on Tuesday November 14, 2023 @12:40PM (#38266631)
I'm not super familiar with PHP -- if you're looking for more of a backend focused project I'd recommend the "ASP.NET Core Web API" template. If you're looking for something that serves HTML pages, possibly the "ASP.NET Core Web App (Model-View-Controller)" template would be pretty straightforward.

There's a pretty good starter tutorial for the Web API one here: https://learn.microsoft.com/en-us/aspnet/core/tutorials/firs...

Or here for the Web App MVC one: https://learn.microsoft.com/en-us/aspnet/core/tutorials/firs...

Re:.NET 8 by wccrawford on Thursday November 16, 2023 @11:45AM (#38291822)
Thanks! I'll take a look at those.
Re:.NET 8 by jcpst on Tuesday November 14, 2023 @01:15PM (#38267179)
PeachPie may be worth a look. It’s a php to .net compiler.

https://www.peachpie.io/

Re:.NET 8 by donatj on Tuesday November 14, 2023 @07:29PM (#38271804)
Oh dang is that really still around? I remember playing with it like 15 years ago. It's been about as long since I've done .Net
Re:.NET 8 by wccrawford on Thursday November 16, 2023 @11:45AM (#38291809)
Haha, cute. I'm fine coding in C#, I just haven't done any web projects in forever. Thanks, though!
Re:.NET 8 by mdasen on Tuesday November 14, 2023 @03:34PM (#38269329)
I'd just create a Blazor project with individual authentication (and don't worry about interactivity). Then inside Components/Pages you'll find code that should look pretty boring. You'll see some HTML, you'll see things like `@page "/counter"` and `@currentCount` and it isn't that hard to understand that the at-symbol means "code thingy" and "oh, @page must be how I specify the URL", and at the bottom there will be an `@code` block. If you look at the authentication pages, you'll see how they handle forms and save things to the database.

There's always more than a comment can talk about, but that's the gist. One good thing is that Visual Studio should be able to help you with a lot of stuff. It's pretty good at keeping you on a good path in the code and pointing out how to fix things.

Re:.NET 8 by wccrawford on Thursday November 16, 2023 @11:47AM (#38291852)
I think I'll eventually look into Blazor, but it seems really cutting-edge and I'm looking for more basic stuff right now, I think. I'm fine with a vanilla html/js front end (or React, or whatever) and having .net do the server side of things.
Re:.NET 8 by oaiey on Tuesday November 14, 2023 @11:51AM (#38265864)
Have a look at Blazor Hybrid. This is really nice thing. Blazor is the first UI toolkit I actually love for many years.
Re:.NET 8 by Someone1234 on Tuesday November 14, 2023 @12:03PM (#38266058)
I have. Too much "magic," and I'm too experienced to fall for that again. No more magic, I should be able to see and understand how every part of my stack works top to bottom.

That's why I'm for isolating the front end from back end frameworks via something agnostic like WebAPI.

Re:.NET 8 by codeTired on Tuesday November 14, 2023 @12:38PM (#38266595)
With blazor wasm you generally do have separate project for front end and api.
Re:.NET 8 by oaiey on Tuesday November 14, 2023 @02:03PM (#38267898)
I am talking about that. Not the server side or server to wasm one.

Maybe I use the term hybrid wrong, I am talking about the fat client hosting blazor/web view one. Basically electron shell just without js

Re:.NET 8 by kcb on Tuesday November 14, 2023 @11:49AM (#38265813)
You can make a fully functional API service with minimal or no third party dependencies.
Re:.NET 8 by guhidalg on Tuesday November 14, 2023 @11:54AM (#38265910)
.NET/C# + Visual Studio [Code] + Azure DevOps + Azure Cloud = Everything is guaranteed to work for what a software company needs, with full documentation, examples, and a history of variants to explore.

You simply don't have to spend too much time researching what to do, just follow the docs and get started writing code and delivering features.

If you stray from the full integration of MS products, you start to lose some of the value proposition.

Re:.NET 8 by neonsunset on Tuesday November 14, 2023 @12:01PM (#38266025)
No love for AWS huh? I've been impressed by how well their Lambdas work with NativeAOT (they make first-party effort to support it) for low cold-start latency. They have even sponsored further development of Dapper AOT recently.

It's crucial for other major players on the market to participate in .NET if we want to ensure its longevity.

Re:.NET 8 by Jochim on Tuesday November 14, 2023 @03:20PM (#38269121)
Azure offers a lot of instrumentation/telemetry out of the box compared to AWS.

The more time I spend with AWS the less I like it. Simple issues are left unfixed, implementations are half baked, tooling incomplete.

e.g:

Their configuration extensions package still doesn't support loading a single SSM parameter, despite someone going to the effort of submitting a PR nearly a year ago.

There's zero support for YAML cloudformation templates in their VS extension.

There's no package that allows you to send OpenTelemetry data directly to XRay, they expect you to run an entirely separate container.

The whole platform feels like a jumble of half baked, and poorly exposed services that end up being outright painful to work with.

Re:.NET 8 by gfna on Tuesday November 14, 2023 @12:10PM (#38266145)
Dont know about fanatic. I would use it mostly for web backends and there one important part for me has been how far one can get with very few third party dependencies. In a normal backend project it isnt uncommon to only need a handful of dependencies, most from eg microsoft namespaces. Compared to especially Node i see this as a huge security and reliability benefit
Re:.NET 8 by pjmlp on Tuesday November 14, 2023 @12:18PM (#38266265)
Not a fanatic, as I use other stacks as well, however a big fan boy from Anders Hejlsberg work, and naturally the team that picked that up.

.NET and Java ecosystems are the only ones with tooling and developer experience that is somehow comparable to the Xerox PARC world. Note for the pedantic, comparable, not exactly the same.

Given the way .NET was born, there is a kind of yin/yang with both platforms.

Some scenarios or guest languages are better in other platform, while some other scenarios or guest languages are better in the other one.

Given this, when would I suggest .NET over Java?

It is closer to C++ in language features (as CLR was designed to accomodate C++ as well), and C# is getting some of those runtime features exposed since C# 7.

Because of this, and XNA/Unity, also got the love from many game studios (Capcom even has their own fork).

Microsoft also understands GUI much better than UNIX shops, so even with the ongoing GUI civil war in Redmond, most of the GUI offerings are still better than what Swing and JavaFX are able to do out of the box.

Blazor looks really cool as technology, however I was in the trenches with WebForms and JSF, so not really something I would like to experience again.

Re:.NET 8 by kaba0 on Tuesday November 14, 2023 @01:30PM (#38267398)
What did you not like about JSF? I mean, the whole EE part had its fair share of flaws, but I think the JSF model was way ahead of its time, and I still think that (model-wise, not necessarily implementation-wise) it is just unbeatably productive.
Re:.NET 8 by pjmlp on Tuesday November 14, 2023 @03:10PM (#38268952)
View Model Lifecycle as starters, the amount of HTML, CSS and JavaScript boilerplate code that got generated leading to lenghty debugging sessions, and the way most JSF frameworks were basically incompatible with each other.

Example, using RichFaces, and then trying to use something from PrimeFaces, IceFaces, or something else Faces, was always open to surprises mixing their lifecycle expectations.

I was involved with a RichFaces based JSF framework, during three years, and afterwards going back to something like plain JSP and tag libraries felt quite refreshing.

Re:.NET 8 by starik36 on Tuesday November 14, 2023 @12:45PM (#38266707)
I've used .NET for work forever, but I also utilize it for hobby projects. I can write and install a small C# app on a Raspberry Pi Zero 2 to do various tasks around the house. Very handy and straightforward.
Re:.NET 8 by smarx007 on Tuesday November 14, 2023 @01:21PM (#38267257)
Haven't seen many .NET fanatics, only pragmatics. I'd say that's another argument in favour.
Re:.NET 8 by whoknowsidont on Tuesday November 14, 2023 @10:00PM (#38272803)
How do you know someone is a .NET developer? Don't worry, they will tell you ;).

I'm sorry but if you compare and contrast the rhetoric and tone of people who are in the .NET ecosystem there is certainly a fanaticism/love for it. And it's often done in a manner that puts other stacks/communities down.

I can't really let this comment stand since it's simply not true.

I say this as someone who has been in the .NET space since 2009.

Re:.NET 8 by zengid on Tuesday November 14, 2023 @01:50PM (#38267689)
I think I'd use the argument that "its pretty boring", meaning, it's very solid. However, the C# language is very expressive and get's better every year, so it's a joy to use. It's a great choice for cloud-native server systems. (I feel like this year Blazor is a strong contender against Next.js, so web UI can work well with the backend).
Re:.NET 8 by majora2007 on Tuesday November 14, 2023 @02:00PM (#38267855)
While I might not be the best as I just joined using .NET for an open source application 2-3 years ago, I did just convince my boss to let me rewrite our (really crappy) Java application with a new version (to enable her 2 year vision) in .NET.

Spring boot vs .NET is pretty similar, they both offer DI, Filters, Middlewares, etc. The ways I really proved to switch (given my development team is usually freshers) is to showcase the power of the Identity framework, LINQ (especially with EF Core and the ability to still use Raw Queries), and just overall being easier than Java (LINQ methods, extensions, syntax sugar).

Another big one is how damn easy it is to update and the performance posts MS does with the improvements. So you literally change one line in simple web apps and get performance boosts. Java doesn't really have that PR and the language (imo) is very verbose and painful to use (like their stream API).

All in all, we are building our rewrite in .NET (and Angular 17) and my team and I couldn't be happier.

Re:.NET 8 by DavidKarlas on Tuesday November 14, 2023 @03:03PM (#38268857)
C# design team is ~5 talented well paid engineers who think how to improve language for past 20 years, every week and don’t let flawed features in and can spend years on how to add async/await, nullables, SpanT and many other features so whole language makes sense and is joy to use. And they have another ~20 engineers implementing features in Roslyn making sure performance of IDE and compiler is acceptable and bug ~free. Unfortunately not many languages can afford that…
Re:.NET 8 by oaiey on Tuesday November 14, 2023 @03:31PM (#38269288)
This is to the point! That is why C# evolved so quickly and does not spiritually or factually broken.
Re:.NET 8 by tester756 on Tuesday November 14, 2023 @07:21PM (#38271742)
Great standard library - really good API design.

Very strong tooling. Compiler APIs, debuggers, very strong IDEs (Visual Studio with free extensions and Rider)

Re:.NET 8 by Shocka1 on Thursday November 16, 2023 @03:03PM (#38294709)
I'm not a 10x expert developer so take this as anecdotal, but I've been freelancing a custom Blazor web application for a small business client who manages property - think presenting the user data, letting them manipulate the data, etc., so pretty simple stuff. It's the simplest MSFT framework I've worked with yet, which is a huge advantage to me as I'm using up my time outside of my regular 9 - 5.

Besides the controllers, models, and other things that might be separated from the views, I can mix my html and C# right there in the view - this is the biggest benefit IMO. In combination I use the Entity framework to interact with the DB, which adds to the simplicity.

The costs to run the internal application for several users is going to be around $6 a month for the Azure database. Hosting the web app is also on Azure, and it's free with the basic MSFT domain, which isn't a big deal to clients who use the software internally. This specific client will be saving over $200 a month once I release the app to them.

I can't tell you all the small details that the cool kids might be able to tell you, but I can produce reliable apps in lightening time and make my clients happy, which is ultimately my #1 goal with freelancing.