net - UK (2020-02)

(Antfer) #1
ANGULAR
AngularJS was released in 2010 but by
2016 it was completely rewritten and
released as Angular 2. Angular is a full-
blown web framework developed by
Google, which is used by Wix, Upwork,
The Guardian, HBO and more.

Pros
O Has exceptional support for
Ty p eS c r ipt
O MVVM enables developers to separate
their work on the same app section
using the same set of data
O Excellent documentation

Cons
O Has a bit of a learning curve
O Migrating from an old version can be
difficult. Updates are introduced quite
regularly meaning developers need to
adapt to them

What’s next?
In Angular 9, Ivy is the default compiler.
It’s been put in place to solve a lot of the
issues around performance and file size.
It should make applications smaller,
faster and simpler.
When you compare previous versions
of Angular to React and Vue, the
final bundle sizes were a lot a bigger
when using Angular. Ivy also makes
Progressive Hydration possible, which
is something the Angular team showed
off at I/O 2019. Progressive Hydration
uses Ivy to load progressively on the
server and the client. For example,
once a user begins to interact with a
page, components’ code along with any
runtime is fetched piece by piece.
Ivy seems like the big focus going
forward for Angular and the hope is to
make it available for all apps. There will
be an opt-out option in version 9, all the
way through to Angular 10.

REACT
React was initially released in 2013
by Facebook and is used for building
interactive web interfaces. It is used by
Netflix, Dropbox, PayPal and Uber to
name a few.

Pros
O React uses the virtual DOM, which has
a positive impact on performance
O JSX is easy to write
O Updates don’t compromise stability

Cons
O One of the main setbacks is the fact
you will need third-party libraries to
create more complex apps
O Developers are left in the dark on the
best way to develop

What’s next?
At React Conf 2019, the React team
touched on a number of things they have
been working on. The first is Selective
Hydration, which is where React will
pause whatever it’s working on in order
to prioritise the components that the
user is interacting with. As the user goes
to interact with a particular section,
that area will be hydrated. The team
has also been working on Suspense,
which is React’s system for orchestrating
the loading of code, data and images.
This enables components to wait for
something before they render.
Both Selective Hydration and Suspense
are made possible by Concurrent Mode,
which enables apps to be more responsive
by giving React the ability to enter large
blocks of lower priority work in order
to focus on something that’s a higher
priority, like responding to user input.
The team also mentioned accessibility
as another area they have been looking
at, by focusing on two particular topics –
managing focus and input interfaces.

VUE
Vue was developed in 2014 by Evan You,
an ex-Google employee. It is used by
Xiaomi, Alibaba and GitLab. Vue managed
to gain popularity and support from
developers in a short space of time and
without the backing of a major brand.

Pros
O Ver y light in size
O Beginner friendly – easy to learn
O Great community

Cons
O Not backed by a huge company, like
React with Facebook and Angular
with Google
O No real structure

What’s next?
Vue has set itself the target of being
faster, smaller, more maintainable and
making it easier for developers to target
native. The next release (3.0) is due in
Q1 2020, which includes a virtual DOM
rewrite for better performance along with
improved TypeScript Support. There is
also the addition of the Composition API,
which provides developers with a new
way to create components and organise
them by feature instead of operation.
Those developing Vue have also
been busy working on Suspense, which
suspends your component rendering and
renders a fallback component until a
condition is met.
One of the great things with Vue’s
updates is they sustain backward
compatibility. They don’t want you to
break your old Vue projects. We saw this
in the migration from 1.0 to 2.0 where 90
per cent of the API was the same.

FEATURES
The future of frameworks

Free download pdf