Why consider Go for building a software product?
Tags: go, iot, startup
Published: 2019-12-04 13:33:05

Why more and more businesses are starting to use Google Go, an open-source programming language, as an alternative to Java and Python? Not surprising. With its promise of agility, simplicity, and speed, Golang seems to have become one of the most powerful rivals to much older and common languages.

<h2>What is Go?</h2> 

Google’s Go language was created 10 years ago as an experimental project. In 2009, two years later, it was introduced to the public. Short time after, the C-based programming language started gaining enormous popularity among web app development companies. The language founders claim to be driven by the idea of creating a “fast, productive and, most importantly, fun” programming language.

Go is a <b> free, open-source general-purpose programming language </b> created to be strongly typed and garbage-collected. Go programs are built from packages whose features allow effective dependencies management. The platform is growing in prominence, being perfected and acquiring new, extended features. Golang was designed to be a language that encourages good software engineering practices:

‘Go combines the development speed of working in a dynamic language like Python with the performance and safety of a compiled language like C or C+. Typical builds feel instantaneous; even large binaries compile in just a few seconds. And the compiled code runs close to the speed of C,’ Google said when Go was firstly launched.

However, Go is not a free-form programming language, as it specifies a lot of formatting details, such as the way spaces and indentation are to be used. The grammar is compact and regular, which allows for smooth analysis by automatic tools, such as integrated development environments.

<h2>What is Go good for?</h2> 

Go is a great programming language that is widely applicable. It fits all-sized software projects with any level of complexity. It is simple, features minimalistic language, and maintainable code.

- Go is really good for writing <b>networking apps and Web servers</b>. The strength is in its well-written and powerful standard library.
- Go is very good for <b>stand-alone command-line applications or scripts</b>. The successive behavior across platforms allows putting out simple command-line applications that can run almost on any platform.
- Go is a great choice for concurrency. Its <b>concurrency model</b> takes from communicating sequential processes.

Networking apps are basically built on concurrency, and Golang’s native features (e.g. goroutines and channels) are perfectly fitted for this job. This makes Go programming language well-suited for minimal frameworks for Web app development, APIs, Web servers, etc. Golang developers prefer this language because most of the items (like goroutines) can be easily used and are available in its <a href="https://golang.org/pkg/net/http/">standard library</a>.

<img src="https://blog.vakoms.com/wp-content/uploads/2017/08/picture-1.png" width="800" height="350">

There is also an issue of latency with garbage collection. Google’s language is claimed to be completely garbage-collected and provides fundamental support for concurrent execution and communication. This is highly important, considering the fact that some of the above mentioned fundamental concepts are not well supported by the majority of popular programming languages.

There are situations, though, when <b>Go is not that good:</b>

- Go is somehow applicable for <b>writing system code</b>. Although it may be not the best option for writing system code, Go allows for the integration of  C code, which goes quite well.
- You’d better not use it for <a href="https://vakoms.com/services/desktop">desktop or GUI-based application development</a>. Building rich GUIs for Go apps is still not that well-managed.
- Although Golang is able to talk to native system functions, this language is not suited well for creating <b>low-level system components</b>, e.g. device drivers or the embedded system design.

<h2>Google’s Go wider adoption</h2>

A great number of major organizations, such as BBC Worldwide and The New York Times, are now using Go programming language for their internal purposes. Alongside large web-companies like Dropbox, Facebook, SoundCloud, and, of course, Google, you can find numerous smaller companies using Golang in their operations.

According to the Tiobe Index research that measures the popularity of languages amongst developers, Google’s Go has been nominated for the programming language of the year. From the 55th position in July 2016 Go moved up to the Top 10 in 2017. For now it is placed 20th in the Tiobe list. 

Rather than recognizing the most popular programing language, Tiobe Index gave the award to the one that has seen the hottest growth in popularity, with many wanting to learn it. The ratings are based on the major searches on Google, Yahoo, Wikipedia, Bing, Amazon, YouTube, and Baidu. According to the research, Golang has been the greatest mover over the last year with hardly any competition.

<h2>Case study: How fuboTV has built a XXI Century Video Streaming Service using Go</h2>

…or how a small U.S. company has turned into a multi-million dollar service

In 2014, initially a small U.S.-based company fuboTV started its cooperation with Vakoms, a web app development company (Ukraine). With an ambitious idea of becoming a nationwide football streaming service, fuboTV aimed to provide access to worldwide football leagues and matches through apps for smart TVs, tablets, mobile devices, and desktop computers.

In 2014, initially a small U.S.-based company <a href="https://en.wikipedia.org/wiki/FuboTV">fuboTV</a> started its cooperation with Vakoms, a web app development company(Ukraine). With an ambitious idea of becoming a nationwide football streaming service, fuboTV aimed to provide access to worldwide football leagues and matches through apps for smart TVs, tablets, mobile devices, and desktop computers.

‘Each microservice solves its own task, e.g. listing, searching, filtration, providing information about a channel, playing video, etc. Thanks to a new structure based on Golang programming language by Google, the rewritten back-end increased safety, development, and data processing speed.’ <i> – Vitaliy Kudryk, web developer Go and Node.js engineer at Vakoms, Go engineer at fuboTV, web developer at Vakoms.</i> 

Initially, having developed the back end with Node.js, the company then decided to upgrade it, splitting it into separate microservices, coded on Go.

‘Most of all, I like Go’s simplicity and fast development pace. You can develop an app in a short term, and this app will be extremely fast in work.’<i> – Vitaliy Kudryk, Go engineer at fuboTV, web developer at Vakoms.</i>

<h2>Golang’s Benefits and Drawbacks</h2>

Computers have become enormously quicker over the last decade; however, no major systems language has emerged in the tech world over that time. The Golang community explains the main drawbacks of some popular languages of these days.

Dependency management is the biggest piece of the pie when it comes to today’s software and web development. In most languages, ‘the ‘header files’ are antithetical to clean dependency analysis and fast compilation,’ says the community. ‘There is a growing rebellion against cumbersome type systems like those of Java and C++, pushing people towards dynamically typed languages such as Python and JavaScript.’ Source Google FAQs.

What Google believes is that all of these drawbacks are worth trying to be cured again with a new, concurrent, promptly compilated and garbage-collected language.

Web app development with Go has a lot of <b>Benefits:</b>

- You can compile a huge program in a couple of seconds on a single computer
- Software construction model provides easy dependency analysis
- The type system has no hierarchy, which fastens the workflow
- Go provides basic support for concurrent execution and communication
- The language is completely garbage-collected
- The system software construction is available on multicore machines?

‘There is a compiler for many various systems, which means Go app can be used not only via mobile devices and laptops with OS installed, but also through smaller devices like coffee machines (Internet of Things).’<i> – Vitaliy Kudryk, Go and Node.js engineer at Vakoms.</i> 

On the other hand, there are still <b>Drawbacks</b> worth mentioning:

- Go still has a very young ecosystem
- There aren’t many libraries for Go yet
- It is hard to handle errors
- A lot of Go’s tools are quite limited when used
- Golang still has low-level features (e.g. pointer-arithmetic)
- It is simple to the point of being superficial

“The main drawbacks can be found in the actual realization of the language. Some things make routine tasks more complicated. Eventually, you get used to it, but anyway it adds “boilerplate” to the code.” <i> – Vitaliy Kudryk, Go and Node.js engineer at Vakoms.</i> 

Go is a new language that doesn’t borrow from existing programming languages like C# and Java. Most of <a href="https://vakoms.com/">Golang development companies</a>, when looking a bit deeper into its design and type system, admit Go’s simple and minimalistic approach. Although it comes with very limited features, it does not hurt your code reusability and general productivity.