background preloader

Javascript

Facebook Twitter

Dynamics.js. 21 Useful Workflow Tools for AngularJS Developers. These days, AngularJS is one of the most popular technologies around the web. It has simplified web application development to a great extent. Currently, it is a popular name buzzing in the community of developers and technology enthusiasts. With AngularJS, one can build a variety of web applications and websites. You can also look upon “Free Ebooks to learn AngularJS” to start development in this technology. AngularJS Frameworks 1) Ionic Ionic is an open-source, front-end framework for developing mobile applications with HTML, CSS and JavaScript. 2) Supersonic Supersonic is a front-end framework for developing data-driven hybrid apps and cool user interfaces for mobile devices. 3) LumX Lumx is a responsive front-end framework based on AngularJS and Google Material Design guidelines. 4) Radian Radian is an Angular JS framework ideal for working on multiple development projects. 5) Mobile Angular UI Also See: 15 Directives to Extend Your Angular.js Apps AngularJS Code Editors 6) Sublime Text.

Ng-inspector for AngularJS. Angular directives for Bootstrap. The $uibPosition service provides a set of DOM utilities used internally to absolute-position an element in relation to another element (tooltips, popovers, typeaheads etc...). getRawNode(element) Takes a jQuery/jqLite element and converts it to a raw DOM element. parameters element(Type: object) - The element to convert. returns (Type: element) - A raw DOM element. parseStyle(element) Parses a numeric style value to a number. Value(Type: string) - The style value to parse. (Type: number) - The numeric value of the style property. offsetParent(element) Gets the closest positioned ancestor. element(Type: element) - The element to get the offset parent for.

(Type: element) - The closest positioned ancestor. scrollbarWidth(isBody) Calculates the browser scrollbar width and caches the result for future calls. IsBody(Type: boolean, Default: false, optional) - Is the requested scrollbar width for the body/html element. (Type: number) - The width of the browser scrollbar. position(element, includeMargins) Open source framework for creating 3D web apps. The Lessons. WebGL Lesson 1 – A triangle and a square. << Lesson 0Lesson 2 >> Welcome to my first WebGL tutorial!

This first lesson is based on number 2 in the NeHe OpenGL tutorials, which are a popular way of learning 3D graphics for game development. It shows you how to draw a triangle and a square in a web page. Maybe that’s not terribly exciting in itself, but it’s a great introduction to the foundations of WebGL; if you understand how this works, the rest should be pretty simple… Here’s what the lesson looks like when run on a browser that supports WebGL: Click here and you’ll see the live WebGL version, if you’ve got a browser that supports it; here’s how to get one if you don’t.

More on how it all works below… A quick warning: These lessons are targeted at people with a reasonable amount of programming knowledge, but no real experience in 3D graphics; the aim is to get you up and running, with a good understanding of what’s going on in the code, so that you can start producing your own 3D Web pages as quickly as possible. Next: …and then: Babylon.js.

Grunt: The JavaScript Task Runner. JavaScript Code Smells. In the past I've given presentations, recorded videos, and written blog posts about fixing common JavaScript and jQuery bugs. This is a good skill to have, but what about working code? Fixing broken code is important, but have you ever gotten into the situation where your code works, but it doesn't feel quite right... maybe even smells? "A code smell is a surface indication that usually corresponds to a deeper problem in the system" --CodeSmell by Martin Fowler As we grow as developers we strive to write more maintainable code, but on our journey we often times don't know what that looks like yet.

Your JavaScript may pass stardard JSHint rules, but that doesn't mean it's legit. Most developers can smell brittle and fragile code a mile away, but it takes time and training to combat against these smells. Code smells scream to be refactored. Video The following video was recorded this year at FluentConf. Types of Smells Slides.

Angular Classy. Angular's controllers are super-simple which is fantastic for getting started (they're just functions). Because they are just functions, there's lots of different ways to write Angular controllers. This is powerful but can also lead to a lack of structure, especially when many people (with many different coding styles) are working on the same codebase. It can be helpful to have something a little more structured and prescriptive. Enter Angular Classy! The code to the right is a Classy controller for a simple Todo application. Hover your cursor over the code on the right for comments and explanations. Injecting Dependencies Angular veterans will know that if you want your Angular code to work with minifiers then you have to annotate your dependencies (i.e. list your dependencies twice), like so (without Classy): app.controller 'AppCtrl', ['$scope', '$location', '$http', ($scope, $location, $http) -> ] If you want to add/remove a dependancy then you need to remember to do it in two places.

FAQs. Model pattern for Angular JS. A word of caution, don’t get fooled. Even though this guide starts rather simply with things you know and take for granted; that’s just an introduction or preparation of a context if you will… It soon progresses to hardcore ES6 goodness, you are searching for, so no worries! Angular before models Most of the old Angular JS tutorials on the internet (and also projects you encounter while working for the clients) are still using simple approach where the $http service is used directly in the controller and the data is then unwrapped and assigned to some $scope property so that it is usable in the html template.

Storing data in controller’s $scope doesn't belong between recommended practices for some time now. Using controller/component itself (binding data to some property on controller’s this) is virtually the same solution as with $scope besides skipping soon to be deprecated API (yes, the $scope itself). The protomodel Syntax used in the following examples Simple model Fetching the data. Grunt: The JavaScript Task Runner. Rainyday.js. Node.js.