Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Building Serverless Web Applications

You're reading from  Building Serverless Web Applications

Product type Book
Published in Jul 2017
Publisher Packt
ISBN-13 9781787126473
Pages 354 pages
Edition 1st Edition
Languages
Concepts
Author (1):
Diego Zanon Diego Zanon
Profile icon Diego Zanon
Toc

Preface

Serverless is a buzzword created to identify cloud services that are totally managed by the provider and have a different billing model where you pay only for the time that you use them, measured in a granularity of tenths of a second and not hours. Serverless Computing allows a wide range of applications to benefit from reduced costs, faster development, and much less trouble with availability and scalability. Those are enough reasons for you to start learning how to build serverless applications.

Besides teaching you what is and how to use serverless, this book offers a broader view on the subject. Serverless is frequently associated with FaaS and people don't realize that you can do much more with serverless than just running functions on demand. Serverless offers many services for databases, security, notifications, and others. I will teach you how to use them.

This book can be divided into the following three parts:

  • Introduction: This is where you will be introduced to the serverless concepts and tools that will be used in this book. You will learn about AWS services and the Serverless Framework. This introduction ranges from Chapter 1, Understanding the Serverless Model, to Chapter 3, Using the Serverless Model.
  • Building a serverless application: From Chapter 4, Hosting the Website, to Chapter 7, Managing a Serverless Database, you will follow how to develop and host a serverless application and build the frontend, backend, and data access layer.
  • Advanced features: This book ends with Chapter 8, Securing the Serverless Application, to Chapter 10, Testing, Deploying, and Monitoring, giving you the knowledge of how to use serverless to implement security and real-time notifications in addition to how to test, deploy, and monitor your application.

What this book covers

Chapter 1, Understanding the Serverless Model, introduces the concept and its pros and cons along with some use cases.

Chapter 2, Getting Started with AWS, gives an introduction to new AWS users and describes which tools will be used throughout the book.

Chapter 3, Using the Serverless Framework, teaches you how to configure and use the Serverless Framework, which is a must-have tool to build serverless applications.

Chapter 4, Hosting the Website, helps you to configure your domain and host your website with HTTPS support.

Chapter 5, Building the Frontend, uses the approach of Single-Page Applications to design a React frontend.

Chapter 6, Developing the Backend, covers how to design a RESTful interface and build the backend code using Node.js.

Chapter 7, Managing a Serverless Database, shows how to use SimpleDB and DynamoDB to store data for a serverless project.

Chapter 8, Securing the Serverless Application, covers the standard security practices and how to implement authentication and authorization in a serverless application.

Chapter 9, Handling Serverless Notifications, demonstrates how to build serverless notifications using the publisher-subscriber pattern.

Chapter 10, Testing, Deploying, and Monitoring, shows how to test a serverless solution, what are the standard practices to deploy your application in production, and what you need to monitor.

What you need for this book

This book assumes previous knowledge of web development using JavaScript and Node.js. While you have many options of programming languages to develop a serverless application, all code examples of this book uses Node, so some basic knowledge of Node.js is necessary at least to understand how npm and the JavaScript ES6 syntax are used.

There are many cloud providers that offer serverless services, but this book focuses on AWS. You don't need to have prior knowledge of AWS because we will cover the basics too, but you will need to create an account to develop and test the code examples. If it is a brand new account, AWS offers a free tier of 12 months for you to learn and develop without any cost.

Who this book is for

This book was designed for web developers who want to use cloud services to be more productive, reducing the time wasted on configuration and maintenance of the infrastructure or for developers who want to build solutions using existing services to solve common problems with very little effort.

Also, as I work as a full-stack developer, my job requires me to understand a little bit of everything such as frontend, backend, databases, security, and DevOps. So I tried to give in this book a broad view of web development using the serverless concept. If you have a similar role or, at least, want to learn more about the different layers of web development, this book will suit you well.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "This example defines a <HelloReact/> HTML element and the rendered output will use the value of the name property".

A block of code is set as follows:

     class HelloReact extends React.Component {
       render() {
         return <div>Hello, {this.props.name}!</div>;
       }
     }

     ReactDOM.render(
       <HelloReact name="World"/>,
       document.getElementById('root')
     );

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

    [default]
    exten => s,1,Dial(Zap/1|30)
    exten => s,2,Voicemail(u100)
exten => s,102,Voicemail(b100)
    exten => i,1,Voicemail(s0)

Any command-line input or output is written as follows:

aws s3 sync ./path/to/folder s3://my-bucket-name --acl public-read

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Clicking the Next button moves you to the next screen."

Note

Warnings or important notes appear in a box like this.

Note

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail feedback@packtpub.com, and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

You can download the code files by following these steps:

  1. Log in or register to our website using your e-mail address and password.
  2. Hover the mouse pointer on the SUPPORT tab at the top.
  3. Click on Code Downloads & Errata.
  4. Enter the name of the book in the Search box.
  5. Select the book for which you're looking to download the code files.
  6. Choose from the drop-down menu where you purchased this book from.
  7. Click on Code Download.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR / 7-Zip for Windows
  • Zipeg / iZip / UnRarX for Mac
  • 7-Zip / PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Building-Serverless-Web-Applications. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Downloading the color images of this book

We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from https://www.packtpub.com/sites/default/files/downloads/BuildingServerlessWebApplications_ColorImages.pdf.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at copyright@packtpub.com with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at questions@packtpub.com, and we will do our best to address the problem.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}