Skip to content

Instantly share code, notes, and snippets.

View leggetter's full-sized avatar

Phil Leggetter leggetter

View GitHub Profile
  1. Go to https://github.com/BladeRunnerJS/brjs-plugin-bootstrap
  2. Either:
    • Copy the "Download ZIP" url and In terminal: curl -L <zip_url> > start.zip
    • Copy BRJS.zip and brjs-plugin-bootstrap-master.zip from network path
  3. If copied BRJS.zip, unzip
  4. unzip brjs-plugin-bootstrap-master.zip
  5. mv brjs-plugin-bootstrap-master ListAppsPlugin
  6. cd ListAppsPlugin
  7. ls -la to show contents of directory
  8. ./gradlew init -Pbrjs= to create the required project files
( function() {
function trackOutboundLink( ev ) {
var el = jQuery( ev.srcElement || ev.target );
var href = el.attr( 'href' ) || '';
var fullUrl = /^https?:\/\//.test( href );
var leggetterLink = /^https?:\/\/www.leggetter.co.uk/.test( href );
if( !fullUrl || leggetterLink ) {
log( 'not tracking internal link' );
return;

No worries if you don't have time to review this - thanks for your input so far


layout: docs title: Testing BRJS Applications permalink: /docs/concepts/testing/

The BRJS toolkit and application architecture encourages you to implement tests at a number of different levels. The focus is to push testing down the testing triangle as much as possible as this results in faster contextual feedback, and faster and more reliable tests.

function Rimmer() {
this._testFailText = 'I AM A FISH.';
this._testFailIterations = 400;
}
Rimmer.prototype.takeTest = function( testName ) {
if( testName.toLowerCase() === 'engineering exam' ) {
var count = 0;
do {
this.write( this._testFailText );

Roadmap to BRJS 1.0 [DRAFT]

A key part of building a scalable application is loosely coupled communication between application components. We had an event hub, but took it out as it was a bit too complicated for general use cases. We want to add this key concept back in.

We don't like the way we currently need to write our JavaScript. We like the Node.js coding style and moduling system. So, we're adding support for it within BRJS applications.

Realtime Web Apps in the Wild

It has been possible to instantly push information from a web server to a web browser for at least 10 years, but this technology has finally gone mainstream thanks to technologies like WebSockets and solutions like SignalR, socket.io, Faye and Pusher. In this sessions I'll cover the past, present and future of client/server communication technology, the realtime web and provide a number of use cases and demonstrations of how the technology is actually used today (it's not just chat and spaceship games).

Talk themes

  • Realtime
  • Best Practices
  • Thought leadership (try to get others to think about building realtime apps)
@leggetter
leggetter / gist:6457525
Last active December 22, 2015 10:18
We have a number of entries in a Confluence wiki that we'd like to migrate to a github wiki. However, Confluence seems to have it's own Wiki Markup. I'd love to create an automated process for the migration, but for the moment these manual steps help.

Migrate Confluence Wiki Markup to Github Markdown

Get the Confluence Wiki Markup

Go to the page and click "Edit". The "View wiki markup" option removes whitespace.

Paste that into your favourite text editor.

Converting inline code

@leggetter
leggetter / gist:6262006
Created August 18, 2013 14:47
Realtime web tech PubSub comparison

What the majority of libraries share is following a form of pubsub pattern where your client (the browser) subscribes to data. When the server has new data it is pushed to the client.

Subscribing

In JavaScript:

socket.io

var socket = io.connect('http://somehost.com');

socket.on( 'news', function ( data ){});

@leggetter
leggetter / gist:5776965
Created June 13, 2013 20:15
Random piece of JavaScript to work out which characters show which icons when using IcoMoon. Not particularly nice, but does the job.
var el = $('.win-command'); // get example from existing page
var charCodeRange = { start: 0, end: 300 };
for( var cc = charCodeRange.start; cc <= charCodeRange.end; ++cc ) {
var newEl = el.clone();
var charLetter = String.fromCharCode( cc );
if(!charLetter) continue;
newEl.find( '.win-commandimage' ).text( charLetter );
var wrapper = $( '<div>' + charLetter + '</div>' );
wrapper.append( newEl );
$( document.body ).append( wrapper );

Phil @leggetter is a Developer Evangelist at Caplin Systems where he's leading the project to open source BladeRunnerJS.

He's the co-author of the Apress title "Realtime Web Apps" and has written articles for Smashing Magazine, .net magazine, Programmable Web, on his own blog and anywhere else he gets an opportunity to create content.

Phil's passions include developer experience and productivity, APIs, customer service and helping people realise the benefits realtime web technologies offer when creating the next generation of interactive and engaging web apps.

--

I'm a Developer Evangelist at Caplin Systems where I'm leading the project to open source BladeRunnerJS.