The time of the Golang for iOS app has arrived

The GopherCon 2015 event for the Go programming language gave a clear statement: Go is a full-stack language for mobile apps.

From Go 1.5, Go libraries can be used in both Android and iOS apps, opening up a new development perspective in the mobile industry when you have a modern and compact language that can program both webservices as well. as client-side elements.

With Go, you will be able to write the entire client data layer (network calls, data processing, data catching), and use as a library for both Android and iOS versions of the app, while still having time to write Native user interface using Java (for Android) and Swift (for iOS). This simplifies many ways to program native mobile apps, because mobile devs only need to focus on native interfaces while client / server communication and data models can be written entirely by Go.

What is Go?

Go (also known as GoLang) is an open source programming language Google launched in 2007 with three language programming experts working together: Ken Thompson, Rob Pike, Robert Griesemer. The first two were the founders of the Unix operating system.

Go is a static language, ie type checking will be done while compilation (such as C, Java, Scala, Pascal) not at runtime (like Javascript, PHP, Python, Ruby). The project was released to the public in November 2009, and version 1.0 was released in March 2012.

Go Mobile revolution

Go's most interesting revolution is that it officially joins the mobile industry as a client language for mobile apps. Starting as an experimental module, since version 1.5, dev has been able to code Go in both Android and iOS apps .

This opens the Go scenario – which is the ideal language for webservices that will gradually become a full-stack language for mobile apps. According to Hana Kim – a Google employee and a member of Go team, the Go team is developing 2 options:

  • Mobile app is written completely by Go
  • Mobile app includes the Go client library

The first option is quite interesting for game apps. Here, the user interface is exclusive and does not need native Android or iOS components. In contrast, the second option is a completely new development, allowing the reuse of the shared lib for shared Android and iOS native apps, simplifying many processes for developing multiple cross-platform with 1 delivery. native. Usually, the ideal component for Go programming is data layer – data layer: network calls, data processing, data catching. It allows the client data layer to write only with Go and is shared as a library for both Android and iOS apps.

Thus, with the biggest advantage being the ability to reuse data structures for both client and server users, the entire client / server interface can be written in the only language, Go. Programming in Native language (Java – Android and Swift – iOS ) becomes data-agnostic and links to the Go client library to retrieve all the data it needs. Go libs will determine where to get the data and whether to make a webservice call or use cached data. Now, mobile dev can focus on the completely native element: the user interface.

Currently, Go's documents are quite scarce, but David Crawshaw – the Go Mobile Project Manager, has promised to release complete documents to integrate Android and iOS.

You can discuss and share your own examples of the Go Mobile package with https://groups.google.com/forum/#!forum/go-mobile

ITZone via IDE Academy via Linked

Share the news now