All @Javascript
3.5K views | +1 today
All @Javascript
Javascript info,  tips & tricks, as well as info on popular frameworks and cool plugins
Curated by Augusto Porto
Your new post is loading...
Your new post is loading...
Scooped by Augusto Porto
Scoop.it!

5 Creative Uses of Favicons - Placeit Blog

5 Creative Uses of Favicons - Placeit Blog | All @Javascript | Scoop.it
A picture is worth a thousand words, even if the picture is a 16×16 pixel favicon. The favicon (also known as favorite icon) has been a part of the Internet, albeit a small one since the release of Internet Explorer 5 in 1999. Originally it was only shown in Internet Explorer’s favorites (bookmarks) menu and [...]
more...
No comment yet.
Rescooped by Augusto Porto from JavaScript for Line of Business Applications
Scoop.it!

A Case Study in JavaScript Code Improvement

A Case Study in JavaScript Code Improvement | All @Javascript | Scoop.it
Raymond Camden shares how a recent project led him to integrate some workflow tools that helped him improve the quality of his JavaScript code.
While writing the JavaScript, I ran into a few bits of code that felt repetitive and seemed ripe for optimization. I intentionally ignored those thoughts and focused on getting the code working. Premature optimization is frowned upon for a reason. Now that the code is released though, I think it makes sense to go back through and look for improvements to the code base.Obviously – and probably more sensible before the optimization, would be the use of unit tests. As this relies upon a remote service, writing tests could be problematic, but even a test that assumes that remote service is running perfectly would be better than no tests. Plus, if I write these tests first, I can then look into code changes and feel secure that I’ve not broken anything.I’m a big fan of JSHint and would like to run it over the code base and make sure it passes that test as well.I’d also like to ship a minified version of the library. To be honest, I’ve never done that before, but if I had to guess, I’d bet there is a command line program I could run to generate that.Finally, I bet I can handle running the unit tests, JSHint checking, and the minification, automatically via a tool like Grunt or Gulp.
Via Jan Hesse
more...
No comment yet.
Scooped by Augusto Porto
Scoop.it!

5 Array Methods That You Should Be Using Now

When ECMAScript 5 was published in 3rd Dec' 2009, it brought in additional new set of Array methods…
more...
No comment yet.
Rescooped by Augusto Porto from JavaScript for Line of Business Applications
Scoop.it!

Javascript promises and why jQuery implementation is broken

Javascript promises and why jQuery implementation is broken | All @Javascript | Scoop.it

It’s very easy to find blog articles and tutorials online, especially around jQuery Deferred object, and almost all of them show how to do callback aggregation using the “then”function to attach callbacks to a promise, whether for success or for errors (or even to signal that an operation has made some progress). When the promise transitions state, the callbacks will be called, that’s as simple as that.


Via Jan Hesse
more...
No comment yet.
Rescooped by Augusto Porto from JavaScript for Line of Business Applications
Scoop.it!

Componentize all the things!

Componentize all the things! | All @Javascript | Scoop.it

Web Components are a collection of standards that change the way we build web applications.
Four technologies:

* HTML Templates - Inert chunks of clonable DOM

* Shadow DOM - Style & DOM encapsulation

* Custom Elements - Define and use new DOM elements

* HTML Imports - Include/Reuse other HTML documents


Via Jan Hesse
more...
No comment yet.
Rescooped by Augusto Porto from JavaScript for Line of Business Applications
Scoop.it!

How to optimize your Mongo database for Meteor.js

How to optimize your Mongo database for Meteor.js | All @Javascript | Scoop.it

Kadira. The amount of insight and analytics you get from Kadira is worth every penny, especially when you are trying to optimize for production. Once I installed and deployed the app with Kadira in it, the app started sending back the metrics from the running meteor app.

As I've said before, publications are the life blood of your meteor app. I started by going to the Pub/Sub detailed tab in Kadira and switched to sort by response time. I quickly noticed that one publication had the second highest subscribe rate and an average response time of 2171ms - that signaled a pretty big bottleneck for me.


Via Jan Hesse
more...
No comment yet.
Rescooped by Augusto Porto from CSS3 Javascript JQuery HTML5 - node.js vert.x
Scoop.it!

Collection of Best JavaScript Libraries for 2014 - Code Geekz

Collection of Best JavaScript Libraries for 2014 - Code Geekz | All @Javascript | Scoop.it
A JavaScript library is a library of pre-written JavaScript which allows for easier development of JavaScript-based applications, especially for AJAX and other web-centric technologies. The primary use of JavaScript is[...]

Via Feker Skandrani
more...
No comment yet.
Rescooped by Augusto Porto from JavaScript for Line of Business Applications
Scoop.it!

sailsjs-angularjs-bootstrap-example

sailsjs-angularjs-bootstrap-example | All @Javascript | Scoop.it

A suite of examples written for Sails.js, AngularJS, and Twitter Bootstrap.
Contents:

* A REST API test page using Sails' transport agnostic routing (HTTP vs. Socket.io)
* A "Todo List" app demo using Sails' Socket.io messaging and REST Blueprints
* Passport middleware authentication integrated with Sails policies.
* Twitter Bootstrap / Font Awesome custom LESS compiles (Grunt)
* Cache busting JS/CSS for production (Grunt)


Via Jan Hesse
more...
No comment yet.
Rescooped by Augusto Porto from JavaScript for Line of Business Applications
Scoop.it!

angular-data: Data store and caching for Angular.js

angular-data: Data store and caching for Angular.js | All @Javascript | Scoop.it

angular-data.js is the full data store that supports collections and communicating with persistence layers. angular-cache.js is a simple key-value store and an api-compatible replacement for $cacheFactory with advanced caching capabilities. Use one, or the other, or use both and angular-data will be able to take advantage of some of the features of angular-cache.


Via Jan Hesse
more...
No comment yet.
Rescooped by Augusto Porto from JavaScript for Line of Business Applications
Scoop.it!

5 Practical Examples For Learning The React Framework

5 Practical Examples For Learning The React Framework | All @Javascript | Scoop.it

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...


Via Jan Hesse
more...
No comment yet.
Rescooped by Augusto Porto from JavaScript for Line of Business Applications
Scoop.it!

Isomorphic JavaScript – Build awesome webapps with the best of two worlds

Isomorphic JavaScript – Build awesome webapps with the best of two worlds | All @Javascript | Scoop.it

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. 


Via Jan Hesse
more...
No comment yet.
Rescooped by Augusto Porto from JavaScript for Line of Business Applications
Scoop.it!

Knockout REST API

Knockout REST API | All @Javascript | Scoop.it

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:

service: it's a reference of our REST service, that point out to /api/cities;model: it's a observable reference to an POJO object;collection: it's a reference to model collection of cities;

At the end we applying this view model object into the page, using ko.applyBindings function. So simple, ha?!



Via Jan Hesse
more...
No comment yet.
Rescooped by Augusto Porto from JavaScript for Line of Business Applications
Scoop.it!

Web Components and you – dangers to avoid

Web Components and you – dangers to avoid | All @Javascript | Scoop.it

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:

One browser solutionsDependency on filler librariesCreating inaccessible solutionsHiding complex and inadequate solutions behind an elementRepeating the “just another plugin doing $x” mistakes
Via Jan Hesse
more...
No comment yet.
Rescooped by Augusto Porto from JavaScript for Line of Business Applications
Scoop.it!

Object Oriented JavaScript Pattern Comparison

Object Oriented JavaScript Pattern Comparison | All @Javascript | Scoop.it

In this post, I explore various object oriented JavaScript design patterns. An intermediate level of JavaScript knowledge is required to get value from this post. Before we get started exploring the various patterns below, it’s worth reviewing a couple key things about JavaScript objects.


Via Jan Hesse
more...
No comment yet.
Rescooped by Augusto Porto from JavaScript for Line of Business Applications
Scoop.it!

Best Learning Resources for Meteor.js

Best Learning Resources for Meteor.js | All @Javascript | Scoop.it

Meteor.js is an open-source platform built on node.js for rapidly creating reactive web and mobile apps. It is designed to allow programmers to create applications in a modern fashion, using up-to-date paradigms, most importantly reactive programming. Meteor became v1.0 on October 28th, 2014.

Together with Manuel I am the author of the Manning book Meteor in Action. It's for everyone coming from traditional server languages like Ruby, PHP, or Java and even front-end engineers looking to cover the full stack. All you need are JavaScript fundamentals and HTML/CSS basics. 


Via Jan Hesse
more...
No comment yet.
Rescooped by Augusto Porto from JavaScript for Line of Business Applications
Scoop.it!

Writing Desktop and Web-Based JavaScript Applications

Writing Desktop and Web-Based JavaScript Applications | All @Javascript | Scoop.it

Desktop applications are another arrow in the web developer’s quiver. Node-webkit is a great, cross-platform way to use existing web development skills without having to learn new tools, languages or frameworks.


Via Jan Hesse
more...
No comment yet.
Rescooped by Augusto Porto from JavaScript for Line of Business Applications
Scoop.it!

Building rich single-page application with Ember.js

Building rich single-page application with Ember.js | All @Javascript | Scoop.it

Logical Code Organization
Easy Persistence
Auto-Updating Templates
Helpful Object APIs

 

How Ember works

Everything starts with URL
A URL maps to a Route
A route prepares the Data
A route prepares the Controller
The Controller is showed into a template


Via Jan Hesse
more...
No comment yet.
Rescooped by Augusto Porto from JavaScript for Line of Business Applications
Scoop.it!

Horizontally Scaling Node.js and WebSockets with Redis

Horizontally Scaling Node.js and WebSockets with Redis | All @Javascript | Scoop.it

The Node.js cluster module is a common method of scaling servers, allowing for the use of all available CPU cores. However, what happens when you must scale to multiple servers or virtual...


Via Jan Hesse
more...
No comment yet.
Rescooped by Augusto Porto from JavaScript for Line of Business Applications
Scoop.it!

AngularJS Tutorial: Learn Angular by building a Gmail clone

AngularJS Tutorial: Learn Angular by building a Gmail clone | All @Javascript | Scoop.it

Get your feet wet with this popular Javascript framework in this hands-on introductory guide. You'll understand the basics and build your first Angular app, a Gmail clone.


Via Jan Hesse
more...
No comment yet.
Rescooped by Augusto Porto from JavaScript for Line of Business Applications
Scoop.it!

The State of the Componentised Web

The State of the Componentised Web | All @Javascript | Scoop.it

An important part of compontent-based development is that components can be composed out of other components. The rich text editor is a great example of this since it will be composed out of buttons, drop downs, some sort of rich view and so on. Another good example is the HTML5 video element which again contains buttons and also an element which renders content from a video data stream.


Via Jan Hesse
more...
No comment yet.
Rescooped by Augusto Porto from JavaScript for Line of Business Applications
Scoop.it!

Start using closures with your AngularJS, EmberJS code, and other JavaScript.

Start using closures with your AngularJS, EmberJS code, and other JavaScript. | All @Javascript | Scoop.it

Closures are one of the most powerful tools in JavaScript; they can help you write faster, cleaner, and safer code. No matter if you are using AngularJS, EmberJS, JQuery or another framework, closures are an invaluable tool you should be taking advantage of. Lets review the how and why of closures, and give you some examples to play with on your own.


Via Jan Hesse
more...
No comment yet.
Rescooped by Augusto Porto from JavaScript for Line of Business Applications
Scoop.it!

Tips for writing third-party JavaScript

Tips for writing third-party JavaScript | All @Javascript | Scoop.it

The unique challenges faced in writing third-party JavaScript revolve around the same-origin policy. Because the JavaScript file is based on a different domain to its host, inbuilt browser security places restrictions on cookie use and client-side/server communication. 

By using jQuery for prototyping, you will be deferring full browser support issues until a little later in the project timeline, but by then you should have gained a better understanding of the unique problems inherent when writing third-party JavaScript.


Via Jan Hesse
more...
No comment yet.
Rescooped by Augusto Porto from JavaScript for Line of Business Applications
Scoop.it!

Improving AngularJS long list rendering performance using ReactJS

Improving AngularJS long list rendering performance using ReactJS | All @Javascript | Scoop.it

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. :)


Via Jan Hesse
more...
No comment yet.
Rescooped by Augusto Porto from JavaScript for Line of Business Applications
Scoop.it!

Best Practices for Building Angular.js Apps

Best Practices for Building Angular.js Apps | All @Javascript | Scoop.it
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)


Via Jan Hesse
more...
No comment yet.
Rescooped by Augusto Porto from JavaScript for Line of Business Applications
Scoop.it!

Sencha Touch / Ext JS and AngularJS: Which framework is right for your project?

Sencha Touch / Ext JS and AngularJS: Which framework is right for your project? | All @Javascript | Scoop.it

Both of these frameworks define a reference architecture for developing single page web applications, providing developers with the means to:

declaratively construct a user interface from constituent components,correlate user interface gestures to corresponding business logic,retrieve and persist data to data sources, andstructure application logic in a manner that enforces separation of concerns.

However, these two frameworks go about solving these problems through fundamentally different approaches.


Via Jan Hesse
more...
No comment yet.