Posts

Showing posts from June, 2017

Adding some @riotjs_ #webcomponents love ...

Image
In my previous article, I showed how we use Visual Studio to work with web components written with the Polymer 2 library . How much work would it entail to toss in a Riot component into the mix? The whole idea of web components, is that we can combine them, right? Right! Oh, and as a side note, I personally found Riot super easy to get into ! Might be a preference thing, but I'm just tossing that out there. The idea of Riot, is that it works right now with existing browser technologies whereas the Polymer components use Polyfills to bring the future of the web into the present. Groovy. In previous experiments, I've tossed together a few riot components and published them to a blob container: Just like web components written using the Polymer library has it as a dependency, Riot has a runtime that we must include where we consume our component; the riot+compiler.min.js . The cool thing about Riot, however, is that you can include that dependency at the end of your docu

Working with @Polymer 2 in @VisualStudio 2017 #webcomponents

Image
You'll be pleased to know, that we now have excellent support in our favourite IDE for creating and consuming Polymer 2 components! Sure, you could use JetBrains' WebStorm or the cross-platform Code editor from Microsoft. But Visual Studio still has your back! Let's explore the support together: Let's pick a .NET Core project template, choose to create a MVC Web Application and right-click on the bower.json file to manage our bower packages (Polymer is still using Bower): Then, install Polymer and iron-icons : If you get a nasty error message, saying something along the lines of  ECMDERR Failed to execute "git ls-remote --tags --heads git://...", exit code of #128 fatal: unable to connect to github.com ... , then open a command window and type out  git config --global url."https://".insteadOf git://  to connect to github using https instead of the git protocol. Then try installing again  ☺ Alright! Let's do the coding req

JavaScript-Mancy by @vintharas at #DevSum17 @DevSum_swe

Image
I had the great honour to take part in Jaime González García's afternoon dance-and-AngularFire session at this year's Developer Summit and was lucky enough to win his book Getting Started With the Arcane Art of Writing Awesome JavaScript for C# Developers . The book is great! Jaime succeeds in entertaining you (well ... me ;-)) throughout the entire book by taking you on a fantasy adventure as he is teaching you new things (such as the spread operator, Maps and Sets) in ES6 and their equivialent in C# and the, slightly aged, ES5. Now, I'm well versed in ES5, but still - in the first part of the book, I learned something new - while having fun! Oh, and ... check this out: Uh-huh! It's in the book! Get it now ! While reading the book, I found this memory rule for myself - when iterating in JavaScript, for ... in yields the In dex (or key ), while for ... o f yields the O bject. Also, Jaime tought me about different strategies for polymorphic functi