Profile cover photo
Profile photo
Tomáš Zvěřina (Tomucha)
Linux, Java, Android, nově i Dart. Silné názory na všechno z IT, nevyhraněné názory na všechno ostatní. Nebo to bylo obráceně?
Linux, Java, Android, nově i Dart. Silné názory na všechno z IT, nevyhraněné názory na všechno ostatní. Nebo to bylo obráceně?

Tomáš's posts

Post has shared content
v0.0.1 of service_worker

Service Worker API for Dart

Dart-y wrappers for the ServiceWorker APIs.

Warning: the API is experimental, and subject to change.

Service Workers

A service worker is an event-driven worker registered against an origin and a path. It takes the form of a JavaScript file that can control the web page/site it is associated with, intercepting and modifying navigation and resource requests, and caching resources in a very granular fashion to give you complete control over how your app behaves in certain situations (the most obvious one being when the network is not available.)

A service worker is run in a worker context: it therefore has no DOM access, and runs on a different thread to the main JavaScript that powers your app, so it is not blocking. It is designed to be fully async; as a consequence, APIs such as synchronous XHR and localStorage can't be used inside a service worker.

W3C draft:

Mozilla doc:


Register the Service Worker from your application script, like in example/web/main.dart:

import 'package:service_worker/window.dart' as sw;

void main() {
if (sw.serviceWorker != null) {
} else {
print('ServiceWorkers are not supported.');

Write the Service Worker in a separate script, like in example/web/sw.dart:

import 'package:service_worker/service_worker.dart';

void main(List<String> args) {
globalScope.onInstall.listen((event) {
print('ServiceWorker installed.');

Post has attachment
Someone should create Angular2 component supporting Android Nine Patches:

<bg-ninepatch src="img/my_cool_background.9.png">
Content here ...

Not me, obviously, I'm both busy AND lazy. But someone!

P.S. Let me know when it's done, thanks!

Post has shared content
Future or no future! That's the question!
Dart 1.22 is now available with faster tools, assert messages, covariant overrides, and more!

Offline web apps question:

I want to create an offline web application in Angular2 Dart. So it seems to me, that I'm supposed to do something like:

$ pub get
$ pub build
$ cd build/web;
$ find . >> manifest.appcache;

... which seems a bit harsh, because:

$ find . | wc -l

There are hundreds of *.ng_meta.json files. Do I need those metadata in production? I'm confused, internet! Help me!

Post has attachment
And now for something completely different.

Post has attachment
Stát potřeboval software na řízení archivů. (Neuvěříte, co se stalo pak.)

Ježto žádný nevyhovoval aktuální metodice, rozhodl se, že si ho vytvoří. Výsledek je open source: Java + Spring + React.

Teď je v jeho zájmu, aby se na ten software podívalo více lidí, aby vůbec bylo dost implementátorů, který to do těch archivů dostanou. Více zde:

Post has shared content
Jasnej fejk, ma obe ruce!
Herec Nikolaj Coster-Waldau, známý ze seriálu Hra o trůny, nahradil Street View auto a s 15 kamerami, pěšky, na čtyřkolce, ve člunu a vrtulníkem nasnímal mizející krásy Grónska, aby upozornil na klimatické změny, které se zde dějí. Projděte se s námi ledovcovou krajinou →

Post has shared content

Post has shared content

I was serverless, before it was cool!
Wait while more posts are being loaded