• Resolved webdbapps

    (@webdbapps)


    Hi,

    I am seeking examples, GitHub repos etc. that show best practices when it comes to developing custom WordPress modules using Angular 4 and the WP API. While I realize that each custom plugin must have it’s own PHP file definition, where does one draw the line in terms of programming logic – server side vs. client side? In my case, I need to develop registration, search, payment and administration modules. Should these each be encapsulated in their own plugin architecture? Or, do they get packaged together for use in one solution? These plugins will only be used on one site and will not be reused. Greatly appreciate input and guidance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    For bespoke, one site solutions you should do whatever makes the most sense. WP is largely server side, but there’s plenty client side when it makes the most sense. Generally speaking, server side is much more secure. If you cannot have bad actors fiddling with things, do it server side. Even if you are strictly REST, you can create custom endpoints to do bespoke server side tasks.

    Client apps can be very interactive and have potential for great user experience. Servers can manage lots of data, working out the minimum needed to be sent out to the client. The less data transmitted, the better.

    There’s little reason to bundle individual plugins except with monetized commercial strategies. I’d combine them all into a single plugin. You can still modularize the UI as needed and organize your code in a similar manner.

    Thread Starter webdbapps

    (@webdbapps)

    I appreciate your guidance. Since part of the solution will be integrating with PayPal Payflow Gateway, I’m thinking server side only. Good ideas especially on the single plugin with multiple modules for admin, moderation, search, sponsors, payments and registration. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Suggested Structure for WP API Angular 4 Custom Modules’ is closed to new replies.