DEV Community

Tomasz Łakomy
Tomasz Łakomy

Posted on • Edited on • Originally published at cloudash.dev

Why I'm excited about serverless as a frontend engineer

Before we start - I'm working on https://cloudash.dev, a brand new way of monitoring serverless apps 🚀. Check it our if you're tired of switching between 50 CloudWatch tabs when debugging a production incident.


Back to the basics

Basically every non-trivial web app (e.g. Uber for Bunnies) is composed out of three basic components, think of it as a recipe:

  • Visuals (frontend) - a layer that users interact with, so your good ol' trio of HTML/CSS/JavaScript (with a dash of jQuery plugins, tracking scripts and whatnot. Sometimes even with some animations sprinkled here and there)
  • Logic (backend) - the brainz of your app. This is where the vast majority of logic lives and here be dragons (and databases). Before the node.js days working with backend was more or less a completely separate skillset than writing frontend code (e.g. PHP backend and jQuery-driven frontend)
  • Where-it-all-lives (infrastructure) - the website you're seeing right now is hosted somewhere. Code and logic doesn't exist in a vacuum - something has to run it. Therefore to handle production-grade load of your Uber for Bunnies website you need a server (or servers) (or an old PC in the corner of your room running your entire site, I don't judge).

A picture of two bunnies
All of this just to move those two c h u n k s from point A to point B

Problems

I've personally been focused strictly on frontend part of this trio for the last couple of years. From vanilla JS, through jQuery, Backbone, Angular, CoffeeScript (I don't want to talk about it), React, and React to React.

To be honest here for a second - I found the rest of that to be straight up daunting for the majority of my career.

Writing a node.js script to perform an action? Sure I can do that!

Configuring a MySQL DB from scratch, provisioning a server to run it and spending 4 days to be able to save a todo in a database? Please tell me we have an IE8 bug to fix, I don't want ot do that

After a couple of years I'm fairly confident that given enough time and will power I'm able to figure out quite a lot of stuff on my own but here's the thing:

I don't want to do everything on my own

At this point I've lost track of how many times I've said "this shouldn't be this difficuly, it's 20XX! in my career.

As a developer I'm getting paid for building products, solving problems, causing bugs and fixing them. And I love that!

Building products that allow others to solve problems is my jam.

Setting up entire node.js sever to host a single index.js function that will get called a couple of times per day is not.

Focusing on what's important

The reason why I'm so excited about serverless from a frontend engineer perspective is that it allows me to delegate away my problems.

And it's not the first time I see a shift like this happen.

Q: Why did I move from Backbone to React?

A: Because React abstracted away a lot of problems I've personally had with building Backbone apps (e.g. performance issues and lack of reusable components)

Q: Why I'm excited about serverless?

A: Because serverless technologies abstract away the problems I don't want to deal with (setting up servers, scaling them, hosting my logic etc.) and allow me to just run my code whenever I need it to.

To make things simple - in this post when I mention serverless I'm referring to AWS Lambda (feel free to check out WTF is AWS Lambda).

Why do we refer to AWS Lambda as a serverless technology? Because yes, there are servers but you don't have to think about them.

The whole problem of managing, provisioning, scaling and whole lotta -ing is managed by somebody else. And the best part is that this 'somebody' is AWS - a company that has world class experts on the job, not to mention more servers that you could count in a month [citation needed].

Honestly, for me it's as if a whole new world of possibilities has opened 🎉

A Full Stack Serverless Developer might be the most desired engineering role in the next couple of years. For a very good reason - having someone on the team that knows how to best combine various serverless technologies to solve your problems (with greatly optimized costs!) is going to be incredibly valuable.

This slide from AWS Re:Invent 2017 is a glimpse in the future we're already seeing with the advance of serverless technologies:

A conference talk slide with 'So what does the future look like? All the code you ever write is business logic'

You know, I'm just really happy to have more tools in my toolkit that I get to play with and use to build better features, products and solving problems faster (and cheaper!)

I'm hyped, where do I start?

Excellent question!

If you'd like to learn some AWS for free from yours truly, check out those free video collections on egghead.io:

AWS Cloud Development Kit egghead.io course logo

I'm also launching an AWS Cloud Development Kit egghead.io soon and to sum up why you shoul...might be hyped to take it:

AWS Cloud Development Kit allows you to build the entire stack (frontend, serverless backend, AWS infrastructure) using a single programming language - TypeScript!

🔥🔥🔥

Top comments (11)

Collapse
 
nicolus profile image
Nicolus

Before the node.js days working with backend was more or less a completely separate skillset than writing frontend code (e.g. PHP backend and jQuery-driven frontend)

That's true but I don't think that's true for the reasons implied.

In my opinion the "fontend" skillset has become closer to the backend skillset around the time where nodejs became popular, but that's not because you can code the backend with javascript, it's mostly because doing frontend work now involves a lot of the same logic that's needed for the backend.

If you'd asked an HTML/CSS/jQuery developer to build the PHP backend of an app 15 years ago, they would have had a very hard time. But now take a modern front-end developer who's building PWAs with Typescript : they already work with OOP, They use MVC, they know reactive programming, they've probably already used some SQL with an embedded SQLite database, maybe even an ORM... So if you suddenly ask them to write the backend (be it with PHP, NodeJS, Python or Go), they just have a new language/framework to learn but they already know most of the concepts.

Collapse
 
tlakomy profile image
Tomasz Łakomy

Great point! I agree with you, those are kinda like two sides of the same coin imho :)

Collapse
 
diek profile image
diek

Hahahaha prefering an IE8 bug was awesome and funny. Sometimes i feel this way when i prefer one tech or stack xD it's nice to see that i am not alone.
Anyway, serverless is awesome, not only for frontend, for backend too, i love servers but removing all the config and upgrade/mantain is very powerfull.
For a frontend stack, i fell in love with cloudfront, if you don't know it yet , i recommend to look about it, it allows you to serve in the edge an static web site directly from the S3, almost configuring nothing, awesome for the spa bundles!

Collapse
 
bernardbaker profile image
Bernard Baker

Keep me posted on this 🧐

Collapse
 
tlakomy profile image
Tomasz Łakomy • Edited

You can sign up for my newsletter on tlakomy.com 💯

Collapse
 
bernardbaker profile image
Bernard Baker

Signed 📳

Collapse
 
jannikwempe profile image
Jannik Wempe

Just finished the egghead course. I love it! Well done! Just used plain CloudFormation template.yml syntax before, which is much more verbose and less intuitive. I'll try to use CDK in my next projects. Thanks!

Collapse
 
tlakomy profile image
Tomasz Łakomy

I’m really glad to hear that! I’m glad you’ve enjoyed it! 🤩

Collapse
 
jannikwempe profile image
Jannik Wempe

Looking forward to the egghead course!

Any estimations about what „soon“ means? 😉

Collapse
 
tlakomy profile image
Tomasz Łakomy

Early June! 🥳

Collapse
 
kayis profile image
K

Pretty sure you're right.

I'll focus my blogging efforts to tools that help frontend developers to go fullstack in the near future too!