Contractor Market Intelligence

Over the past few months, I’ve been developing a web application to keep track of my contractor business contacts and contract applications.  It allows me to capture enquiries and contract opportunities and provides a workflow to capture additional information as we progress through the hiring process.

Why am I doing this?

I used to manage all this information on a few spreadsheets, which worked fine, but is was not so easy to extract useful information from the spreadsheet, such as: what has this agency found for me in the past.

I also wanted an excuse to write an ‘live use’ application using some new technologies (more on that later).  I find that if I actually use the application on a daily basis, I learn how to solve real world problems instead of just solving the artificial problems that your average tutorial presents.  I find a combination of writing ‘real’ code and dipping into the odd PluralSight tutorial works best for me.

What technologies did I use?

The application itself is a web application that is hosted in Microsoft Azure.  I signed up for the developer benefit programme, which allows me to get £20 per month free credit, so I’m effectively hosting the application on shared infrastructure for free.

For the server side coding, I’ve been using ASP.NET MVC Core.  This is my first foray into using a cross platform framework.  Most of my previous work as been targeting the various .NET Frameworks.   I’ve also been using ASP.NET WebAPI Core to create RESTful services backed by SQL Azure (SQL Server V12) databases and Azure Blob Storage to store CVs and job specifications for the contract opportunities.

For the client side, I’ve been using AngularJS 1.5 and building reusable components (directives).  To call the RESTful services I’ve been using the AngularJS $resource service.  For the reactive interface, that can be used on a laptop, or smartphone, I used Bootstrap and Bootswatch to give me my theme.

For the database and database access, I’ve been using SQL Server and Entity Framework Core and Migrations.

For testing the server side, I used xUnitMoq and dotnet-test-xunit.  For the client side, I used Jasmine, angular-mocks, Karma and Chutzpah.

For agile sprint planning, source-control, build, test and deployment I used Visual Studio Team Services.  I set up a GIT repository for the project and used the VSTS features to automatically build and test my code-base before deploying over to a Microsoft Azure we app slot. Migrations were used to do the database schema and data upgrades.

How did I go about developing the application?

I used an agile process and developed user-story by user-story to build up the functionality over 7-8 two week sprints.  I started off with the data capture stories and then added the workflow stories and then finished off with the data-view and editing stories.

The purpose of this approach was so that I could use the application in parallel with further development and refinement.  I found that this accelerated my understanding of the technologies.

One of the final stories was to turn the app from a single user application into a multi-tenant application.  This was so I could have a separate account for demoing the the application from my live production account.

The Good, the bad and the Ugly.

Developing with this stack and tooling was mostly a very enjoyable experience with few gotchas.  As a first foray into cloud computing, I was really impressed with the VSTS and Azure combination.  Getting from my agile stories to a new branch, coding, creating push requests, reviewing, build and testing and deploying was all very intuitive.  I would certainly use these again.

I also really enjoyed using .NET Core for the first time.  I really like it’s ‘opt-in’ approach rather than a standard include of quite bloated libraries.  Some of the tooling is still quite new and ‘raw’, but I didn’t run into too many problems that couldn’t be sorted out with a quick trip to StackOverload.  For someone who is used to using the .NET Framework and Microsoft’s own tooling, it was initially quite daunting to be confronted with all the open-source tools.  Even Entity Framework Core has a new set of commands for building and applying migrations.  This is something that you get used to quite quickly though.  Test support for .NET Core is still quite immature, so I was quite restricted to what I could use.  xUnit and Moq for core certainly did the job though.

I’d used AngularJS before in a contract role, but this development gave me the opportunity to have a deeper dive in to it’s bundled services, components, directives, asynchonous (promises) and testing modules.  Again, I didn’t really run into many problems that couldn’t be solved with a quick google search.  Probably the biggest gotcha is how you can come unstuck when minifying angular modules due to the way that AngularJS injects dependencies.  However, this is easily solvable and quite well documented in the community.

For getting started on this stack, I can certainly recommend the following PluralSight course: ASP.NET Core, EF Core, Bootstrap, AngularJS – Shawn Wildermuth

Tagged with: , , , , ,
Posted in App Development, CMI

Leave a comment