Developer's Updates

 
  michaelgreenhill Administrator That's Numberwang!

Location: Melbourne
Hi guys,

I thought I'd kick off a thread discussing some of the changes I've been implementing. Since a lot of it's under-the-hood the changes aren't immediately noticeable, but they're all good things Smile

basket.js

I'll kick off with something I've been reading about for a few days now, which is basket.js. Basket.js is a great little bit of code, which enables us to cache some parts of the site in your browser in a more efficient manner. It does this by leveraging a browser featured called localStorage, a feature new to HTML5.

In years past, when we wanted to cache JavaScript files in your browser, we'd send the appropriate HTTP headers to your browser which instruct it to hold a copy of those files for a period of time. That worked great, but it still required your browser to send a HTTP request to our server for each file, to verify that it hadn't changed. While it reduced the amount of data that was being sent to you, it didn't reduce the amount of requests made.

What basket.js does is first check your localStorage cache for these files, and if they're not found it grabs them from our server and stores it locally. This is great, because apart from the initial fetch from us there aren't any additional HTTP requests to be made. It makes loading the page faster: as JavaScript files are traditionally synchronous, they need to be loaded in order before executing the code. To solve the problem of newer versions of these files, we instruct basket.js to store each file with a unique ID, in this case a version number. When we update the files, basket.js is sent the new version string and updates the cached content accordingly.

Operating system migration

When we migrated to our new servers, we also migrated Railpage to a different operating system. For many years now we've been using Ubuntu, which unfortunately has proved to be a bit of a buggy OS, especially in relation to the underlying VMWare platform which powers each virtual machine. When the time came to provision new VMs, we decided to give Debian a chance. Debian, which Ubuntu is built from, has a history of being incredibly stable, and has a mantra of "release when it's ready" - as such, many versions are released months late. So far, the change has been incredibly good: there's been minimal disruption to our workflow, and the stability has improved dramatically. 10 points to Debian.

Sponsored advertisement

  s3_gunzel Not a gunzel developer

Location: Western Sydney, AU
Were you running 14.04 or something? Had no issues with Ubuntu 12.04 and reluctant to update as a result.
  michaelgreenhill Administrator That's Numberwang!

Location: Melbourne
12.04 is not supported by the software Railpage runs on Smile 12.04 -> 14.04 inclusive has been problematic in one way or another.
  s3_gunzel Not a gunzel developer

Location: Western Sydney, AU
12.04 is not supported by the software Railpage runs on Smile
michaelgreenhill


Duh, s3_gunzel - get with the times!

12.04 -> 14.04 inclusive has been problematic in one way or another.
michaelgreenhill


Ubuntu has been buggy since the Unity Desktop rolled out in 11.04!
  michaelgreenhill Administrator That's Numberwang!

Location: Melbourne
Ubuntu has been buggy since the Unity Desktop rolled out in 11.04!
s3_gunzel
Being a server role inside a VM, we don't install the desktop components Smile
  NSWGR8022 Chief Train Controller

Location: From the lands of Journalism and Free Speech
Congratulations Michael on the new site.  Been back online for over a week now with no issues at all.  Have tried the usual things I do.  Replying and posting and sending news news up to you.

All worked good.

The jobs also work well. Easily readable and able to see the new jobs. Previously the site listed expired jobs.

The speed of the site is really fast.  No long waits for page loads which is a real plus.
  michaelgreenhill Administrator That's Numberwang!

Location: Melbourne
Updated navigation menu
Desktop/laptop users should now see a slightly updated navigation menu at the top of each page. It retains the same layout as previous versions, but while previous versions were JavaScript driven this one is entirely CSS driven, making it significantly faster to load.

If you encounter any issues with the new menu please post it in the Bugs and Feedback thread, with your browser name and version, and a screenshot showing the fault Smile
  s3_gunzel Not a gunzel developer

Location: Western Sydney, AU
Updated navigation menu
Desktop/laptop users should now see a slightly updated navigation menu at the top of each page. It retains the same layout as previous versions, but while previous versions were JavaScript driven this one is entirely CSS driven, making it significantly faster to load.
michaelgreenhill
Pushed that through fast. Do you plan on re-adding the RP logo next to our username as per previous versions?
  michaelgreenhill Administrator That's Numberwang!

Location: Melbourne
Updated navigation menu
Desktop/laptop users should now see a slightly updated navigation menu at the top of each page. It retains the same layout as previous versions, but while previous versions were JavaScript driven this one is entirely CSS driven, making it significantly faster to load.
Pushed that through fast. Do you plan on re-adding the RP logo next to our username as per previous versions?
s3_gunzel
Done Smile
  michaelgreenhill Administrator That's Numberwang!

Location: Melbourne
Add an event to your calendar
Following a feature request made to me, I've added a new feature to the Events module which allows you to export an event (including all following dates) to a .ics file, which can then be imported into your calendar app. Some browsers will automatically recognise this file and open up your calendar app - for others, you'll have to manually import it, usually as easy as tapping/double-clicking the file.

  freightgate Minister for Railways

Location: Albury, New South Wales
Great idea.
  michaelgreenhill Administrator That's Numberwang!

Location: Melbourne
Updated thread reply notifications
TRNs have been given a facelift, and now include the thread title in the email subject. Enjoy!
  bevans Site Admin

Location: Melbourne, Australia
Updated thread reply notifications
TRNs have been given a facelift, and now include the thread title in the email subject. Enjoy!
michaelgreenhill

Just received one for this post.  Looks awesome.
  michaelgreenhill Administrator That's Numberwang!

Location: Melbourne
Forum thread cover photos
When creating a new thread you can also select a cover photo to attach to the thread. This photo will appear in social media previews of the thread Smile
  michaelgreenhill Administrator That's Numberwang!

Location: Melbourne
Our Locations module now includes a link to SunCalc.net, which will show you the angle of the sun at a given location at any point in time.
  michaelgreenhill Administrator That's Numberwang!

Location: Melbourne
vimeo.com videos
Following a submission to the Ideas module I've now enabled auto-embedding of all Vimeo videos in forum posts.

Cheers!



Interlude With Steam Locomotive R761 near Donald Victoria by reidgck
  bevans Site Admin

Location: Melbourne, Australia
Forum thread cover photos
When creating a new thread you can also select a cover photo to attach to the thread. This photo will appear in social media previews of the thread Smile
michaelgreenhill

I am been meaning to take a closer look at this feature.  I must try it.
  bevans Site Admin

Location: Melbourne, Australia
Add an event to your calendar
Following a feature request made to me, I've added a new feature to the Events module which allows you to export an event (including all following dates) to a .ics file, which can then be imported into your calendar app. Some browsers will automatically recognise this file and open up your calendar app - for others, you'll have to manually import it, usually as easy as tapping/double-clicking the file.
michaelgreenhill

Michael, this working like a dream on iOS and specifically my iPad.  Downloads and inserts correctly into the nominated calendar and allows you to even edit the entry prior to saving. Excellent work.

Thinking about an API post so we can have 3rd parties send their event details on a regular basis.
  michaelgreenhill Administrator That's Numberwang!

Location: Melbourne
Push notifications
Push notifications are a web browser feature, currently supported in the latest Chrome and Firefox versions, that show a pop-up dialogue on your computer/phone even when you're not actively browsing Railpage. Of course, this is an opt-in feature, per browser Smile That means you'll have to opt-in on your phone, your work PC, your home laptop, etc, which gives you full control over the notifications.





This feature is in development, and will be released to a small group of testers soon.
  NSWGR8022 Chief Train Controller

Location: From the lands of Journalism and Free Speech
Looks very neat and can it work on a tablet?

I see how this could be brilliant for a tablet where forums you are following updates are sent using notifications like you get from apps?
  michaelgreenhill Administrator That's Numberwang!

Location: Melbourne
Looks very neat and can it work on a tablet?
NSWGR8022
An Android tablet, yes.

iOS push notifications will come at some point in the future Smile
  NSWGR8022 Chief Train Controller

Location: From the lands of Journalism and Free Speech
Looks very neat and can it work on a tablet?
An Android tablet, yes.

iOS push notifications will come at some point in the future Smile
michaelgreenhill

Cool.

How do you ask for a notification?
  michaelgreenhill Administrator That's Numberwang!

Location: Melbourne
Cool.

How do you ask for a notification?
NSWGR8022
The site will prompt you to allow notifications. Once it does, they'll be delivered to your browser immediately after being created on our servers.

As I said in my post, this feature is in development, and will be released to a small group of testers soon. For now it's limited to a handful of people only.
  NSWGR8022 Chief Train Controller

Location: From the lands of Journalism and Free Speech
Cool.

How do you ask for a notification?
The site will prompt you to allow notifications. Once it does, they'll be delivered to your browser immediately after being created on our servers.

As I said in my post, this feature is in development, and will be released to a small group of testers soon. For now it's limited to a handful of people only.
michaelgreenhill

Sad
  michaelgreenhill Administrator That's Numberwang!

Location: Melbourne
FYI contentless-posts, such as a single emoticon, are generally frowned upon.

Sponsored advertisement

Display from: