Hands-On Full Stack Development with Go : Build Full Stack Web Applications with Go, React, Gin, and GopherJS.
Go programming has been rapidly adopted by developers for building web applications. With its ecosystem growing in size and its stable architecture, Go offers a library for building scalable and high-performant web services and apps. Hands-On Full Stack Development with Go is a comprehensive guide t...
Clasificación: | Libro Electrónico |
---|---|
Autor principal: | |
Formato: | Electrónico eBook |
Idioma: | Inglés |
Publicado: |
Birmingham :
Packt Publishing Ltd,
2019.
|
Temas: | |
Acceso en línea: | Texto completo |
Tabla de Contenidos:
- Cover; Title Page; Copyright and Credits; Dedication; About Packt; Contributors; Table of Contents; Preface; Section 1: The Go Language; Chapter 1: Welcome to Full Stack Go; What is full stack development?; What will we build?; The application architecture; The outline of this book; Chapter 2: Building Blocks of the Go Language; Technical requirements; Go's playground; Setting up Go's workspace; Packages, variables, data types, and pointers; Packages; Variables and data types; Pointers; Functions and closures; Functions
- the basics; Functions
- accessing functions from other packages
- ClosuresGo data structures; Arrays; Slices; Maps; Struct; Methods; Type embedding; Interfaces; Conditional statements and loops; The if statement; The switch statement; Loops; Panics, recovers, and defers; Summary; Questions; Further reading; Chapter 3: Go Concurrency; What is concurrency?; Goroutines; Go channels; Regular channels; Buffered channels; The select statement; The sync package; The simple mutex; The read-write mutex; Wait groups; Summary; Questions; Further reading; Section 2: The Frontend; Chapter 4: Frontend with React.js; Prerequisites and technical requirements
- The GoMusic projectNode.js and the npm; HTML, CSS, and Bootstrap; Project code; The React framework; How to construct React applications; Setting up the project; Installing React; Preparing the new project; JSX and React elements; React components; React application design; Props; State; Initializing the state object; Setting our state; Developer tools; Summary; Questions; Further reading; Chapter 5: Building a Frontend for GoMusic; Prerequisites and technical requirements; Building GoMusic; Main pages; The navigational menu; The Products and Promotions pages; The About page
- Modal dialog windows and handling credit cardsThe Buy Item modal window outline; Credit card handling with React and Stripe; Creating a child React component to host Stripe elements; Making use of Stripe elements to handle credit card information; Submitting a credit card token to the backend; Creating a parent StripeProvider component; The Sign in and Register modal windows; Handling forms in the React framework; The Sign in page; The Registration form; User pages; The orders page; The user page navigational menu; Putting it all together
- routes; Summary; Questions; Further reading
- Section 3: Web APIs and Middleware in GoChapter 6: RESTful Web APIs in Go with the Gin Framework; Technical requirements; RESTful APIs; Overview; The client-server architecture; URLs; HTTP methods; The Gin framework; Models and the database layer; Models; The database layer interface; Implementing RESTful APIs using the Gin framework; Defining routes; Creating handlers; Getting a full list of available products; Getting a list of promotions; Sign in new users or add new users; Sign out requests; Getting orders for a specific user; Charging a credit card; Putting it all together; Summary