ES6 vs Objective-C: What are the differences?
ES6 and Objective-C can be categorized as "Languages" tools.
"ES6 code is shorter than traditional JS" is the top reason why over 98 developers like ES6, while over 211 developers mention "Ios" as the leading cause for choosing Objective-C.
Slack, StackShare, and ebay are some of the popular companies that use ES6, whereas Objective-C is used by Uber Technologies, Instagram, and Pinterest. ES6 has a broader approval, being mentioned in 1461 company stacks & 1725 developers stacks; compared to Objective-C, which is listed in 851 company stacks and 363 developer stacks.
What is ES6?
What is Objective-C?
Need advice about which tool to choose?Ask the StackShare community!
Sign up to add, upvote and see more prosMake informed product decisions
What are the cons of using ES6?
What are the cons of using Objective-C?
Sign up to get full access to all the companiesMake informed product decisions
Sign up to get full access to all the tool integrationsMake informed product decisions
By mid-2015, around the time of the Series E, the Digital department at WeWork had grown to more than 40 people to support the company’s growing product needs.
By then, they’d migrated the main website off of WordPress to Ruby on Rails, and a combination React, Angular, and jQuery, though there were efforts to move entirely to React for the front-end.
The backend was structured around a microservices architecture built partially in Node.js, along with a combination of Ruby, Python, Bash, and Go. Swift/Objective-C and Java powered the mobile apps.
These technologies power the listings on the website, as well as various internal tools, like community manager dashboards as well as RFID hardware for access management.
At the heart of Uber’s mobile app development are four primary apps: Android rider, Android driver, iOS rider, and iOS driver. Android developers build in Java, iOS in Objective C and Swift. Engineers across both platforms land code into a monolithic code base that ships each week.
They use some third-party libraries, but often build their own, since “Many open source libraries available are general-purpose, which can create binary bloat. For mobile engineering, every kilobyte matters.”
On Android, the build system is Gradle. For the UI, Butter Knife binds views and callbacks to fields and methods via annotation processing, and Picasso provides image loading.
As for iOS, all of the code lives in a monorepo built with Buck. For crash detection, KSCrash reports crashes to the internal reporting framework.
Winds 2.0 is an open source Podcast/RSS reader developed by Stream with a core goal to enable a wide range of developers to contribute.
Excerpts from how we developed (and subsequently open sourced) Uber's cross-platform mobile architecture framework, RIBs , going from Objective-C to Swift in the process for iOS: https://github.com/uber/RIBs
Uber’s new application architecture (RIBs) extensively uses protocols to keep its various components decoupled and testable. We used this architecture for the first time in our new rider application and moved our primary language from Objective-C to Swift. Since Swift is a very static language, unit testing became problematic. Dynamic languages have good frameworks to build test mocks, stubs, or stand-ins by dynamically creating or modifying existing concrete classes.
Needless to say, we were not very excited about the additional complexity of manually writing and maintaining mock implementations for each of our thousands of protocols.
The information required to generate mock classes already exists in the Swift protocol. For Uber’s use case, we set out to create tooling that would let engineers automatically generate test mocks for any protocol they wanted by simply annotating them.
The iOS codebase for our rider application alone incorporates around 1,500 of these generated mocks. Without our code generation tool, all of these would have to be written and maintained by hand, which would have made testing much more time-intensive. Auto-generated mocks have contributed a lot to the unit test coverage that we have today.
We built these code generation tools ourselves for a number of reasons, including that there weren’t many open source tools available at the time we started our effort. Today, there are some great open source tools to generate resource accessors, like SwiftGen. And Sourcery can help you with generic code generation needs:
(GitHub : https://github.com/uber/RIBs )
I think next step could be to use Koa but I am not sure.
We are always building new features and replacing old code at StackShare. Lately we have been building out new features for the frontend, and removing a lot of old jQuery code (sorry jQuery but it's time to go).
As we've moved towards the above tech, its really made smashing out new features and updating legacy code super fast, and really fun!
Obviously, using ES6 and TypeScript is what makes it decent in browser contexts. Throw in a bit of React and now we're cooking with gas!
The power of SSR React and then hydrating it client-side to add interactivity and App-like feel is what makes Gatsby powerful.
It comes with a ton of plugins, that are mind-boggling: Image Processing, GraphQL, Node.js, and so much more. This is thanks to a great ecosystem, a great user-base and the revolutionary Community work, which led to the Gatsby repo to be one of the most committed to, out there.
We are phasing out jQuery and jQuery UI in favour or Vue.js and @Vue-cli so we can support building a modern, well-architectured frontend.
For markup and style, I used Pug and Sass, since they’re the perfect match to me. I love the clean and strict syntax of both of them and even more that their structure is almost similar. Also, both of them come with an expanded functionality such as mixins, loops and so on related to their “siblings” (HTML and CSS). Both of them require nesting and prevent untidy code, which can be a huge advantage when working in teams. I used JSON to store data (since the data quantity on my website is moderate) – JSON works also good in combo with Pug, using for loops, based on the JSON Objects for example.
To send my contact form I used PHP, since sending emails using PHP is still relatively convenient, simple and easy done.
DevOps: Of course, I used Git to do my version management (which I even do in smaller projects like my website just have an additional backup of my code). On top of that I used GitHub since it now supports private repository for free accounts (which I am using for my own). I use Babel to use ES6 functionality such as arrow functions and so on, and still don’t losing cross browser compatibility.
Side note: I used npm for package management. 🎉
Basically, the trajectory was we had our iOS app, which started out native, right? It started as a native app, and then we realized you have to go through a review process and it’s slow, and at a very early stage, it made sense for us to make it a wrapped web view. Basically, the app would open, and it would be a web view inside of it that we could iterate on quickly and change very rapidly and not have to wait for app store view process to change it. It wasn’t totally a native experience, but it was as actually a pretty good experience and lasted for a very long time and was up until recently the foundation of our current mobile web experience, which is different from our app situation. So for a long time, basically, our app store iOS Instacart app was a wrapped web view of just our store, a condensed version of our store, which meant that we could add things. We could change sales. We could change the formatting. We could change the UI really fast and not have to worry about the app store review process.
This all changed about a year ago, I would like to say, at which point it became a totally native app. We felt comfortable enough with the product and all the features that we made it a native experience and made it a fully featured app.
We started using CoffeeScript years ago, so the switch to ES6 is quite natural in our team. ES6 of course advances the JS standard to a level of an advanced language. We are using it today simply because it: 1. helps to keep the code shorter, 2. integrates easily with JSX, 3. helps to deal with immutable using const.
While the majority of our stack is now using Swift, we still love Objective-C in many cases, especially low-level software manipulation, where it's just easier. It doesn't hurt that a lot of iOS/OS X Libraries out there are written in it either.
We like to go native with iOS development, and Objective-C has been the only game in town until recent introduction of Swift. We're keeping an eye on Swift, but we aren't giving up on the [old way:to do:things]!
ES6 brings some sweet features to the language. Our favourites are lambda-expressions, block-scoped consts and lets and Promises.