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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Write in JavaScript, Render in Flutter

83 点作者 geordee超过 3 年前

12 条评论

mhoad超过 3 年前
I feel like maybe it has been a long time since people took a real serious look at Dart but you couldn’t possibly convince me to switch it out with JavaScript in most contexts let alone when trying to build a UI.<p>I spent a year looking for a new language in the pandemic and went from Ruby to Typescript, JavaScript, Java, and even a little C# but by such a long margin Dart was my favourite.
评论 #28581171 未加载
评论 #28580319 未加载
评论 #28587713 未加载
评论 #28582108 未加载
评论 #28580197 未加载
exikyut超过 3 年前
My acid test for all things &quot;super-modern&quot; is to try firing them up on older devices. Y&#x27;know, to combat the old &quot;fast enough to reach production but quadratic once it gets there&quot; thing.<p>Take 1: Galaxy Note 3 with Android 5<p><pre><code> E&#x2F;AndroidRuntime(25964): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.kraken_gallery&#x2F;com.example.kraken_gallery.MainActivity}: android.content.res.Resources$NotFoundException: File res&#x2F;drawable-v21&#x2F;launch_background.xml from drawable resource ID #0x7f040000 </code></pre> Hokay then. Moving on I guess?<p>Take 2: Galaxy Note 4 with Android 6<p>...Yep this is definitely running at about 19-20fps, maybe 23fps. It&#x27;s <i>not</i> smooth. It&#x27;s... responsive... I guess? But NOT smooth.<p>I experience the same effect when in websites that have long scrollable areas inside position:fixed divs or position:absolute divs anchored to the viewport edges.<p>Chrome seems to be able to special-case &quot;scroll the root&#x2F;body of the page&quot; in such a way that it can run at like ~45fps on the Note 3 and pretty much the same on the &#x27;4. Random divs don&#x27;t get that special-casing, and scroll rather choppily... exactly like this app.<p>I tried a Flutter API demo a while back and experienced identical behavior.<p>My reference case for rendering speed is the Drive PDF viewer (!), which on my Note 3 runs at easily 55-60fps and has just about the lowest latency I can recall of any app I&#x27;ve tried on that device. So I know the hardware can actually update very quickly... if you aren&#x27;t reconstructing Mt Everest on every frame in the fast path ;)<p>&quot;BuT DeVeLoPeR PrOdUcTiViTy&quot;<p>Well, hot take: industrial&#x2F;brutalist design can be a <i>great</i> fit for the &quot;look&quot; parts of apps... but not the &quot;feel&quot; parts. That always needs to be the result of a feat of integration engineering, for the UX to, well, <i>feel good</i>. All these toolkits break the &quot;look&quot; down into nice little manageable components... by applying isolation principles that also break down the cohesion of the &quot;feel&quot; as well in the process. In the name of progress. Or something.
评论 #28583338 未加载
评论 #28595198 未加载
评论 #28582052 未加载
评论 #28582401 未加载
SpaghettiX超过 3 年前
As a Flutter developer, &quot;Write in JavaScript, Render in Flutter&quot; is vague.<p>&quot;Write Flutter apps in Javascript&quot; would make more sense. Flutter is not a &quot;renderer&quot;, Flutter is a framework + engine. &quot;Kraken&quot; literally builds widgets for you when you write Javascript code, Flutter is doing a lot more than &quot;rendering&quot;.<p>&quot;Kraken&quot; is like React Native, but instead of talking to the host platform, it uses Flutter. Flutter is already cross platform, so the only benefit here is to write in Javascript. However, you would probably inherit some costs similar to React Native: communication between a Javascript Engine&#x2F; interpreter and a AOT compiled application. This time, you don&#x27;t get to use the react-native-plugin NPM packages, because you&#x27;d need kraken-flutter-plugins.<p>The biggest concern I have is usability. How will I use popular Flutter packages, from Javascript? The &quot;Kraken&quot; community is very small. Even worse, the community seems purely based in China.<p>It&#x27;s very difficult to understand the health of the codebase with all these github issues written in Mandarin Chinese: <a href="https:&#x2F;&#x2F;github.com&#x2F;openkraken&#x2F;kraken&#x2F;issues?q=is%3Aissue+is%3Aclosed+label%3Abug" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;openkraken&#x2F;kraken&#x2F;issues?q=is%3Aissue+is%...</a>
评论 #28582456 未加载
评论 #28584820 未加载
Dig1t超过 3 年前
The link to the Chinese government website in the footer is a little weird. What is that? Is this project affiliated with beian.gov.cn?<p>Honestly just curious.
评论 #28579590 未加载
评论 #28579160 未加载
评论 #28580113 未加载
sandGorgon超过 3 年前
Can I write an entire iOS app using Javascript and compile via flutter?<p>Is there an example - I&#x27;m not able to find one.<p>That could be killer!
mindfulplay超过 3 年前
Not sure I follow this.<p>Flutter uses Skia as the rendering engine - albeit with a different layout engine. JS on Chromium uses Skia.<p>If you are using JS to talk to Flutter to then talk to Skia, what&#x27;s the value add? Is it the multithreaded layout engine?
评论 #28581423 未加载
评论 #28581701 未加载
评论 #28581691 未加载
评论 #28587791 未加载
SpaghettiX超过 3 年前
If you build a Flutter app through Javascript, how can the AOT Dart compiler work its magic? Won&#x27;t &quot;Kraken&quot; forever have the performance of JIT, even for production releases?
jack_pp超过 3 年前
Installation instructions only for osx and when I go to the try on Android I&#x27;m redirected to a GitHub readme that tells me to build something with node.<p>Seems the docs need a little bit of attention
评论 #28581267 未加载
lucas_codes超过 3 年前
Is this a joke? It&#x27;s 100 &lt;div&gt; tags with inline styles!
评论 #28580922 未加载
cutler超过 3 年前
Not to be confused with Kraken JS <a href="https:&#x2F;&#x2F;krakenjs.com" rel="nofollow">https:&#x2F;&#x2F;krakenjs.com</a> .
bengold14超过 3 年前
I can&#x27;t tell if this is a joke or we&#x27;ve actually done a full circle
评论 #28579094 未加载
评论 #28580003 未加载
nsonha超过 3 年前
This is how I would be interested in using Flutter. Honestly the thing that has been stopping me from doing it is Dart. It&#x27;s not that it&#x27;s a terrible language, it&#x27;s just a very mediocre one. At this point in my career, I detest that and will not learn anything that simply exists for the sake of being difference instead of offering any actual merit.
评论 #28579522 未加载
评论 #28579637 未加载
评论 #28579224 未加载