Jump to content

Customizable SPA - Is ProcessWire the right approach?


Red_nipon
 Share

Recommended Posts

Hello devs!

First of All, lovely community! Im very New to ProcessWire but I read a lot.

I'm a bit confused about the approach I should use...

A bit about the project:

Its something like a customizable SPA for the customers.

So I have a basic design, the customers can change some parts of it (e.g. fontcolor, dates) and publish it (e.g. https://mypage.com/customerName). The customization should be done on seperat page.

I think it is something like a own CMS...

 

Now my question:

What approach would you suggest? My idea was to use ProcessWire, then I read something aboud headless CMS (e.g. sanity.io) because I have worked much more with JavaScript (React).

I'm not new to development so it is not a problem to learn something new.

Best wishes!

  • Like 1
Link to comment
Share on other sites

ProcessWire is not a headless CMS by default, but it can be turned into one with the right modules. Maybe you want to read 

and the case study 

 

which uses the PageQueryBoss module which allows you to build complex nested queries containing multiple fields and pages and return an array or JSON. This is useful to fetch data for SPA and PWA.

Also take a look at these modules which provide APIs to use data from ProcessWire in whatever frontend you chose:

 

Link to comment
Share on other sites

Hey @Red_nipon!
Nice to have you here!

Can you please explain this in more detail? What exactly do you want your client to be able to do?
As I understand it, the customer gets a login from you for the ProcessWire admin interface and can then publish one or more SPAs there themselves with their own configuration. Then it would make sense to create a ProcessWire template for it with the configurable parts (fontcolor, dates, ...) as fields. If you or the customer then create a new page with this template in the pagetree, it can be called in the frontend. Of course you can also put a javascript file from a SPA into the corresponding template PHP file and just let PHP write the few configuration parameters into a <script> area, which the SPA then reads when loading.

That would be the simplest way I can think of. This concept isn't strictly "headless" then, but it doesn't have to be, does it? 

Headless to me would be an approach where the ProcessWire resides somewhere else and completely independent of the frontend. I'm actually working on an SPA with Angular/Ionic right now as well. The javascript application is at a hoster under its own domain, the ProcessWire backend is somewhere else entirely. I really like ProcessWire and have already done a lot with it, so it was my first choice as headless CMS for my project. If there are better headless alternatives I can't tell you, only that it works well with ProcessWire. 
The SPA then constantly requests data (e.g. a configuration, the contents of lists, blog articles, users, ...). The AppApi module is very good to create a JSON api for this [Disclaimer: I am the author of this module :D]. But if you don't need such a constant data exchange, this concept is probably much too cumbersome...

  • Like 1
Link to comment
Share on other sites

Hello @dotnetic and @Sebi,

Thank you for your quick reply!

 

@dotnetic I already read the first two posts while I had researched. Very interesting, especially the Vue.js feat. ProcessWire case study.
I'll take a look to the other modules, maybe they will help me to accomplish me needs.

 

@Sebi

11 hours ago, Sebi said:

Can you please explain this in more detail? What exactly do you want your client to be able to do?
As I understand it, the customer gets a login from you for the ProcessWire admin interface and can then publish one or more SPAs there themselves with their own configuration.

I think you basicly understand the concept:

The page is like an invitation for a Christmas-Party or similar events. The customer can modify some party of the invitation like background image or font-color and can publich the SPA with their own configs.

11 hours ago, Sebi said:

Then it would make sense to create a ProcessWire template for it with the configurable parts (fontcolor, dates, ...) as fields. If you or the customer then create a new page with this template in the pagetree, it can be called in the frontend. Of course you can also put a javascript file from a SPA into the corresponding template PHP file and just let PHP write the few configuration parameters into a <script> area, which the SPA then reads when loading.

Ok, that was my initial idea. There shouldn't be any probleme that one customer can see the other pages if he edit his invitaition if I hable the right correct, right?

 

11 hours ago, Sebi said:

That would be the simplest way I can think of. This concept isn't strictly "headless" then, but it doesn't have to be, does it? 

No, it doesn't have to be headless at all, just steped over the "new and modern" headless CMS approches.

Maybe the mentioned way will cover all my needs.

 

  • 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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...