Jump to content

PW possibility questions


DL7
 Share

Recommended Posts

Hi all,

Just wanted your opion on the following. I`m creating a jobboard, with the below mentioned features. I`m building this on a home build CMS. The website is like 60% complete. But during some browsing I ran into PW. I downloaded it, and I like the possibilities of it. I`m now wondering if I should continue building the website on top of my own CMS or make the switch to PW. The website contains:

- Basic website (showing all jobopenings on the homepage, specific jobopening page, Company page, search) {Should all be possible with PW without custom coding}

- Company dashboard -> Login, Post openings, edit openings, edit company page, edit company profile, Check invoicing, Manage applicants {Login should be possible and editing should be possible without custom coding, I`m not sure about the management of applicant however. }

- Management of applicants (Applicants can apply on the website. The information gets stored and company can see all the details. Company should be able to define the formfield wich they want to capture; manage the applicants (send emails, changes statuses)

I coded all this already within my own CMS/Database. I wondering how I could incorporate this within PW. And what the page/field/template strategy should be. Next to that, I`m wondering how flexible I can utilize PW in the sense of adding custom database tables?

 

Cheers,

DL

Link to comment
Share on other sites

Hello DL7,

Excellent that you are considering ProcessWire, it's an amazing piece of Software. All of this is possible without custom coding, it's all built into the CMF API. I can't say I've had much experience with custom database tables however I do know that ProcessWire has an API to deal with that too: https://processwire.com/api/ref/database/

 

Thanks,

Tom

  • Like 1
Link to comment
Share on other sites

This will be my honest opinion

3 hours ago, DL7 said:

Basic website (showing all jobopenings on the homepage, specific jobopening page, Company page, search) {Should all be possible with PW without custom coding}

Processwire works for this without a problem

 

3 hours ago, DL7 said:

- Company dashboard -> Login, Post openings, edit openings, edit company page, edit company profile, Check invoicing, Manage applicants {Login should be possible and editing should be possible without custom coding, I`m not sure about the management of applicant however. }

- Management of applicants (Applicants can apply on the website. The information gets stored and company can see all the details. Company should be able to define the formfield wich they want to capture; manage the applicants (send emails, changes statuses)

To be sincere this section I would advise using a framework like Yii2 or Laravel, if you are going to handle concepts like RBAC or Permission and authorization, as am assuming there would different roles and all. I tend to use Processwire for mostly content centric sites or mostly site management, but when it comes to applications with specific logic, I tend to use frameworks like Yii2/Symfony as i would love to have things as flexible as possible. 

 

Once again this is my personal opinion. 

  • Like 1
Link to comment
Share on other sites

22 hours ago, DL7 said:

I`m building this on a home build CMS. The website is like 60% complete.

Welcome to the Forums!

If it is 60% done, you are probably better off finishing it. However, if you have the time, you can start it from scratch and learn ProcessWire at the same time. Learning ProcessWire is a nice experience with a good, linear learning curve, but it is still something new to learn. For example the above mentioned "page/field/template strategy" depends on your needs and experience too, so this is something you need to examine in detail before you make the plunge. You can find a lot of topics on it in the forums and in the docs.

If you want to save time on coding, look up the Modules Directory. I recommend modules with v2.7 and/or v3 compatibility. Always check out the module's forum topic to learn more about its current status and get more info on them.

As for  Yii2 or Laravel suggested by @Sephiroth, I do not think it is something everyone should follow, at least ProcessWire is perfectly suitable for "anything" and development can be quite rapid with it, one just needs the experience to build something quickly in any framework one uses.

Edited by szabesz
typo
  • Like 4
Link to comment
Share on other sites

6 hours ago, Sephiroth said:

To be sincere this section I would advise using a framework like Yii2 or Laravel, if you are going to handle concepts like RBAC or Permission and authorization, as am assuming there would different roles and all. I tend to use Processwire for mostly content centric sites or mostly site management, but when it comes to applications with specific logic, I tend to use frameworks like Yii2/Symfony as i would love to have things as flexible as possible. 

Would you mind discussing what RBAC/Permissions features Yii2/Laravel have that ProcessWire doesn't?  Is it text-based configs, console tools, pre-made modules/API features, or something else?

I'm starting to design a couple systems that need to have very clear & strong roles/permissions established.

Thanks!

Link to comment
Share on other sites

ProcessWire's core permission system currently falls short as soon as permissions need to be dynamic, e.g. if a user is part of a team or something like that. Basically everywhere were you cannot create a static role or permission per case. The dynamic roles module does help a bit, as you can dynamically assign those roles, but it's still one dynamic role per team (to stay with the above example). The optimal case would be to be able to have a single dynamic role, which would work like this: "If user is part of a team XY then give access to pages owned by team XY", where XY would be dynamically adjusted and not static.

  • Like 1
Link to comment
Share on other sites

11 hours ago, WinnieB said:

Would you mind discussing what RBAC/Permissions features Yii2/Laravel have that ProcessWire doesn't?  Is it text-based configs, console tools, pre-made modules/API features, or something else?

Not familiar with Laravel that much but I will talk on Yii2, Yii2 has a class responsible for adding Roles and Permissions, the roles are stored in the Database and there's a console tool to aid in creating of Roles, however how it works in Yii2 is that you create roles , create permissions, and you can also create more complex roles system in a way that goes like this

Younglinh -> Padawan -> Jedi Knight -> Jedi Master with each higher roles having the existing permissions of the lower role, and when creating a user all you simply do is assign a user to a role, to use it, you simple check the users role and also infer if the user has permission to access that resource.

http://www.yiiframework.com/doc-2.0/guide-security-authorization.html#access-control-filter you will see how it's implemented here. However since Processwire works with composer easily, there should be package around this. 

  • Like 1
Link to comment
Share on other sites

To be fair I've never had any major issues with permissions in ProcessWire:

  • Built-in RBAC system fits most needs easily,
  • for page-and-group-level access management we've built the UserGroups module,
  • the DynamicRoles module provides a lot of flexibility when you can't make pre-defined groups/roles work,
  • and, finally, when none of these approaches work I have always been able to check permissions programmatically.

Sure, the last part requires some custom work and thus it's obviously not something you can just pull out of the bag and set up with a couple of clicks on some GUI.. but, unless I'm missing something obvious, this is true for most other frameworks (such as Yii or Laravel) as well.

Finally, I'd like to point out that if you find yourself in a situation where the permissions on your site constantly change and there are no logical rules to define them, thus making even programmatic permission checking impossible, I'd be tempted to say that it's not a problem with the system but rather within your own design.. or, rather, the lack of it :)

Regarding the original questions from @DL7:

  • Depending on your time frame and definition of "60% done", I'd say that while all of this falls nicely into ProcessWire's domain you should consider finishing your first version on the current platform and then, perhaps, merging it to a more flexible platform like ProcessWire.
  • You've mentioned multiple times the need for "custom development", so I'm not really sure if you're not comfortable with this or if it's just something you see as a benefit of ProcessWire. Either way, you should realise that with ProcessWire you will no doubt have to do custom development too.
  • We don't have a module for everything (we're not WordPress). That being said, ProcessWire is quite likely much friendlier to develop with than your home-baked system and we have a wonderful community you can ask specific questions from. There are also some modules that could help you a lot, such as DynamicRoles and, perhaps, the commercial FormBuilder.
  • While you can no doubt integrate your custom-built solution with ProcessWire and you can even perform direct SQL queries from within your ProcessWire template files and modules in order to utilise your own database tables (see the $database API variable), I'd strongly suggest that you don't. 99% of time using a custom database means that you are not making use of ProcessWire's features as well as you could. In some cases I've found it useful, but those cases are really, really rare.
  • All of the data structures you've mentioned can no doubt be done via regular pages, for the editing part you could consider using the regular page editor, and you might even be able to pull this off using the built-in page tree, but if you need something more customised, you might also want to look into developing your own custom Process module (which is what I've used for a few similar use cases before). The commercial ListerPro module is another useful tool in this regard, so don't forget to check that one out too.

I'm not going to try and provide you a ready-to-use structure (or page / field strategy) for your site, but feel free to draft something out and post it here so we can comment on it. Generally speaking if you have a specific question or an idea / concept you'd like to get comments for, you'll get replies on this forum in no time, but if you ask others to do the groundwork for you that won't get you anywhere :)

  • Like 9
Link to comment
Share on other sites

Hi all,

thanks for all the comments. It seems like there is no standard answer to my question ;-) Happy to started this discussion. For what I brainstormed with the current level of Processwire knowledge, I think I will be very feasable to get all the items in here. Having a look at the Skyscraper example (were jobpenings are the skyscrapers) I just need to add one additional layer (being the applicants). The challenge would be to build a dashboard with (front-end) access control were only the company posted the opening is able to post/edit/see the jobopenings and the applicants. My guess is that this would be very feasible using the current RBAC model in Processwire as the login is quite standard. In essence there would only be two roles defined: #1 me as being the admin and 2# as companies that want to post a jobopening. 2# would only be front-end access to the dashboard.

When I find the time, I'll set-up a basic version of this website to test if this will work. I`ll keep you updated on the progress.

Thanks!

  • Like 2
Link to comment
Share on other sites

Hi All, Hi @teppo,

So I got started with some basic testing and ran into some hurdles. Using the FrontEndUser module I managed to get a new user created. But somehow I dont see a way to connect this specific user with a specific profile page (company page) . What I therefor drafted is the following:

Create two templates:

- Company (Profile information, company infomation, e-mail adres, password (hashed) )

- - Jobapplication (all information for application)

With this structure and the API i`m able to login the user and get the profile information into a session. With that I`m able to grab the company information and make a front-end edit page. Furthermore, I can connect the jobapplication to his parent and therefor:

-echo all application (being sole children) on the company page

- easily post the parent ID with the jobapplication once a new one is created.

Some questions with this set-up :

Would this work or am I using a workaround and would it be better to do this differently?

While using for instance the FormBuilder Module, am I able to -within 1 formpost- create the companypage and then the applicationpage? This would be helpful for the  register form where company`s that havent posted anything yet, can create a profile + post a job.

Thanks

After some more reading and testing, I think I got it. Process changes a bit, but I now understand the flow. What I`ll do is make a login/register page. Then when user logs in (after registration) I can grab the user->ID. He can then update his company data via a front-end form. I`ll attach the used-ID as a field for that (company)page. When that page is created, I can then let the user add a application and I`ll append that to the company page as a child. Think that will work. I think I would even be able to do this in one form-flow.

  • Like 2
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...