Monday, 26 June 2017

Dart SDK and Dartium 1.24.2 Chocolatey Packages for Windows

Chocolatey is a package manager for Windows similar to Linux's apt-get, based on Microsoft's Nuget tool and Powershell scripting language. It works from the command-line and from a WPF GUI interface.

You can install unmoderated versions by specifiying the install version during installation.
Chocolatey has also been updated with versions 1.24.2
Command line installation:
choco uninstall dart-sdk

choco install -y dart-sdk  -version 1.24.2
To verify you have the right version on your path.
dart --version
Dart VM version: 1.24.2 (Thu Jun 22 08:55:56 2017) on "windows_x64"

Command line installation:
choco uninstall dartium

choco install -y dartium  -version 1.24.2

Saturday, 17 June 2017

A Multiplicity of Singleton Services

Angular Services are singletons right? Google it and you will get plenty of pages saying they are. Well sometimes they are and sometimes they are not!

I was working on a service that didn't seem to be working. To debug, I put a print statement in the constructor and I received 2 messages. So what's happening? Turns out to be down to Providers

Suppose you have a component and you want to use a service, you may have declared it in each component like this:

providers: const [TextProcessingService]

This actually creates a new instance before injecting it into your component.

So say we only want one instance ever? How do we do it? First step, delete that Providers declaration. Next declare at the bootstrap level:

  bootstrap(
      AppComponent, [TextProcessingService]
  );

Hope this blog post clears up confusion for anyone else. It is actually quite a powerful feature, allowing you to keep services and components totally separate.

Thursday, 15 June 2017

Dart SDK and Dartium 1.24.1 Chocolatey Packages for Windows

Chocolatey is a package manager for Windows similar to Linux's apt-get, based on Microsoft's Nuget tool and Powershell scripting language. It works from the command-line and from a WPF GUI interface.

You can install unmoderated versions by specifiying the install version during installation.
Chocolatey has also been updated with versions 1.24.1
Command line installation:
choco uninstall dart-sdk

choco install -y dart-sdk  -version 1.24.1
To verify you have the right version on your path.
dart --version
Dart VM version: 1.24.1 (Wed Jun 14 07:53:19 2017) on "windows_x64"

Command line installation:
choco uninstall dartium

choco install -y dartium  -version 1.24.1

Tuesday, 13 June 2017

Dart SDK and Dartium 1.24.0 Chocolatey Packages for Windows

Chocolatey is a package manager for Windows similar to Linux's apt-get, based on Microsoft's Nuget tool and Powershell scripting language. It works from the command-line and from a WPF GUI interface.

You can install unmoderated versions by specifiying the install version during installation.
Chocolatey has also been updated with versions 1.24.0
Command line installation:
choco uninstall dart-sdk

choco install -y dart-sdk  -version 1.24.0
To verify you have the right version on your path.
dart --version
Dart VM version: 1.24.0 (Mon Jun 12 08:37:04 2017) on "windows_x64"

Command line installation:
choco uninstall dartium

choco install -y dartium  -version 1.24.0

Tuesday, 30 May 2017

Introducing NB8080 - a simple Notes Board application

Time for a new productivity web app project! This time a notes application with a similar philosophy to NP8080. This means offline, 100% local storage of data, easy to use and a focus on emerging browser features. No Angular this time - just vanilla dart:html.

Enjoy the first version of NB8080.win - feedback would be great!

The app works offline thanks to the excellent PWA package. For details see the article 'Making a Dart web app offline-capable: 3 lines of code'.

NB8080 is on GitHub - star, grab the code and raise issues!