9 ms·
Basecamp 3 for iOS: Hybrid Architecture
- sgt 9y agoIt seems like a sensible architecture, and the app looks really good. I appreciated the paragraph on hybrid apps, as many people think hybrid == cordova, which is not always the case.
- holydude 9y agoI would be interested in hearing about what made them to abandon RubyMotion.
- zimpenfish 9y agohttps://signalvnoise.com/posts/3807 https://signalvnoise.com/posts/3807 > Why did we move away from RubyMotion? Quite honestly: we needed to buckle down and learn the platform as a team. Doesn't sound like there was any real abandonment as much as "We should use the tools the platform supplies".
- ngsayjoe 9y agoI used to use RubyMotion, then i encountered crashes in my app that weren't there previously (no code changes). It tried debugging for long time in vain, then converted to Swift. With Swift, the language is fine but the way needed to design the app really turned me down (Xcode, UIBuilder, Autolayout, etc.). Then I discovered React Native, not only it is cross-platform (Android, Windows) but it is also a joy to work with (the last time i felt this was with Rails). My apps are now completely on 1 single code base, very maintainable, as native as I want, and hardly crash. Besides, the binaries are so small (4MB iOS & 8MB Android). (PS: My android app https://play.google.com/store/apps/details?id=plus.land https://play.google.com/store/apps/details?id=plus.land)
- ryanwaggoner 9y agoI really admire Basecamp's culture of being thoughtful and forward-thinking, without crossing the line into fad-chasing and reinventing the wheel for no reason. I'm a native iOS developer who is horrified by 95% of the "hybrid" or cross-platform approaches to mobile development out there today. They all seem to primarily be driven by a desire to use Javascript, or some manager naively thinking they can cut their mobile dev budget in half, rather than any concern for what's best for the user. I thought React Native might finally be a sensible approach, but there's a long list of things I really dislike about it. However, Basecamp's mix of native and webview here is thoughtful and appropriate. Rendering those web-based views with 100% native views would be a huge pain for very little gain, and this approach allows them to retain much of the advantages of an overall native architecture.
- gozzoo 9y agoWhat about Fluter?
- ryanwaggoner 9y agoEven more skeptical, especially since it hasn't caught on yet. Now I have to learn Dart, trust that Google doesn't kill Flutter, trust that they'll give it their full support even though they're also supposed to be safeguarding and advancing native Android dev, etc. Plus, I still have to deal with all the issues that any hybrid or psuedo-native solution adds. Things like feature lag, crappy and non-native UI / UX, more pain during debugging / optimizing, extra layer of bugs to deal with, lower community and support, etc, etc. Just learn Swift! It's not that hard! :)
- htormey 9y agoAll good points. Also accessibility is not great with flutter right now as they don’t wrap native components. They take a qt like approach, I.e they attempt to simulate these native components.
- ryanwaggoner 9y agoAgreed, that's my "crappy and non-native UI / UX" point :)
- on_and_off 9y agoRight now it more feel like 'uncanny valley' native. They don't look as bad as a rendered webview, but they look distinctively different from the native implementation. For example on Android, the ripple implementation is very different on Flutter. It might even be that Flutter more closely adheres to the design spec, but since what I am used to is the actual Android implementation, the Flutter one feels wrong. On top of some missing features like accessibility. Perfs are also not entirely where they are promised, but that's a separate issue.
- 9y ago
- jmkni 9y agoGood article. I definitely think that for a cross platform app, going all out with something like Cordova or React Native isn't particularly smart. Sooner or later, you are going to reach a point where you need to use a feature of the underlying OS which your abstraction layer doesn't support well (or at all) and will end up having to make a horrible compromise. Also, apps build with these frameworks usually don't look or feel native, I can generally tell that I'm using something built with Javascript (not always, sometimes the developers nail it, but a lot of the time). However I feel that developing completely separate native versions of the same app with zero overlap in code isn't smart either. It's definitely good to find a middle ground. I personally like Xamarin. Xamarin.Android and Xamarin.iOS get you as close to native as you can get, while still allowing you to share a fair amount of code between the platforms. I'm using this approach on a project at the moment and it's working well. I would love to try Basecamps approach here on a project, it seems very smart.
- htormey 9y ago“ definitely think that for a cross platform app, going all out with something like Cordova or React Native isn't particularly smart. Sooner or later, you are going to reach a point where you need to use a feature of the underlying OS which your abstraction layer doesn't support well (or at all) and will end up having to make a horrible compromise” I can’t really speak for Cordova but one of the strengths of React Native is that you can drop to native code relatively easily. I’ve done this in the past for projects and it’s not been a problem. Can you give a specific example of such a compromise? “I personally like Xamarin. Xamarin.Android and Xamarin.iOS get you as close to native as you can get, while still allowing you to share a fair amount of code between the platforms” I’d say the biggest problem with xamarin, aside from debugging, is that all your developers need to learn c# right? At least with the other approaches (article, Cordova, react native) mentioned they can use languages used by the target platforms (web, mobile).
- WA 9y agoCan you also share between iOS/Android and Web with Xamarin? Because that's what Basecamp's approach helps with.
- jtmarmon 9y agoDoes anyone know of any other apps/companies going with this hybrid approach using turbolinks?
- jeswin 9y agoFor most apps (and especially for apps which have a lot of text like Slack), Native is overkill and suboptimal though some people claim otherwise. You lose standard functionality like Copy, Partial Text Selection, Web Search (Selection), Share (text selection) with Whatsapp, Messenger, Copy Link etc. All of which come free with a Browser view. Even in a shopping app (where Native isn't so disadvantaged), a Browser View lets you do a quick google search on the product or company. Once browsers become faster, I'm hoping native will get relegated to games. If OS vendors are listening, a way to install web apps beyond (a) "Click the three dots and Add to Homescreen" or (b) the PWA thing. Maybe just let web apps into the app store. It's not like the Appstore has a high bar on quality these days, anyway.
- vintagedave 9y ago> Native is overkill and suboptimal though some people claim otherwise. You lose standard functionality like Copy, Partial Text Selection, Web Search (Selection), Share (text selection) with Whatsapp, Messenger, Copy Link etc. All of which come free with a Browser view. Whoa, no. One of the points of having native is to /have/ standard functionality. Native copy/paste, native sharing, etc. All those things have to be implemented and hooked up to by the browser or JS library, otherwise. Not to mention native controls, the native UI behaviour, etc which is otherwise mimicked.
- kitsunesoba 9y ago>For most apps (and especially for apps which have a lot of text like Slack), Native is overkill and suboptimal though some people claim otherwise. You lose standard functionality like Copy, Partial Text Selection, Web Search (Selection), Share (text selection) with Whatsapp, Messenger, Copy Link etc. All of which come free with a Browser view. I can't speak for Android, but under iOS you get all of that for free if you're using UITextViews that have selection enabled (as opposed to UILabels). It'll also give you Wikipedia/Dictionary/Thesaurus lookup popover, data detectors (auto-linking dates, etc) and more. There is functionality somewhat unique to browsers, sure, but it's a smaller set than you may think and in many cases, dropping in a resource intensive WebView for a couple of little perks is what's overkill. Personally, my feelings are that if your app is mostly a webview, just stick with a web page. There's little benefit adding a wrapper, and it strips control away from me as a user (no blockers, etc).
- staunch 9y agoWe already have a native and universal computing platform, the web, and yet we're stuck in 2007 writing code for Apple and Google! Is there any real movement on iPhone or Android moving to replace native apps with offline web apps? Any competitor on the horizon? Apple and Google are being very Microsoftesque in dragging their feet towards the inevitable.
- alexashka 9y agoThere's a thing called battery life and frames-per-second. iPhone was initially supposed to be web-apps, then reality set in. You're under the assumption that 'big bad men are keeping us down', whereas in reality, if you don't want your phone to run out of battery, handling website animations and transitions, the best you can hope for is hybrid, as Basecamp has done.
- staunch 9y agoYes, that was a reasonable and accurate explanation in 2007 or 2009. It's decade later. I'm using Safari for hours at a time in web apps with video and JavaScript. Performance is excellent. Battery life is sufficient. Now let me run these same web apps offline with embedded web servers or cached data!
- mixedCase 9y agoWhich phone and how long does the battery last? I find it us developers tend to readily dismiss low-end, even "middle of the road" hardware when we ourselves use high-end hardware.
- staunch 9y agoFair point, I am using a modern phone, but I think most phones created in the last ~3 years are at this point now.
- simonh 9y agoExcept that the web was never designed to be a universal computing platform. It's a hypertext document navigation system with a hacky, horrible, opaque and insecure scripting language bolted on to the side. An actual distributed cross platform application development and distribution system wouldn't look anything like the web we have today. At least I seriously hope it wouldn't.
- alexashka 9y agoThis is a nice write-up. The summary here would be: we have a native app that provides the most used screens, while the smaller text-heavy pages are rendered as a webview. The webview hide elements that would normally display on desktop, that don't make sense for mobile, via javascript. Turbolinks is used to route links. Overall, I think Basecamp makes very smart hires, with people who care about technology and have a good head on their shoulders - making these types of apps and write-ups possible. Your average mobile dev(sweat)-shop would never be able to pull this off because this involves good decision making and a stable team that communicates well and is up to date on the latest tech.
- s73ver_ 9y agoI would have liked to hear more from them on how the hybrid approach helped them with sharing stuff with Android.
- dep_b 9y agoI've done a ton of apps for iOS and I'm really sure I'm never going to do another implementation of vanilla segue unwind UIViewController routing ever again, unless it's something totally stupid like an on boarding sequence. For more complex applications that also need to open from push notifications or respond to events and have several ways to end up in some sort of screen (like going to a chat view controller discussing a certain document from a push notification) it's just not doable to do all these tight couplings between screens. I create a router that has an enum per screen which can accept another parameter if there can be a certain mode or certain data is required. The router figures everything out and the enums force you to provide the right associated data. Just call something like this from any place in the code you want to segue and it's done: Router.segue(to: .profile(of: .followedUser(selectedUser)))