简体   繁体   English

哪个更好:fcm-django或django-push-notifications?

[英]Which is better: fcm-django or django-push-notifications?

I'm developing a DRF API for an angular frontend and have to implement push notifications and so, I came across two libraries: fcm-django and django-push-notifications .我正在为有角度的前端开发DRF API,并且必须实现推送通知,因此,我遇到了两个库: fcm-djangodjango-push-notifications

I read the README file for both repos to try to understand the differences and choose one.我阅读了两个存储库的README文件,以尝试了解差异并选择其中一个。 It seems to me that fcm-django is better as it provides a better abstraction (only one model: FCMDevice) for all types of devices.在我看来,fcm-django更好,因为它为所有类型的设备提供了更好的抽象(只有一个模型:FCMDevice)。 If I were to use django-push-notifications then I would have to make 3 queries, one for each model (GCMDevice, APNSDevice and WNSDevice), to send the same message, which seems to me utterly redundant.如果我要使用django-push-notifications,则必须进行3个查询(每个模型一个查询)(GCMDevice,APNSDevice和WNSDevice),以发送相同的消息,在我看来这完全是多余的。 However, django-push-notifications appears to be more famous (1.7k stars) so obviously I'm missing something here.但是,django-push-notifications似乎更出名(1.7k星),因此显然我在这里遗漏了一些东西。 The only advantage that I see is that for django-push-notifications I don't need to set up a firebase project if my app is web-only (in which case I would only need WNSDevice model), but still, what if I later decide to develop an android or iOS app?我看到的唯一好处是,对于django-push-notifications,如果我的应用程序仅是基于Web的,则不需要设置firebase项目(在这种情况下,我只需要WNSDevice模型),但是如果我只使用WNSDevice模型,以后决定开发一个android或iOS应用程序? Isn't fcm-django approach more flexible? fcm-django方法不是更灵活吗?

I'm developing a DRF API for an angular frontend and have to implement push notifications and so, I came across two libraries: fcm-django and django-push-notifications .我正在为有角度的前端开发DRF API,并且必须实现推送通知,因此,我遇到了两个库: fcm-djangodjango-push-notifications

I read the README file for both repos to try to understand the differences and choose one.我阅读了两个存储库的README文件,以尝试了解差异并选择其中一个。 It seems to me that fcm-django is better as it provides a better abstraction (only one model: FCMDevice) for all types of devices.在我看来,fcm-django更好,因为它为所有类型的设备提供了更好的抽象(只有一个模型:FCMDevice)。 If I were to use django-push-notifications then I would have to make 3 queries, one for each model (GCMDevice, APNSDevice and WNSDevice), to send the same message, which seems to me utterly redundant.如果我要使用django-push-notifications,则必须进行3个查询(每个模型一个查询)(GCMDevice,APNSDevice和WNSDevice),以发送相同的消息,在我看来这完全是多余的。 However, django-push-notifications appears to be more famous (1.7k stars) so obviously I'm missing something here.但是,django-push-notifications似乎更出名(1.7k星),因此显然我在这里遗漏了一些东西。 The only advantage that I see is that for django-push-notifications I don't need to set up a firebase project if my app is web-only (in which case I would only need WNSDevice model), but still, what if I later decide to develop an android or iOS app?我看到的唯一好处是,对于django-push-notifications,如果我的应用程序仅是基于Web的,则不需要设置firebase项目(在这种情况下,我只需要WNSDevice模型),但是如果我只使用WNSDevice模型,以后决定开发一个android或iOS应用程序? Isn't fcm-django approach more flexible? fcm-django方法不是更灵活吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Django Rest 框架中的 django-push-notifications - django-push-notifications in Django Rest Framework 如何获取 FCM-Django 推送通知的 registration_id (flutter app) - how to obtain the registration_id for FCM-Django push notifications (flutter app) Apple推送通知不适用于带有django-push-notifications的生产环境 - Apple Push Notifications are not working in production with django-push-notifications 使用django-push-notifications库将django推送通知到android - django push notification to android using django-push-notifications library Django多模型继承,django-push-notifications - Django multiple model inheritance, django-push-notifications 如何使用带有 APNS.p8 证书的 django-push-notifications - How to use django-push-notifications with an APNS .p8 certificate Django 和 FCM 发送推送通知 - Django and FCM to send push notifications 2 package fcm-django 和 django-fcm 有什么区别 - What is difference between 2 package fcm-django and django-fcm 使用带有 Django-Push-Notifications 的 Firebase 云消息传递时,如何使用 TTL 来防止消息积压? - How can I use TTL to prevent a message backlog when using Firebase Cloud Messaging with Django-Push-Notifications? 龙卷风,Django和推送通知 - Tornado, Django, and push notifications
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM