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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Show HN: SyncNinja – Mirroring browser execution on the server

20 点作者 vladaionescu超过 9 年前

3 条评论

zerovox超过 9 年前
Unless I&#x27;m missing some of the problems you&#x27;re trying to solve, this seems like an extremely over engineered solution to the problem of code duplication (like validation) and boiler-plate communication code. For the former, if you&#x27;re using a node backend, you can pretty trivially reuse the same code between client and server side. The later doesn&#x27;t really seem like a big enough issue on its own to really warrant an architecture that requires a back-end with per-tab mirroring - you can usually encapsulate the &#x27;cumbersome AJAX calls&#x27; with a straight forward API (or GraphQL query if that floats your boat).<p>This approach also forgoes many of the nice side-effects of having a clear slide-server boundary like avoiding leaking implementation details into your front-end code. Also, a simple REST API can be reused across platforms, so when you want a native experience on Android, iOS, etc you wont have to replicate this architecture or the underlying logic on each of those platforms.
Maarten88超过 9 年前
I&#x27;ve been working on a project where we generate and synchronize view models (instead of full views like this proposal) between the server and web&#x2F;app clients. We maintain (view)state in an Actor based backend, pushing updates to the clients through websockets. The client only needs to databind and render the model. This gives a really nice realtime user experience and is quite efficient.<p>Like SyncNinja, our architecture moves a layer of clientside code into the server. This enables more code sharing, at the cost of tight coupling between client and server (which does not matter for web but is problematic for our app clients). For use cases that need to work offline it falls apart; for that you need api&#x27;s that work at the business layer and duplicate the view logic in each client.<p>I think SyncNinja will share difficulties we found around offline&#x2F;localStorage, besides high resource usage, support for non-web clients, and all the problems you&#x27;d expect from browser differences (i.e. input prefill).
评论 #10285119 未加载
rywalker超过 9 年前
Project looks promising... Do you have source code to a demo app available?
评论 #10284239 未加载