Jump to content

is it worth to make project on PW


tarkvsg
 Share

Recommended Posts

Does it make sense to make a project in the ProcessWire if there are queries like "select mailbox from table" or "insert into table set field='a'" to it, and judging by the structure of ProcessWire database, you cannot make it simple. For example: postfix sql queries for  quotes, checking mailboxes and so on.

Link to comment
Share on other sites

Have you made projects before with processwire api and sql queries ? Did you prototype your new project with processwire ? I don't know of any other cms that has a better api, so please give us some more details what your new project is about.

  • Like 1
Link to comment
Share on other sites

Thank for your rocket answer! Yes, some time ago i have a small project on PW. So i look forwards PW - PW and community are best. New project is an interface to our mailuser database where pages are mailuser entries. Email server will ask db about permissions and so on. Something that.

Link to comment
Share on other sites

13 hours ago, tarkvsg said:

Does it make sense to make a project in the ProcessWire if there are queries like "select mailbox from table" or "insert into table set field='a'" to it, and judging by the structure of ProcessWire database, you cannot make it simple. For example: postfix sql queries for  quotes, checking mailboxes and so on.

With ProcessWire you don't generally want to perform your own SQL queries. It's possible, but generally I'd consider that a bad practice.

If your content is stored as ProcessWire objects (basically Pages), you should always use the Selector engine for that sort of stuff. Not only does this provide the benefits of a great API (such as $pages->find('template=mailbox, owner=[some_user_field=whatever_value]') or $pages->get('parent=some-parent, name=page-name')->setAndSave('field', 'value')), there's also zero chance of accidentally running into nasty SQL injection vulnerabilities.

Of course you can always create custom database tables and perform queries on them using the $database API variable (which is essentially a wrapper for PHP's own PDO class), but in such cases the content won't be editable within ProcessWire's admin, so you're missing a pretty important benefit there. Another alternative would be using RockFinder, which kind of provides the best of both worlds: easy to use syntax for queries combined with the performance of raw SQL and lightweight PHP arrays/objects.

So, long story short: if you want a nice GUI and an easy-to-use API for managing your content, ProcessWire is a great choice. If you ultimately just want to use your custom database tables, write a few SQL clauses to update a few rows here and there, and there's no need for a web based interface for managing said items – then perhaps you should just build it from scratch (or use something like Laravel instead).

  • Like 6
Link to comment
Share on other sites

  • 1 month later...

Processwire API and minimalism is so much lean that it feels like you are still writing PHP compared to other CMS which are overly complex, I think Processwire is easy to use Project with so many things taken care of, especially the fields, It's so much easier to build applications for client easily than other frameworks/cms because Processwire provides so many features that are vital. 

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