mendoz Posted July 24, 2008 Share Posted July 24, 2008 S'up freaks I will have 70 sites fetching data from one "master" website. Each site will need different portions of the data. The client wants to manage all the sites from one main control panel. The data is a list of items, each record has data like (name,date,etc...) Each item has one or some websites that will use it. Each website will get it's corresponding items from the "master" website. Is the right way of doing this is via XML? Each website would request the feed like feed.php?site_id=10, Then it would get it's specific data. Now, What are the best practices for doing this? Caching the feeds and checking if there was an update? Learning what the hell is XML-RPC? Something I'm missing? Thanks, dror Quote Link to comment https://forums.phpfreaks.com/topic/116480-is-xml-the-right-solution/ Share on other sites More sharing options...
dbo Posted July 25, 2008 Share Posted July 25, 2008 I dunno all the specifics, but it sounds to me like more of a play for a database and webservices. Quote Link to comment https://forums.phpfreaks.com/topic/116480-is-xml-the-right-solution/#findComment-599097 Share on other sites More sharing options...
Highlander Posted July 28, 2008 Share Posted July 28, 2008 Yea, a database and use views / SP:s to handle the different client. Quote Link to comment https://forums.phpfreaks.com/topic/116480-is-xml-the-right-solution/#findComment-601479 Share on other sites More sharing options...
JonnoTheDev Posted July 28, 2008 Share Posted July 28, 2008 You could do it with XML but the sole idea of using XML is that it is non platform specific so a site written in java or asp or any language could parse the XML and display the results identical on each. If all your sites are php based then you could grant access direct to the database from each IP that your site is hosted on (setup good username and passwords) and make the queries direct. Essentially if you were to make an XML request it would be created by pulling data from your database anyway so using XML may just create extra work. Quote Link to comment https://forums.phpfreaks.com/topic/116480-is-xml-the-right-solution/#findComment-601827 Share on other sites More sharing options...
dbo Posted July 29, 2008 Share Posted July 29, 2008 I'm going to say again... DB and Webservices. You wouldn't have to grant direct DB access to every client. The server code for the webservice would be all that needs to communicate with the database and then send the appropriate information back to the client... if for some reason you just want to parse XML, then have the webservice return XML, but use the database to manage the larger quantities of data more efficiently. XML is great for small amounts of data and being platform independent (though damn near all languages can query databases with relative ease)... XML just can't compare to the speed and ease of search that databases provide. Quote Link to comment https://forums.phpfreaks.com/topic/116480-is-xml-the-right-solution/#findComment-602255 Share on other sites More sharing options...
mendoz Posted July 29, 2008 Author Share Posted July 29, 2008 I've been messing with Zend framework and some new stuff and this my new approach. Each site will have it’s data on a locally stored XML file. The master site can trigger an update on the client site, which would make the client to get an update XML file and cache it. This way The data is stored only on one database. Quote Link to comment https://forums.phpfreaks.com/topic/116480-is-xml-the-right-solution/#findComment-602681 Share on other sites More sharing options...
corbin Posted July 29, 2008 Share Posted July 29, 2008 I'm going to say again... DB and Webservices. You wouldn't have to grant direct DB access to every client. The server code for the webservice would be all that needs to communicate with the database and then send the appropriate information back to the client... if for some reason you just want to parse XML, then have the webservice return XML, but use the database to manage the larger quantities of data more efficiently. XML is great for small amounts of data and being platform independent (though damn near all languages can query databases with relative ease)... XML just can't compare to the speed and ease of search that databases provide. So, do you basically mean a web API? Kinda like facebook and a few other large sites do? (Well, their system is obviously security tight, but you know what I mean.) Quote Link to comment https://forums.phpfreaks.com/topic/116480-is-xml-the-right-solution/#findComment-602843 Share on other sites More sharing options...
dbo Posted July 29, 2008 Share Posted July 29, 2008 You could use it as an API if you wished to do so. I personally just like it as an integration tier. If you've got data and/or calculations that you need to share between different applications, you can leverage webservices for them to communicate. It provides a level of interoperability between different languages (ex, PHP could consume an ASP.NET webservice, and vice versa). There is also a level of security in that you don't have to give direct access to your DB, only certain information you want to share, etc. Quote Link to comment https://forums.phpfreaks.com/topic/116480-is-xml-the-right-solution/#findComment-603083 Share on other sites More sharing options...
corbin Posted July 30, 2008 Share Posted July 30, 2008 So it sounds to me like a 1 sided API ;p. I had never heard the term webservice before. Quote Link to comment https://forums.phpfreaks.com/topic/116480-is-xml-the-right-solution/#findComment-603665 Share on other sites More sharing options...
dbo Posted July 31, 2008 Share Posted July 31, 2008 Webservices are something that have really gained popularity the last few years. I'd suggest grabbing a few tutorials and exploring some of the possibilities yourself. Quote Link to comment https://forums.phpfreaks.com/topic/116480-is-xml-the-right-solution/#findComment-604175 Share on other sites More sharing options...
tibberous Posted July 31, 2008 Share Posted July 31, 2008 If your doing all PHP to PHP I'd recommend serialized objects over XML. XML support in PHP is pretty weak. Quote Link to comment https://forums.phpfreaks.com/topic/116480-is-xml-the-right-solution/#findComment-604233 Share on other sites More sharing options...
secoxxx Posted July 31, 2008 Share Posted July 31, 2008 I use php to generate xml files. w3c validates it but i dont know if that very viable. Quote Link to comment https://forums.phpfreaks.com/topic/116480-is-xml-the-right-solution/#findComment-604253 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.