Single Page Applications
1.5K views | +0 today
Follow
Your new post is loading...
Your new post is loading...
Rescooped by James Finnigan from JavaScript for Line of Business Applications
Scoop.it!

Use Lo-Dash Instead of Underscore

Use Lo-Dash Instead of Underscore | Single Page Applications | Scoop.it

I've been using Lo-Dash in place of underscore for a while now, because it's faster, it has AMD support, and it has extra functionality that Underscore lacks. Because it's 100% compatible, if I have a library that requires Underscore (Backbone, for example) or an existing code base that already uses Underscore, I get all that performance for free just by dropping Lo-Dash in its place. That's great!


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

AngularJS $Provide Service

* AngularJS Service Overview

* $provide functions:

* Provider

* Factory

* Service

* Value & Constant

* Decorator


Via Jan Hesse
more...
Benjamin Dean's curator insight, January 21, 2014 9:41 AM

Great presentation.

Rescooped by James Finnigan from JavaScript for Line of Business Applications
Scoop.it!

Creating Semantic, Reusable Directives in AngularJS

One of the main benefits of Angular is the ability to easily extend HTML with new behaviours through the use of custom directives. Directives allow developers to match markers in the DOM with the intended behaviours.

In this post we’ll cover:
* Why writing semantic and reusable directives is desirable.
* How to build directives on top of semantic HTML elements and attributes.
* How to provide communication between directives via controllers.
* How to provide basic animations using the $animate service.

This post assume you have some experience with Angular directives.


Via Jan Hesse
more...
No comment yet.
Rescooped by James Finnigan from Digital-News on Scoop.it today
Scoop.it!

Ionic mobile app dev framework centers on touch, animation - InfoWorld

Ionic mobile app dev framework centers on touch, animation - InfoWorld | Single Page Applications | Scoop.it
Ionic mobile app dev framework centers on touch, animation InfoWorld Proclaiming "the bond between HTML5 and native has arrived," proponents of the Ionic mobile framework are set to offer developers a tool for building hybrid applications with an...

Via Thomas Faltin
more...
No comment yet.
Rescooped by James Finnigan from JavaScript for Line of Business Applications
Scoop.it!

FireBase, AngularJS, Plone: Part 1

FireBase, AngularJS, Plone: Part 1 | Single Page Applications | Scoop.it

An interesting way for building responsive web apps quickly

FireBase is a cloud database service, that allows developers to "power real time collaborative applications". What does this mean for you? It means that with FireBase you can easily build applications that allow users to interact via your website. FireBase provides your front-end with persistent and shared real-time data out of the box, letting you focus on your application itself. Developing applications with FireBase can be refreshingly easy, as I will try do demonstrate in this article. I will show this in combination with the AngularJS MVC framework, on an existing Plone CMS back-end.


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

Using Firebase and AngularJS with AngularFire

Using Firebase and AngularJS with AngularFire | Single Page Applications | Scoop.it
An initial look at using the AngularFire library to link up Firebase and AngularJS by creating a simple client-side search app.

This past week I been taking a closer look at Firebase. In particular I have been looking at using AngularJS in combination with it in order to create web apps which don’t require any significant back-end code. This has been made a bit easier with the recent(ish) release of AngularFire which is probably the easiest way to connect the two technologies up.


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

Accessors vs Dirty-checking in Javascript Frameworks

Accessors vs Dirty-checking in Javascript Frameworks | Single Page Applications | Scoop.it

One of the many ways in which EmberJS, AngularJS, and BackboneJS differ is in how they treat their models. AngularJS uses dirty checking on Plain Old Javascript Objects (POJSO); whereas EmberJS and BackboneJS both use accessors (getters and setters) on wrapped objects.

We will be exploring the ways in which these two approaches differ, and the implications these differences have when it comes to choosing which Javascript framework we we should write our single page apps in.

Most Javascript frameworks for front end user interfaces used to build single page applications (SPAs) use MV* architectures, and a feature that most of them have in common is the ability for the View to update the Model, and for the Model to update the View.

 

For this to happen, there needs to be to be a means to “listen” for these changes, and then trigger some code to respond to that change. One call this “Two-way Data Binding”.


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

Create a reusable AngularJS input form component

Create a reusable AngularJS input form component | Single Page Applications | Scoop.it

One of the beauty of the AngularJS framework is its ability to isolate complexity with services and directives; This is perfect for segmenting our code, create very testable components, and make them reusable. A directive, which is an anticipation of the future web components, is a piece of isolated javascript, HTML and CSS that encapsulate a specific behaviour and that you can easily reuse in various apps. Once created, a directive is simply invoked by adding it to the DOM via a HTML tag (<accordion></accordion>, or a custom attribute <div accordion></div>, or a CSS class <div class="accordion"></div> (and even as HTML comment).


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

Getting started with web components and polymer.js

Getting started with web components and polymer.js | Single Page Applications | Scoop.it

Web components are basically small encapsuled units inside of a website or web application(like for example the HTML5 video element). They include their own styling(CSS) and their own behaviour(JS). And this is the main advantage of them. Imagine little pieces inside of your web app, that are not influenced by the global stylesheet and whose children are not affected by any written JavaScript function. This way you end up with a box of bricks and the only thing to do is putting them together easily. Additionally you can use them whereever you want, because they include everything they need to look awesome and to behave awesome. Sounds really like a dream to me. :)

I started looking around and decided to use polymer.js (written by the Google guys) to play around with the principle of web components. Unfortunately they are rarely supported these days and this library gives me the opportunity to use this technique already today by providing needed polyfills.


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

Create a reusable AngularJS input form component

Create a reusable AngularJS input form component | Single Page Applications | Scoop.it

One of the beauty of the AngularJS framework is its ability to isolate complexity with services and directives; This is perfect for segmenting our code, create very testable components, and make them reusable. A directive, which is an anticipation of the future web components, is a piece of isolated javascript, HTML and CSS that encapsulate a specific behaviour and that you can easily reuse in various apps. Once created, a directive is simply invoked by adding it to the DOM via a HTML tag (<accordion></accordion>, or a custom attribute <div accordion></div>, or a CSS class <div class="accordion"></div> (and even as HTML comment).


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

Phonegap app with AngularJS fetching data from Drupal

Phonegap app with AngularJS fetching data from Drupal | Single Page Applications | Scoop.it

The power to make single page application so easily with AngularJS always pushed me to make a mobile app using Phonegap and AngularJS which will talk to a Drupal website. In this tutorial, I will show you how I made this basic app in AngularJS which allows a user to login using the Drupal credentials and then fetch the latest nodes.

After trying a lot to use the Drupal Services module and failing at the authentication, I finally decided to write a custom module which will handle the authentication and the REST requests. The Drupal module is not in the scope of this tutorial; I would share the link for ease.


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

How to do Authorization and Role based permissions in AngularJs

How to do Authorization and Role  based permissions in AngularJs | Single Page Applications | Scoop.it

We will be adding 3 Layer to implement Authorization in our app* UI manipulation (Showing or hiding part of the screens based on the user permission)* Routing ( When the user access a route that he doesn’t have permission to will redirect him to an error  route )* Http Interceptor (We will Setup an interceptor that will check when the server returns 401 or403  and will redirect the user to an error route)

 

First thing we want to get all the user permissions before loading our app (more like a resolve but for every route) then we will store it (using a service) then for showing/hiding sections of our app that require special permissions we will use a directive for that, after that when we define a route we will add an extra parameter “permission” and give it a value for the permission that it requires then after that we will test in a routeChangeStart event to check if the user has permissions for that route (if any), lastly we will set an http interceptor & read the respond status codes if its  401 or403 we will redirect the user to an error page

Its a long list, so lets get starting

 


Via Jan Hesse
more...
No comment yet.
Rescooped by James Finnigan from AngularJS
Scoop.it!

AngularJS in Patterns

AngularJS in Patterns | Single Page Applications | Scoop.it

This example defines a simple directive, which is a UI component. The defined component (called “zippy”) has header and content. Click on its header toggles the visibility of the content.

From the first example we can note that the whole DOM tree is a composition of elements. The root component is the html element, directly followed by the nested elements head and bodyand so on…

In the second, JavaScript, example we see that the template property of the directive, contains markup with ng-transclude directive inside it. So this means that inside the directive zippy we have another directive called ng-transclude, i.e. composition of directives. Theoretically we can nest the components infinitely until we reach a leaf node.


Via William delmas
more...
No comment yet.
Rescooped by James Finnigan from JavaScript for Line of Business Applications
Scoop.it!

AngularJS - ng-conf 2014 - Exclusive

AngularJS - ng-conf 2014 - Exclusive | Single Page Applications | Scoop.it

No other site has gathered all these slides. We bugged every speaker to get them and we are still fighting to get the 3 missing ones. Hope you enjoy this!

Here we have gathered a mashup of all videos and slides for all sessions at the conference.

NG-CONF was amazing. With lots of best practices, tips, new keywords and homework.

* Opening Keynote
* AngularJS in 20-ish Minutes
* Writing a Massive Angular App
* Going Postal with Angular in Promises
* Deep Dive into Custom Directives
* Progressive Saving
* Rapid Prototyping with Angular & Deployd
* Rich Data Models & Angular
* Filters: Beyond OrderBy and LimitTo
* Awesome Interfaces with AngularJS Animations
* Dependency Injection
* Angular Team Panel
* Angular === Community (Keynote)
* How to use Typescript on your Angular Application and Be Happy
* Building Realtime Apps With Firebase and Angular
* Angular Directives that Scale
* Dart, it’s Angular Too
* Zones
* Angular with Browserify
* Angular + RequireJS & Angular Decorators
* Using AngularJS to create iPhone & Android applications with PhoneGap
* End to End Angular Testing with Protractor
* Using ngModelController to Make Sexy Custom Components
* PhotoHunt
* Angular Performance
* AngularJS ORM
* Ionic Framework, Built on Angular
* Angular + Breeze


Via Jan Hesse
more...
Arik Grinstein's curator insight, January 29, 2014 11:07 AM

A must for any angular developer who somehow slept through  the last month :)

Rescooped by James Finnigan from JavaScript for Line of Business Applications
Scoop.it!

A Practical Guide to AngularJS Directives

A Practical Guide to AngularJS Directives | Single Page Applications | Scoop.it

Directives are the most important components of any AngularJS application. Although AngularJS ships with wide range of directives, you will often need to create application specific directives. This tutorial will give an overview of custom directives and explain how to use them in real world Angular projects. At the end of the tutorial, I will guide you through the creation of a simple note taking app with the help of Angular directives.


Via Jan Hesse
more...
Rescooped by James Finnigan from Web tools and technologies
Scoop.it!

Removing the iOS Status Bar - Ionic Framework

Removing the iOS Status Bar - Ionic Framework | Single Page Applications | Scoop.it
Ionic: The Most Advanced HTML5 Mobile App Framework. Ionic makes it incredibly easy to build performant, beautiful hybrid native apps using web technologies like HTML5, Javascript, CSS, and AngularJS.

Via Frédéric Fadel
more...
No comment yet.
Rescooped by James Finnigan from JavaScript for Line of Business Applications
Scoop.it!

Realtime Web Apps with AngularJS and Firebase

Angular is great at 2-way data bindings between the DOM and models in memory. What if you'd also like to persist your models on a server? Join us to hear guest speaker Anant Narayanan (@anantn) of Firebase discuss how their integration with Angular makes it a breeze to synchronize data between the DOM and a server-side JSON store.


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

FireBase, AngularJS, Plone: Part 2

FireBase, AngularJS, Plone: Part 2 | Single Page Applications | Scoop.it

In my last article, I introduced Firebase and presented too simple demos, a poll and a chat application, integrated to a Python based Plone CMS website. To continue, I would like to show the details on how this works. This time, prepare for a longer reading, or ...


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

AngularFire - A real-time backend for AngularJS from Firebase

AngularFire - A real-time backend for AngularJS from Firebase | Single Page Applications | Scoop.it
AngularFire is an officially supported AngularJS binding for Firebase. Firebase is a full backend so you don't need servers to build your Angular app!

* Rapid Development
AngularFire is built to make sure you can write your app as quickly as possible. There's no backend code to write or servers to set up, just start writing your frontend code and focus on building a great experience.

* Flexible API
Choose between an easy to use implicit sync API that will automatically keep all your Angular models persisted and updated, or a more powerful explicit sync API that gives you control over when data gets synchronized.

* 3-way Data Binding
Synchronizing and persisting user or app data in realtime is a breeze with AngularFire's 3-way data binding. It's never been easier to extend Angular's quintessential 2-way data binding concept to the server.


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

Tested various Javascript MV* frameworks

Tested various Javascript MV* frameworks | Single Page Applications | Scoop.it

I wanted to try and compare some other popular Javascript MV* frameworks. I am aware that TodoMVC exists for this, but I wanted to implement the same thing (with encrypted local storage) that previously was created with AngularJS.

What to implement:
* Create a view that has a input[type=text] field
* When the user enters some text in the input, encrypt the text and save it in localStorage
* Instantly display the encrypted text and the decrypted text

 

The following code samples seems to do the right thing / achieve the same results. I have just included the code samples here, with a small summary for every frameworks with my own pros and cons.

 

* KnockoutJS
* VanillaJS (simple)
* VanillaJS (MVC style)
* BackboneJS
* EmberJS
* AngularJS


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

Replacing (most of) d3.js with pure SVG + AngularJS

Replacing (most of) d3.js with pure SVG + AngularJS | Single Page Applications | Scoop.it

Over the last few months, I've been feeling increasingly unsatisfied around the options we have for integration between d3.js and AngularJS. In my earlier projects, I used Brian Ford's approach of creating a directive for the visualisation I need, and adding the d3 code in the link function of the directive. This is simple and works, but it feels like a very superficial integration. Effectively the Angular directive creates a hole in the DOM processing cycle within which d3 can work.

The good guys at skybluetrades came out with an alternative approach called Radian, that felt closer to what I wanted. They rely heavily on small, pre-existing Angular directives to declaratively create d3 visualisations. This means that a lot of the information about how to configure the graph lives in the HTML, as it should.

Thinking about it further though, what Radian is doing is using directives (masterfully) to trigger d3, to create SVG tags, so that the browser can finally render a visualisation. But if the browser already contains a declarative language that allows specifying visualisations in SVG, why do we have to jump through so many hoops?


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

How to do Authorization and Role based permissions in AngularJs

How to do Authorization and Role  based permissions in AngularJs | Single Page Applications | Scoop.it

We will be adding 3 Layer to implement Authorization in our app* UI manipulation (Showing or hiding part of the screens based on the user permission)* Routing ( When the user access a route that he doesn’t have permission to will redirect him to an error  route )* Http Interceptor (We will Setup an interceptor that will check when the server returns 401 or403  and will redirect the user to an error route)

 

First thing we want to get all the user permissions before loading our app (more like a resolve but for every route) then we will store it (using a service) then for showing/hiding sections of our app that require special permissions we will use a directive for that, after that when we define a route we will add an extra parameter “permission” and give it a value for the permission that it requires then after that we will test in a routeChangeStart event to check if the user has permissions for that route (if any), lastly we will set an http interceptor & read the respond status codes if its  401 or403 we will redirect the user to an error page

Its a long list, so lets get starting

 


Via Jan Hesse
more...
No comment yet.
Rescooped by James Finnigan from Single Page Applications
Scoop.it!

Practical AngularJS Part 1 – Introducing AngularJS

Practical AngularJS Part 1 – Introducing AngularJS | Single Page Applications | Scoop.it

In this series of articles I’m going to be working with AngularJS, a fantastic framework from Google that helps you rapidly build web applications. We’ll see how AngularJS can be used to speed up your development and help you write cleaner, more testable code.

Before I start to advocate the use of a library or framework, I need to demonstrate a need for it. Unless we’re just coding for fun or specifically to learn, the reason we choose to use a library or framework is that we have a problem, or problems to solve.

So as a way of introducing angular, I’m going to start with a trivial task, see how it quickly gets harder, identify problems and demonstrate how angular is a good choice as something that can mitigate these problems.

 


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

Practical AngularJS Part 1 – Introducing AngularJS

Practical AngularJS Part 1 – Introducing AngularJS | Single Page Applications | Scoop.it

In this series of articles I’m going to be working with AngularJS, a fantastic framework from Google that helps you rapidly build web applications. We’ll see how AngularJS can be used to speed up your development and help you write cleaner, more testable code.

Before I start to advocate the use of a library or framework, I need to demonstrate a need for it. Unless we’re just coding for fun or specifically to learn, the reason we choose to use a library or framework is that we have a problem, or problems to solve.

So as a way of introducing angular, I’m going to start with a trivial task, see how it quickly gets harder, identify problems and demonstrate how angular is a good choice as something that can mitigate these problems.

 


Via Jan Hesse
more...
No comment yet.