Vue.js and Wrapper like Cordova: The Winning Choice for Mobile App Development

Sioli Francesco
carpediem-tech
Published in
3 min readJun 14, 2023

In this article, we will explore the compelling reasons why using Vue.js in combination with Cordova or any other framework that wraps your HTML/JavaScript app into a native container can be the winning choice for mobile app development.
I will speak from my personal experience in the field and show you how this combination offers a perfect balance between technical power and ease of use, ensuring excellent results in the world of mobile development.

Simplicity and speed of learning

When I first approached Vue.js, I was pleasantly surprised by its ease of use.
Compared to other frameworks that seemed to require a specific course to master them, Vue.js has a friendlier approach.
I realized that I could quickly create interactive user interfaces without getting lost in a sea of technical complications.
This can also mean that many more people can contribute to the project you are creating, making maintenance easier and faster!

Scalability and flexibility

Another aspect that I appreciated about Vue.js is its modular nature.
With Vue.js, I can create reusable components that simplify code management.
It’s like having a set of LEGO bricks that I can combine to create the desired application.
This flexibility has allowed me to develop complex mobile apps without having to worry about tangled and difficult to maintain code.

Below you can find an example of a basic “.vue” page.
Inside the “<template></template>” tags, you will find simple HTML code with the use of components (which are also .vue files) present within the solution.
Within the “<script lang=”ts”></script>” tags, there is the JavaScript part, the component imports, the declaration of variables and the logic of our page.
Finally, between the “<style scoped></style>” tags is the CSS part.
The “scoped” keyword indicates that the CSS rules are applicable only and exclusively to our page, by removing it, the CSS rules will have global value within the project.

<template>
<div class="appContainer">
<spinner-container v-if="!loaded"></spinner-container>
<h1 v-else>Hello world</h1>
</div>
</template>

<script lang="ts">
import { Options, Vue } from 'vue-class-component';
import SpinnerContainer from '@/components/standard/spinnerContainer.vue';

@Options({
components: {
SpinnerContainer
}
})
export default class App extends Vue {

loaded: boolean = false;

created() {
setTimeout(() => {
this.loaded = true;
}, 1500);
}

}
</script>

<style scoped>
.appContainer {
background: black;
}
h1 {
color: white;
}
</style>

Performance and reactivity

When you develop mobile apps, speed and reactivity are essential.
Vue.js did not disappoint me in this sense.
Thanks to its lightweight and fast virtual rendering engine, the apps developed with Vue.js have been incredibly smooth, even on older mobile devices… and we know how much users hate slow and choppy apps!
Moreover, Vue.js’s incremental rendering has allowed optimizing the performance of applications, offering an even better user experience.

Multi-platform compatibility

Developing mobile apps for different platforms can be a real challenge and can take a lot of time.

Cordova is a framework that enables developers to create mobile applications using web technologies, offering a way to build cross-platform apps with a single codebase and access to native device features.

With this combination, I saved a lot of time and energy, focusing on the development of features rather than managing platform differences.
This approach does not mean losing some of the native features that you would have with other languages, on the contrary, it means being able to focus more on the differences, aware that the common parts are already developed!

Unfortunately, in April 2022, Microsoft App Center deprecated Cordova support. Ionic’s open-source powerhouse is the perfect replacement for those looking to migrate from Cordova.

Support ecosystem

Finally, Vue.js’s support ecosystem was another determining factor in my choice.
I found a wide range of components, plugins, and useful resources that helped me tackle challenges during mobile app development.
And if I ever found myself in difficulty, I could rely on comprehensive and well-curated documentation to find the answers I needed.

I hope these motivations can help you consider the use of Vue.js and Cordova/Ionic’s open-source powerhouse for the development of your mobile apps.
My experience in the field has shown me that this combination is winning in many respects.
In conclusion, “listen to a fool” and take your mobile development to the next level!

--

--