7 ms·
Hyperview: Native mobile apps, as easy as creating a website
- paradite 4y agoIs this a new DSL reinventing WeChat's Mini Apps / Mini Programs? https://web.dev/mini-apps/ https://web.dev/mini-apps/ https://github.com/apelegri/wechat-mini-program-wiki https://github.com/apelegri/wechat-mini-program-wiki https://developers.weixin.qq.com/miniprogram/en/dev/framework/quickstart/#Technical-Development-of-a-Mini-Program https://developers.weixin.qq.com/miniprogram/en/dev/framewor...
- marstall 4y agoreminded me more of Expo, but looks like it might be friendlier to newer devs, designers who want to make an app, or just someone who knows their app will stay within certain boundaries. Another option I like, which takes some minimal custom native programming, is to use Android/IOS native WebViews load your mobile-web app and use it as a mobile app.
- novok 4y agoIf it's too obvious that your app is just a web-app shell, you risk rejection from the iOS app store at least, and they'll tell you to just use the 'bookmark website as app' thing. Needs to still feel like a native app, which is possible but more work.
- paradite 4y agoI use Expo everyday. Expo is more like a supercharged React Native + SaaS. This is apparently also built with React Native but somehow does not expose RN to user (didn't look into docs too much)?
- ivanstojic 4y agoHow does this differ from XUL?
- adamstep 4y agoHyperview incorporates ideas from HTMX to make it easy to create dynamic apps without the need for developers to write client-side JS.
- robmccoll 4y agoCool - extend this to just be a new browser that supports Content-Type: text/html and Content-Type: text/hyperview or something rendering either using a Web View or a Hyperview. Allow links between Hyperview documents within and across domains. Add user-driver permissions per domain for native APIs. It's been time to have a better alternative to HTML/JS for building rich applications on the web that still fit as web technologies.
- adamstep 4y agoI’ve been thinking about adding something like this to the Hyperview client: if a response uses HTML content type, we can render the screen in a web view.
- gabereiser 4y agoI came here to upvote and second the suggestion.
- jacobra2 4y agoHow does login/auth work with Hyperview if there's no local storage?
- adamstep 4y agoThere is session storage much like in a web browser. So you can use the same cookie-based auth techniques.
- personjerry 4y agoWhat's the difference between this and a PWA?
- kitsunesoba 4y agoLooks like this uses the native UI toolkits under the hood, making it closer to something like React Native, whereas a PWA is just a chromeless webview with a home screen icon loading a web app.
- personjerry 4y agoSo many options under that spectrum now. I'm not sure how to decide what to use in the future, hmm.
- adamstep 4y agoThat’s right. Under the hood, the Hyperview client is built on top of React Native. That means it can be easily extended by creating new RN components, and mapping them to a new XML tag: https://hyperview.org/docs/reference_custom_elements https://hyperview.org/docs/reference_custom_elements
- solardev 4y agoDoesn't mean that every trivial UI update has to load over the wire? Can you do client-side processing at all, like browsing or filtering a downloaded list of items on the client itself? And can you download new data without new UI code?
- adamstep 4y agoTrivial UI updates can be handled client-side without hitting the server. Some things can be done with the standar feature if Hyperview, like hiding/showing elements. For filtering a list of items, this is possible using Hyperview’s support for custom components. We’ve built apps that do this, and I’d be happy to share our approach if you’re interested!
- akudha 4y agoNot you parent comment, please share more details. Thank you
- deleted 4y ago[deleted]
- dr_kiszonka 4y agoDoes it have any limitations wrt accessing Android's API? For example, can I create a Hyperview password manager that would draw over other apps and fill out fields using Android Accessibility features? Can you access sensor information or list running processes?
- NoahKAndrews 4y agoLooks like you have do that via React Native components: https://hyperview.org/docs/reference_custom_behaviors https://hyperview.org/docs/reference_custom_behaviors
- adamstep 4y agoHyperview probably isn’t the best fit for apps with deep platform integration. Given that it’s designed to be cross-platform and server-rendered, I think this use case would be better served writing code directly against the Android SDK.
- a9h74j 4y agoIt does seem imaginable to have Android-specific browsers support a common superset of the "nominal/desktop" browser js api. Reference to Hyperview not specifically required, but an enabler for such. Security issues of course, so specific pages/sites might need permissions, as with webserial etc.
- replwoacause 4y agoCan this be used to create a web app too?
- adamstep 4y agoTheoretically yes. Since Hyperview uses React Native, you can use React Native for Web to render a Hyperview app in the web browser. However, the resulting web app won't feel at home, the same way a webview-wrapped web app doesn't right on mobile. A better approach is to share the same backend, but have requests return Hyperview or HTML responses based on the client.
- samora 4y agoThis is great! I think Facebook Lite already uses something like this. Great work. https://engineering.fb.com/2016/03/09/android/how-we-built-facebook-lite-for-every-android-phone-and-network/ https://engineering.fb.com/2016/03/09/android/how-we-built-f...
- gorbypark 4y agoSeems interesting and is apparently built on top of React Native. Obviously this is billed as a “server side streaming UI”, but it’s already possible to chunk the React Native bundle and deliver portions on demand (per route/screen, for example). Of course that’s a bit different than generating the XML for the screen on the fly, but more or less gives most of the benefits this would offer in terms of small initial downloads and OTA updates.
- aatd86 4y agoIt's often known as Server-Driven UI. It's basically a generalization of Server-Side rendering. I'm interested in knowing the limitations of that approach besides the connectivity requirement. Are complex data-based interactions easily implementable?
- adamstep 4y agoLocal interactions can be achieved with this approach by building custom components. However, a limitation of Server-driven UI is supporting interactions that update state across the entire app. For example, I wouldn’t use Hyperview or HTMX to implement a spreadsheet, where changing the value in one cell would trigger recalculations across the sheet.
- sibeliuss 4y agoQ: Since this is built on React Native, is it possible to build pages using Hyperview and then supplement them with stateful UI component trees using common RN libraries (eg, Redux)? Like, mix approaches?
- adamstep 4y agoIt is possible. We've built apps this way (integrating Hyperview into an existing RN app). With custom behaviors, you can have actions in Hyperview screens trigger Redux actions: https://hyperview.org/docs/reference_custom_behaviors https://hyperview.org/docs/reference_custom_behaviors
- leephillips 4y agoAre there any example apps that I can point the Expo client at to try out? I mean ones with servers running, not the example that I can develop myself.
- adamstep 4y agoThere is not, but the Github repo comes with a kitchen-sink demo app that you can try: https://github.com/instawork/hyperview#2-start-the-demo-app https://github.com/instawork/hyperview#2-start-the-demo-app
- tessela 4y agoReminds me of https://jasonette.com https://jasonette.com (also AMP, sigh)
- christiangenco 4y agoI used to love jasonette! I think the project was abandoned a while ago but in digging into it from this comment it looks like it was forked just for iOS and is now actively maintained at https://jasonelle.com/ https://jasonelle.com/
- adamstep 4y agoYes, Hyperview was definitely inspired by Jasonette. Like others have mentioned, Jasonette is not maintained, and Jasonelle has moved away from the server-driven paradigm. Check out Hyperview if you enjoyed Jasonette!
- darkteflon 4y agoThis is so elegant. It has that rare quality of making you go: “Aha! This is the obviously correct paradigm”. Web and Electron apps are inevitably marked out by distinctive UX jank. In the iOS ecosystem - just the one I’m most familiar with - I always felt that Apple was pushing them more as a sop to App Store regulators than because they are a real, viable alternative to native.
- _448 4y agoOther similar projects: 0. DivKit by Yandex https://github.com/divkit/divkit https://github.com/divkit/divkit 1. AdaptiveCards by Microsoft https://github.com/microsoft/AdaptiveCards https://github.com/microsoft/AdaptiveCards 2. dynamic_widget(https://github.com/dengyin2000/dynamic_widget https://github.com/dengyin2000/dynamic_widget) and json_dynamic_widget(https://github.com/peiffer-innovations/json_dynamic_widget)for https://github.com/peiffer-innovations/json_dynamic_widget)f... Flutter
- speps 4y agoAlso: https://jasonette.com/ https://jasonette.com/ (Show HN https://news.ycombinator.com/item?id=12879179 https://news.ycombinator.com/item?id=12879179 )
- berns 4y agoLiveView Native https://native.live/ https://native.live/ https://news.ycombinator.com/item?id=32694668 https://news.ycombinator.com/item?id=32694668
- LAC-Tech 4y agoMakes sense for B2C where discovery is done through app stores I guess. But no B2B decision maker is idly browsing google play for expensive SAAS products to use on a whim. Best there to focus on a web app that does everything well until you get into time/cost luxuries like mobile app - unless you really do need something only native can do.
- singpolyma3 4y agoI'm a bit curious why invent a new XML format rather than a subset of HTML+HTMX
- adamstep 4y agoXML, as the name implies, is extensible. An important aspect of Hyperview is that developers can create their own high-quality UI elements that can then be referenced by the backend using XML tags. These are things we can't do with a subset of HTML. In the Hypermedia Systems book, I showed examples of extending the XML format to add things like swipeable rows and toast messages: https://hypermedia.systems/book/extending-the-hypermedia-client/ https://hypermedia.systems/book/extending-the-hypermedia-cli...
- noveltyaccount 4y agoThis is neat, but why does it need a new XML schema? Why not bind a subset of HTML controls to native controls?
- jlarocco 4y agoI still don't understand why this type of native app exists. If it can be a website, it should be a website. Tech really does obey "worse is better" in the weirdest ways. Don't "web apps" exist to solve the "problems" of native apps? Yet 30 years later we're back to downloading native apps despite all of the downsides, but ironically these native apps are basically just showing a website anyway, but with none of the web advantages.
- gregmac 4y agoWhat's described here is not a website; it's not even HTML (it's "HXML" [1] ) Ignoring that, and addressing your question: there are several things apps can do that websites can't, even if the app is really just a wrapped/packaged website (and actually HTML): Native notifications Background tasks Full access to sensors Access to file system and contact lists Handler for system actions Offline support (though this requires more work beyond a mere 'wrapper') Also, don't underestimate the marketing/branding impact of having an app icon that's always there. Sure, you can get users to bookmark a site, but it's a very different action from having an app icon, and it opens and works in a different way. To techies this is a rather pointless distinction, but to most users this is huge. [1] https://hyperview.org/docs/example_index https://hyperview.org/docs/example_index
- jlarocco 4y agoSure, it's not exactly HTML, but looking at the examples it might as well be. But what prompted my post was the opening section of this page https://hyperview.org/docs/guide_introduction https://hyperview.org/docs/guide_introduction where they complain about their web developer and mobile app developer productivity. Why have a mobile app at all in that case?
- RussianCow 4y ago> Sure, it's not exactly HTML, but looking at the examples it might as well be. The language itself doesn't really matter; that's not the interesting part. The fact that the UI is rendered natively on each client platform is what makes this project interesting. > ...they complain about their web developer and mobile app developer productivity. Why have a mobile app at all in that case? Because the business requires it? I'm not sure how that has anything to do with productivity.
- tcper 4y agoScenes to be used are limited. It's only fit for table/list page, any custom features will make you surfer.
- gloosx 4y agoAs an established JS-only web/mobile/desktop developer, don't really understand why it is better than just React Native. On the landing page, there is no straight value proposition, but instead there is something like "Now use Y instead of X". I don't see why i should serve my app as XML, I can work with any backend technology i like using just React Native, as well as updating it instantly over the air. And the bottom table looks misleading too – no native elements in HTML5? why? ios safari surely provides native ui for HTML5 elements. no offline data for HTML5? this is not true, PWA exists
- rlawson 4y agoQuestion: I have been looking for a way to use htmx to build mobile apps. What I iterated too was just cordova + css framework of choice + htmx. How is hyperview better/worse? Does hyperview let me use htmx or does it just share the same htmx philosophy?
- ckluis 4y agoTLDR: Serve XML from a server and get "dynamic" native apps
- adamstep 4y ago“Native” in this case refers to the fact that the interface is rendered using the system UI libraries. So you get a native feel for things like scrolling, navigation, gestures, etc. This isn’t possible (or really difficult) using web technologies (HTML and JS)
- dickersnoodle 4y agoThis is the same B.S. definition-stretching that you see in a bunch of React Native posts.
- ljlolel 4y ago“Dynamic” “native” apps
- IIsi50MHz 4y agoI was hoping this would be like Hypercard (without much real hope, of course), allowing users to create their own native 'apps' with perhaps some safety limitations. That would be both dynamic and native, though any scriptable actions would be performant.
- Cyberdog 4y agoSo it’s a web app with new syntax. People who use the term “native app” incorrectly like this should… face difficult circumstances.
- Kiro 4y agoIt is native though. You misunderstand what this is.
- 4y ago
- luckymate 4y agoWon’t it cause problems with Google/Apple stores?
- jtsiskin 4y agoNo, this isn’t shipping native code dynamically, just content. Crudely, will the fetched bytes go into executable or non-executable memory? If non-executable, Google/Apple are usually lax
- adamstep 4y agoThat’s right, no native code is shipped dynamically. The dynamic part is the layout of components and styling. Many apps use this approach and refer to it as Server-driven UI (SDUI).
- thecupisblue 4y agoWasn't basically this just posted under https://news.ycombinator.com/item?id=34134545 https://news.ycombinator.com/item?id=34134545?
- recursivedoubts 4y agoHyperview is an amazing piece of technology, bringing the hypermedia architecture to a native mobile environment in a way that HTML just can't. The crux of the system is that it provides not only a mobile hypermedia that takes advantage of mobile-specific features, but also it provides a client. This client is key because it is what allows the uniform interface of HXML to function properly. I didn't appreciate how important the browser was (it's often forgotten in discussions around hypermedia on the web) until I saw how well Hyperview works and thought about why.
- j45 4y agoParts of this are a distant reflection of Adobe AIR and Flex, both of which used xml for much of its functionality. Of course this is more interesting because it’s modern and appears to work on the web. Maybe tires will be a worthy contractor of things like Flutter
- deleted 4y ago[deleted]