Working with Asp.net and Asp.net Core Again

Bryan Siegel
February 28, 2020

I’ve decide this year I’m getting back into Asp.net Development. Every year I focus on one technology (web stack) to focus on to improve my skills. I chose Asp.net primarily because of Blazor which is basically using C# instead of Javascript on the Front End.

The golden years of web development for me was Asp.net Webforms. I loved dragging and dropping controls on a web page. It felt magical to me and I was cranking out massive websites that ranked high in Google at the same time. Man those were the days. The reason I got out of web form development was the same reason I got into it. Controls. Modifying a control to do something outside of the out-of-box behavior was a nightmare.

Since them I’ve built a few simple projects here and there but nothing massive. I’ve stayed up to date with the state of .Net because duh I’m a web developer, but there’s a major difference between staying up to date and actually building something.

I spent about a good week going over tutorials and decided to say fuck it I’m just going to build something. You see one thing I’ve noticed about learning .Net is there’s never just a “create a blog in 5 minutes” tutorial. For the most part they start of by digging into shit you don’t need to just get going. With core in particular the tutorials I followed went into pipelines and the two or three configuration files and how to build your own custom build thingie – when all I want to do is some crud with whatever database I want. And this is the point that shit went south.

From everything I’ve Googled everyone is talking about doing Asp.net core. What is Asp.net core you might ask? It’s Asp.net that you can kinda do cross platform development with. You would think yeah that’s cool. I could use my Mac, MySQL and deploy an Asp.net core application on an Apache server right? Well that’s what I set out to do at first, but then I was like let me just do it the Microsoft way first on my Mac and then do this cross platform thingie after I get my feet wet. From everything I’ve read the Mac version is pretty close to the Windows version. Right? Oh fuck no. Instead of making the Mac version like the Windows version they decided to start over.

The Nightmare of Building a Asp.net Core app on Mac

Keep in mind I half ass read the docs and glanced at working with Asp.net core on the Mac. After I watched this shitty video where the presenter who built tools for the IDE fumbled his way through an app I decided to dive right in.

So I got Visual Studio for Mac and started a new Asp.net core project and said why not put it in Docker cause I’m a pro, I’ve done this crap for a long time. Why not. So I built out my model and went to the races. Scaffolded my views (yes I was using 8.5 of Visual Studio for Mac that was recommended), had all my views and appsettings.json or whatever it’s called duplicate itself, Migrated my database and database’d up the shit out of my uh database and boom crud. Never mind files were duplicated and didn’t open. I didn’t care cause I was building. Then I was like hey what database am I… fucking SQLite who in the fuck uses SQLite to build real shit. Then I went down Docker hell trying to get mssql running in docker on a Mac. Failed that miserably and said fuck it. Let’s just do this on Windows cause I’m not fucking around with this while learning. So I cloned the repo on my Mac cause you know git and said this should just work right. I can get mssql running in docker on… Fuck no. So I decided to say fuck it delete the repo and just use Windows and get this fucker running on Windows without messing with docker. Let’s do some crud on Windows using mssql. Everything was going good until migrations. Did you know there are two separate commands for migrations in Asp.net core. While in Visual Studio in the package console the command is something like Add-Migration but if your using the cli which is fancy talk for command line it’s dotnet ef migrations Initial create. Oh no it gets better. Update-Database for package console and dotnet ef database update or some shit like that. Oh and you know what’s even better than that? You have to install the cli command even after you install the sdk. It took me hours to figure that shit out. And after all that was said and done I could not Migrate the database. I had some weird error I didn’t feel like debugging. I basically threw my hands up and said fuck it. I know I know I half assed the tutorials and all but Asp.net core doesn’t feel done to me. I’ve always called Microsoft the 90% company. Everything I’ve used fells 90% there. So I decided to delete that repo cause you know git. I’m a professional.

Shit is not getting easier

The whole reason behind this post is because I feel as though web development is not getting easier. In fact I think we’re layering too much complexity. https, webpack, react, flutter, node dependency hell and the list just goes on. Asp.net core felt that way to me. Why isn’t there a button for me to push that migrates my database and gets everything running for me? Why do I have to remember commands that are hard to remember? Even though I haven’t built shit in Rails for a few years I still remember all the commands because they make sense. Rails g controller supercoolcontroller.

Mamma didn’t raise no quitter though. So in the end I deleted that repo again cause you know git and decided to make something with the old shit. Let’s build a CMS in Asp.net MVC 5. In 2 hours I got the main page to be the login that goes into a dashboard themed in SBAdmin (popular bootstrap admin theme). No stupid commandS just build and my basic crud was ready to go. I’m having a blast so far and feeling productive.

While I’m not going to give up on core luckily .net is .net. Once I build out a few big projects going into core should be just a few different steps and maybe the bugs will be ironed out by then. Hopefully by that time I can finally use my Mac to build some Asp.net projects. And who knows maybe I’ll update my MVC 5 projects to core while I’m at it.

Tags

asp.net

Would you like to hire me?

Side projects, Employment Opportunities, you want to give me a [big bag] of money.

Contact