Cross Platform project structure
-
Hey,
I am wondering if there is a way to develop an cross platform app (web, android and iphone) sharing a single codebase.
The cordova and web versions would have some differences in the pages and business logic (expanded functionality).
How would you guys set this kind of project up? Is it possible? Or should I mantain two separate code bases, copy and paste components and adapt them?Regards,
João -
Take a look at quasar docs, that is the main purpose of Quasar, have one codebase for all of your platforms.
-
@shone I have. Could you point to a specific part of the documentation where it shows where I can handle the differences between the platforms? And what is the advised structure for the distinct components?
Thanks
-
You can use platform detection in your templates and JS, for example, if you want to use a Cordova-specific technology. However, if you’re only showing and hiding stuff in the screen, it’s recommended to use platform CSS classes.
-
By the way V0.15 makes great advances in this regard, and makes it much easier to deploy multiple versions of a single app. It is due out shortly
-
Personally, I would go for the PWA template.
More about PWAs: https://blog.nrwl.io/a-new-day-for-pwa-e7c3342b753c
-
@jlugao as @leopiccionia said you can use Platform Detection, also quasar it self comes with materialize and ios style and you can use Cordova and Electron wrappers to get mobile/desktop apps.
-
@LaurentPayot @jlugao - 0.15 template is universal so you can use one template for all platforms. Isn’t it just amazing?!
-
@mariaczi yes sure the best thing to do is to wait for Quasar v0.15 and its unique universal template. And then build a PWA with it