Forum Discussion
Re-writing website in .Net 5 with Blazor
I wrote my website https://fitpacking.com in .NET Webforms. In order to stop using old technology and keep up with all the advantages of newer technologies, I am considering re-writing the entire thing in .NET 5.0 (or Core 3.1 anyway) perhaps leveraging Blazor since I'm terrible with Javascript and its repeated silent failures.
Before I embark upon this considerable project, I wanted to see if the developers here think it's worthwhile. (If you're reading this forum, I would guess you'd say it is worthwhile) The biggest problem I have is that developing with .NET has been "only me" since 2005 when I last worked alongside another developer. I'm sure I've missed a lot along the way, developed some really bad habits and have used horrible, inefficient hacks when I'm stuck. So I'm not at all confident that I will produce something superior to what I've got now.
I haven't given you much specific to comment upon, but here are some of my concerns / website updates I need to accomplish.
- User accounts. I'd like to add authentication to my website. I have successfully done so on another smaller site that I developed to learn .NET Core 3.1. But since the test website was written entirely in MVC, adding the authentication module was pretty easy. I don't know how to add Middleware to a WebForms project or if it's even possible
- Database migrations. I have a database I use on the Fitpacking website. If I start over in One.NET, I am not sure how to mix an existing database with the code first migration approach. I suppose I could do the entire project as code first and transfer the live data rows from existing tables later
- Static URLs vs Restful URLs. I have an upcoming trip to the https://fitpacking.com/2022/GrandCanyonNorthBass.aspx. I like the fact that there's a static URL to go to and that I don't have to denote it as fitpacking.com/Trips/123 or whatever. I'm sure there's some way around this but then am I still leveraging MVC?
- CRUD operations. While there are a few forms on the website (where people sign up) there isn't a lot of repeated need for CRUD operations. Sure, people will want to edit their profile occasionally, but it seems like a small part of what the site does
- Database operations. The code I use to query and update the database is a dreadful kludge, full of connections, contexts, data adaptors, data tables, result sets all tied to various grids, drop downs and other controls. There is one screen I use fails about half the time because too many connections are open (even though I have code to close them -- I think). Anyway, will Blazor controls or One.NET data operations help clean some of this up?
I'm not really sure what I'm even asking. I guess I just want to know if it's worth embarking upon this project at all. I could live with the WebForms site indefinitely if I had to although I fear it will be unsupported at some point, not to mention how web crawlers will ding it for being slow, old technology. And if my ISP stops supporting it, I can't create a cross platform version.
Any musings?
Thanks,
Steve
2 Replies
- PaulMarangoniCopper Contributor
https://docs.microsoft.com/en-us/dotnet/architecture/blazor-for-web-forms-developers/migration#:~:text=Migration%20conclusion%20Migrating%20a%20code%20base%20from%20ASP.NET,Web%20Forms%29%20is%20separate%20from%20the%20business%20logic.
- ssilberbergCopper Contributor
Test. Not sure how to get this to notify me about responses.
Also, why is there only 25 discussions? Where did Microsoft hide the "real" (possibly archived) forums?