background preloader

How do I "think in AngularJS" if I have a jQuery background

How do I "think in AngularJS" if I have a jQuery background

Leveling Up in Angular - HTML5DevConf in Angular Alicia Liu @aliciatweet Sr Software Engineer, Lift Enjoyment of Angular AngularRULEZ I'm doingit wrong! services,modules promises,directives,... Module Organization Module By Feature Supports asynchronous loading of modules in the future From Angular Developer Guide Service vs Factory var Mario = function() { this.size = 'small'; }; Mario.prototype.eatMushroom = function() { this.size = 'large'; }; myModule.service('marioService', Mario); // calls new Mario() Provider Asynchronous Events // in some controller $scope. What happens if the data doesn't load? Promises $q var deferred = $q.defer(); svc.getMario = function() { return deferred.promise; }; ... deferred.resolve(data); ... deferred.reject(error); svc.getMario().then( doStuffWithMario, displayError ); Using Promises Chaining $q.all $q.when Interceptors Resolve myModule.controller('CharacterCtrl', function($scope, character) { $scope.character = character; }); Why Write Custom Directives? Restrict Scope

egghead.io: Learn AngularJS with Tutorial Videos & Training @eggheadio AngularJS Tutorial: Learn to Rapidly Build Real-time Web Apps with Firebase In response to the feedback from our original tutorial, we decided to take the new version of the tutorial in an entirely new direction. Mucking around in backend code doesn't belong in an AngularJS tutorial, and we've found an elegant solution to this problem. This tutorial will guide you through the process of creating a frontend-only application. Firebase’s firebase.js and angularFire.js libraries offer an entirely new flavor of application: an app built with no backend server or code. The only parts of this application are the AngularJS app, the Firebase data store, and the minimal backend server to deliver the assets to the browser. Our intention with this tutorial is to provide the AngularJS community with instructions on how to design and build an ultra-modern application. The application you are building will go beyond basic use of AngularJS, and we will attempt to explore as much of the framework as possible. The tutorial is a living thing, a work in progress. app/js/config.js

Brian Ford The AngularJS documentation is great for getting started and for looking up specific API calls. However, it doesn't really tell you how to organize and manage your app as it grows to tens or hundreds of thousands of lines of code. I've collected here some of my observations and best practices for how to manage your sprawling application. First we'll take a look at organization, then move on to some tips on improving performance, and conclude with a brief summary on tools, servers, and build processes. While this post will focus on big apps in particular, there's a great video on YouTube from the December 2012 AngularJS meetup on best practices that's also worth checking out. Don't Write a Huge App The best advice about huge apps is not to make them. Organization Probably the biggest question with large apps is where to put all of that code. Directories This is the typical folder layout that I recommend: Files I would make an exception for closely related directives. Modules Dependencies Models

Code Organization in Large AngularJS and JavaScript Applications — Cliff Meyers Many developers struggle with how to organize an application's code base once it grows in size. I've seen this recently in AngularJS and JavaScript applications but historically it's been a problem across all technologies including many Java and Flex apps I've worked on in the past. The general trend is an obsession with organizing things by type. Let's take a look at angular-seed, the official starting point for AngularJS apps. css/img/js/ app.jscontrollers.jsdirectives.jsfilters.jsservices.jslib/partials/ The JavaScript directory has one file for every type of object we write. This is a mess. The next logical pass at organizing JavaScript involves creating a directory for some of the archetypes and splitting objects into their own files. Let's imagine we're building a simple e-commerce site with a login flow, product catalog and shopping cart UI's. Nice! Imagine you're at the office and realize you need a few outfits dry-cleaned for a business trip tomorrow morning.

The Next Big Programming Language You’ve Never Heard Of | Enterprise Getty Andrei Alexandrescu didn’t stand much of a chance. And neither did Walter Bright. When the two men met for beers at a Seattle bar in 2005, each was in the midst of building a new programming language, trying to remake the way the world creates and runs its computer software. That’s something pretty close to a hopeless task, as Bright knew all too well. Alexandrescu, a graduate student at the time, could’ve said the same thing to Bright, an engineer who had left the venerable software maker Symantec a few years earlier. Andrei Alexandrescu.Photo: Ariel Zambelich/WIRED The result is a programming language that just might defy the odds. C++ is an extremely fast language—meaning software built with it runs at high speed—and it provides great control over your code. Among the giants of tech, this is an increasingly common goal. In the past, the programming world was split in two: the fast languages and the simpler modern languages. The Cape of a Superhero For Alexandrescu, D is unique.

The Julia Language

Related: