background preloader

JavaScript

Facebook Twitter

Project Planning I: The Work Breakdown Structure. Project Planning II: Effort Introduction A lot of work has to be done in a project (or in a major task). But how much effort will it really cause, and when will it be finished? Fundamentals of planning When it comes to project planning we have to make a basic distinction: What type of desired result has our project? It could be e.g. unknown, a building, a factory, a product, a changed behaviour of an organisation, or a software application.

In general the result of the project may be a) fairly unknown, b) tangible, c) intangible or d) a complex system. When the result of the project is fairly unknown, the project itself has to focus on evolution, when it is tangible, the project has to focus on structure, when it is intangible, the project has to focus on behaviour, and when the result of the project is a complex system, the project itself has to focus on structure and behaviour. How is this done in detail?

Fairly unknown project result: evolution Tangible project result: structure History. The Front End Engineering Spectrum: The Roles | HTML + CSS + JavaScript. Following up on my previous post about the generic types of front end engineers, this post will deal with the common roles that I see people trying to fill. Unlike the previous list which was written solely from the perspective of a front end engineer, looking at the actual skill sets of the people whose resumes I’ve reviewed, people I’ve interviewed and folks I’ve worked with; this list is based on job descriptions and roles designed by people may not really understand what being a front end engineer means in 2011.

Hopefully a few of those people (and maybe a recruiter or two) will visit this site and come away with a better sense of how to staff these roles. I’ve seen examples of all of these over the past few years. “The Hybrid” This role includes some combination of User Experience/Visual Design and Front End Development. I see this one a lot. This combination was the prototype in the early 2000s and still has a lot of traction in a lot of organizations. “Soup to Nuts” “The Full Stack” Prototypes and Prototype Inheritance. In JavaScript, a prototype is a property of functions and of objects that are created by constructor functions. The prototype of a function is an object. Its main use is when a function is used as a constructor. function Vehicle(wheels, engine) { this.wheels = wheels; this.engine = engine; } In the example above, the prototype of the Vehicle function is the prototype of any object that is instantiated with the Vehicle constructor. You can use the prototype property to add properties and methods to objects, even the ones that have already been created: var testVehicle = new Vehicle(2, false); Vehicle.prototype.color = "red"; var testColor = testVehicle.color; The value of testColor is "red".

You can even add properties and methods to predefined objects. Using Prototypes to Derive One Object from Another with Object.create The Bicycle object has the properties wheels, engine, color, and pedals, and its prototype is Vehicle.prototype. Changing an Object's Prototype. Learning Advanced JavaScript. JavaScript Objects in Detail. JavaScript’s core—most often used and most fundamental—data type is the Object data type. JavaScript has one complex data type, the Object data type, and it has five simple data types: Number, String, Boolean, Undefined, and Null.

Note that these simple (primitive) data types are immutable (cannot be changed), while objects are mutable (can be changed). A Once-in-a-Lifetime Opportunity Train to Become an Exceptional and Successful Developer While Building Real-World Projects You Can Benefit from for Years By the founder of JavaScriptIsSexy What is an Object An object is an unordered list of primitive data types (and sometimes reference data types) that is stored as a series of name-value pairs. Consider this simple object: Think of an object as a list that contains items, and each item (a property or a method) in the list is stored by a name-value pair. Property names can be a string or a number, but if the property name is a number, it has to be accessed with the bracket notation. Intro to javascript unit tests for client side.

Unit tests for UI developers is a underground world and today we will explore this world a bit. The first question you need to answer is, why unit test my code? That will give you a better understanding of why unit tests are important and useful. Here a few points. Reduce bugs (new and/or existing features) Serve as documentation Improve Software Design Reduce fear (you can write code with no fear of breaking something else) Unit tests are meant to be small but what I mean by that is, let's say you have a function called foo() that calls two other functions fooUno() and fooDos() each function has a specific logic/goal, let's also say that one of those functions inside foo() make a XHR request.. One of the ways to achieve isolation and small unit tests is using Spies, Stubs and Mocks understanding them will help you write better unit tests, I'm going to talk more about it later. ECMAScript 6 modules: the final syntax. This blog post is outdated. Please read chapter “Modules” in “Exploring ES6”.

At the end of July 2014, TC39 [1] had another meeting, during which the last details of the ECMAScript 6 (ES6) module syntax were finalized. This blog post gives an overview of the complete ES6 module system. Module systems for current JavaScript JavaScript does not have built-in support for modules, but the community has created impressive work-arounds. The two most important (and unfortunately incompatible) standards are: CommonJS Modules: The dominant implementation of this standard is in Node.js (Node.js modules have a few features that go beyond CommonJS).

The above is but a grossly simplified explanation of the current state of affairs. ECMAScript 6 modules The goal for ECMAScript 6 modules was to create a format that both users of CommonJS and of AMD are happy with: Being built into the language allows ES6 modules to go beyond CommonJS and AMD (details are explained later): Named exports (several per module)