Angular 2, Electron, NodeJS

Currently I’m working on a private project with Angular 2 (v.2.0.0-beta.0 | TypeScript), Electron (Atom Shell) and NodeJS.

I had some issues with Angular 2 and webpack modular bundler.
In my system I have to transcode all the TypeScript code with all the nice features to normal JavaScript-code (ES5).

first issue
  • It took me many hours to get the InterProcess Comunication from the Electron to the NodeJS running. The Problem is that the IPC-module is a native Electron-module and webpack is trying to find it in the node_modules folder.
    StackOverflow issue

Solution: webpack-target-electron-renderer
You have to change/update your webpack config. After that webpack will ignore or find the native Electron-modules.

second issue
  • In Angular 2 you can write components, services, …. and more. I wanted to use a service to get data from one component to another but I never got the data exchanged between them.

Solution: In my case I used the Componenttag “providers” to create an instance of the declared service but every time you write “providers” with a service in it, you are creating a new instance of the service and you will never get data from one component to another. You start your app with that

bootstrap(App, ['services']);

since then you have an instance of the provided services. To use them, you only have to import the service and to write in the somponent-constructor

constructor( %varname% : %servicename% )

 

conclusion:

The combination of Angular 2 (TypeScript), Electron (Atom Shell) and NodeJS is very nice. With that components you are able to build a client application rapidly. My next “nice to have” is to integrate a CSS-preprocessor (SASS, LASS, …) in my projects to write CSS-code in the ways of a programmer.

Finding the right track – defining guideposts with JSON

Many different organisations have to deal with the management of guideposts – especially in alpine regions. Sometimes all the data about the guideposts is managed in databases and GIS-Systems, often no digital data management is in use. In the first case mostly internally developed databases/applications are used and there is no open technical “standard” for storing “guidepost-data” and EXCHANGING it. In some regions – like in Tyrol – governmental standards for the guideposts (“the hardware”) are available (how guideposts have to look like – e.g. size, classification of difficulty, …). Based on the idea that around the world guideposts have some elements (direction, name of target,…) in common, we started to work on a modern technical standard…

guidepostJSON

Finding the right track – defining guideposts with JSON weiterlesen

Silvester ohne Raketen muss nicht sein

Im Süden Österreichs gilt heuer ein Feuerwerks-Verbot an Silvester wegen der Trockenheit, die in letzter Zeit herrschte.
Das hat David inspiriert, einen Countdown zu schreiben, der zu Mitternacht ein virtuelles Feuerwerk initiiert.

Zum Countdown gesellen sich Bilder aus der Umgebung – die mit wenigen Eingriffen im Code natürlich ausgetauscht werden können.

–> Hier geht’s zum GitHub Projekt
https://github.com/2er0/silvester

Ein gutes, neues und nerdiges Jahr wünschen das Isticktoit-Team
Florian, David, Tobias

Drei (3Österreich) und ein offenes Internet…

Die Verwendung eines Internet-Zugangs über Drei (drei.at / Hutchinson 3G) mit den DNS von Drei kann zu manch Überraschung führen. Gesperrte Webseiten und bei fehlerhaften URLs wird einem gleich durch eine von Drei zwischengeschaltete Seite “geholfen” – inkl. Google Analytics. Netzneutralität ? User-Enscheidung ?

Drei (3Österreich) und ein offenes Internet… weiterlesen

Raspberry Router

raspi-router2

I built myself a UMTS router. An extravagant one. Out of scotch tape and parts I found in my apartment. Here’s how.

First of all: This is not your usual router. This thing was initially built out of necessity: I had (and still have) an unlimited/uncapped mobile data plan for my tablet, which is not capable of doing wifi tethering for my phone. So as a student (read: lazy and cheap) I did not want to leave the four walls I call home dormitory just to watch Youtube videos on my phone.

Raspberry Router weiterlesen

Stuff for nerds and geeks