Sunday 26 November 2017

Issues Part 2

I suppose first stage of a rewrite is to see how much you actually want to rewrite.  There has been a website doing various things for about eight years now.  Those things include

  • RSS stuff
  • WebcomiX app stuff
  • My web comic
  • Corporate web site ;)
  • Personal web site
It also evolved from one project to a solution with about three or four and involved a lot of logging.  

From now on all analytic logging will be done with Google Analytics.  The site is just going to log any errors and stuff like that.  App logging will also be done by Google.  That cuts down on a lot of code.  

The rewrite isn't just going to be porting code over either.  Where I have to add some services to do it properly, I will.  Whats that, a bit of SQL?  Replace that with some EF.

Monday 20 November 2017

Issues Part 1

Rewrites

The first problem I found was that everything is just SSSSOOOO different.  MVC 4 to 5 was patching a few using statements and recompiling.  .NetCore is completely different.  You can import the code but you will have to rewrite it before you get it working properly.  I think I am going to have to go one area at a time.  There were a few bits where I should have added some services.  There is the new DI use in Constructors.  If I get one area working then hopefully the others should be quicker.

Libraries

Of course libraries have changed.  I us syndicationFeed quite a lot and that has only just been added.  Caching has changed as well.

Porting MVC5 to ASP.Net Core

So I have this web site.  It has some information in the front and some functionality in the back.  Every now and again I have to upgrade it.  One thing I have learnt is that you don't "upgrade" a M$ website.  Even going form MVC 4 to 5, it was easier to start a new project and just copy everything into it.  Going from MVC5 to .Net core is an even bigger jump.  In these posts I will flag any issues I had and any tips I found for getting round them.