TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Weather the Trip’ Built on Kotlin Multiplatform Mobile

1 点作者 jasonmarks_超过 2 年前
Hi there Jason Marks here~<p>I’ve been browsing hacker news for years and am happy to share with the community my latest project Weather the Trip. Weather the Trip provides you with forecasts and recommended departure times for your road trips within the U.S. I did the whole legal zoom LLC angle trying to bootstrap this idea to something. So far this is a difficult process but I find it fun and rewarding.<p>Download link &gt; www.weatherthetrip.com&#x2F;download<p>If you are unacquainted, Kotlin Multiplatform Mobile (KMM) helps you create a core business logic library that includes all the tools and convenience to compile directly to the platforms you would like to build for. You get to keep all the benefits that native applications inherently have without having to port the business logic amongst the platforms! The native portions of the Android and iOS app for Weather the Trip are pretty much just view related code.<p>I think KMM is a great platform but I feel obligated to a few critiques. Right now, there are not a lot of third-party dependencies that are interesting which also compile to the swath of targets available. Worse yet some that are interesting get out of date fast since KMM is still not beta (the caveat is SQLDelight for ur tables which is [in fact] delightful). The first party core dependencies do have you covered for all of the essentials: Net, Serialization (no XML), Datetime (no formatters at the moment), Concurrency.<p>Concurrency has additional complexity to get right. The first party coroutines work great but not all targets know what a coroutine is (looking at you iOS). Out of the box you are not able to use coroutines inline to something like a Reactive pattern for all targets. I ended up deciding on flinging out results through interfaces and catching and redirecting using native abstractions. It isn’t elegant but works without getting too clever. This path does require a contract with the core library where calls must return data or an error to the target.<p>I will end on an acknowledgement that other multiapp platforms exist. I am a believer that native apps always outperform alternatives in UX. I won’t bother ranting against other multiapp platforms. If your skillset fits a certain platform then do that. If you are willing to pickup Kotlin, Swift, etc. then KMM is worth your time.<p>Still reading? I’m also on twitter @jmarks213<p>Still still reading? How about some inflammation???? Do you think the Kremlin is in the Kotlin? <i>side ways eye emoji</i>

暂无评论

暂无评论