Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Phoenix Web Development

You're reading from   Phoenix Web Development Create rich web applications using functional programming techniques with Phoenix and Elixir

Arrow left icon
Product type Paperback
Published in Apr 2018
Publisher Packt
ISBN-13 9781787284197
Length 406 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Brandon Richey Brandon Richey
Author Profile Icon Brandon Richey
Brandon Richey
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Title Page
Copyright and Credits
Packt Upsell
Contributors
Preface
1. A Brief Introduction to Elixir and Phoenix FREE CHAPTER 2. Building Controllers, Views, and Templates 3. Storing and Retrieving Vote Data with Ecto Pages 4. Introducing User Accounts and Sessions 5. Validations, Errors, and Tying Loose Ends 6. Live Voting with Phoenix 7. Improving Our Application and Adding Features 8. Adding Chat to Your Phoenix Application 9. Using Presence and ETS in Phoenix 10. Working with Elixir's Concurrency Model 11. Implementing OAuth in Our Application 12. Building an API and Deploying 1. Other Books You May Enjoy Index

Preface

With Elixir and Phoenix, you build your application the right way the first way: ready to scale and ready for the increasing demands of real-time web applications.

This book will cover the bare basics of the Phoenix web framework through building a community voting application and, in the course, discuss the new structure changes introduced in Phoenix v1.3. We'll cover the initial challenges of getting started with our app, working with the generators to learn more about the structure of a standard Phoenix app. From there, we'll build our application and work with Channels, Schemas, Contexts, and even dive into more advanced topics such as working with Tasks/Async and GenServers. By the end of this book, we'll have a strong grasp of all the core fundamentals of the Phoenix framework, and we'll have built a full production-ready web application from nothing!

Who this book is for

This is for people who have started messing around with Elixir and have enjoyed what they've seen! We'll take those skills and apply them to building a full web application. If you have some knowledge of Elixir and have experience with other web frameworks in other languages and want to see what it's like to build a web application where concurrency and performance are first-class citizens, you're in the right place!

What this book covers

Chapter 1, A Brief Introduction to Elixir and Phoenix, goes over the basics of developing in Elixir and Phoenix and makes the readers understand some of the basic constructs available.

Chapter 2, Building Controllers, Views, and Templates, covers working with the fundamentals of every Phoenix application.

Chapter 3, Storing and Retrieving Vote Data with Ecto Pages, discusses working with data in our database.

Chapter 4, Introducing User Accounts and Sessions, begins to introduce the concept of Users into our system and introduces working with login, logout, and session management.

Chapter 5, Validations, Errors, and Tying Loose Ends, explores working on tightening up our application through validation, error-handling, and general tweaks.

Chapter 6, Live Voting with Phoenix, starts building out a real-time application with Phoenix and JavaScript.

Chapter 7, Improving Our Application and Adding Features, continues to build upon the solid foundation of our application and brings it closer to production-ready.

Chapter 8, Adding Chat to Your Phoenix Application, adds even more real-time feature support.

Chapter 9, Using Presence and ETS in Phoenix, teaches readers to use Phoenix's new Presence support to keep track of what users are logged in or logged out of our system.

Chapter 10, Working with Elixir's Concurrency Model, takes readers through how Elixir handles concurrency implementations at a deeper level.

Chapter 11, Implementing OAuth in Our Application, implements a new way for users to sign in with providers such as Twitter and Google.

Chapter 12, Building an API and Deploying, outlines finishing reading our application, adding an API to interact with our application, and finally finishing deploying our application to production.

To get the most out of this book

  1. Readers should already have at least a basic understanding of the Elixir programming language and some beginner-level knowledge of common web development terms and techniques
  2. You will also need an internet-capable programming environment where you can install required software such as Elixir, Phoenix, Node.js, and Postgres

Download the example code files

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

You can download the code files by following these steps:

  1. Log in or register at www.packtpub.com.
  2. Select the SUPPORT tab.
  3. Click on Code Downloads & Errata.
  4. Enter the name of the book in the Search box and follow the onscreen instructions.

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 athttps://github.com/PacktPublishing/Phoenix-Web-Development. In case there's an update to the code, it will be updated on the existing GitHub repository.

We also have other code bundles from our rich catalog of books and videos available athttps://github.com/PacktPublishing/. Check them out!

Conventions used

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "Let's use String.Chars as an example, where we'll call the h helper on String.Chars to learn more about the module from its documentation."

A block of code is set as follows:

person = %{ name: "Brandon" }
person = %{ name: "Richey" }

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

iex(1)> greeting = "Hello There"
"Hello There"

Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "Select System info from the Administration panel."

Note

Warnings or important notes appear like this.

Note

Tips and tricks appear like this.

Get in touch

Feedback from our readers is always welcome.

General feedback: Email [email protected] and mention the book title in the subject of your message. If you have questions about any aspect of this book, please email us at [email protected].

Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details.

Piracy: If you come across any illegal copies of our works in any form on the Internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.

If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.

Reviews

Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make purchase decisions, we at Packt can understand what you think about our products, and our authors can see your feedback on their book. Thank you!

For more information about Packt, please visit packtpub.com.

 

 

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 £13.99/month. Cancel anytime
Visually different images