work, Work, WORK!

tshirtpic

Everybody works in one way or another, we all have jobs to do, and for the last few days, I’ve been dreading getting out of bed for a few reasons. First of all, because I’ve not been eating properly or getting much sleep at all over the last few weeks which is leaving me a bit short in the old energy department, and secondly, because i know I’m going to have to stare at a screen full of code for hours, and that being the reason for the first.. erm.. reason..

Seriously though, I have just spent around 8 hours finishing off the new Radio Center Sidebar Hook, and why, because it’s a long process meeting standards.

Hooks for example come bundled in 1 xml file, this file has to contain language strings, template bits, settings, PHP code, help files, database queries and so on.

Now the radio sidebar hook only contains 1 template bit, 12 settings, 24 language strings, 1 PHP file and 1 help file and its taken me all this time to complete it.

Saying that, the sidebar module uses the RAJAX module and has some JavaScript coding in it also, so I’ve had to add some stuff to the RAJAX module to auto update certain elements of the sidebar. Still, most people will look at the sidebar and think nothing of it, its small, it doesn’t look too complicated, and in reality, its taken hours and hours to complete.

The fun doesn’t end there though, oh no. I’ve still got loads of other bits to complete, the main board panel hook for starters, its almost done, i just cant decide if i like the look of it or not, mainly because of the padding with the default IPB table class, however i did write a class called “RadPad” specifically for the radio, but i haven’t decided if i want to use it or not yet.

Then there’s the global radio bar hook, which i haven’t even started yet.. HA! fun times!

As far as the actual radio center goes lets see, the History page is completed, done, dusted, the schedule page is done on the public side, but I’m not happy with the way scheduled entries are laid out, so that’s probably going to have an overhaul. DJ List, not started, Downloads, not started, Linking, Not done but that’s an easy one, Stats, done, but not finished.

Mentioning the stats, i forgot to post on my blog about them, so i will write an article shortly about the new stats features.

Despite all the work i have done so far, completion still seems a long way away. I’ve literally been getting up, working on the radio center, going to bed, getting up, working on the radio center, going to bed.

Time off today i think, but saying that, I’m to anxious to get it finished i end up going back to it, telling myself I’ll just do a little edit here an there and before i know it am full on writing modules and crap.

Anyways, enough ranting from me, I’m gonna go eat.

Bouncy Radio Center 9 RAJAX Module

So I’ve been working a lot on a feature that has been requested for a LONG time, a feature which seen an early implementation in old versions for a brief period. That’s right, AJAX refreshing of radio data “in page”. Basically this is updating details such as the current song playing, DJ, listeners etc. without having to refresh the page.

This is where i would like to introduce to you the brand spanking new RAJAX module for Bouncy Radio Center v9. RAJAX is short for ‘Radio Asynchronous JavaScript and XML’ and comes bundled with the new Radio Center App.

CaptureRAJAX comes with 2 modes, Auto & Manual, quite simple really, Auto Mode will update the radio data every ‘x’ amount of seconds after the page has loaded, while Manual Mode provides buttons to the right of each block of data, which when clicked, will update the relative information, However, Auto Mode also includes the refresh buttons, allowing for you to check the current song for example as you wish.

In addition to this some protection has been put into place for those people who visit the page, fall asleep and forget all about it. This comes in the form of a Decay time. What this basically does is double the wait time if data has not been updated on a certain RAJAX element. Let me show you in detail, lets assume this check is for the name of the current song playing.

Check Time Since Load Starting Decay Did Data Change? Ending Decay Time To Wait Comments
1 00:00 1 N/A 1 30sec Data is deemed changed as there is no prior response to compare to
2 00:30 1 YES 1 30sec song name changed so decay is reset to default which was already 1
3 01:00 1 NO 2 60sec song name not changed, decay and wait time doubled
4 02:00 2 NO 4 120sec still no change, double again
5 04:00 4 NO 8 240sec no change again, double again
6 08:00 8 YES 1 30Sec ahh, data changed, reset the decay and wait times to default

 

So as you can see, if somebody sits on the page, and the radio goes offline for example, rather than there browser making a request every 30 seconds, it will double the wait and decay time if nothing has changed. This means idle users wont hog up resources making un-needed requests.

In regards to how this works if you have a song for example which is 6 minutes long playing on the radio, it should be caught and updated by check 6, if however you have a song which is say 9 minutes long, check 6 would detect no change and would have to wait an additional 8 minutes before the next check picks up the change, this is not a serious problem, as you could just click the refresh button to update that element and the decay and wait time is reset again.

So that’s most of the technical side sorted, well, at least all you need to know for now. Oh yes, RAJAX will also feed any custom radio hooks, apps, modules that users may create letting you take full advantage of it in your own custom modules whether its inside of the forum scripting or not, RAJAX is there to feed you, and your there to be fed.

Thanks for reading and feel free to leave me your thoughts and comments.

oh, and before i forget you can test RAJAX live over at our development forums http://dev.bouncyservers.co.uk

Until next time, keep it bouncy! (poor attempt at a sign of line)