Skip to content

Why another book for web development?

Suraj Patil edited this page May 14, 2016 · 2 revisions

This book aims to teach how to write web applications in Go to those who know a little bit of Go and are clueless about how to write web apps.

It was well over an year ago when I left the Django world and entered the world of Go. I wanted a simple yet fast language which would be fun to write web applications in. RoR/Django wasn't an option. Node is cool and now backed by The Linux Foundation, but I don't like the concept of write everything in Javascript. Node is making considerably progress in the DevOps area, node is the new Java!

I looked for alternatives over the web, luckily Google had faced the same problems well ahead of me, they had begun working on a language called Go, which would be their answer to Python + Java, initially it was meant for systems programming, but since it was compiled, easy to use, the language's users exploded. These days, it seems, everyone is re-writing everything in Go.

Learning the language wasn't difficult, I knew C,C++,Python and Java, so I picked up pretty quickly. But since I had zero experience in web development I had no idea how cookies work in the backend, how sessions are handled, what handlers are. There are a few books available out there, but they either give very high level introduction or they expect you to be a web dev ninja.

I wanted to learn web dev in Go, I referred to the two books, astaxie's and codegansta's. The books are great, but they weren't what I was looking for, I wanted a book which taught by practical examples and not threw at me some random high level examples. I wanted a book to grow up with me, so to speak while the journey of writing a webapp.

I started working on Tasks, because I sucked at todo lists and didn't learn anything fruitful in my life. I had multiple apps to do todo, but I stopped using an android phone and despite what they say, desktops aren't going anywhere for the next decade, so I started writing a todo list manager in Go, it was tough to understand how routing works, how handlers work, how to set cookies, how sessions work, what middlewares are. But I kept learning the only way I knew to be the best one, to implement the features, only when you implement the features do you realise what middlewares and cookies really are, until you do that, they are just mumbo-jumbo.

I used the same app to keep track of todos and as I learned new things I started writing that in my book. Astaxie's book is wonderful, I adapted the "Go tutorial" chapter from it. Everything else, I wrote from my small experience. I kept using the todo list manager I was writing to keep track of both, the book and the app itself. Otherwise what is the point of building a todo list manager?

Clone this wiki locally