Angular.js and Go...
Follow
10.3K views | +22 today
 
Rescooped by Piyas De from JavaScript for Line of Business Applications
onto Angular.js and Google Dart
Scoop.it!

How to Build an AngularJS Filter

How to Build an AngularJS Filter | Angular.js and Google Dart | Scoop.it

I have recently been working with AngularJS and I have to say, I haven't felt this productive since Rails. I'm a bit of an architecture nut and AngularJS gives me all the building blocks to build a well structured application.

The first building blocks that everyone learns are filters. They are one of a few ways to get presentation logic out of your business logic. Filters format data to be displayed to the user. In this post, I will show you how to build a simple phone number filter. First, lets see how filters would work.

Filters are functions that are passed an expression.

n AngularJS, it is best to build a bunch of smaller modules and then craft them together to build a larger application. Not only does this make it easier to test, but it becomes very easy to reuse components. Following that mantra, we will build a filter as a standalone module.

A filter is just a function that is executed on some input.

 


Via Jan Hesse
more...
No comment yet.
Angular.js and Google Dart
Here we will have latest updates and learning materials on Angular.js and Google Dart
Curated by Piyas De
Your new post is loading...
Your new post is loading...
Rescooped by Piyas De from JavaScript for Line of Business Applications
Scoop.it!

Some Thoughts on the Awesomeness of Function and Object Composition in JavaScript

Some Thoughts on the Awesomeness of Function and Object Composition in JavaScript | Angular.js and Google Dart | Scoop.it

In JavaScript, probably due to it’s dynamic character and sparse syntax, we can easily compose both functions and objects. We will start looking at how we can compose functions. My goal is to define a series of functions that have a single responsibility and combine them into new functions that provide a richer functionality and result in more readable, intentional, explicit, terse, reusable JavaScript code.


Via Jan Hesse
more...
No comment yet.
Rescooped by Piyas De from Javascript
Scoop.it!

Learning React.js: Getting Started and Concepts

Learning React.js: Getting Started and Concepts | Angular.js and Google Dart | Scoop.it

One of it’s unique selling points is that not only does it perform on the client side, but it can also be rendered server side, and they can work together inter-operably.

The way React works, rather than taking the real person and rebuilding them from the ground up, it would only change the face and the arms. This means that if you had text in an input and a render took place, as long as the input’s parent node wasn’t scheduled for reconciliation, the text would stay undisturbed.


Via Jan Hesse, Darlene Tate
more...
No comment yet.
Rescooped by Piyas De from JavaScript for Line of Business Applications
Scoop.it!

Spring and Angular JS: A Secure Single Page Application

Spring and Angular JS: A Secure Single Page Application | Angular.js and Google Dart | Scoop.it
In this article we show some nice features of Spring Security, Spring Boot and Angular JS working together to provide a pleasant and secure user experience. It should be accessible to beginners with Spring and Angular JS, but there also is plenty of detail that will be of use to experts in either. This is actually the first in a series of articles on Spring Security and Angular JS, with new features exposed in each one successively. We’ll improve on the application in the second and subsequent installments, but the main changes after this are architectural rather than functional.

Via Jan Hesse
more...
Rescooped by Piyas De from JavaScript for Line of Business Applications
Scoop.it!

High Performance Web Components

High Performance Web Components | Angular.js and Google Dart | Scoop.it
How many photo carousels have you built? Date pickers? Dynamic tables and charts? Wouldn't it be great if there was a way to make these custom elements encapsulated and reusable? Welcome to Web Components!

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

A Case Study in JavaScript Code Improvement

A Case Study in JavaScript Code Improvement | Angular.js and Google Dart | 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.
Rescooped by Piyas De from JavaScript for Line of Business Applications
Scoop.it!

Five Traits of Well-Managed JavaScript

Five Traits of Well-Managed JavaScript | Angular.js and Google Dart | Scoop.it
As JavaScript projects grow, they tend to become difficult to manage if you're not careful. We found ourselves running into common problems including code that was difficult to reuse or test, and code that broke when introduced in new pages.

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

Planning A Front-end JavaScript Application

Planning A Front-end JavaScript Application | Angular.js and Google Dart | Scoop.it

Planning a front-end web application is about more than just picking a few JavaScript solutions to aid in the architecture and testing of a web application. While this might be where much of the front-end community focuses, seasoned developers know that building enterprise-grade software is much more than this.

In this article, I am going to describe 16 steps that front-end developers should go through when planning a front-end web application. These steps aim to cover the entire life-cycle of a front-end application. However, before diving in, I need to clarify a few front-end terms that remain unsettled in the industry.


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

Async Fragments: Rediscovering Progressive HTML Rendering with Marko

Async Fragments: Rediscovering Progressive HTML Rendering with Marko | Angular.js and Google Dart | Scoop.it

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

Breaking Down AngularJS to Smaller Components

Breaking Down AngularJS to Smaller Components | Angular.js and Google Dart | Scoop.it

Separation of concerns has its own tradeoffs. A lot of people doesn’t seem to understand this; they tend to use Controller for everything. Even library authors instruct that way. Although library authors are not to be blamed, it seemed to have been applied in practice by everybody, and that’s not awesome.


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

Getting To Know Flux, the React.js Architecture

Getting To Know Flux, the React.js Architecture | Angular.js and Google Dart | Scoop.it
Contents:IntroductionWhat is Flux?The DispatcherStoresAction Creators & ActionsController ViewsPutting It All TogetherWrap Up
Via Jan Hesse
more...
No comment yet.
Rescooped by Piyas De from JavaScript for Line of Business Applications
Scoop.it!

HTML5 Mobile - Optimising for older or slower devices

HTML5 Mobile - Optimising for older or slower devices | Angular.js and Google Dart | Scoop.it

I built my App using Ionic Framework, which is based on AngularJS, but these lessons should apply to other frameworks too. Angular has built-in support for animations, and Ionic comes with some default transitions for sliding pages left and right. I used that, and added a Javascript animation for the “Hero” element. It extracts the element from the card and positions it so it’s in the same place on screen, then animates it to it’s new location before removing it. The corresponding element in the details page is initially hidden during the animation, and revealed at the end so it appears to be the same element.


Google’s success at making the OS available at lower price points means that many users have devices with relatively limited performance. Giving those users a good experience is vital. Here are some lessons I’ve learned while optimising my App to look good on older or slower devices.


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

The Two Pillars of JavaScript — Pt 2: Functional Programming

The Two Pillars of JavaScript — Pt 2: Functional Programming | Angular.js and Google Dart | Scoop.it

How to Stop Micromanaging Everything

 

Over the course of the next few years, the way we code is going to change in radical ways, pushing us in a fundamentally different direction than the one we’ve been sprinting for the past 30 years or so. These changes will lead to many important breakthroughs in programming techniques, processes, application scalability, and quality controls.


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

Getting started with hapi 8 - tutorial

Getting started with hapi 8 - tutorial | Angular.js and Google Dart | Scoop.it
Getting started with hapi 8: request lifecycle, plugins and server methods...

Via Jan Hesse
more...
No comment yet.
Rescooped by Piyas De from AngularJS charting
Scoop.it!

C3.js Brings Charting Power Without the Learning Curve - InfoQ.com

C3.js Brings Charting Power Without the Learning Curve - InfoQ.com | Angular.js and Google Dart | Scoop.it
“The JavaScript charting library, C3.js is a newcomer in an ocean of similar tools. Built on the D3 visualization library, it enables developers to create reusable charts and provides ways to manipulate a chart after it appears on screen.”
Via Jason McClean
more...
No comment yet.
Rescooped by Piyas De from JavaScript for Line of Business Applications
Scoop.it!

2015: The End of the Monolithic JavaScript Framework

2015: The End of the Monolithic JavaScript Framework | Angular.js and Google Dart | Scoop.it

We need to move beyond monolithic frameworks to a component/library-based front-end solution, but there’s too much fragmentation/abstraction to create an industry standard approach. Below are some constructive thoughts aimed at building a more viable and stable alternative.


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

Mercury - A truly modular frontend framework

Mercury -  A truly modular frontend framework | Angular.js and Google Dart | Scoop.it

Some of the core ideas are:

your entire view is a single complex vtreeyour entire view state is a single complex immutable object.your rendering function is pure, it takes just the view state (disclaimer: hooks & widgets are not pure).you declare all user input as channels up front in your view state.the view state supports cursors, you can nest components in components.

Mercury is unidirectional because:

A DOM event triggers a value to be send to a channelThe listener for the channel updates the view stateAn update to the view state triggers a re-renderA new vtree is createddiff() and patch() update the DOM.


mercury is similar to react, however it's larger in scope, it is better compared against om or quiescent

mercury leverages virtual-dom which uses an immutable vdom structuremercury comes with observ-struct which uses immutable data for your state atommercury is truly modular, you can trivially swap out subsets of it for other modulesmercury source code itself is maintainable, the modules it uses are all small, well tested and well documented. you should not be afraid to use mercury in production as it's easy to maintain & fix.mercury encourages zero dom manipulation in your application code. As far as your application is concerned elements do not exist. This means you don't need to reference DOM elements when rendering or when handling eventsmercury is compact, it's 11kb min.gzip.js, that's smaller than backbone.mercury strongly encourages FRP techniques and discourages local mutable state.mercury is highly performant, it's faster then React / Om / ember+htmlbars in multiple benchmarks TodoMVC benchmark\ animation benchmarkTodoMVC benchmark sourcemercury comes with FP features like time-travel / easy undo out of the box.mercury is lean, it's an weekend's read at 2.5kloc. (virtual-dom is 1.1kloc, an evening's read.) compared to react which is almost 20kloc (a month's read)
Via Jan Hesse
more...
No comment yet.
Rescooped by Piyas De from JavaScript for Line of Business Applications
Scoop.it!

Writing AngularJS directives as TypeScript classes

Writing AngularJS directives as TypeScript classes | Angular.js and Google Dart | Scoop.it

TypeScript is a fantastic language that extends JavaScript by providing static typing syntax. Writing TypeScript to utilize AngularJS can be clunky at times, and one pain point for me was in writing directives.

AngularJS expects to be feed a factory function that returns an object that defines parameters and functionality for your directive.

In JavaScript, that looks like this.


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

A Comprehensive Story of 'this' in JavaScript

A Comprehensive Story of 'this' in JavaScript | Angular.js and Google Dart | Scoop.it

Variable scoping has always been a part of every programming language. Whether we are using a class based object oriented language (e.g. Java/C#) or a class-less object oriented language, scope has a very important role to play.

What scope defines?
In easiest terms, scope defines the visibility of any variable/data. In JavaScript, you can define a piece of code (function/method) globally or you can keep it within an object and expose it for public use. The keyword 'this' has a special significance when it comes to JavaScript. Other languages also use the 'this' keyword but it needs some serious attention if you are trying to use or understand it in JavaScript world.


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

Protractor - Testing Angular and Non Angular Sites

Protractor - Testing Angular and Non Angular Sites | Angular.js and Google Dart | Scoop.it

So what if at work you need to write an automated functional regression for non angular site? If you’re a lucky guy/gal you spend your days dealing with AngularJS and you have convinced your manager to use protractor to write the much needed automated functional suite. Now your manager comes back with a smile on his face asking you to create a new set of tests for this other non angularized web application.

Some would be scared, somebody would run, not you! That’s because you know how this thing actually works. You know you can always get the webDriver instance and do some vanilla selenium things. That’s why they call you ‘The Selenium dude’ and sometimes other names which are outside the article’s scope.


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

Building scalable applications with Angular.js

AngularJS today is one of the most powerful, user-friendly and popular JS frameworks to work on web applications. Surprisingly, one of the main weaknesses of this framework is poorly structured documentation and the lack of ready-made solutions. In this report, we will try to work out the best approach to the organization of large and very large applications. We will also speak about the tools that will be useful at every stage of the application development and tools and practicesthat will help you to work in the continuous delivery mode.


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

How we make RWD sites load fast as heck

How we make RWD sites load fast as heck | Angular.js and Google Dart | Scoop.it

In this post, I’ll outline some recent observations and approaches to delivering sites for speed and broader access, and link out to various tools we are using to facilitate our approach. All of the tips mentioned in this post are implemented on this very site, and we’ve tested them heavily to ensure that they’re working as well as they can.

I’ll start with some high-level observations, then later I’ll dive into the more technical how-to. First, some general notes about page loading performance and what we aim to accomplish.


Via Jan Hesse
more...
No comment yet.
Rescooped by Piyas De from Javascript
Scoop.it!

Asynchronous calls with ES6 generators

Asynchronous calls with ES6 generators | Angular.js and Google Dart | Scoop.it

A few months ago Jake Archibald wrote an article about the awesomeness of the asyncfunctions in ES7 and how we can “emulate” them using ES6’s generators, using his spawn function, which has subset of the features of co.

In this blog post we’ll take a look at standard ways of handling asynchronous calls and how we can improve the readability of our code using generators. We’ll also take a further look at the implementation of spawn, since there are few tricky moments there.


Via Jan Hesse, Darlene Tate
more...
No comment yet.
Rescooped by Piyas De from JavaScript for Line of Business Applications
Scoop.it!

React Tutorial: Creating a Simple Application Using React JS and Flux Architecture

React Tutorial: Creating a Simple Application Using React JS and Flux Architecture | Angular.js and Google Dart | Scoop.it

React JS and Flux go together pretty well, as it was architected that way, but they’re by no means dependent upon one another. As a result, I’m going to split this article up into the React JS piece, which will go over how to create views and best practices, followed by a detailed look into how I’m getting data out of my mocked server API via Flux.

I’ve put a demo of the todo application in action, but prepare to be disappointed, as it’s really very straightforward.


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

How to setup AngularJS in MVC4 application

How to setup AngularJS in MVC4 application | Angular.js and Google Dart | Scoop.it
In this post, I would like to explain Part 1 - How to setup AngularJS in MVC4 application. This is our First Post about AngularJS. Here I have explained a little about AngularJS and What we will learn in this section part by part. In this part (Part 1) I am going to explain how to setup AngularJS in MVC4 application.

Via Jan Hesse
more...
Rescooped by Piyas De from Javascript
Scoop.it!

JavaScript Application Architecture On The Road To 2015

JavaScript Application Architecture On The Road To 2015 | Angular.js and Google Dart | Scoop.it

* Composition
* Component messaging
* ES6 & Browserify
* The Offline Problem
* Component APIs and Facades
* Immutable & persistent data structures
* We have a long way to go yet
* Onward and upward




Via Jan Hesse, Darlene Tate
more...
No comment yet.