jeff00seattle Posted February 28, 2009 Share Posted February 28, 2009 Hi My career has primarily been a backend (file, network, and kernel, C++) and middle-tier (transactions, stored procedures, java, PHP) developer. However, on occasions, I am asked to develop a presentation layer solution. For small Intranet deliverables, I have been able to get away in whipping up a data-driven site by using PHP + MySQL/MS-SQL. But, I want to broaden my craft as a programmer, and I want to understand what rule-of-thumb I should follow to choose between: [*]PHP + MySQL functions(): Synchronous Query by direct connection to DB [*]XQuery [*]AJAX - Asynchronous Query by indirect connection to DB I know that I can perform all the basic data-access control operations (e.g., navigation, aggregation, filtering) by synchronous queries by direct connection to a DB (using SELECT, INSERT, DELETE, stored procedures, etc...). But when should I consider the other two? I have not any discussion on the Net that clarifies this question, or am I total confused trying to compare apples to oranges? Thanks for the help, Jeff in Seattle Link to comment https://forums.phpfreaks.com/topic/147346-when-to-choose-between-mysql_functions-and-xquery-and-ajax/ Share on other sites More sharing options...
cooldude832 Posted February 28, 2009 Share Posted February 28, 2009 Well the way I look at it is ajax is useful if you are doing a lot of things that are simple. I did a site where ppl update clients info using a php/mysql system. I made a small page that they can leave open on their desktops that is an ajax search for a customer and when they use a strong search criteria it is very effective. AJAX or other newer technology is not good when you are making a huge request in or out. To Use AJAX best what I do is simply push my request in as simple as possible method through the object and then send it to a page via POST/GET that processes it via php. That page then will echo out any messages and then using JS I use the return where it needs to be. Link to comment https://forums.phpfreaks.com/topic/147346-when-to-choose-between-mysql_functions-and-xquery-and-ajax/#findComment-773430 Share on other sites More sharing options...
Mark Baker Posted February 28, 2009 Share Posted February 28, 2009 But, I want to broaden my craft as a programmer, and I want to understand what rule-of-thumb I should follow to choose between: [*]PHP + MySQL functions(): Synchronous Query by direct connection to DB [*]XQuery [*]AJAX - Asynchronous Query by indirect connection to DB They're quite different in purpose XQuery is used for extracting information from XML data. Ajax has nothing to do with DB access directly. Ajax is all about communication between the user's web browser and the web server. It's up to the script running on the server, possibly accessing a DB, possibly not, what it does... but the server side script isn't Ajax: simply a script doing whatever you want that accepts an http request and responsds with data. Link to comment https://forums.phpfreaks.com/topic/147346-when-to-choose-between-mysql_functions-and-xquery-and-ajax/#findComment-773434 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.