Will JavaScript type annotations kill TypeScript?
The creators of Svelte and Turbo 8 both dropped TS recently saying that "it's not worth it".
Yes: If JavaScript gets type annotations then there's no reason for TypeScript to exist.
No: TypeScript remains the best language for structuring large enterprise applications.
TBD: The existing user base and its corpensource owner means that TypeScript isn’t likely to reach EOL without a putting up a fight.
I hope they both die. I mean, if you really need strong types in the browser then you could leverage WASM and use a real programming language.
I don’t know and I don’t care.
Frontend Development / Software Development

Facing the Challenges in Building Cross-Platform Apps

Should devs build native applications for each platform, or take advantage of cross-platform development frameworks such as Flutter or React?
Jul 26th, 2022 11:02am by
Featued image for: Facing the Challenges in Building Cross-Platform Apps
Featured image by Richard Burlton on Unsplash. 

Some of us are old enough to remember when each mobile platform, even each device, was a walled garden in and of itself. If you wanted mass-market entertainment or tailored content, your options were limited. Crazy Frog, anyone?

Now we face a world dominated by iOS and variants of Android, each of which has a vested interest in attracting developers. And this leaves developers with a dilemma.

Should they develop native applications for each platform, risking duplicated effort and over-stretched teams? Or should they take advantage of cross-platform development frameworks such as Flutter or React, at the risk of not quite delivering the level of seamlessness a native app should achieve?

There’s certainly a place for cross-platform frameworks. James Governor, co-founder of dev-focused analysts Redmonk, recently flagged Flutter’s progress in a blog post, noting that it “seems well suited to the problem of building and deploying good-looking applications for deployment to iOS, Android or desktop.”

While using Flutter means learning Dart, he continued, “that language is well supported from an education point of view, and can make teams far more productive for multiplatform development.”

Meanwhile, he pointed out in his blog post, “As with Facebook and its stewardship of React, you don’t have to have a trillion dollar company behind you to thrive as a framework or language, but it certainly helps.”

Many organizations “build with iOS in mind,” Governor wrote, so Google has a clear incentive to tempt them to build for Android too, by throwing its weight behind Flutter and Dart. Interestingly, he added, Google seems to be taking a very broad approach to pushing Flutter: “I have noticed developers and evangelists from various African countries increasingly talking about Flutter.”

But what do users think about the rise of cross-platform development frameworks? Well, they shouldn’t have a view at all, if both providers and developers get things right in the first place.

Users simply want great experiences, noted Bruno Garcia, engineering manager at Sentry, an application-monitoring platform: “Consumers now expect instant gratification with new updates and feature releases on a regular basis and having access to everything at their fingertips.”

Let’s Keep This a Jank-Free Zone

And that access needs to stay at their fingertips, Garcia added, with stability a given: “Essentially, the end user has no idea that the app wasn’t native to the OS and there needs to be no issues when it comes to UI/UX, jank, latency or features.”

Unresponsive UIs or slow-loading screens should be a warning sign for developers, says Garcia — and a cute animation is not going to be enough to distract the user. “An app’s cold and warm start time is also key,” he says. Other concerns include random crashes, unresponsive button actions and poorly placed UI elements.

So how do these problematic applications escape into the market in the first place? Experience and design issues arise because cross-platform technologies create a unique UI/UX that may stray from the original platform, Bruno said.

For example, a device’s physical or digital buttons may take up space on the screen, or there may be a notch on the top, and this requires a specific design to ensure the right spacing in the UI.

Other challenges can emerge when it comes to plug-ins — for Bluetooth, for example — which can mean devs having to rely on open source libraries.

“The key is to understand what you are trying to build and who are you building it for, before you start working with cross-platform frameworks,” Garcia said.

“If it’s important to be consistent with a platform’s UI/UX. If you require hardware features or need to be on top of the latest OS’s features, a cross-platform technology might not be the best option for your app, as it won’t be able to provide what your end users expect and need.”

These are things that developers should be able to see. But a continuing lack of visibility is a major factor in misfiring cross-platform development efforts. As Garcia noted, it’s easy to forget that software teams aren’t just comprised of developers, but include product managers, designers, marketeers and support engineers. As teams expand, people get siloed, information is not always communicated well, and visibility and collaboration become harder to maintain.

Metrics to Compare Performance

“Developers may not be the point of contact for warning signs like an error,” Garcia said. “Which is why it’s important to use effective tools to alert the appropriate teams and people responsible to quickly fix any issues before they become a bigger problem for the end user.”

So, it’s really important that developers, and the team at large, work to monitor key metrics, and spot problems before a release veers into instability or even becomes unusable. Those metrics include app speed and performance by measuring time to interaction. Others include data on crashes and bugs, on an app’s cold and warm starts, and on slow and frozen frames.

It’s also important to consider conversion and retention rates, Garcia said, which will give you a handle of whether consumers are installing and using an app — or losing interest.

Sentry’s platform, for example, serves up real-time alerts of exceptions, OS-specific crash reports, and details about crash-free sessions and users, as well as key performance metrics like slow and frozen frames, cold and warm starts.

Serving up such actionable data should enable developers to spot a problem, quickly fix it and get back to shipping code, said Garcia. But, he added, the company also focuses on the developer experience: “It integrates directly into the workflow — from the second you push to production.”

This also means Sentry has a handle on what really happens when developers adopt cross-platform tools. And the results are encouraging.

“I’d say Flutter is great for tooling and is backed by Google,” said Garcia, “Unity has an accessible gaming engine and React Native is easy to adopt as it’s based on JavaScript and developed by Facebook, so we’ve seen it quickly gain in popularity.”

Sentry recently released support for .NET MAUI, built on C#, and the company expects it to gain a lot of traction, as it’s backed by Microsoft.

Will that make cross-platform clear sailing in the future? Not entirely. Developers increasingly have to have to deal with more than just multiple operating systems, Garcia said. “It’ll also be interesting to see how folding devices, building for desktop, updates in processors will bring new challenges for developers.”

Group Created with Sketch.
TNS owner Insight Partners is an investor in: Pragma.
THE NEW STACK UPDATE A newsletter digest of the week’s most important stories & analyses.