tarkvsg Posted June 7, 2019 Share Posted June 7, 2019 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 More sharing options...
pwired Posted June 7, 2019 Share Posted June 7, 2019 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. 1 Link to comment Share on other sites More sharing options...
tarkvsg Posted June 7, 2019 Author Share Posted June 7, 2019 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 More sharing options...
teppo Posted June 8, 2019 Share Posted June 8, 2019 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). 6 Link to comment Share on other sites More sharing options...
qtguru Posted July 11, 2019 Share Posted July 11, 2019 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. 3 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now