CodeHubOrg / discussions

Discussion board for CodeHub Bristol
2 stars 2 forks source link

xmas js101 - our favourite resources #3

Open katjad opened 8 years ago

katjad commented 8 years ago

Gicela asked everybody to name 3 resources they found helpful or are interested in exploring more. Here is what we came up with.

mjg17 commented 8 years ago

I'm sure some of these suggestions have come from the group, but anyway, here are mine.

A great resource for comparing JS frameworks: http://todomvc.com/

Indispensable reference for HTML, CSS, JS, and lots of frameworks. Works online and offline. Generated from official reference sources: http://devdocs.io/

A nice CSS layout tutorial: http://learnlayout.com/

And a bonus - HTML/CSS table generator (for tabular data, not for layout!!): http://www.tablesgenerator.com/html_tables

PaulGrimshaw commented 8 years ago

First one was https://coderbyte.com/. Good fun attempting the javascript challenges under time pressure!

Second was meteor, new to me though obviously a lot of you know it already. https://www.meteor.com/. Looks good for quickly producing very interactive applications. Handles all client server communication for you, comes with built in MongoDB support, as well as user management etc. Supports AngularJS and ReactJS.

Third one was more of a technique I used, which would delay a function call in nodeJS. I really liked this as it shows how user friendly the javascript callback mechanism is.

I created a proxy class for a web api i used, which effectively throttles the requests. I did this by creating a queue of calls, and a call to the proxy would add to the queue with the parameters. Relevant code below:

//ES6 code

//utility function to store function with params
    wrapFunction (fn, params) {
    return function() {
        fn.apply(this, params);
    };
}

//class that proxies the api call.  Any time method 1 is called, it adds the call to the queue.  An interval call process queue items one by one.
class ProxyClass() {
    //initialised properties
    constructor () {
          ProxyClass.queue = [];
    }

   //Called directly from external objects 
   method1(param1,param2,callback) {
          ProxyClass.queue.push(wrapFunction(this.method1ApiCall,[param1,param2,callback]));
    }

   //Private function (in principle) called by queue service
   method1ApiCall (param1,param2,callback) {
        //on api call success function  ... function() {
             callBack();
        }
   }

   //Called once to start the queue engine
   startProcess(readyForNextCallback) {
          ProxyClass.readyForNextCallback = readyForNextCallback;
          setInterval(this.tick,100);
    }

   //fired every 10th second, executes method and checks if ok to fill more into queue.  If no more methods are queued, fires the callback prompting calling code to add more calls.
   tick() {
       (ProxyClass.queue.shift())();
       if(ProxyClass.queue.length === 0) {
           ProxyClass.readyForNextCallback();
       }
   }
}

And as a bonus - Floobits - https://floobits.com/ - really clever collaborative code editing

katjad commented 8 years ago

So here are mine, I realise they all have to do with learning.

Gicela commented 8 years ago

I suggested https://www.javascript.com/ -particularly the free books link :) The JavaScript podcast https://devchat.tv/js-jabber/ Finally, the latest native javaScript https://www.nativescript.org/ for creating apps in javaScript that work natively!

anndaff commented 8 years ago

Hi there, here are some ebooks

itebooks.zone --> quite a few books on quite a few subjects

JavaScript: The Definitive Guide https://www.dropbox.com/s/jzywdfivri35gw2/%5BO%60Reilly%5D%20-%20JavaScript.%20The%20Definitive%20Guide%2C%206th%20ed.%20-%20%5BFlanagan%5D.pdf?dl=0

Eloquent JavaScript. 2nd.Edition https://www.dropbox.com/s/ibmv0zj663fvu6c/No.Starch.Eloquent.JavaScript.2nd.Edition.Dec.2014.ISBN.1593275846.pdf?dl=0

55Learning Javascript Design Patterns https://www.dropbox.com/s/dba8vw0hup5tcol/55Learning%20%20Javascript%20Design%20Patterns.pdf?dl=0

javascript_tutorial https://www.dropbox.com/s/6p3nbwl0swd143s/javascript_tutorial.pdf?dl=0

Programming in HTML5 with JavaScript and CSS3 https://www.dropbox.com/s/gphj16ttr8335qx/Programming%20In%20HTML5%20With%20JavaScript%20And%20CSS3%20Training%20Guide.pdf?dl=0

Hope this helps :)