Jump to content
Gadgetto

Porting my MODX add-on to Processwire - basic questions

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

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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. 

Share this post


Link to post
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

Share this post


Link to post
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

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Gadgetto
      Hi,
      for my GroupMailer module I've created a custom Fieldtype + Inputfield module which provides multi-column field values. The first field column is a visible text field and there are some other columns which are not presented to user (they are rendered as hidden form fields).

      This is the database schema:
      $schema['data'] = 'text NOT NULL'; // we're using 'data' to represent our 'subject' field $schema['sendstatus'] = 'tinyint NOT NULL DEFAULT 0'; // message send status $schema['recipients'] = "int(10) unsigned NOT NULL DEFAULT 0"; // recipients counter $schema['sent'] = "int(10) unsigned NOT NULL DEFAULT 0"; // sent counter $schema['started'] = "int(10) unsigned NOT NULL DEFAULT 0"; // message sending start $schema['finished'] = "int(10) unsigned NOT NULL DEFAULT 0"; // message sending finished This are the ___wakeupValue and ___sleepValue methods:
      Now I try to extend this Fieldtype/Inputfield to provide multi language features.
      Only the first value ("data" which represents the "subject" field) should be/needs to be multi language!
      I had a look at the built in Fieldtypes (e.g FieldtypeText & FieldtypeTextLanguage) which provides multi language support but I couldn't find a similar case (multi-value field with language support). All built in Fieldtypes are single-value fields.
      I know this is a very "general" question but maybe somebody could push me in the right direction?
    • By Gadgetto
      I'm looking for an ON/OFF Inputfield for my GroupMailer module I'm currently writing. (Preferably based on a core field, not 3rd party)  
      I'd like to implement a quick ON/OFF switch to quickly enable/disable all sending process (an emergency stop!). The field should submit it's value immediately after state changes.
      Maybe a checkbox toggle or a kind of button which is able to change it's state.
      Found this forum thread for changing a checkbox field to toggle style with CSS - but it's only for UIKit admin theme:
      What would you recommend?
      Greetings,
      Martin
    • By Gadgetto
      Under MODX my Newsletter Add-On manages all mailings in its own resource containers. This is comparable to a PW page, which serves as a container for subpages.
      My newsletter module GroupMailer will also provide an administration console where you can start, stop and generally manage mailings + allows you to watch the sending status.
      What would you recommend as an experienced PW user? How should the mailings be managed in the PW module? I want to follow the PW paradigms as much as possible and also offer the greatest possible flexibility.
      Here is a screenshot from the MODX version:

      Greetings, and a Happy New Year!
      Martin
×
×
  • Create New...