News for hackers. Stuff that matters.
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.