Hyperview 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.
reminded 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.
I 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)?
If 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.
This 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.
I 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.
What'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.
Sure, 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 where they complain about their web developer and mobile app developer productivity. Why have a mobile app at all in that case?
> 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.
Most apps should be websites, but the only reason many of us build apps is to get into the app store. Most normies, for better or for worse, like applications to be launchable applications from their home screen. And for most normies, that concept is synonymous with applications they downloaded from the app store. If Apple allowed PWAs in the app store, 99% of apps could just be websites.
At the end of the day they're using the system that we created, and they use it the way we tell them to, so we can hardly blame them for the design decisions we made.
For example, there's no technical reason bookmarks can't be added to the home screen via the app store, and appear more or less identically to apps.
Seems 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.
Local 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.
Q: 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?
It 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
I wonder if there is some mechanism that could achieve app wide state updates by performing a “refresh” after a mutation, and hyperview/HTMX handles the integration of the the changeset.
Cool - 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.
I’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.
As 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
Does 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?
Hyperview 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.
It 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.
No, 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
That’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).
I 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/
Yes, 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!
Question: 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?
Doesn'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?
Trivial 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!
XML, 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-cli...
Are 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.
“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)
I 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.
My perspective is that if an app is not directly using a platform’s APIs, it is not native to that platform. Feel free to explain to me and others how this take is wrong and how something written in XML could be a native app on, say, iOS.
It is using the platform's API directly and renders native components. The XML is just an abstraction layer on top of that and not a web wrapper like you're implying. It's not using any WebView.
It's native by all definitions of it. It calls native APIs, renders native system elements and what you get is indistinguishable from an app written in Swift or Kotlin down to the machine code displaying it.
The "XML is just an abstraction layer" part is exactly what makes it not native. It's a big abstraction layer, it uses React under the hood, it's not native.
It's easy, instead.
It may render native components, but those components are still controlled by the non-native runtime, thus extra baggage.
It would definitely be using native UI components, which a normal web browser won't give you via the rendering engine.
But that's as native as it gets. The control logic for how those components operate outside of how they're internally built is likely done w/ React / JavaScript, instead of native.
Looks 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.
That’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
Theoretically 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.
Makes 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.
0. DivKit by Yandex https://github.com/divkit/divkit
1. AdaptiveCards by Microsoft https://github.com/microsoft/AdaptiveCards
2. dynamic_widget(https://github.com/dengyin2000/dynamic_widget) and json_dynamic_widget(https://github.com/peiffer-innovations/json_dynamic_widget)f... Flutter