Tuesday, May 17, 2022

TournamentCompare v0.007 - The microsoft alternative

 After getting a standard user set up (so I'm not directly touching the admin account), the first step is to set up a new Power Platform environment to keep all the development tables and apps away from the default instance. I'm also tempted to have a Dev / Test / Prod environment too. Yep, may as well go full lifecyccle management from the get-go (It'll be in Dev for a significant chunk of time anyway).

Hmm, apparently the tenant doesn't have enough space for the database. Sure enough, database capacity is 0 of 0, No space allocated. Might see if  I can create the environment without the dataverse database and make afterwards. Hmm nope, still complaining about capacity constraints. Tried signing up for the developer plan for power apps, but it just took me to the same environment. Looks like Microsoft confirms that the developer plan cannot create environments. Oh well.

The next alternative is to create separate databases in the dataverse of the default instance and hopefully link them to separate solutions. Actually without environments the standard solution export / import isn't going to work. Possibly just use DevOps and branching?

Setting up DevOps it looks like my personal account had got there first to register VRBones. Since my personal account is also set up as a developer for Visual Studio, it probably makes sense to leave it there, so I just added the organisation admin and standard user to the mix and made a new TournamentCompare project. 

Upon looking into the DevOps integration it looks to be only with VS Team Services account. Ok, it looks like I'll just need to build out the app in default and keep it lightweight before deciding whether lifecycle management will help to push out anything.  

Tournament Template files created pretty quickly. Next step is to check the model-driven app and especially the self-referenced heirarchy.



Tuesday, May 03, 2022

Microsoft 365 and Power Apps development

Inspired by my new job at Best Practice, I have been looking at Microsoft 365 Dataverse and model-driven power apps as a potential replacement for TournamentCompare development (and possibly others). 

Although it looked like you could sign up for a free community / developer plan, it didn't like my hotmail address. Digging deeper it looked like all I had to do was have a custom domain, so I set up a dev account on tournamentcompare.com, but it still rejected stating it needed a O365 tenant (had expected such, otherwise it would have created all the back end anyway). 

It turns out what I REALLY need is a developer tenant for the entire Microsoft 365 suite, which comes with 25 sample E5 licenses and a 3 month extendable trial window. Super impressed with this offering and goes along the lines of Visual Studio being offered for free too. 

Initially it offered a sample userbase and SharePoint site for a trial, but since I had used the admin tools before I decided to go with the custom install and eschew the trial data, even though it warned on a possible 2 day setup timeframe. Luckily it was provisioned within a minute and sure enough, all the admin controls are available. 

Checking SharePoint and it has a boilerplate communication-style site already set up and admin back end ready to go. 

Jumping straight over to Power Apps and although it took a little to process, it was also provisioned and looks to be ready for development. Excellent, don't need the developer plan (kinda makes sense since I am already inside a dev plan for the entire tenant).

Popping over to Azure Active Directory and, as expected by now, it is also provisioned on a Premium P2 license. This will also allow a great sandbox for testing some of the potential dev opportunities at work (PIM springs to mind).

Overall super happy with the offering.

  

Wednesday, February 02, 2022

TournamentCompare v0.006 - The resurrection

 Now that I have some time to blow the dust off parked projects, TournamentCompare is back in active development. Since almost 7 years have passed, there has a been a pretty steep relearn and upgrade path to get back into the swing of things. 

Visual Studio 2022
Previously development had been exclusively on the laptop with a full install of VS2012, whereas with the community edition generally available I wanted to move it all over to my main PC. Most of the code came across, but the project had issues reconnecting the local files to the new version of SQLExpress. Rather than tackle the upgrade I assumed the laptop would make an easier upgrade path and, as I was taking it to Andrew's, would be required anyway. Over the course of the resurrection I bounced several times between old-but-working versions and the draw of a shinier interface with more integration. 

NuGet Package Management
On the laptop I was able to easily get the original project cloned and compiled under VS2022, but when I went to test a database field update, the scaffolding options for generating the controller and view failed due to requiring EF 6.4.4. After an hour struggling to upgrade 6.1.1 to 6.4.4 using the NuGet package manager (continually downloaded a 0kb package) I gave up and went back to the old code and VS2012 to at least confirm everything was actually working. As package management would definitely be needed eventually I returned after calming down and it was likely an artifact of storing the data on Google Drive. I didn't have much confidence in the cloned package so I looked to regenerate the project again from scratch. 

.NET Framework
When building a brand new project, the package management issues disappeared, but generating the EDMX and controllers from the SQL database seemed to be completely missing. It turns out that a new MVC project using default settings builds only on .NET Core and all the solutions I found for scaffolding out the model-controller & view were definitely NOT what I'd call helpful. To get a new project with .NET Framework elements needed additional components installed into VS 2022, but once up and running it quickly generated the model, controllers and views as expected. 

Bootstrap
I had re-read some of the initial blog posts and recalled the struggles with enumerated types. Instead of repeating the coding upgrades to maintain data-first capability, I revisited the initial clone of the code on my main PC and resolved most of the database upgrade and connection issues. NuGet was also working to deliver Entity Framework 6.4.4, but failed to clean up the old version properly (restart VS needed). Feeling confident I upgraded all other components and promptly broke the compile with bootstrap giving unexpected object errors. Looking into it, Bootstrap 3.x to bootstrap 5.x is just too big a jump, so chose just to downgrade. 

So after a couple of days it feels like I have revisited and relearned most of the foibles with Entity Framework and MVC to set off and actually make progress

ToDo:

 - Get Github integrated so I can develop on PC or laptop
 - Confirm everything is able to be published to Azure SQL & Azure apps
 - Build a few more tournament templates
 - Generate sample tournaments rather than record every single tournament instance when calculating bias. 
 - Generate bias using running methods for averages, std deviations and other aggregators.