Hi there, first the compliments:
I found Processwire about a week ago (where have you been all this time PW?), and I found it mind blowing, basically because how easy is to create a site. I had my homepage made with Symphony CMS, and it was fun to develop with, but XSLT still gives me headaches (even I still have love for Symphony and its simple approach, and the power that XSLT gives). I've worked before with Drupal, Wordpress and some little experience with Joomla!, and always found myself programming hacks to make the CMS do exactly what I wanted.
The I found Processwire and it took me less than three days to learn and migrate my homepage. And I love it. I'll buy the cache module even if I don't really need it, just for the support, Ryan's work here is simply amazing. So now I'm preparing myself to start to work with PW for future clients.
So here is my question, maybe a dumb one, but I need advice on how to approach this:
A client needs a frontend for managing some data stored in his database (separated from PW). They manage their own users and even an authentication system by their own from their portal. So probably the pages I will have to create within PW are the needed admin sections, and then make internally calls to their database. So here's where I need some advice, to make it the correct PW way: Should I use mysqli_query directly in the file template to obtain the data, or is there a method in the API to query external databases? Also I could create pages directly from the queries (let's say, I make a query returning 5 integer values, and then create these values automatically in pages, so I can have them directly in PW, but I'm not quite comfortable with that because redundancy).
Also the authentification system, is there a way I could integrate their authentification? I was thinking on adding a request in the head.inc to see if the users is authenticated, and if not, redirect them accordinlgy.
So there are the questions, sorry if they seem dumb (or with obvious answers), but I'm just diving into PW, and I want to do it right.
Cheers