twitter application development : PHP or javascript...please help
What is the preferred method fo开发者_开发百科r twitter application development
Using Javascript or using PHP
Is it true we can do more things if we use PHP instead of Javascript
Is any one of them going to be deprecated in future
Efforrts Appreciated Thanks!!!
It depends on what you want to do. If you want something that will do basic grabbing of tweets, probably JS. If you want to do smarter things like count keywords, then you'll need PHP.
Will either of them be deprecated? You'd have to ask Twitter, and hope they don't change their minds. They can turn anything off at any time.
If you are talking about using PHP and javascript in a web application the paramount difference is:
PHP runs on the server. JS runs on the client.
You could also run JS files on the server, but this isn't the usual way.
JS will cause traffic from the client to the web servers it connects. JS is very attackable as it is run where you have no control. Web browsers are sometimes a bit conservative if you use JS to poll data from different domains (basically they ask first the target server if it allows this behaviour).
PHP will cause traffic from your server to the servers it connects. It is harder to attack as you have (almost) full control over it.
If you could specify more in detail what kind of application you are intending to do, perhaps the choice would be easier.
If you had a choice, I'd say JS is better as it's considerably faster through it's asynchronous nature.
精彩评论