Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
688 views
in Technique[技术] by (71.8m points)

reactjs - Advantages and disadvantages of PWA only greenfield project?

Our team is starting new project with initial consideration of react-native as a framework to build on top of (Majority of us have been within React ecosystem for a while now).

We are also discussing PWA only based approach since support is coming to Safari soon and Chrome already has good one with a lot of apis available and Desktop PWA's coming soon.

I wanted to ask community about possible complications related to PWA only approach, here are drawbacks we thought of:

1) No presence / discoverability in App / Play stores

2) No access to certain api's like NFC... (but by the looks of https://whatwebcando.today in chrome, we will have access to all we need)

3) Smooth UX will be hard to achieve (although very possible to do 60fps)

4) Users are not too familiar with PWA installation / usage process, might find it alienating

5) A lot of knowledge required to get good caching / networking and performance experience (Most of this we do know from web app development already however)

Some advantages

1) No cuts taken by app stores for in app digital content purchases

2) Truly one codebase for all platforms Mobile and Desktop

3) Lighter in terms of weight on user's device

4) Full control of release process

5) Easy and fast updates

6) Our team will develop higher quality code with tooling they are already familiar with as opposed to learning native bits of react native.

Assuming go live for the project after 7 - 9 months, is PWA a viable way to go forward with?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Like most of us here, we are getting started with PWA as well and had some similar questions. Trying to answer yours with our PWA startup experience.

Spoiler alert : Its is possible to create Production ready, high performing, write once run anywhere apps in PWA today. Learn from people who have done it- Ali express and Twitter. Here is one best article on comparisons of different options that we have today.

Question : 1) No presence / discoverability in App / Play stores

Answer: PWA Apps can be packed as an app(like .apk for Android) and published in app stores. This is possible for all platforms(iOS, Android, UWP). Here is a handy tool to pack (https://www.pwabuilder.com/).

What it does is packs your site(URL) into a hosted web app if supported(UWP) or use Cordova as polyfil by creating a webview and wrap your app(iOS, Android). Hoping Android will soon give option to avoid this polyfil. Until then, we can wrap in Cordova, and still take advantage of PWA features(like service worker-offline caching. iOS supports service worker only from 10.3).

Off-course, putting in app store comes with the cost of app store revenue sharing. Still with the PWA "Add to home option", you can slowly get new user base bypassing app store. One good back door for increased revenue if you are in paid app space.

Question : 2) No access to certain api's like NFC... (but by the looks of https://whatwebcando.today in chrome, we will have access to all we need)

Answer: If you are wrapping your app in cordova (as in above solution- PWA builder), you can use cordova plugins for things that are not supported..say NFC. This closes all hardware access limitations. we can keep replacing with PWA way as the support starts to come in feature. That's essentially what "Progressive" in PWA :)

Question :3) Smooth UX will be hard to achieve (although very possible to do 60fps)

Answer: Yes, you can't beat the FPS of a native app. But with PWA, it doesn't matter for the majority of the app out there(exclude apps like games, heavily animated apps), considering service workers- caching and other PWA features, apps can load fast and smooth enough to not have any frame drops that a human eye can detect. You wouldn't need more than 60fps to achieve that. Here is some good explanation and you can find so many such articles if you google for why 60fps.

If you are targeting any specific hardware in a enterprise environment, you can test the device's FPS here in the latest version of browser that supports PWA (chrome is a good one for now).

Question 4) Users are not too familiar with PWA installation / usage process, might find it alienating.

Answer: As mentioned in the first answer, you can continue to have your PWA site as an app (hosted app) in app stores and extend the PWA benefits to the in a web browser as well. PWA app benefits for the in browser user as well(like offline capability) and the option of asking the user to "Add to Home screen" is an another level of benefit you get with PWA (to increase the user engagement).

Question 5) A lot of knowledge required to get good caching / networking and performance experience (Most of this we do know from web app development already however)

Answer: PWA builder link above also helps you generate "Service worker" which solves your caching with not much complexity. Yes, there will be a lot of best practices out there and things will be keep coming as PWA evolves. You don't have to have everything in place to start with though. You can start with a basic service worker and manifest file to add to home screen/pack it as an app for app store and you can keep adding more PWA stuff on top of it as you progress.

All of the above work is going to give the benefits that you have mentioned and its worth the errfort


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...