This is a list of must-watch videos devoted to JavaScript
Your new post is loading...
Your new post is loading...
From
github
This is a list of must-watch videos devoted to JavaScript No comment yet.
Sign up to comment
The talk included a number of specific tips and tricks on Backbone.js, Handlebars, and Rails that the team employed to build Wish Lists, which we launched in June. I mention how we bootstrap the app from Rails to Backbone, our data lazy-loading strategy, how we keep our Backbone views modular and DRY, how we handle CDN and asset fingerprinting when generating HTML client-side, and our approach to I18n in the client, among other things. In the talk I also introduced what it means to build a single-page app and outlined two different approaches: the Easy Way and the Hard Way. Single page web applications - or SPAs, as they are commonly referred to - are quickly becoming the de facto standard for web app development. The fact that a major part of the app runs inside a single web page makes it very interesting and appealing, and the accelerated growth of browser capabilities pushes us closer to the day, when all apps run entirely in the browser.
When we talk about any MV* pattern, model is undoubtedly the most important part of the architecture/application. Its the model that contains all the application data. Along with keeping the data the model class performs various set of actions on the data. Actions like possibility to validate the data.
From
medium
Browserify? Require.js? Doesn’t Angular.js have modules? A module can be different things. It could be Angular, lodash (you’re not still using underscore, are you?), shared code in your organization, some gist you found online, or separating features out inside your codebase. JavaScript doesn’t support modules, so we’ve traditionally had a few various approaches. (Feel free to skip this next section if you understand JavaScript modules) With the raising of modern rich web applications it’s getting more and more important to improve the speed and the interactivity of mobile web applications. People are spoiled of native applications and compare the experiences of both worlds to each other. After several years of static web pages with thin client and fat server architecture the architecture switched to rich client architecture some years ago. This was definitely owed to the raise of Model View Controller JavaScript Frameworks like Backbone.js or AngularJS which made it possible to implement structured single page applications.
From
github
Knockout REST API provides a simple and flexibe API to use REST services with Knockout ViewModel objects. This code above, creates a view model called CityViewModel with 3 properties:
At the end we applying this view model object into the page, using ko.applyBindings function. So simple, ha?! Both of these frameworks define a reference architecture for developing single page web applications, providing developers with the means to:
However, these two frameworks go about solving these problems through fundamentally different approaches. The blueprint Angular offers is fundamentally quite simple – JavaScript doesn’t have a module system, so Angular provides one for you. Angular ensures that all of your JavaScript code is ready, loaded and available when your application runs. It does this primarily via dependency injection. The next logical step would be to break these controllers, services, and anything else we can out into separate files. This would be the physical project structure that mimics the coded one. We generally have two options here – Browserify and RequireJS HTML5 and the latest standard web technologies have finally driven the developer community towards a cross-platform app and game deployment scenario. Push the limits of what’s possible on the web When building AngularJS apps, it can be challenging to access data and services hidden deep in our application through the Javascript console in Chrome, Firefox, and IE. Here are some simple tricks we can use to inspect and control a running Angular app through the browser Javascript console, making it easy to test, modify, and even program our Angular app in real-time: The application is a kind of video aggregator: the front page loads many rows of videos, each coming from a different source. Since the various requests can take some time, we want to display a spinner for each row. Nothing too fancy or unusual here. But what if you have many API calls and not just one? You can use a “meta-promise”, ie. a promise that get resolved once every “sub-promise” is resolved. You can achieve this using RSVP.all or RSVP.hash, and it works great. But it is an all-or-nothing situation: you cannot see the individual progress for each promise, and if one fails, the meta-promise also fails. So we would have a global spinner, not one per row, and if one of the requests fails, we cannot easily display one error for this row, and the other rows correctly. |
From
github
A collection of awesome browser-side JavaScript libraries, resources and shiny things. Yahoo! home page engineer Nicholas Zakas, author of Professional JavaScript for Web Developers, discusses frontend architecture for complex, modular web applications with significant JavaScript elements. How to tackle real-world web platform performance problems in modern websites and apps? This session starts with a basic understanding of the web platform and then explores to a set of problem/solution pairs built from industry-standard performance guidance. In the talk, we will demonstrate performance tips and tricks that will help you improve the performance of your apps and sites today. We will discuss the following respond to network requests, speed and responsiveness, optimizing media usage, and writing fast JavaScript. These performance tips and tricks apply equally to web sites that run on standards based web browsers, as well as to modern apps. It was a long time ago (almost a decade back) when most software applications were getting built as standalone applications. These applications were targeted at a single user and ran on their operating systems. Then came the need to share data across multiple users and a need to store data at a cent. React is built around the concept of components. This is in contrast to frameworks like Angular and Ember, which use two-way data bindings to update the HTML of the page. In my opinion React is easier to learn than Angular and Ember – it is much smaller and plays nicely with jQuery and other frameworks. It is also extremely fast, because it uses a virtual DOM, and syncs only the changed parts with the underlying page (accessing the DOM is still the slowest part of a modern web application, which is why the framework gets a performance boost by optimizing it). However, the flip side is that it takes a bit more code in React to achieve the same things that can be easily done with a data binding, as you can see from the examples below... What are the chances to mess up? There are a few. From what I gathered at several events and from various talks I see the following dangers:
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. :) I want my unit test to verify that the $scope object has the right areas and that when the click event happens, the $rootScope variable is set correctly. Fast Track to Mobile Application Development In this tutorial, you will learn strategies and best practices to build native-like mobile applications with HTML, JavaScript, and CSS. You will build an Apache Cordova (aka PhoneGap) Employee Directory application from scratch using the Single Page Architecture, HTML templates, touch events, and performance optimization techniques. A presentation that IS actually a hybrid app, showing off how to build it. Tutorial 11: AngularJS Navigation I’m using jQuery dialogs in an AngularJS application. I’ve struggled to find a way to use them that follows angular ‘best practices’. Then I thought, what if I created a generic directive that would allow me to set the dialog options in the markup? Furthermore, what if I could register the the dialog in a service so I could inject it into a controller and open the dialog using that controller? It turns out it’s possible with a little angular black magic. Meet the jqdialog directive. |
Your new post is loading...