hjertnes.blog

What React is, and how it is different.

13.12.2017 01:00

We often compare React, Angular and Vue. I get why. But it isn’t the best. Because both Vue and Angular are more complete solutions for building web apps, while React are just a library for dealing with the user interface part of it. And leave other things like communicating with API’s, routing and global state to others.

The bad thing about this approach is that you need to learn more, and there are no “standards”. But the good thing about this is that you can chose the best option for what you are building, and only increase the complexity as you need it.

React is based on components instead of a variant of the well known MVC model. In a MVC model you have the model (data), the interface (view) and the controller; the controller is the one that controls everything and are doing the work. A component based system on the other hand is based on the idea that you make many small components that are fully independet and combine them to build what every you are building, They can be pure UI components or pure wrapper components; or a combination. A wrapper component is a component with just logic.

The biggest difference between the two from a practical stand point is the structure. A MVC system does a lot of the organisation for you, but makes it harder to re-organise everything. When you use React you typically start with a single file, then you divide it into different files and slowly make it more complex as you need it.

That means that the the structure rarely is more complicated than it has to be.

#

12.12.2017 01:00

hjertnes/op-cli. I’m working on a wrapper around the 1password cli.

#

12.12.2017 01:00

Got my Pilot Metal Falcon today. First thought: why doesn’t the Vanishing Point have this converter?

Learning React now and then.

12.12.2017 01:00

When I started to learn react in 2015 I thought it was a challenge. Not because react itself is difficult, but because there was a lot of stuff surrounding it one had to know. It kind of reminded me about when I started to do web development back in the stone ages. “You need to know html, css, javascript, php, mysql, apache cookies”. And I just understood that I should learn all of it, without understanding what everything was or why I had to learn it.

The short version is that the react community is very good for better an for worse to use the bleeding edge of new Javascript features, even when they are in drafts stages. But I wasn’t familiar with all of the new ES6 features when I started to learn React. And when you finally understood what was going on, then you had to learn how to get webpack or browserify up and running. Looking through a million different config files trying to find a config that works.

What I recommend that you do today, if you want to learn React is to start with “create-react-app”. It is a very good package for starting a new react app without having to worry about anything but react. You might still want to learn how to configure webpack, but I don’t think you need so unless you have some particular needs or have a larger app. I have deployed smaller apps into production using create-react-app.

#

11.12.2017 01:00

Lightroom CC has the essential options, where the old Lightroom had options for every single possible thing imaginable. For example the old “export” have been replaced with a “Save To” with three options File Type, Location and Size. But my impression is that it is much slower than the old export.

#

11.12.2017 01:00

The speed of navigating between photos in Lightroom CC seems to be roughly the same as in Classic. But the killer in terms of speed is that you don’t need to jump between library and “develop”. It will probably result in me editing way more of my photos than before.

#

11.12.2017 01:00

The process of importing new photos into CC is much more streamlined than in Classic. It’s just add; not “move”, “copy” and “copy as DNG”. You just copy them in as is. I would prefer a option for them to be converted to DNG. But that might show up in the future.

#

11.12.2017 01:00

All the previews are generated in the cloud, or I do at least think they are. Which means that it may take more or less time before you can process your images after a import; it all depends on the speed of your internet connection.

For me, it took way less time when I imported two 64GB cards yesterday. But I have a very fast 120mbit connection.

#

11.12.2017 01:00

I’ve bought a second hand ThinkPad, because it’s been way too long since I played around with desktop Linux.

#

11.12.2017 01:00

Looks like my Pilot Falcon will arrive tomorrow.