Tero Parviainen's Blog, page 2
May 19, 2016
Things that Excite Me about Angular 2
In the past six months or so I've spent a good amount of time playing with Angular 2. I've built some fun projects and given talks about them. I've written some documentation and had lots of discussions with other people who are doing that. And I've written a couple of articles too. I thought this might be a good time to sum up what I find exciting about this platform right now.
TypeScriptI wasn't interested in TypeScript before the Angular community started making noise...
April 1, 2016
A Dash of Queueing Theory
I originally wrote this article in January 2015 for the Static Showdown. I'm republishing it here since Divshot has shut down.
The modern world is full of queues. There are queues everywhere from supermarkets and airports to web servers and databases. We organize ourselves in queues and we organize our work in queues. Therefore it is useful to understand a little bit about how these things called queues behave.
The problem is that the behavior of queues is actually pretty counterintuitive...
March 5, 2016
Writing A Structural Directive in Angular 2 - Or, how I wrote a customized version of ngFor
When building Angular 2 applications, we spend most of our time writing components. There are also other kinds of other kinds of directives we can define, but in my experience you end up needing to do that surprisingly rarely.
But recently I did end up in a situation where I needed a custom directive. I was using ngFor to render a collection of items, and I wanted to not keep track of items changing positions inside the collection. Instead I wanted a repeater directive that only adds and remo...
February 28, 2016
Metabubbles: Making Generative Art with Angular 2 - A tutorial using Angular 2, ES2015+, Babel, and Webpack
Most people talk about Angular 2 as a platform for writing business applications. But there's no rule that says this is the only thing it should be used for. If you're in the mood for something fun, how about making some generative visual art?
You see, the same characteristics that make Angular 2 a useful framework for business app development also make it a fun platform for pure experimentation and self-expression through code. In this tutorial we're going to do just that.
So let...
February 22, 2016
Dumb Components and Visual Feedback in Angular Apps
Angular applications are becoming increasingly component-oriented. Angular 2 is all about components. In Angular 1, component patterns and APIs are emerging.
As we move towards component-style applications, we should think about how we organize components and divide responsibilities between them. One useful way to think about this is to distinguish between smart and dumb components, or presentational and container components.
The idea is simple: Your UI component tree consists of two differen...
October 18, 2015
Refactoring Angular Apps to Component Style - Or, how to modernize your crufty AngularJS codebase one simple step at a time
Component-based directives are becoming increasingly popular in the Angular community. One reason for this is that Angular 2 will be all about components and people are preparing their 1.x code for the upgrade. Another reason is that componentization just makes apps easier to work with.
The thing is, even though people are talking about components a lot, most of the existing Angular code in the world is still not component-based. Components didn't become widespread until quite recently, a...
September 10, 2015
Full-Stack Redux Tutorial - A Comprehensive Guide to Test-First Development with Redux, React, and Immutable
Redux is one of the most exciting things happening in JavaScript at the moment. It stands out from the landscape of libraries and frameworks by getting so many things absolutely right: A simple, predictable state model. An emphasis on functional programming and immutable data. A tiny, focused API... What's not to like?
Redux is a very small library and learning all of its APIs is not very difficult. But for many people, it creates a paradigm shift: The tiny amount of building blocks and t...
August 10, 2015
Clojure Cup Looking For Organizer
I've organized the Clojure Cup a couple of times now: The inaugural event in September 2013 and the second edition in September 2014.
I'd very much like to see a Clojure Cup 2015 this fall, but the time has come for me to hand over the reins to someone else. So, I'm looking for someone to take on the ownership and organizing duties of Clojure Cup.
As the new owner of Clojure Cup, you will run the event as you see fit, though I'm of course willing to advise based on my experience of the two p...
July 15, 2015
Overcoming JavaScript Framework Fatigue
The JavaScript community is suffering from a wave of framework fatigue. It's caused by the massive outpouring of new frameworks, techniques, and ideas that has been going on for some time now. Even though it's all very exciting, it's just impossible to keep up with it all.
Since you can't keep up with it, you have to choose what to focus on. And having to make that choice is a cause of anxiety in itself. Are you focusing on the right things? Is the framework you're learning the best one for y...
June 9, 2015
A Guide To Transclusion in AngularJS
I've always had a problem with transclusion. Though I've used it from time to time, using it always felt uncomfortable. I was never really sure what exactly the API was doing, or more importantly, what exactly I was supposed to do when using it.
Based on what I've heard, I'm not alone in this. Transclusion is one of those things people often mention when they talk about their difficulties with Angular.
What is it that makes this a difficult topic then? Conceptually we're not talking about any...


