News

Azure Functions Improves TypeScript Support, Adds Java

Azure Functions, Microsoft's serverless computing experience in the cloud, now officially supports the Java programming language and has also made it easier to work with TypeScript.

Azure Functions, like AWS Lambda and Google Cloud Functions, is an event-driven serverless compute platform that lets developers provide code that gets executed -- typically in response to events or bindings -- without the need to provision or manage servers, which is done automatically in the cloud.

The Azure Functions Web site promises developers they can "Use the programming language of your choice," and those choices just expanded yesterday (Feb. 25) with the general availability of Java support in Azure Functions 2.0.

Java support for Azure Functions was earlier introduced in a preview, and since then the dev team has been improving that support by, for examples, boosting the authoring experience and hosting platform.

"With this release, Functions is now ready to support Java workloads in production, backed by our 99.95 percent SLA," said Asavari Tayal, program manager II, Azure Functions, in a blog post. "You can build your functions based on Java SE 8 LTS and the Functions 2.0 runtime, while being able to use the platform (Windows, Mac, or Linux) and tools of your choice. This enables a wide range of options for you to build and run your Java apps in the 50+ regions offered by Azure around the world."

Also yesterday, Microsoft announced improved TypeScript support. Previously, said Colby Tresness, another program manager, developers could work with Azure Functions in TypeScript (after all, Tresness said, Azure Functions runs another JavaScript-based technology, Node.js).

"However, the experience wasn't seamless, and things like our default folder structure made getting started a bit tricky," Tresness said. "Today we're pleased to announce a set of tooling improvements that improve this situation. Azure Functions users can now easily develop with TypeScript when building their event-driven applications!"

That set of tooling improvements affects Azure Functions Core Tools and the Azure Functions Extension for Visual Studio Code (preview) and consists of new templates for TypeScript, type definitions and npm scripts.

Here's a look at each:

  • Templates for TypeScript: When creating functions with the two tools mentioned above, developers can opt in to using TypeScript. That sets up the background machinery to set up TypeScript compatibility such that upon creating future functions, various TypeScript-specific function templates will be available. "Each template represents one possible trigger, and there is an equivalent present in TypeScript for each template supported in JavaScript."
  • Type definitions for Azure Functions: The @azure/functions package on npm contains type definitions for Azure Functions that provide information such as what an Azure Function object is shaped like or the context object that is passed into every JavaScript function.
  • Npm scripts: The TypeScript function apps now include a default package.json file containing some simple npm scripts that allow Azure Functions to fit directly into typical development workflows by calling specific Azure Functions Core Tools commands. "For instance, 'npm start' will automatically run 'func start,' meaning that after creating a function app you don't have to treat it differently than any other Node.js project."

Additional resources available include:

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Hands On: New VS Code Insiders Build Creates Web Page from Image in Seconds

    New Vision support with GitHub Copilot in the latest Visual Studio Code Insiders build takes a user-supplied mockup image and creates a web page from it in seconds, handling all the HTML and CSS.

  • Naive Bayes Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the naive Bayes regression technique, where the goal is to predict a single numeric value. Compared to other machine learning regression techniques, naive Bayes regression is usually less accurate, but is simple, easy to implement and customize, works on both large and small datasets, is highly interpretable, and doesn't require tuning any hyperparameters.

  • VS Code Copilot Previews New GPT-4o AI Code Completion Model

    The 4o upgrade includes additional training on more than 275,000 high-quality public repositories in over 30 popular programming languages, said Microsoft-owned GitHub, which created the original "AI pair programmer" years ago.

  • Microsoft's Rust Embrace Continues with Azure SDK Beta

    "Rust's strong type system and ownership model help prevent common programming errors such as null pointer dereferencing and buffer overflows, leading to more secure and stable code."

  • Xcode IDE from Microsoft Archrival Apple Gets Copilot AI

    Just after expanding the reach of its Copilot AI coding assistant to the open-source Eclipse IDE, Microsoft showcased how it's going even further, providing details about a preview version for the Xcode IDE from archrival Apple.

Subscribe on YouTube

Upcoming Training Events