Seeking Recommendation

When Meteor came out a couple of years ago I picked it not only because it was fun developing, but I really liked the prospect of being able to have a single code base for desktop and mobile.

I am in the process of re-writing my application, ditching blaze because I want SSR, so I am trying to choose between VueJS and maybe Svelte (I just can not bring myself to learn React).

Do you guys think Meteor+Cordova is still a good option to build a mobile app? If so, what are your recommendations?

3 Likes

I’m hoping others share here too, but I think Meteor w/ Cordova is still a top way to produce mobile apps with minimal coding.

A really top notch Cordova app, that I didn’t even realize was Cordova is JustWatch, I use this app pretty often to find the best options to stream movies & shows since there are so many platforms now.

You’d probably never think it’s not 100% native.

Also, I don’t think SSR is as important as the trends are making it look right now, I think fast apps are the big deal. To me SSR makes development a bit harder, and puts a lot more load on the server during production, where I think that “clients” should share some of the processing load. Smart phones and laptops are light years ahead of where they were 8 yrs ago, so SSR will seem less relevant every year that hardware advances in my mind.

I just turned my Meteor + Vue app into an official PWA (desktop app & mobile app) with just a couple hours of work, and adding two new JS files to my project and a couple <meta> tags in my main.html file. It blew my mind :exploding_head: My app, without SSR performed or even final performance tweaks did very well on Google’s Lighthouse tests. I used this guide thanks to @jkuester. Also I figured out how to do native web notifications on all devices other than iPhones, but people expect Apple will make changes that allow them this fall (iOS 14 coming, still a rumor though).

If you’ve never seen a PWA app for desktop (download button automatically pops up in Chrome) and mobile, you should check out this example Vue PWA app

I now have an amazing single code base for a Web App, Desktop App, and Mobile Apps that work on Androids, iPhones, and Windows phones or others. I get to bypass the App Store review processes and keep my app current without my users doing updates. This is crazy amazing!

Vue is the dream for me and it is very mature compared to Svelte if you ask me. But pick what you might like the best. The Vue community is the biggest open source community on the planet right now, as far as I can tell, so there are so many things done :white_check_mark: as examples out there that it’s fun to build with.

I’m still possibly planning to use Cordova if I want my App in the App Stores eventually, but I can probably hold off for several months or a year on that now and have more simplicity for my initial user base.

5 Likes

Holy crap, that is cool. Need to check into that. Thanks for your feedback.

So you are not using SSR for your VueJS app?

Correct, no SSR for me, I thought about it at the beginning of this project, even did a bit of testing with it, but to me SSR would be more well suited for fast loading websites, just 1 last thing you can do if you want max performance. But for a full multi-user app, I think it has more drawbacks than benefits.

Many people favor SSR for static site generation, due to extra good SEO ease, but there are other ways to SEO optimize a Meteor app too. Static site generation is a cool use case, but it has so many different priorities than real-time mulit-user app development. Everything has tradeoffs, but for me I just don’t want the extra complexity of SSR when I have so many other things to handle. Vue is VERY fast already due to its design and is going to be even faster in Vue 3. And Svelte is super-fast too. Devs from Vue & Svelte both shared optimizations and were able to improve both projects.

1 Like

I definitely recommend Meteor+Cordova for mobile apps, especially since the recent update to Meteor’s version of Cordova proved there is on-going commitment from Tiny (https://github.com/meteor/meteor/issues/10718#issuecomment-555981992)

You can’t beat a single code-base and not having to provide a separate API for native mobile apps. Development and maintenance is a dream. The best bit is hot-code-push though - from a single deploy I update all my web, iOS and Android clients. No need to update app store releases and lengthy Apple reviews every time. Means you can easily do quick development cycles rather then waiting until you’ve got enough to bother with a new release.

Using a Material Design library (Vuetify) makes it easy to develop UI which looks great and works briliantly on all devices.

I’m using SSR with Vue, and even added pre-caching and critical CSS to make my landing pages extra fast. I don’t use SSR on logged-in routes though, I only use it on my sales pages. As @mullojo says, it increases load on the server. For my logged-in users SSR isn’t really necessary because they probably have all the app.js, css, and even any pre-visited code-split routes cached in their browser or bundled into the apps, so loading is quick. You only really need SSR on certain pages where you want new visitors to get a quick load time. If those pages are static then you can cache it (as I’ve done), if not you can SSR on demand with hydration.

Have fun! (and it is fun - I have zero frustration points with this setup).

1 Like

Now I’ve read @mullojo’s post a bit more closely, and looked as his demo I’m super impressed with his usage of PWA instead of Cordova! :clap: :clap:

For a suitable project PWA would definitely be easier than Cordova. However, here’s why I need/use Cordova instead:

  • Some users just don’t get PWAs. I had “Add to Homescreen” working on Android and iOS long before I had apps, but user’s would still ask if I had apps for Android and iOS, so I built with Cordova just to shut them up :man_facepalming: :wink:
  • Later I needed to use some Cordova plugins, particularly background gelocation so my app can track Lone Worker safety even when their phone is in their pocket.
1 Like

I’m pretty sure I’ll eventually add Cordova to my stack for those same reasons :slight_smile: Just another reason I love Meteor. I still have to see how more people “handle” the PWA install idea since it is still so new for most people. And Apple has really dragged their feet on PWA “awareness”, but almost any app today should include PWA support as a base design requirement. All the big platforms are quietly adding it.

1 Like

I just removed SSR from my project, but it still restarts the server when I edit a client file. Any ideas why?

Maybe just build a super simple clean project from this guide and give it a try…

I don’t know enough about your projet to advise, but that shouldn’t happen.

@jamgold, I’ve replied in your other thread…

For most apps I’d definitely recommend PWA over Cordova at this point. Or to put it in other words, I’d look at options beyond PWA only after I have determined that the app at hand absolutely must have some feature that PWA does not support right now and will not in the foreseeable future. Most apps don’t have such requirements. With PWA:

  1. you’ll move really fast, it’s truly the same code running on all platforms
  2. in addition to getting installations on phones, you’ll also get the same feature on desktops - the app will run in a separate window with the browser UI hidden (you can check it out here in the forum, in chrome there’s an install button at the right edge of the url field)
  3. you don’t rely on a very complex system that is Cordova and its integration with Meteor
  4. an often overlooked side effect of PWAs - you will not subject yourself to the pain that is the App/Play store and their control. Deploy code when you want and how often you want.

Like wildhart said, users not “getting” PWAs is a thing. But this can also be mitigated. It is possible to override the browser’s default PWA installation flow (the ‘Add to home screen’ popup) with the beforeinstallprompt event and handle the installation process in your own UI instead.

5 Likes

I agree with this, I’m also pushing for PWAs over Cordova and Native. Once iOS implements notifications, I don’t see a reason at all to go the native for most of the apps.

3 Likes

Here’s a real-world example of life on the other side (without Meteor or Cordova)…

I have a new job (yay!) and I’ve inherited another project - I’m responsible for the node+mongoose backend and Vue frontend, a colleague is responsible for the native iOS app. There are various collections referencing each other by _id, which need to be displayed to the users, and also some calculated fields (e.g one document isActive if it is used by an active document in another collection). Typical stuff.

I have asked to do the reactive joins and computed properties in the client because it’s super easy (particularly using Vue), but heavy lifting for the server, particularly making sure the isActive fields are kept up-to-date.

However, the other dev has asked if we can do all that on the server so he doesn’t have to reproduce the joins/computed fields in swift which doesn’t make it as easy for him. And I see his point.

But jeez, I wish we could use Meteor+(Cordova|PWA) for this project! Write-once-run-anywhere is such a time saver. We’re both having to reproduce ALL the client UI. :man_facepalming: Gonna try harder on Monday, but I think it’s too late to convert this project to Meteor…

3 Likes

We are dropping Meteor+Cordova in favor of PWA. We started our company with a couple of Meteor + Cordova apps. And after doing some SWOT analysis, we have concluded that us and our users will benefit a lot for choosing PWA over Cordova.

The biggest negative that we will lose is IOS push notifications (as @alawi mentioned) but the benefits of doing PWA for us far outweighs this negative. And we are bullish that iOS will support it before the end of the year.

We also highly recommends SSR (+inline css, +fast-render-like data) especially if you will get a lot of traffic from SEO. Achieving a one-render hydration without data query is amazing

3 Likes

I understand how PWA has benefits for developers, but I’m interested what your benefits to users would be?

I knew PWA was supported on smartphones – with somewhat limited support on IOS for the time being – but I didn’t know until I read your post that it was supported on OS X desktop. I installed Journalistic. Amazing!

1 Like

That is an easy answer. Each page in our site has a url. And thus available in search.

We connect property buyers to brokers and agents. Buyers will easily find the properties through a Google/Bing search. It benefits both buyers and sellers. In a cordova app, the app download is a big hurdle.

Also, there is an indirect benefit to users when developers can have more time improving one system than dividing time in maintaining two separate ones.

I’m totally in favor of Meteor+Cordova.
I tried with PWA, and although functionality was the same (I didn’t check PushNotifications, though), final users were asking to get it from the stores. May be in the future where/if final users are more used to PWA (instead of stores) will consider PWA again.
Meteor+Cordova having the Hot Code Push make it also great for quick improvements without waiting for the stores approval/updates.

1 Like

It depends on the the app you are building and how you plan to market it.

Some of us here are building enterprise apps and there is no need to put in the stores, some running websites and just want to improve the mobile experience.

Now for the consumer apps, yes , this is what the most consumers currently accustomed to, however keep in mind few things:

  1. App stores (Google and Apple) are getting extremely saturated with many VC funded apps and there is a very strong long-tail effect and strong competition on price
  2. you can easily get copied due to exposure
  3. you will have to pass a rigid approval process, take a look at the recent example for the Hey app (from the Basecamp team) rejection, https://www.theverge.com/2020/6/16/21293419/hey-apple-rejection-ios-app-store-dhh-gangsters-antitrust
  4. Stores take 30% of your profit
  5. PWA installation is in fact better experience then native apps, it is just apple slowing adoption and consumers are not used to it
  6. there are many PWA stores already popping up
  7. you can distribute PWA app in Play and Microsoft stores
  8. the update process is out of the control of the developers, over the air push is a hack that could be stopped anytime

To sum the only reason why PWA is still not mainstream is consumer familiarity and Apple.

So I would encourage developers to go with PWA whenever they can to break the stores dominance and save themselves money and time unless they absolutely need to go to those stores.

I for one can’t wait to get rid of the Play/Apple stores duopoly, we spend large money on these hardwares, we deserve more options.

1 Like

just today, I tried to run the todos meteor svelte repo on mobile. Because I was thinking svelte should be the best option for mobile since the performance and what is not. However, I could not get the app to work. The app just shows an empty screen in the emulator and even that happened after spending sometime with preparing all of the prerequisites. First, it complained about jdk so I installed the latest version then it complained jdk must be v8 so I tried to find a download link for jdk 8 that is not from the official orcale website cuz I don’t wanna sign up for that crap company then it complained about Android studio not being installed which it was but gave me a choice to install Gradle instead so installed gardle. Basically, I do not think mobile meteor svelte is ready for production. Maybe I missed something important, the prerequisites are normal and no big deal but I hated that I wasted so much time but at the same time that white empty screen is just not a good first impression