Best 6 Programming Languages For IoT Projects

Every day, there are more devices everywhere connected to the Internet, waiting patiently for our commands. How can we order them around? Which language do they speak?

The simple answer is that “smart” things use many of the same languages as desktops, in part because their similarities with desktop computers continue to grow. “A Raspberry Pi is an actual computer now,” said Ian Skerrett, the vice president of marketing for the Eclipse Foundation.

It’s no surprise that what he calls an “actual computer” uses many of the same languages. In a survey of developers who write code for the Internet of Things (IoT) conducted in April 2016, the Eclipse Foundation discovered that Java, C, JavaScript, and Python were the top four choices for developers who are “building IoT solutions.”

That’s not much different from the top languages used for writing old desktop apps and servers. But while the simple answer is that smart things aren’t much different from desktops and servers, the complex answer is that there are important differences between all of the things that make up the IoT.

What we mean when we say ‘IoT devices’

Skerrett divides the IoT architectural environment into three major sections: the sensors that create the data, the hubs or local gateways that organize it, and the geographically distant, centralized servers that collect the data.

“If you’re writing for a sensor on bare metal, you’re probably using C,” said Skerrett. The ability to work directly with the RAM makes C one of the first choices of hardware developers.

The rest of the machines in the chain, though, are as familiar as desktop computers, from the developer’s perspective. Thus, developers are able to use the language that’s familiar to them.

The hubs may be a smartphone or a small console, but they are just general-purpose machines inside. They usually run a standard operating system and often feel no different from a big machine, at least when communicating via the command line.

Choosing a language for IoT

There’s no reason why they can’t choose the language in the same way they do for a desktop project. If a Raspberry Pi is running Linux, it’s behavior is not that different from a desktop.

By the time the debate on languages makes its way to the servers, there’s no difference there, either. They speak with the hubs and sensors—usually with some kind of microservice architecture—then the data is pushed into standard databases.

While the usual suspects of popular languages dominate the IoT space already, the Eclipse survey found at least 14 different languages that were mentioned by 5 percent or more of the developers.

“Our Internet of Things effort at Eclipse is polyglot,” said Skerrett. “It’s not one language.”

The Eclipse Project’s IoT open-source effort has been expanding, and there are now more than 20 different projects spanning millions of lines of code. Much is in Java, but there’s plenty in Python, JavaScript, C, and other important frameworks.

Here are some of the top choices that are being used to build the foundations of the next generation of things connected to the Internet.

1.Java

The top choice of the Eclipse survey and another survey by embedded-computing.com was Java, a result that’s not surprising for a language still known for being “write once, run anywhere.” The original project was aimed at set-top boxes, one of the first domains for non-desktop computing.

Java’s advantages are well known. Developers can create and debug code on their desktop and then move it to any chip with a Java Virtual Machine. That means the code can run not just on places where JVMs are common (servers and smartphones), but also on the smallest machines.

Prev1 of 3Next

Leave a Reply

Your email address will not be published. Required fields are marked *