本文介绍了PWA唯一的绿地项目的优缺点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我们的团队正在开始一个新项目,首先考虑react-native作为构建基础的框架(我们大多数人已经在React生态系统中一段时间​​了)。 我们也在讨论仅基于PWA的方法,因为支持即将推出到Safari,而且Chrome已经有很好的一个,并有很多apis可用,桌面PWA即将推出。 我想问社区有关PWA only方法可能出现的复杂情况,这里有我们认为的缺点:$ b​​ $ 1)App / Play商店中没有存在/可发现性 2)不能访问某些类似NFC的API ...(但通过 https://whatwebcando.today ,我们将可以访问我们所需要的所有内容) $ b $ 3平滑UX将很难实现(虽然很有可能做60fps) 4)用户不太熟悉PWA安装/使用过程,可能会发现它疏远了 $ b 5 5)获得良好的缓存/网络和性能体验所需的大量知识(然而,我们已经从Web应用程序开发中获得了大部分知识) 一些优势 1)应用程序商店在应用程序数字内容购买中没有削减开支 2)真正为所有平台提供一个代码库移动和桌面 3)用户设备的重量更轻巧 完全控制发布流程 简单快速更新 假设在项目之后7 - 9个月,PWA是一种可行的方式吗? 与PWA以及有一些类似的问题。试图用我们的PWA初创经验来回答你的问题。 剧透音警报:今天,可以在PWA的任何位置创建适用于任何应用程序的Production,高性能编辑器。向已完成此工作的人员学习 - Ali express 和 Twitter 。 这是一篇最好的文章比较我们今天的不同选择。 问题:1)App / Play商店中无存在/可发现性 答案: PWA Apps可以打包为应用程序(例如Android的.apk)并在应用程序商店中发布。这对所有平台都是可能的(iOS,Android,UWP)。这是一个方便的工具( https://www.pwabuilder.com/ )。 通过创建webview并包装您的应用程序(iOS,Android),它可以将您的网站(URL)打包到托管的Web应用程序中(UWP)或使用Cordova作为polyfil。 。希望Android很快会提供避免这种polyfil的选择。在此之前,我们可以在Cordova中进行换行,并且仍然可以利用PWA功能(例如服务工作者离线缓存,iOS仅支持服务人员从10.3开始)。 当然,放入应用商店也会带来应用商店收入分成的成本。尽管PWA的添加到家选项,您可以慢慢地获得绕过应用程序商店的新用户群。如果您处于付费应用程序空间,则可以增加收入。 问题:2)不能访问某些类似NFC的api ...(但通过 答案:如果您要将应用程序封装在cordova中(如上述解决方案PWA构建器),则可以将cordova插件用于不支持NFC的事物。这将关闭所有硬件访问限制。随着支持开始进入功能,我们可以继续以PWA方式替代。这基本上是PWA中的渐进式:) 问题:3)平滑的用户体验难以实现(尽管非常有可能达到60fps) 答:是的,您无法击败原生应用的FPS。但对于PWA来说,对于大多数应用程序而言并不重要(不包括诸如游戏,大量动画应用程序之类的应用程序),考虑到服务人员 - 缓存和其他PWA功能,应用程序可以快速且平滑地加载,以便不会有任何帧滴眼睛,人眼可以检测到。你不需要超过60fps来实现这一点。 这里有一些很好的解释,你可以找到很多这样的文章,如果你为什么60fps谷歌。 如果你的目标是任何特定的硬件企业环境中,您可以在支持PWA的最新版本的浏览器中测试设备的FPS 此处(铬是一种很好的一个现在)。 问题4)用户不太熟悉PWA的安装/使用过程,可能会发现它疏远。 答案:正如第一个答案中所述,您可以继续将您的PWA网站作为应用程序商店中的应用程序(托管应用程序),并将PWA的好处扩展到网页浏览器。在浏览器用户中使用PWA应用程序的好处(例如离线功能),并要求用户选择添加到主屏幕是PWA获得的另一个好处(增加用户参与度)。 问题5)需要很多知识才能获得良好的缓存/网络和性能体验(然而,我们已经从Web应用程序开发中获知了大部分知识) 回答:上面的PWA构建器链接还可以帮助您生成服务工作者,它可以很简单地解决您的缓存问题。是的,这里会有很多最佳实践,随着PWA的发展,事情将会持续。尽管如此,你不必一切就绪。您可以从一个基本的服务工作者和清单文件开始,将其添加到主屏幕/将其作为应用商店的应用打包,您可以继续在其上添加更多PWA内容。 上述所有工作都将带来您所提及的好处,以及它的价值。 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 stores2) 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 alienating5) 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 advantages1) No cuts taken by app stores for in app digital content purchases2) Truly one codebase for all platforms Mobile and Desktop3) Lighter in terms of weight on user's device4) Full control of release process5) Easy and fast updates6) 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? 解决方案 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 storesAnswer: 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 这篇关于PWA唯一的绿地项目的优缺点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
09-03 11:55