PDA

View Full Version : Social Networks and PHP/MySql/AJAX



adyrox
11-11-2009, 09:57 PM
Hey,

I'm developing a light weight social network that will run on anything that can access the internet.

Here is what i have thought of so far:



<?
define("IN_NETWORK",true);
include 'inc.php'; // include all frameworks and classes
$display->page('home',$_GET['media_type']);
?>
the AJAX can be either JSON or XML but polling is definatly not user friendly if we're talking cell phones/mobiles/mobile broadband etc



if(!is_defined("IN_NETWORK")){ die("ERROR 403"); // check no one is calling code out of network

if($_SESSION['userid'] OR !is_empty($_GET['action']){
// check for user id and make sure action isnt empty
switch($_GET['action']){
case "tick":
// grab buddy list and update the current user's online timestamp
break;
}
}

?>
the above code is what AJAX IM uses (or a rough version of)

the reason for this thread is your everyone's opinion on social networks and how much bandwidth they cost us all

Ady

PeteA
11-11-2009, 10:25 PM
By bandwidth I presume you mean data transfer as there is a major difference between the two.


Data transfer is all of the information transferred from your web site to your visitor's computer; bandwidth is the capacity for this transfer.

From a personal side
I'm not a fan of social networking sites. I find them some what of an annoyance as everything is taken at face value and seems to be taken as truth. Now more than ever companies are paying the likes of facebook to have full access to peoples information which has already proved to be detrimental to peoples jobs. I've also seen people effected in a personal way.

From a Technical Side
Technically speaking they are an excellent way to gather information.
They're a wider form of communication and information sharing; photos, likes, dislikes, moods, videos, and so on. Taking advantage of the internet in it's fullest form.
Giving people a free and easy way to stay in touch. Profiles and advanced relations between information gives people the ability to expand their "Social Networks" which they would otherwise not do.

jonbanjo
12-11-2009, 06:54 AM
polling is definatly not user friendly if we're talking cell phones/mobiles/mobile broadband etc

I don't know the one you suggest you are basing yours on but some web based ones can be really slow. In plain HTML one would use a META tag to cause the page to refresh every few seconds. Perhaps faster could be achieved with JavaScript but I (perhaps wrongly) suspect to get really good responses, you would be looking at something like a Java Applet and using sockets to talk to a server.


the reason for this thread is your everyone's opinion on social networks and how much bandwidth they cost us all

Instant messengers or social networks? Either way, I suppose my answer would be the same. Plain text uses nothing but other media such as video uses loads. I think where the cost could come in is with different types of media (and those big companies who can afford to pay for it) getting priority over other information travelling on the Internet.