8000 GitHub - adamnfish/PiG: A simple JavaScript Push engine, with PHP backend: "Push it Good" · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Jun 11, 2024. It is now read-only.
adamnfishPublic archive

About

A simple JavaScript Push engine, with PHP backend: "Push it Good"

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Push it Good (PiG) - a JavaScript push engine with PHP backend

PiG is a simple push server implemented in PHP with a jQuery plugin / MooTools (coming soon) class to power the front end

This code gives a simple framework for creating a push request. It requires that you add application logic by the following methods:

1) Extend the PiG PHP class to preform the check for your application (eg. checking for new unread email) and return the information your client-side code needs - you can also set the default poll interval and maximum open connection time
2) use the client-side PiG plugin events to perform whatever actions you need when information is returned from the server

An example of usage is included - extremely spartan. I'll add a more detailed one ASAP

*NOTE:
Event callback names are a mess at the moment - I need to sort this!

TODO
 -	Use milliseconds for the poll time - it's ridiculous to use seconds for the poll!
 -	algorithimic open request time in case there is a network problem preventing requests from being maintained for the default time (unlikely, but which would result in lost data)
 -	Have some way of passing the last sent item? Maybe leave this up to the extended code?
 -	Try to reopen if the ajax call fails (maybe only try this a couple of times before invoking a hard "shizzle's broken" callback?


Changelog:
22/09/2009
Sanity-checked callbacks and function names
Prevented connection from opening if it's already opened - just returns the existing handle
Updated example to include new callbacks and set the maintain time to something more useful

About

A simple JavaScript Push engine, with PHP backend: "Push it Good"

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

0