请选择 进入手机版 | 继续访问电脑版
  • 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

reactjs - Advantages and disadvantages of PWA only greenfield project?

[复制链接]
菜鸟教程小白 发表于 2022-6-22 22:05:22 | 显示全部楼层 |阅读模式 打印 上一主题 下一主题

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?



Best Answer-推荐答案


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

回复

使用道具 举报

懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关注0

粉丝2

帖子830918

发布主题
阅读排行 更多
广告位

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap