24 November 2019
tags: C#, Web
Recently I have been working on a large ASP.Net Core web application that also needs to have pluggable components so the main application can be deployed with or without them. It is possible to add a reference to another project in the Visual Studio Solution and have what are called Areas, but I don’t want this dependency so I went for Application Parts.
An application part is a .net assembly that can be used in the main application through reflection, you just need to tell the Startup class to look for them and include them with any other services.
This can be done through the ConfigureServices method in startup.cs
The ConfigureApplicationParts method is where we search for a Plugins directory and iterate through any libraries we find....more
What We Are Trying to Achieve
As a side project I am in the middle of porting a website from Angular.js to Vue.js. Why you may ask, well it is not a complicated site and even though I am proficient with AngularJS, I saw the jump to Angular too heavy and I don’t need all the functionality or complexity that introduces. I have worked with Vue.js before and find it a superb framework that allows you to get a site running quickly with just the basics and only include the parts of the framework you need. It is easy enough to come back and put more functionality in such as routing, state management later on.
So as part of this work I have large chunks of TypeScript that interact with jQuery UI that I need to bring over. I know I could write or find on GitHub some of this functionality, but this is supposed to be a quick project and I haven’t got the time. I just need to get Vue to interact with jQuery UI written in TypeScript. Should be easy…and it is....more
Have you ever browsed websites using Microsoft Edge and seen the little reading book in the address bar? That is the reading view option and is an absolute brilliant tool as when it is enabled, it gets rid of all the junk on the page, changes the text size and colours and makes a reading experience so much better. Some sites seem to have it and some don’t, but why? What is the magic juice that is needed to get this enabled for your web sites?
A tale of two Edges
Yes there are two edges we need to worry about here. Firstly there is the out of the box Microsoft Edge that comes with Windows 10 and renders using EdgeHTML. Secondly there is the re-invented Edge that uses Chromium under the hood. Edge powered by Chromium is still in development, but you can get your hands on it by signing up to the Insiders Channels....more
Why use it?
HTML 5.2 is currently at the ‘Recommendation’ phase with the W3C, which means that slowly each item in the specification is being worked on to bring them to your browser (well the features that the vendors deem are important). One of these is the dialog element. Currently it can only be used in Chrome and Firefox if you set the flag ‘dom.dialog_element.enabled’ in about:config. There is no support in Edge…unless you are using the new Chromium based development version, in which case you are good to go....more