4 ms·
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 j
by wccrawford 3y ago
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.
- artimaeis 3y agoI'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/first-web-api 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/first-mvc-app/start-mvc https://learn.microsoft.com/en-us/aspnet/core/tutorials/firs...
- wccrawford 3y agoThanks! I'll take a look at those.
- jcpst 3y agoPeachPie may be worth a look. It’s a php to .net compiler. https://www.peachpie.io/ https://www.peachpie.io/
- donatj 3y agoOh 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
- wccrawford 3y agoHaha, cute. I'm fine coding in C#, I just haven't done any web projects in forever. Thanks, though!
- mdasen 3y agoI'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.
- wccrawford 3y agoI 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.