f you're reading this, you most probably tried to make a long and/or complex list of items using a ng-repeat directive, and after seeing how it performs in terms of speed, felt like AngularJS failed you. In some cases you might be able to avoid this problem by using paging or infinite scrolling, but sometimes that's just not good enough. For example, lists that are displaying only a few items at a time (like any kind of a log) would simply be very impractical from the users point of view. Another reason - you might be using libraries like SlyJS that load a whole list at once to calculate the size of the embedded scrollbar and to make list swiping and elastic bounds work properly. Ooooor - your client simply demands it. :)
Web Components aim to solve some of these complexities by providing a unified way to create new elements that encompass rich functionality without the need for all the extra libraries. Web components are comprised of four different specifications (Custom Elements, Templates, Shadow DOM and HTML imports) which are being fleshed out in the W3C.
To bridge the gap and give developers access to this rich functionality now, Google has created the Polymer library which serves as a set of polyfills to bring the promise of Web Components to you today. Let's dive a little deeper into.
As I said before, some people think Meteor generates codes on the fly or does some magic behind the scenes. But it does not. It’s a combination of carefully crafted technologies built into a single framework. It’s extensible and very easy to use.
An AngularJS service to bind Angular models with sailsjs backend models using socket.io.
What it does:
Creates the model inside the $scope for you.Retrieves the model data from the backend using socket.Watches for changes made by the user in the UI and updates the backend immediately.Watches for changes made in the backend and updates the UI immediately.
Via Jan Hesse
* Rule 0: Never make breaking changes to your API. Unless you must. * Rule 1: Provide wood and nails, and a complete house for your API * Rule 2: Have nouns, verbs, and a complete bipartite graph * Rule 3: When dealing with APIs fail fast, or better, not at all * Rule 4: If the API is hard to use, it’s not good enough
There are three keys to effective AJAX-driven websites: event delegation, History management, and effective app-wide communication with pub/sub. This blog employs of all of these techniques, and I thought I'd share the simplest of them: a tiny pub/sub module I use on this site.
If you've not used pub/sub before, the gist is that you publish to a topic and anyone can subscribe, much like the way a radio works: a radio station broadcasts (publishes) and anyone can listen (subscribes). This is excellent for highly modular web applications; it's a license to globally communicate without attaching to any specific object.
Here is a plunk that demonstrates how to reset an Angular form. The form itself will display any element with a dirty flag using a thick red border. The ngModel and ngForm directives automatically add the ng-dirty class to ...
Jaadi is simple, easy to use, abstraction API over many storage techniques provided by DOM, W3C, Browser specific (Chrome) and user defined storages. Jaadi provides interface for basic CRUD operations.
One common problem that we face during BackboneJS is view management. Things are simpler when you are developing single page application. But when it comes to multi-page application in BackboneJS, it is common that views become unmanageable.
Going through the Protractor docs and getting started can still be a daunting task. My goal is to alleviate some of that by sharing my configuration and setup, as well as using the page object pattern for creating an API through which we’ll interact with our web pages. We’ll also be using the jasmine-given library to help clean up our specs.