简体   繁体   中英

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 .

I read the README file for both repos to try to understand the differences and choose one. It seems to me that fcm-django is better as it provides a better abstraction (only one model: FCMDevice) for all types of devices. 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. However, django-push-notifications appears to be more famous (1.7k stars) so obviously I'm missing something here. 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? Isn't fcm-django approach more flexible?

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 .

I read the README file for both repos to try to understand the differences and choose one. It seems to me that fcm-django is better as it provides a better abstraction (only one model: FCMDevice) for all types of devices. 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. However, django-push-notifications appears to be more famous (1.7k stars) so obviously I'm missing something here. 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? Isn't fcm-django approach more flexible?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM