The number of IoT developers continues to grow and a market growth rate of 10% per year is expected until 2030. Within the IoT industry, several programming languages are popular. This is particularly the case for 6 of them: Java, C, Python JavaScript, Swift and Php.
Java
Java is a language that has multiple benefits for IoT development . This is mainly used for the development of set-top boxes, which is one of the first areas of non-desktop computing.
The advantages of Java are well known: developers can debug their code from their desktop and then move it to any chip with a Java Virtual Machine. The code can therefore work not only on servers and smartphones, but also on smaller machines.
Java SE Embedded allows this code to be sent to very small machines and offers more possibilities than did Java ME. Developers can use the latest features of the Java 8 platform to send their code to very small embedded cards.
Several open source projects like Pi4J and BlueJ show that the embedded version of Java works very well, including on chips that seem limited.
VS
Despite a sometimes indigestible syntax and a million possibilities to make mistakes, the C language is still the first choice of many low level developers, especially for those who already have some hardware experience. The language makes it possible to carry out very numerous tests by modifying such or such part of the code to obtain the best possible performance from a weak device. Each bit can be reversed, and each value in the stack is available. It is however preferable not to make too many errors, because the C language does not offer many safety nets.
For many CTOs, C remains a preferred language for resource-constrained devices , such as a basic task scheduler also coded in C.
More advanced or larger devices also use the C language, but Java is increasingly preferred in this type of case.
On the smartphone side, part of the programming is still delivered in Objective C, but Swift is on the way to exceeding its popularity.
Python
Python has been gaining momentum for two years and is at the top of the general classification of programming languages 2018 of the IEE. For small devices with enough memory and computing power, developers are free to choose the language that will make their life easier, and it turns out that Python is becoming more and more of a frequent choice.
Both easy to learn and supported by a large community , Python is particularly practical for IoT development. Its syntax is clear and simple, and attracts more and more developers. Python is the ideal language for the most popular microcontrollers on the market, Raspberry Pi. Much of the documentation is written in Python, and many schools use the platform to teach computer programming. If the project is relatively simple and does not require great power, it is quite possible to develop effective tools from the same libraries as those used in school.
Some versions are also designed for smaller devices, such as MicroPython, a small microcontroller optimized to run Python in bare metal and offers a low-level operating system to control all kinds of electronic projects.
JavaScript
Surprisingly enough, JavaScript is quite popular for IoT application development. Most developers use Node.Js and focus their work on servers and gateways or hubs collecting and storing information . Smaller hubs and sensors running on Linux can usually run on Node.JS.
But even if most of the Node.JS code works on larger machines, several efforts are made to allow it to work on smaller devices. From small microcontrollers like Tessel or Espruino can execute JavaScript, which allows some developers to make IoT without having to learn a new language.
Swift
Swift is becoming more and more popular and is gradually overtaking Objective C in the development of iOS and macOS applications. Given the preponderance of these devices on the market, it makes sense that this language is often part of the IoT stack. To interconnect an object with an iPhone or iPad, the application will probably be coded in Swift.
Apple intends to make its iOS devices the center of the connected home of the future, so that the company has created numerous booksellers and an infrastructure considerably facilitating the handling of development. Apple’s HomeKit platform provides support for integrating data flows from a network of compatible objects. It is therefore possible to focus on the details and delegate the supervision of the integration to HomeKit.
PHP
If we understand that the popularity of Php resists the weight of years on the web, we can wonder about the reasons for its popularity for IoT development. Php is however an ideal server language for managing microservices. But the language also shows an important interest at low level. Several Raspberry Pi developers are considering setting up a complete LAMP stack with Apache, MySQL and Php running on Linux, and are paradigm shifting by transforming the lowest level of the Internet into a full-fledged web server.
When a Raspberry Pi has enough cycles, setting up a LAMP stack on the chip facilitates development. All the code developed on the server side over the past 20 years can then be sent to a small sensor. Not very orthodox, but visibly effective, so why deprive yourself of it?
Comments are closed.