Jump to content

Porting my MODX add-on to Processwire - basic questions


Gadgetto
 Share

Recommended Posts

Hi,

I'm starting the port of my MODX add-on GoodNews - a powerful integrated group and newsletter mailing system - to Processwire:

http://www.bitego.com/extras/goodnews/

I know I'll have a long and hard way to go... ?

In order to plan the basic principles for my module in advance, here is my first question (more will come, that's for sure):

GoodNews Subscribers are basically MODX users extended with the necessary meta informations to handle subscriptions and other mailing related stuff. The benefit for a subscriber being a MODX user is that it I also can use the permission system of MODX. How should I handle this in Processwire? Should subscribers also be Processwire users? Or is it better to use a custom user type? How will processwire handle lists of thousands of users?

Thanks in advance for your help!

Greetings,

Martin

Link to comment
Share on other sites

Sorry to answer a question with another question, but is there a specific reason you want subscribers to be users? You mentioned being able to use the MODX permission system, but what do you use it for?

While there's no technical reason why you couldn't make your subscribers ProcessWire users, the reason I'm asking is that unless there's a solid reason for it, I'd recommend not going that route. You'd essentially have to build an open registration system, where anyone can create new user accounts. While that isn't necessarily a problem in itself, coupled with any kind of permission related issue things could get very ugly very fast.

That being said, depending on your needs you could use users, or you could create a custom template for your subscribers, or you could even create your own database table(s) – though that last option would likely not be preferable, considering that you wouldn't be able to benefit from ProcessWire's API.

Whether you go with a custom template or choose to build upon built-in system users, I'd recommend looking into $pages->findMany(). Thousands of users / pages shouldn't be an issue.

  • Like 1
Link to comment
Share on other sites

Regardless wich way you decide to go re the user question, there are already modules available that seem to implement parts of what you want create. Maybe they can serve as additional stuff for reading, or maybe they can be implemented as required (sub)-modules for yours.

http://modules.processwire.com/modules/newsletter-subscription/

Also Ryan has posted something about building a bare email sending module in the near past. Currently does not find it, but will add the link if I do.

EDIT: I found it, but it will become a ProModule:

Quote

In addition to that, I've also recently been working on ProMailer which is a module I developed for managing the weekly newsletter distribution. This is something I actually developed a few years ago, but have recently been improving it and making it more into something that might also be helpful to others. The module is useful if you want to do your email newsletter production, distribution and subscriber management in-house, rather than outsourcing to an external service like MailChimp. That's how we do it at processwire.com, and have for several years. Though the module has been kind of bare-bones (since I've been the only user of it), but I've been recently improving upon it not just for the new website, but also hopefully to share too.

From the last Blogpost (https://processwire.com/blog/posts/processwire-3.0.121-core-updates-and-more/) the very last paragraph.

Link to comment
Share on other sites

1 hour ago, teppo said:

Sorry to answer a question with another question, but is there a specific reason you want subscribers to be users? You mentioned being able to use the MODX permission system, but what do you use it for?

While there's no technical reason why you couldn't make your subscribers ProcessWire users, the reason I'm asking is that unless there's a solid reason for it, I'd recommend not going that route. You'd essentially have to build an open registration system, where anyone can create new user accounts. While that isn't necessarily a problem in itself, coupled with any kind of permission related issue things could get very ugly very fast.

That being said, depending on your needs you could use users, or you could create a custom template for your subscribers, or you could even create your own database table(s) – though that last option would likely not be preferable, considering that you wouldn't be able to benefit from ProcessWire's API.

Whether you go with a custom template or choose to build upon built-in system users, I'd recommend looking into $pages->findMany(). Thousands of users / pages shouldn't be an issue.

My last MODX project was an online shop with newsletter system. Registered shop users could also subscribe to a newsletters. So subscribers being MODX users was a big benefit. Otherwise I’d have to create a subscriber user + a MOX user and combine the data.

When a user is logged in into his shop account, he could also edit his newsletter subscriptions.

Logged in users could also have access to their newsletters history.

Link to comment
Share on other sites

1 hour ago, horst said:

Regardless wich way you decide to go re the user question, there are already modules available that seem to implement parts of what you want create. Maybe they can serve as additional stuff for reading, or maybe they can be implemented as required (sub)-modules for yours.

http://modules.processwire.com/modules/newsletter-subscription/

Also Ryan has posted something about building a bare email sending module in the near past. Currently does not find it, but will add the link if I do.

EDIT: I found it, but it will become a ProModule:

From the last Blogpost (https://processwire.com/blog/posts/processwire-3.0.121-core-updates-and-more/) the very last paragraph.

Yes I did read the announcement from Ryan regarding the Mail module. I don’t know what features Ryan’s module will provide (it will be for sure a very pro tool), but we have an extremely strong sending engine with multi-processing which can handle a huge set of mails. We tested with about 100.000 subscribers without any problems. Mailings can be sent in a reasonable time.

Plus GoodNews will be free.

  • Like 3
Link to comment
Share on other sites

I have built and used some custom newsletter systems already. But 100k is a huge number. With regular hosting accounts I'm able to send 500 mails per 250 second chunks in a single thread. So I never sent more then 15k. 

To send 100k would take 15 hours this way. ?

If you not already know it, there is the wireMail system in PW available, plus some extending modules for different purposes. When I'm back in the office, I provide some links. 

Link to comment
Share on other sites

13 minutes ago, horst said:

I have built and used some custom newsletter systems already. But 100k is a huge number. With regular hosting accounts I'm able to send 500 mails per 250 second chunks in a single thread. So I never sent more then 15k. 

To send 100k would take 15 hours this way. ?

If you not already know it, there is the wireMail system in PW available, plus some extending modules for different purposes. When I'm back in the office, I provide some links. 

Our sending engine is capable of running multiple parallel send-processes. Therefore the time needed to send out such number of mails can be drastically reduced (of course if your sever can handle the load).

I already had a look at the implementation of WireMail. I'll definitely use existing modules as dependencies wherever applicable.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...