
Go: Building Web Applications
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
All prices
More details
Persons
Nathan Kozyra is a seasoned web developer, with nearly two decades of professional software development experience. Since Go's initial release, he has been drawn to the language for its power, elegance, and usability. He has a strong interest in web development, music production, and machine learning. He is married and has a two-year-old son.Ryer Mat :
Mat Ryer has been programming computers since he was 6 years old; he and his father would build games and programs, first in BASIC on a ZX Spectrum and then in AmigaBASIC and AMOS on Commodore Amiga. Many hours were spent on manually copying the code from Amiga Format magazine and tweaking variables or moving GOTO statements around to see what might happen. The same spirit of exploration and obsession with programming led Mat to start work with a local agency in Mansfield, England, when he was 18, where he started to build websites and services. In 2006, Mat left rural Nottinghamshire for London, where he took a job at BT. It was here that he worked with a talented group of developers and managers on honing his agile development skills and developing the light flavor that he still uses today. After being contracted around London for a few years, coding everything from C# and Objective-C to Ruby and JavaScript, Mat noticed a new systems language called Go that Google was pioneering. Since it addressed very pertinent and relevant modern technical challenges, Mat started using it to solve problems while the language was still in the beta stage and he has used it ever since. In 2012, Mat moved to Boulder, Colorado, where he worked on a variety of projects, from big data web services and highly available systems to small side projects and charitable endeavors. He returned home, to London, in 2015 after the company he was working in was sold. Mat, to this day, continues to use Go to build a variety of products, services, and open-source projects. He writes articles about Go on his blog at matryer.com and tweets about Go with the handle @matryer. Mat is a regular speaker at Go conferences around the world and encourages people to come up and introduce themselves if their paths ever cross.
Content
- Cover
- Copyright
- Credits
- Preface
- Table of Content
- Module 1: Learning Go Web Development
- Chapter 1: Introducing and Setting Up Go
- Installing Go
- Structuring a project
- Importing packages
- Introducing the net package
- Hello, Web
- Summary
- Chapter 2: Serving and Routing
- Serving files directly
- Basic routing
- Using more complex routing with Gorilla
- Redirecting requests
- Serving basic errors
- Summary
- Chapter 3: Connecting to Data
- Connecting to a database
- Using GUID for prettier URLs
- Handling 404s
- Summary
- Chapter 4: Using Templates
- Introducing templates, context, and visibility
- HTML templates and text templates
- Displaying variables and security
- Using logic and control structures
- Summary
- Chapter 5: Frontend Integration with RESTful APIs
- Setting up the basic API endpoint
- RESTful architecture and best practices
- Creating our first API endpoint
- Implementing security
- Creating data with POST
- Modifying data with PUT
- Summary
- Chapter 6: Sessions and Cookies
- Setting cookies
- Capturing user information
- Initiating a server-side session
- Summary
- Chapter 7: Microservices and Communication
- Introducing the microservice approach
- Pros and cons of utilizing microservices
- Understanding the heart of microservices
- Communicating between microservices
- Putting a message on the wire
- Reading from another service
- Summary
- Chapter 8: Logging and Testing
- Introducing logging in Go
- Logging to IO
- Formatting your output
- Using panics and fatal errors
- Introducing testing in Go
- Summary
- Chapter 9: Security
- HTTPS everywhere - implementing TLS
- Preventing SQL injection
- Protecting against XSS
- Preventing cross-site request forgery (CSRF)
- Securing cookies
- Using the secure middleware
- Summary
- Chapter 10: Caching, Proxies and Improved Performance
- Identifying bottlenecks
- Implementing reverse proxies
- Implementing caching strategies
- Implementing HTTP/2
- Summary
- Module 2: Go Programming Blueprints
- Chapter 1: Chat Application with Web Sockets
- A simple web server
- Modeling a chat room and clients on the server
- Building an HTML and JavaScript chat client
- Tracing code to get a look under the hood
- Summary
- Chapter 2: Adding Authentication
- Handlers all the way down
- Making a pretty social sign-in page
- Endpoints with dynamic paths
- OAuth2
- Tell the authentication providers about your app
- Implementing external logging in
- Summary
- Chapter 3: Three Ways to Implement Profile Pictures
- Avatars from the authentication server
- Implementing Gravatar
- Uploading an avatar picture
- Combining all three implementations
- Summary
- Chapter 4: Command-line Tools to Find Domain Names
- Pipe design for command-line tools
- Five simple programs
- Composing all five programs
- Summary
- Chapter 5: Building Distributed Systems and Working with Flexible Data
- System design
- Installing the environment
- Votes from Twitter
- Counting votes
- Running our solution
- Summary
- Chapter 6: Exposing Data and Functionality through a RESTful Data Web Service API
- RESTful API design
- Sharing data between handlers
- Wrapping handler functions
- Responding
- Understanding the request
- A simple main function to serve our API
- Handling endpoints
- A web client that consumes the API
- Running the solution
- Summary
- Chapter 7: Random Recommendations Web Service
- Project overview
- Representing data in code
- Generating random recommendations
- Summary
- Chapter 8: Filesystem Backup
- Solution design
- Backup package
- The user command-line tool
- The daemon backup tool
- Testing our solution
- Summary
- Module 3: Mastering Concurrency in Go
- Chapter 1: An Introduction to Concurrency in Go
- Introducing goroutines
- Implementing the defer control mechanism
- Understanding goroutines versus coroutines
- Implementing channels
- Closures and goroutines
- Building a web spider using goroutines and channels
- Summary
- Chapter 2: Understanding the Concurrency Model
- Understanding the working of goroutines
- Synchronous versus asynchronous goroutines
- Visualizing concurrency
- RSS in action
- A little bit about CSP
- Go and the actor model
- Object orientation
- Using concurrency
- Managing threads
- Using sync and mutexes to lock data
- Summary
- Chapter 3: Developing a Concurrent Strategy
- Applying efficiency in complex concurrency
- Identifying race conditions with race detection
- Synchronizing our concurrent operations
- The project - multiuser appointment calendar
- A multiuser Appointments Calendar
- A note on style
- A note on immutability
- Summary
- Chapter 4: Data Integrity in an Application
- Getting deeper with mutexes and sync
- The cost of goroutines
- Working with files
- Getting low - implementing C
- Distributed Go
- Some common consistency models
- Using memcached
- Summary
- Chapter 5: Locks, Blocks, and Better Channels
- Understanding blocking methods in Go
- Cleaning up goroutines
- Creating channels of channels
- Pprof - yet another awesome tool
- Handling deadlocks and errors
- Summary
- Chapter 6: C10K - A Non-blocking Web Server in Go
- Attacking the C10K problem
- Building our C10K web server
- Serving pages
- Multithreading and leveraging multiple cores
- Exploring our web server
- Summary
- Chapter 7: Performance and Scalability
- High performance in Go
- Using the App Engine
- Distributed Go
- Some helpful libraries
- Memory preservation
- Summary
- Chapter 8: Concurrent Application Architecture
- Designing our concurrent application
- Identifying our requirements
- Using NoSQL as a data store in Go
- Monitoring filesystem changes
- Managing logfiles
- Handling configuration files
- Detecting file changes
- Backing up our files
- Designing our web interface
- Reverting a file's history - command line
- Checking the health of our server
- Summary
- Chapter 9: Logging and Testing Concurrency in Go
- Handling errors and logging
- Using the log4go package for robust logging
- Using the runtime package for granular stack traces
- Summary
- Chapter 10: Advanced Concurrency and Best Practices
- Going beyond the basics with channels
- Building workers
- Implementing nil channel blocks
- Implementing more granular control over goroutines with tomb
- Timing out with channels
- Building a load balancer with concurrent patterns
- Choosing unidirectional and bidirectional channels
- Using an indeterminate channel type
- Using Go with unit testing
- Using Google App Engine
- Utilizing best practices
- Summary
- Bibliography
System requirements
File format: ePUB
Copy protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePub works well for novels and non-fiction books – i.e., „flowing” text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our ebook Help page.
File format: PDF
Copy-Protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (only limited: Kindle).
The file format PDF always displays a book page identically on any hardware. This makes PDF suitable for complex layouts such as those used in textbooks and reference books (images, tables, columns, footnotes). Unfortunately, on the small screens of e-readers or smartphones, PDFs are rather annoying, requiring too much scrolling.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our eBook Help page.