Need advice about which tool to choose?Ask the StackShare community!
Apache Cordova vs Expo: What are the differences?
Introduction
Apache Cordova and Expo are both frameworks that allow developers to build mobile applications using web technologies such as HTML, CSS, and JavaScript. However, there are several key differences between these two frameworks that make them suitable for different use cases.
Development Environment: One of the main differences between Apache Cordova and Expo is the development environment. Apache Cordova allows developers to build mobile apps using their own preferred tools and libraries, while Expo provides a more streamlined development experience with its own set of tools and libraries. This means that developers who are already familiar with certain tools or libraries may prefer using Apache Cordova for more flexibility, while developers who prefer a more integrated and simplified development process may opt for Expo.
Native Module Support: Another important difference between Apache Cordova and Expo is the level of native module support. Apache Cordova allows developers to access and utilize native device features by using plugins, which can be developed separately. This provides developers with a high level of flexibility and customization, as they can include specific native functionality in their apps. On the other hand, Expo provides a more limited set of pre-built native modules, which may not cover all the functionalities required by some applications. This means that developers who require extensive native module support may choose Apache Cordova, while those who can work within the confines of Expo's pre-built modules may prefer using Expo.
Offline Support: Offline support is another difference between Apache Cordova and Expo. Apache Cordova allows developers to build applications that can work offline by using local storage and caching strategies. This is particularly useful for applications that require offline functionality, such as note-taking or document editing apps. Expo, on the other hand, does not provide built-in offline support, which means that developers would need to implement their own offline functionality if required. Developers who need offline support may choose Apache Cordova for its built-in capabilities, while those who do not require offline functionality may opt for Expo.
Build and deployment process: The build and deployment process is another distinction between Apache Cordova and Expo. Apache Cordova requires developers to set up their own build environment, which involves configuring and managing SDKs, build tools, and other dependencies. This can be time-consuming and may require some technical expertise. Expo, on the other hand, offers a simpler build and deployment process, where developers can build their applications in the Expo cloud and then deploy them directly to mobile devices using the Expo Client app. This makes the build and deployment process more accessible to developers who may not have extensive knowledge or experience with complex build environments.
Platform Support: Apache Cordova supports a wide range of platforms, including iOS, Android, Windows, and more. This makes it a versatile choice for developers who want to target multiple platforms with a single codebase. Expo, on the other hand, focuses primarily on iOS and Android, with limited support for other platforms. This means that developers who require cross-platform compatibility may choose Apache Cordova, while those who primarily target iOS and Android may prefer using Expo.
Access to Device APIs: When it comes to accessing hardware features of mobile devices, Apache Cordova and Expo take different approaches. Apache Cordova allows developers to access device APIs directly by using plugins, providing a high level of control and customization. Expo, on the other hand, encapsulates device APIs behind a set of pre-built modules, which abstract the underlying functionality. This means that developers who need fine-grained control over device APIs may choose Apache Cordova, while those who prefer a simpler and more consistent API may opt for Expo.
In summary, Apache Cordova offers more flexibility and customization options with its open development environment, extensive native module support, offline capabilities, and broad platform support. Expo, on the other hand, provides a streamlined development experience, simpler build and deployment process, and a more consistent API for accessing device features. The choice between Apache Cordova and Expo ultimately depends on the specific requirements and preferences of the developer and their project.
Heya, I'm very new on here! And I hope I can get advice on this matter :
We are working on a new app. The web version is on Sails.js (V1)/node.js/vue.js. Started with the Web App default settings (including login and payments, which we are using use). We started with a web version to give access to the customer to start creating the data while building the mobile version. (iOS and Android)
I heard of Apache Cordova, that using the same JavaScript/css could be used to not re-code the front-end of the app for iPhones and Androids. I've been told that it is end-of-life now (? - I couldn't find this info myself).
I saw that Vue Native might be an alternative and would only need a few adjustments from our web version as we are using Vue.js for the frontend.
I know next to nothing on this, so I would really appreciate it if you guys could point me to possible solutions you've used and why instead of searching through all the existing solutions. (I'm very open to know if there are alternatives to those two too !!)
We will need to be using the GPS functions of the mobiles, which is a big part of the app.
Thank you!
i don't have any experience with the vue native what so ever but i think Quasar and Ionic are the best options for an HTML/CSS/JS based mobile app ionic has full support of vue and quasar is built on vue you may have to change some configurations in your project files
Hello guys, I am new here. So, if I posted without specific guidelines, please ignore.
Basically, I am an iOS developer and developing native apps for the last three years. Recently, I started learning React Native to develop apps for both platforms. If anyone out there knows any useful resources that will become a better react native developer.
#newbie
Well, the first resource I would recommend you is my upcoming book by Packt Publishing, "Professional React Native", but it's due late January next year :) . Now jokes aside (the book's real by the way :) ), the easiest way to build a iOS/Android/Web app with React Native is to do: npm install -g expo-cli expo init some-project cd some-project expo eject
You might have heard of Expo, but trust me, stay away from it. Expo highest value is that it's an already pre-configured 3 platforms environment, but if you don't eject then you're vendor-locked to what Expo has to offer in iOS and Android, which is very poor compared to going full React Native on these platforms, they can't even handle Google Sign In properly and by the way, even if your app is 10 lines of code your app size will be over 40 MB if you don't eject, yep it's that bad, plus the performance is regular and the loading times slow, not to mention that you're stuck with their build service which the free tier makes you wait for hours for a free build slot. It's important to note that when ejecting you don't lose the Web, you simply do expo start --web to start your dev environment and expo build:web to build a static website that you can serve with any web server. Regarding state management, don't bother with "lifting state up" philosophies mixed with Context API to manage your state, lifting state is a great pattern and helps your codebase, Context is great to avoid prop-drilling, but NEVER mix them to achieve app-wide state management, for that, simply go for Redux or MobX, the hype is all about Redux, but I consider MobX far better in many aspects. However, as you're getting new into this I would recommend you start with Redux AND PLEASE grab yourself npm install @manaflair/redux-batch so that you can batch updates and don't bring your app to a crawl. Forget that "connect HOC" thing with React-Redux, don't bother for a second with it, go with Hooks and useSelector and useDispatch and the likes, it will make your code SO much cleaner and smaller. Adopt clean and new Hooks philosophy, avoid writing class components as much as possible and write function components augmented with Hooks.
Our stack roughly divides into three major components, the front-end, back-end and the data storage.
For the front-end, we have decided to go with React Native via Expo. This allows us to target both Android and iOS with a single codebase. Expo provides "managed workflows" and an SDK that will simplify development and deployment.
For the back-end, we have decided to use Python. Python is the language of choice for machine learning (ML). It has extensive support for traditional ML algorithms (e.g. random forests) via Scikit-Learn and the SciPy ecosystem. On top of this, our industry partner has provided us their current solution written in Python. We decided to expose the back-end as a REST API using FastAPI. This allows us to nicely separate concerns from the rest of the codebase. FastAPIs use of static type hints, validation with Pydantic, and automated documentation allows us to build better APIs faster.
For data storage we decided to use a MongoDB Atlas, a NoSQL database. We decided to use a NoSQL database because we need to store large amounts of data (e.g data from the wearable IMUs). Moreover, due to the ever changing nature of a startup we require flexibility. NoSQL databases are schema-free which enables us to modify our schema as we see fit.
We plan on using GitHub Actions (GA) to orchestrate our CI/CD. Given GAs broad support of languages and workflows, it's hard to go wrong with this decision. We will also be using GitHub for version control and project management, so having everything in one place is convenient.
The major components of our CI/CD for the backend will consist of black for autoformatting, flake8 for linting, pytest for unit-testing, and mypy for static type checking and codecov for coverage reporting. We plan to use separate Docker containers to package the back-end and front-end components and use Docker Compose to launch the app. This allows us to better separate concerns, manage dependencies, and ensure our app is deployable anywhere.
I've done some Hybrid Mobile apps with both technologies Apache Cordova
and React Native
and described my experience in my blog.
In a few words, I would suggest to use each technology in accordance what what is your current code base and what do you want to achieve.
React Native is a great option if you need that extra edge in performance with multi-threading and native UI rendering. Or you already have a web app based on React which you want to port to mobile.
On the other hand, if you have an existing web application code and you want to reuse some or all, including the ability to use web third-party libraries, then Cordova is the best option.
Proguard
?
ProGuard is the most popular optimizer for Java bytecode. It makes your Java and Android applications up to 90% smaller and up to 20% faster. ProGuard also provides minimal protection against reverse engineering by obfuscating the names of classes, fields and methods.
How to use it inCordova
app?
I didn't find any plugins for it. So I've implemented it by myself and shared it on GitHub.
Feel free to use!
Pros of Apache Cordova
- Lots of plugins48
- JavaScript35
- Great community26
- Easy Development25
- Easy to learn18
- Cross platform15
- Open Source7
- Easy, fast, not buggy in my experience with my code6
- Lots of descendants; PhoneGap, Ionic, Intel XDA etc6
- Can use CSS34
- Rich HTML 54
- Easy debugging4
- HTML, CSS and JS3
- Fast and hot reload3
- Rich css ui3
- Use what you code in your browser3
- Need a light system2
- Native Web Technologies2
- Without extra tooling needed2
- One code base everywhere2
Pros of Expo
- Free15
- Hot Reload13
- Easy to learn9
- Common ios and android app setup9
- Open Source6
- Streamlined6
- Builds into a React Native app5
- PWA supported2
- Plugins for web use with Next.js1
Sign up to add or upvote prosMake informed product decisions
Cons of Apache Cordova
- No native performance2
- Hard to install1
- Hard to install0