{"id":1832,"date":"2018-08-31T00:55:25","date_gmt":"2018-08-30T16:55:25","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/iotdev\/?p=1832"},"modified":"2019-03-14T13:45:15","modified_gmt":"2019-03-14T05:45:15","slug":"azure-iot-toolkit-supports-c-go-java-node-js-php-python-and-ruby-to-develop-azure-iot-application-in-vs-code","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/iotdev\/azure-iot-toolkit-supports-c-go-java-node-js-php-python-and-ruby-to-develop-azure-iot-application-in-vs-code\/","title":{"rendered":"Azure IoT Toolkit supports C#, Go, Java, Node.js, PHP, Python and Ruby to develop Azure IoT application in VS Code"},"content":{"rendered":"<p>With the latest release of <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=vsciot-vscode.azure-iot-toolkit\">Azure IoT Toolkit<\/a>, lots of popular languages are supported to quickly create an Azure IoT application in VS Code: C#, Go, Java, Node.js, PHP, Python and Ruby! (Note: For C#, Java, Node.js and Python, it is based on Azure IoT Hub SDK, while for Go, PHP and Ruby, it is based on Azure IoT Hub REST API.) What&#8217;s your favorite programing language? Which language would you like to develop an Azure IoT application?<\/p>\n<p>For scripting languages (Go, Node.js, PHP, Python and Ruby), the steps are pretty easy, you could follow this <a href=\"https:\/\/blogs.msdn.microsoft.com\/iotdev\/2018\/08\/08\/quickly-build-your-azure-iot-application-in-vs-code-with-node-js-python-or-rest-api\/\">blog post<\/a> to quickly make that.<\/p>\n<p>For compiled language (C# and Java), there is one more step compared with the scripting languages, but it is still easy. Let&#8217;s see how easy it is to create a Java application for Azure IoT Hub in VS Code.<\/p>\n<h2>Prerequisites<\/h2>\n<ul>\n<li>If you do not have an IoT Hub, you could follow our <a href=\"https:\/\/github.com\/Microsoft\/vscode-azure-iot-toolkit\/wiki\/Quickstart-Node.js#create-an-iot-hub\">tutorial<\/a> to create IoT Hub and device.<\/li>\n<li><span><a target=\"_blank\" href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=vsciot-vscode.azure-iot-toolkit\" rel=\"noopener\">Azure IoT Toolkit extension<\/a><\/span> to help you do all the things when develop with Azure IoT Hub.<\/li>\n<li><span><\/span><a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=vscjava.vscode-java-pack\">Java Extension Pack<\/a><\/li>\n<\/ul>\n<h2>Generate Code<\/h2>\n<ol>\n<li>Right-click your device and select<span> <\/span><strong>Generate Code <\/strong>to monitor the <span>device-to-cloud message<\/span><strong>\n<\/strong><\/li>\n<li>In<span> language list, select <strong>Java<\/strong>\n<\/span><\/li>\n<li>In code template list, select <strong>Send device-to-cloud message<\/strong><\/li>\n<li>In pop-up file dialog, select the folder for your Java application<\/li>\n<li>A new VS Code window will open<\/li>\n<\/ol>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-1775\" alt=\"\" src=\"https:\/\/devblogs.microsoft.com\/iotdev\/wp-content\/uploads\/sites\/24\/2018\/09\/code-generation-java.gif\" width=\"1366\" height=\"887\" \/><\/p>\n<h2>Run Code<\/h2>\n<ol>\n<li>Open Integrated Terminal of VS Code<\/li>\n<li>Run <strong>mvn clean package<\/strong> to install the required libraries and build the simulated device application<\/li>\n<li>Run <strong>java -jar target\/simulated-device-1.0.0-with-deps.jar<\/strong> to run the simulated device application<\/li>\n<li>You will see the Java application is running. It is sending the simulated device data to IoT Hub every second.<\/li>\n<li>If you want to monitor the <span>device-to-cloud<\/span> message in VS Code, you could refer to our <a href=\"https:\/\/github.com\/Microsoft\/vscode-azure-iot-toolkit\/wiki\/Monitor-IoT-Hub-D2C-Message\">Wiki page<\/a>.<\/li>\n<\/ol>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-1795\" alt=\"\" src=\"https:\/\/devblogs.microsoft.com\/iotdev\/wp-content\/uploads\/sites\/24\/2018\/09\/Capture-1.png\" width=\"1372\" height=\"886\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>If your preferred language is not supported yet, no worry! You could just submit your <a href=\"https:\/\/github.com\/microsoft\/vscode-azure-iot-toolkit\/issues\">request<\/a> in GitHub, or use the REST API to build your application. Let us know what languages you want! Feel free to leave your feedback or suggestion in our <a href=\"https:\/\/github.com\/Microsoft\/vscode-azure-iot-toolkit\/issues\/118\">GitHub issue<\/a> !<\/p>\n<p><strong>Useful Resources:<\/strong><\/p>\n<ul>\n<li><a href=\"https:\/\/channel9.msdn.com\/Shows\/Internet-of-Things-Show\/Azure-IoT-Toolkit-extension-for-Visual-Studio-Code\" rel=\"nofollow\">Channel 9 video: Walkthrough of Azure IoT Toolkit extension<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/iot-hub\/iot-hub-create-use-iot-toolkit\" rel=\"nofollow\">Create an IoT hub using the Azure IoT Toolkit for Visual Studio Code<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/iot-hub\/iot-hub-vscode-iot-toolkit-cloud-device-messaging\" rel=\"nofollow\">Use Azure IoT Toolkit to send and receive messages between your device and IoT Hub<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/iot-hub\/iot-hub-device-management-iot-toolkit\" rel=\"nofollow\">Use Azure IoT Toolkit for Azure IoT Hub device management<\/a><\/li>\n<li><a href=\"https:\/\/blogs.msdn.microsoft.com\/iotdev\/2018\/07\/12\/use-vs-code-as-iot-hub-device-simulator-say-hello-to-azure-iot-hub-in-5-minutes\/\" rel=\"nofollow\">Use VS Code as IoT Hub Device Simulator<\/a><\/li>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/iotdev\/call-azure-iot-hub-rest-apis-in-vs-code\/\" rel=\"nofollow\">Use VS Code to call Azure IoT Hub REST APIs<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/Microsoft\/vscode-azure-iot-toolkit\/wiki\/Quickstart-Node.js\">Create and control an IoT device connected to an IoT hub (Node.js)<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/Microsoft\/vscode-azure-iot-toolkit\/wiki\/Quickstart-.NET\">Create and control an IoT device connected to an IoT hub (.NET)<\/a><\/li>\n<li><a href=\"https:\/\/blogs.msdn.microsoft.com\/iotdev\/2017\/09\/01\/handy-tool-when-you-develop-with-azure-iot\/\" rel=\"nofollow\">Handy Tool When You Develop With Azure IoT<\/a><\/li>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/iotdev\/azure-iot-toolkit-for-visual-studio-code-generally-available-for-managing-azure-iot-hub-and-devices-with-ease\/\" rel=\"nofollow\">Azure IoT Toolkit for Visual Studio Code generally available for managing Azure IoT Hub and Devices with ease<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>With the latest release of Azure IoT Toolkit, lots of popular languages are supported to quickly create an Azure IoT application in VS Code: C#, Go, Java, Node.js, PHP, Python and Ruby! (Note: For C#, Java, Node.js and Python, it is based on Azure IoT Hub SDK, while for Go, PHP and Ruby, it is [&hellip;]<\/p>\n","protected":false},"author":672,"featured_media":1836,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[290,1],"tags":[5,6,7,16,17,19],"class_list":["post-1832","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure-iot-hub","category-iot-dev","tag-azure","tag-azure-iot","tag-azure-iot-hub","tag-internet-of-things","tag-iot","tag-iot-development-tools"],"acf":[],"blog_post_summary":"<p>With the latest release of Azure IoT Toolkit, lots of popular languages are supported to quickly create an Azure IoT application in VS Code: C#, Go, Java, Node.js, PHP, Python and Ruby! (Note: For C#, Java, Node.js and Python, it is based on Azure IoT Hub SDK, while for Go, PHP and Ruby, it is [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/iotdev\/wp-json\/wp\/v2\/posts\/1832","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/iotdev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/iotdev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/iotdev\/wp-json\/wp\/v2\/users\/672"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/iotdev\/wp-json\/wp\/v2\/comments?post=1832"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/iotdev\/wp-json\/wp\/v2\/posts\/1832\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/iotdev\/wp-json\/wp\/v2\/media\/1836"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/iotdev\/wp-json\/wp\/v2\/media?parent=1832"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/iotdev\/wp-json\/wp\/v2\/categories?post=1832"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/iotdev\/wp-json\/wp\/v2\/tags?post=1832"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}