Java, C and Python Among Most Popular IoT Programming Languages

essidsolutions

The Internet of Things is gaining momentum, spurred on by the promise of an improved 5G network and an increasingly connected society. For the six million developers working to develop devices to be integrated into the network, determining the programming language is vital.

Traditionally, hardware platforms drove the programming language for software applications, as they needed to communicate with the hardware itself. But platforms are not moving to open source standards, opening up the range of languages that can be used for the Internet of ThingsOpens a new window , or IoT devices.

And as hardware platforms – that is, the compatible hardware hosting a software application — moves to open source coding standards, this evolution has impacted programming language choices for the development of IoT devices.

“You’ll be able to choose from a language based on factors such as whether your enterprise dev team is already familiar with it, whether it works within the environment used by other components of the total IoT system, or whether it produces code that is smaller, more efficient, or more rapidly written than that of other options,” says Curtis FranklinOpens a new window at Information Week. “More modern platforms that are based on open source standards and able to support multiple languages make for much more flexibility and, therefore, more choices.”

Lingua Franca Yet To Be Determined

There are currently several popular programming languages: Java, C, JavaScript, Python and C++ are the most widely-used, according to an IoT Developer SurveyOpens a new window conducted by the Eclipse Foundation.

The debate about which language is the most applicable largely depends on the use. Preferences are determined by factors that include whether a device is generating the data, the gateway or hub organizing it, or the server that eventually collects the data.

For the development of devices, like a smart watch, Java is the most popular language, used by more than 65% of developers, largely because of its portability. Java was designed not to be dependent on specific hardware for compiling.

“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,” says TechBeacon writer Peter WaynerOpens a new window . “That means the code can run not just on places where JVMs are common (servers and smartphones), but also on the smallest machines.”

Javascript is likewise used by roughly 47% of developers for similar reasons. It is a scripting language, especially designed for communicating with other programming languages, and is most commonly used for building Web-fronted applications.

“One of the reasons we chose Javascript as a language to base everything on is it was never tied to any particular operating system or any chipsets, so it’s intrinsically portable,” says Peter HoddieOpens a new window , vice president of the Kinoma Software Team at Marvell Semiconductor.

Another popular language for coding is C, especially for smaller devices (also known as constrained devices as they are too small to have their own operating system). The value of C is that because the language is more transparent, it provides more programming flexibility to correct errors and utilize the computing power more efficiently, resulting in a big payoff in the functionality of a small device.

“The language hides nothing from you, and that means you can fiddle with every part of the code to squeeze out the best performance from an underpowered device,” Wayner says. “Every bit can be flipped. Every value on the stack is available.”

IoT OS Compatability Adds Weight to Choice

The related language C++ has the same advantage as C, but provides more options in manipulating data. It’s also highly compatible with Linux, the most popular operating system for IoT devices. “C++ kept the spare nature of C but added data abstraction, classes, and objects,” says Franklin. “All of these features make C++ a popular choice for those who are writing embedded and IoT code for Linux systems.”

For small devices with more computation power and memory, Python is a popular choice – used by about 46% of IoT developers, according to Eclipse. The advantage of Python is its ease of use and the community support for the language.

Then there are languages like Apple’s Swift, the primary language used for apps that interact with the iPhone or iPad. The level of support provided by Apple for this computing language means that there are plenty of resources for interested developers.

“Apple wants to make its iOS devices the center of the home network of sensors, so it’s been creating libraries and infrastructure that handle much of the work,” says Waynor of TechBeacon.

Other less-frequently used but languages still in play include PhP, C#, Assembler, Luo and Go, all of which may be employed depending on the need for certain benefits and on the use of the device.

The considerable range of languages is expected to continue as the level of device integration that the IoT offers continues, according to Fredric PaulOpens a new window of Network World: “IoT development is multilingual, and it’s likely to remain multilingual in the future.”