9 ms·
Hyperview – Native mobile apps, as easy as creating a website
- gnabgib 2y agoPopular in 2022 (252 points, 74 comments) https://news.ycombinator.com/item?id=34137381 https://news.ycombinator.com/item?id=34137381
- dbbk 2y agoSurely this will be redundant with React Server Components on RN/Expo?
- benpacker 2y agoThis is more of an HTMX native
- mrbluecoat 2y agoYeah, the moment I read "Serve your app as XML" my brain instinctively began to move on but it's really just HTML-like semantic snippets that remind me of WebComponents. Example: https://github.com/Instawork/hyperview/blob/master/demo/backend/advanced/case-studies/basic-forms/submit.xml https://github.com/Instawork/hyperview/blob/master/demo/back... However, this warning statement should be in bold at the top: "If your app relies on offline data or local computations, Hyperview won't be the right choice." For that reason, I lean toward https://volt.build/ https://volt.build/
- giwook 2y agoA key distinction here is that Hyperview is free, which makes the offline capabilities or lack thereof a more than reasonable tradeoff IMO. Volt looks great, but $15/mo. for the basic plan, $37/mo. for the pro plan that you likely need for the ad hoc builds alone (unless you test in prod).
- dbbk 2y agoIf it doesn't do offline data or local computations what is the point?
- sibeliuss 2y agoServer components + RN + Expo.... Could it get any more pointlessly complicated?
- satvikpendem 2y agoJust because there are multiple technologies does not make it complicated per se. Indeed, something could evolve to a simpler model, which it seems RSC on RN is.
- sibeliuss 2y agoKeep dreaming man. Just look at what Next has become... It has taken "render component on the screen" and turned that into an experts domain. It's a nightmare for anyone who isn't the most skilled, for projects that are more than just toy apps and AI one-offs.
- satvikpendem 2y agoNot sure about that, it's gotten easier as time goes on, especially with server actions. Previously we used something like OpenAPI to map types on the frontend and backend and had to make separate HTTP endpoints for everything. Now I just write a function and it's all taken care of automatically, I can put types and functions in any folder I want and it just works.
- 52-6F-62 2y agoDoesn’t it require Expo’s servers for a development environment? All these companies have given up on the gold rush long ago and are just slinging fancy shovels.
- satvikpendem 2y agoNo, they can run locally.
- netghost 2y agoThis is a ReactNative app that consumes XML and maps it to ReactNative components, so you're still using those pointlessly complicated technologies, but through a proxy application that abstracts some of the complexity away (https://github.com/instawork/hyperview?tab=readme-ov-file#hyperview-react-native-client https://github.com/instawork/hyperview?tab=readme-ov-file#hy...). When you hit the boundaries of what Hyperview can do, you're going to need to dig into some of the details, but mayhaps you don't need those features. Either way, it's an interesting project, but like everything else it's going to have _some_ drawbacks
- tjmtjmtjm 2y agoI'm more of a Floral Green person.
- latortuga 2y agoUnderrated joke, did not expect a Title Fight reference when I opened this thread!
- recursivedoubts 2y agoHyperview is a very interesting mobile-oriented hypermedia system created by Adam Stepinski. He talks about is in the third part of our book, hypermedia systems: https://hypermedia.systems/part/hyperview/ https://hypermedia.systems/part/hyperview/ I have said before that I regard his work as much more innovative than htmx in that he developed an entire hypermedia client and format for his system.
- toddmorey 2y agoI'm curious about the limitations that prevent these apps from writing / caching local data. It doesn't seem like the paradigm would have to change entirely to support that.
- recursivedoubts 2y agoThere aren't any, with hyperview you actually own the hypermedia client as well as the server and you can write and cache local data in the form of custom extensions you make to it. I think that needs better documentation though.
- smackeyacky 2y agoSo, basically it's like every other non-native development environment for mobile: basically useless when you want to use any feature of the phone. These things always implement the easiest bit of mobile development (the UI) and then make everything else harder, so it's useless for anything non-trivial.
- recursivedoubts 2y agoi don't know if being that pessimistic is warranted i'd need adam to comment
- sirjaz 2y agoI'm wondering if they could get that to work with React Native for desktop apps
- openrisk 2y agoYou'd have to run a server in the background which complicates things but otherwise it would seem to be feasible.
- ipnon 2y agoNot even a day after the post about HTMX not living up to its promise! There are only two certainties in life, death and frontend churn.
- JodieBenitez 2y ago> the post about HTMX not living up to its promise You read that wrong.
- birdgoose 2y agoI'm fairly certain the tone of the HTMX post (https://htmx.org/essays/future/ https://htmx.org/essays/future/) was positive about its future of becoming "stable" (as opposed to "stale").
- Cthulhu_ 2y ago> frontend churn. Frontend churn hasn't been as much of a thing for years now, see e.g. https://2022.stateofjs.com/en-US/libraries/front-end-frameworks/ https://2022.stateofjs.com/en-US/libraries/front-end-framewo.... If you stuck with Angular or React 10 years ago, you're still good today. jQuery is even older but still on 75% of websites (https://w3techs.com/technologies/overview/javascript_library https://w3techs.com/technologies/overview/javascript_library), and Bootstrap is on nearly a quarter. Frontend churn is only a thing if you try to stay on the left side of the Gartner Hype Cycle.
- owebmaster 2y agoReact churned itself.
- ricardobeat 2y agoThat’s only true on the surface: if you chose React, you had to rebuild and relearn everything about once every two years. Averages out to about the same workload as following the latest fad. Maybe more, since refactoring legacy code is 10x harder than building from scratch.
- 2y ago
- deleted 2y ago[deleted]
- paradite 2y agoAh finally the Western tech ecosystem has caught up with WeChat/Alipay mini programs. https://developers.weixin.qq.com/miniprogram/en/dev/framework/ https://developers.weixin.qq.com/miniprogram/en/dev/framewor... China had this DSL for building mobile apps for years. Those these apps are initially embedded inside WeChat/Alipay, there are now frameworks that allow it to run outside, like uniapp. https://en.uniapp.dcloud.io/ https://en.uniapp.dcloud.io/
- klausa 2y agoI've had very limited exposure to Alipay mini-programs (took a daytrip to Shenzhen from HK); but anything I had to touch (couples of restaurant menus; buying tickets for metro) was _screaming_ "this is poorly constructed webpage", not native-like experience. Are there some you would recommend to see as an example of it being done right?
- paradite 2y agoYou can buy plane tickets, railway tickets, book hotels on wechat via popular 3rd party booking platforms. I think there are first party integrations in wechat app, go to Me - Pay and Services, you can see a bunch of them.
- klausa 2y agoSorry, just to clarify — I meant examples of services that "feel" nice to interact with in the app; not examples of what they can be used for.
- scotty79 2y agoIt's a bit like asking which power company has pretty technicians.
- klausa 2y agoWe're in a thread talking about a technology that purports to make creating "native mobile apps, as easy as creating a website"; and the parent claimed that the Alipay/WeChats mini-app stacks are similar. I don't think asking for examples of this resulting in an experience that's pleasant is unreasonable?
- jsiepkes 2y ago"Serve your app as XML" As someone who started his professional career in 2005: All the old is new again.
- magic_smoke_ee 2y agoSomeone will inevitably create an app to create apps using Brainfuck encoded in Morse code running on a 16-QAM wireless protocol... just beam your app with your data.
- revskill 2y agoJSON is same as XML.
- baxtr 2y agoText is the same as JSON.
- deleted 2y ago[deleted]
- beagle3 2y agoAnd XML is essentially lobotomized and extra verbose Lisp S-expressions, going back to the 1960’s
- xarope 2y agodon't talk about my thesis, written in LaTeX, like that... /j
- magic_smoke_ee 2y agoBack in my day, real cowboys wrote their papers in PostScript, making their papers as inaccessible as possible for user of consumer-grade devices. /s PS won on human readability and editability but lost on portability to Adobe's own internal competitor, PDF, and because it fought and lost to (La)TeX -> PDF & (La)TeX -> DVI -> PS. PS: I once printed out and bound the PDF 1.3 spec[0] on 24 lbs. bleached dead trees on an HP LaserJet IIIP with over a million page count. Some of the nuclear engineers and scientists an office containing <50 people routinely printed thousand page documents every week. 0. https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/pdfreference1.3.pdf https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandard...
- globular-toast 2y agoAny "app" framework that isn't offline-first seems broken by default to me. It seems ridiculous to me that client-server architecture is considered the easy thing now. Where did it all go wrong?
- vincnetas 2y agoWhen companies decided that they need to know as much as possible about the end user, and don't want to care about backwards compatibility (old version apps, all users are using latest)
- mihaaly 2y agoAnd consequently when they started to give no f about if users like or not the new version of the app forced on them. So before the Enterprise Oriented Design.
- owebmaster 2y ago[dead]
- Hilift 2y agoMaking mobile platforms second class citizens was wrong.
- SillyUsername 2y agoHow does this improve on w3c standard of xforms + CSS?
- bplaat 2y agoAh I've seen this before but then with JSON https://github.com/Jasonette https://github.com/Jasonette
- donatj 2y agoI am very unclear reading the documentation and clicking around, how do you actually implement the logic? Some sort of JavaScript runtime?
- VagabundoP 2y agoIts a client/server system. So the logic is done by the server and snippets of HXML are served: https://hypermedia.systems/building-a-contacts-app-with-hyperview/#_creating_a_mobile_app https://hypermedia.systems/building-a-contacts-app-with-hype... That's an example using Flask. There's a demo client bundled with the repo, but I assume you can customise and deploy it. I'm not familar with Expo.
- trey-jones 2y agoUsing web technology to build "native" mobile apps has been around almost as long as mobile apps themselves. I used Appcelerator Titanium and Phonegap to do this beginning in 2012 (maybe even 2011) before eventually trying Native development later after finding these options underwhelming. I have a reasonable amount of experience doing both, and my opinion is that development tools aren't really the problem. The biggest pain point is the platform specific deployment and maintenance requirements (including legal and technical documentation) that will be needed regardless of what technology you use to actually build the product. Because of this I always advise clients that they don't really need a mobile app. Just build it on the web. If you absolutely must have a mobile app, you need to fully commit and hire an internal development team and be prepared to keep paying them as long as the app is going to be in use.
- giancarlostoro 2y ago> Just build it on the web. It takes a very insignificantly small amount of JavaScript to make a website a Progressive Web App, which iirc can be listed on app stores. If you dont use React or any fancy frameworks, I believe last time I ever did such a project our JS was under 50 lines of code to have our PWA working fully offline. There were some odd hacks, like detecting network connectivity.
- sebmellen 2y agoNot on iOS. You gave to use this WebKit hack https://blog.pwabuilder.com/posts/publish-your-pwa-to-the-ios-app-store/ https://blog.pwabuilder.com/posts/publish-your-pwa-to-the-io....
- giancarlostoro 2y agoThat's specifically to be listed right? I mean I guess that's fair. Thanks for the link, saving that.
- Lerc 2y agoIs there a super simple tool for turning statically served websites into PWAs? Last time I looked all of the simple tools had been deprecated in favour of complex tools that do way more than I need. If I had a site in a directory that works fine from >cd MyWebApp >python3 -m http.server I would like a command line tool That worked like >becomepwa MyWebApp Which produced a PWA that downloaded everything on install and could be run henceforth offline. I thought this would be a common use case, but I failed to find anything that supported it without intruding on my workflow.
- deleted 2y ago[deleted]
- captainepoch 2y agoFor the love of God, stop putting "Native" in web frameworks. No, React will never be native.
- dbbk 2y agoWhat does this mean? There are plenty of big, native apps using React.
- captainepoch 2y agoReact is a web framework. You can put Native behind React, it'll never be.
- tstusr20190823 2y agoReact allows you to write custom renderer and React Native is a quick and dirty example of that custom renderer. The only reason it does not "feel native" is because Meta does not invest much into it and only subset of the "native" features is implemented in "native way".
- rib3ye 2y agoIt's "native" in that the wrapper is a native binary, but it's still a webpage.
- agsnu 2y agoReact Native actually constructs a view hierarchy in the platform's UI toolkit, so I'm curious what you mean by "still a webpage"?
- kelnos 2y agoBut everything in that view hierarchy is still drawn using HTML and CSS, and all the logic is implemented in JS, no? If that's the case, then that's not "native".
- happytoexplain 2y ago>as easy as creating a website This strikes me as odd - I have a much easier time making a well-functioning native app (iOS or Android) than the equivalent website. That's not typically a checkmark in the web column for web vs app pros and cons. Unless we're including distribution when we say "creating".
- LVB 2y ago>Unless we're including distribution when we say "creating". I think it has to be included given how much traffic I see from mobile devs I follow about getting stuck in some review blackhole, running afoul of a TOS or payment rule, etc. Getting the app built is in your control, but getting it to end users has a big dependency on others, potentially. The idea of being able to push code to a server you control and deliver instant updates is appealing.
- strogonoff 2y agoEngineers have vastly different definitions of “well-functioning” and “easy”. Once I saw an app that used accelerometer API to determine in real-time whether the user is walking. It was done as a web app (native was considered too difficult) and the data was sent to GCP for processing. Even without the GCP code, which involved a custom ML model, it was in the hundreds of LoC. I don’t know how well it would function in real use, since it did not really reach mass production, but I do know it is possible to do completely on-device with very little bespoke logic and a very small LoC count on iOS (and I’m sure on Android) where APIs would give you exactly that (and even movement speed, if needed).
- YuukiRey 2y agoI overlooked it at first even though it’s right there on the landing page but this is ultimately still React Native with all the baggage that entails.
- strogonoff 2y agoI briefly investigated using React Native on a project. Obscure installation and linking process which no one seems to understand exactly, no SPM support on iOS, incomplete documentation that from the start pushes to adopt yet another layer on top (such as Expo, and I suppose Hyperview is now another option)… It felt like I am adopting some rusty legacy software, and not in a good way (more full of quirks than mature, well-documented and time-tested). Judging by discussions, most people would somehow get it working and then not touch it again until it breaks. My intuition was to stay away and to recommend, if PWA is not an option and resources are limited, to go with a native app for one platform (whichever more familiar) & later pay someone to port it for the other.
- tarentel 2y agoIf resources are limited and you plan on charging any type of money for the app, either one time or as a subscription, it's almost always better to go iOS first and port to Android later. I obviously can't speak for the ecosystems as a whole but anecdotally of the last few companies I've worked for a strong majority of paying users came from iOS.
- mijkal 2y agoIn my xp, React Native was far more fragile a few years ago, but it has improved immensely since then. I quite enjoy working with it these days.
- iforgot22 2y agoProbably has changed since then, but I remember the RN docs telling me to use Expo. I was wondering the whole time, do people actually use Expo or no. And why is it uploading my code to some website? Soon I had a clear answer; I had to "eject" from Expo to do a prod build or just add any native components. Not a good first impression. That said, RN was a win in the long run. It was a lot less baffling than the notorious Xcode/Swift/ObjC/UIKit ecosystem I'd used for years.
- biosboiii 2y agoAs a reverse-engineer tinkering with iOS this reminded me of some system apps. E.g. in the app store you click a button, send a request, receive the response which contains a xml-like structure describing the UI mutation to your action. <Alert> <Header>iTunes Login</Header> <Body>We could not find a user with those credentials.</Body> </Alert> type stuff.
- LudwigNagasena 2y agoServer-Driven UI is a very common architectural pattern.