[英]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-django和django-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-django和django-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.