JavaScript for Line of Business Applications
596.1K views | +0 today
Follow
JavaScript for Line of Business Applications
Keeping track of current JavaScript Frameworks that help design your clientside Business Logic Layers.
Curated by Jan Hesse
Beam to my Inbox:
Your new post is loading...
Your new post is loading...

Popular Tags - Filter using the Funnel

Current selected tags: 'AngularJS', 'RequireJS'. Clear
Scoop.it!

Require.js packages for building large scale angular applications

Require.js packages for building large scale angular applications | JavaScript for Line of Business Applications | Scoop.it

Require.js is one of my favorite ways to work with large JavaScript applications. It allows you to build AMD (asynchronous module definition) style modules to break up your application into small reusable modules. This is a desirable feature in large code bases.

It's important to know when and why you may consider require.js. If you're working on a small application that doesn't have a need for many files and little logic, you may or may not need the overhead of require.js. However, you still can get value out of it's organization and structure it provides you.

No comment yet.
Scoop.it!

Lazy loading AngularJS components using Providers

Lazy loading AngularJS components using Providers | JavaScript for Line of Business Applications | Scoop.it

In most of the example applications that I've seen, all application script files are loaded upfront i.e. all JavaScript files are loaded when the user accesses application. I get annoyed by this approach; why should all the components be loaded upfront when the probability of user accessing the entire application is very less. How does one architect a multi-page application using Angular? What would be the size of the application after minifying all the JavaScript files. Most importantly how does one load the components lazily. I've used RequireJS in my previous projects and it allows you to load components on demand; the idea is to load components based on the selected route. I've tried a similar approach with Angular using 'resolve' property in the $routeProvider.

No comment yet.
Scoop.it!

Angular JS localization with Require JS i18n module

When we started working with AngularJS, one of the first non-trivial challenges we were faced with was to find a way to localize the text in our app.

We had a few basic requirements for the localization solution:

  1. Will not require any changes to my existing controllers.
  2. Will not polute the current $scope.
  3. Be able to define the desired string directly on the markup with a simple syntax.
  4. Be defined as a module that can be minified and compiled with RequireJS.

Some brief research did not produce any options we were completely satisfied with. We then considered the RequireJS i18n module. It is a very simple and elegant solution that's worked very well for me in my previous projects, so I set out to write a small module that will bridge the gap between this module and my Angular JS code and views.

No comment yet.
Scoop.it!

Creating A RequireJS Service For AngularJS Applications

Ben Nadel demonstrates how to use RequireJS inside an AngularJS application by calling the $apply() methods alerting AngularJS to any relevant changes.

As far as AngularJS is concerned, everything "happens" inside of the $apply / $digest lifecycle. This is the period in which AngularJS performs its "dirty checking" of the $scope data, which may or may not precipitate the invocation of various watchers and data-bindings. As such, if your code doesn't trigger an $apply / $digest, AngularJS doesn't know that your code has changed anything.

When you load RequireJS modules, RequireJS loads the target JavaScript files asynchronously before invoking your callbacks asynchronously. This asynchronous nature means that your RequireJS callbacks will be invoked outside of the AngularJS lifecycle. As such, you have to explicitly call $scope.$apply() within your callbacks so that AngularJS will propagate your asynchronous changes throughout the rest of the application.

No comment yet.
Scoop.it!

Angular.js example application

Angular.js example application | JavaScript for Line of Business Applications | Scoop.it

This article is my first one for quite a while, there is a reason for that but I will not bore you all with that. Anyway I have written this article after a little time off. So what does it do, what is this article about?

I decided to spend a bit of time to learn a bit more about a popular web MVC framework by our friends at Google called Angular.js, which is a JavaScript MVC framework, which is a bit of departure for me from my usual XAML influenced world. It is however good to try things out to get an appreciation of how you would do things in different languages/environments (my old mentor Fredrik Bornander (AKA the Swede) told me that), so I decided to take Angular.js for a spin.

This article will talk about some of the fundamental ideas behind Angular.js, and shall then focus on the specifics of the demo application that I have created to go along with this article.

Before we get into the actual article I will just breifly (not too techie just yet, though I know you lot will want to see that, and it will come don't worry) talk about what the demo app does in plain terms, so you know how to drive the thing yourself when you download it.

No comment yet.
Scoop.it!

Creating An Application With Sails, Angular and Require.js

Creating An Application With Sails, Angular and Require.js | JavaScript for Line of Business Applications | Scoop.it

There are a lot of really good client-side and server-side JavaScript frameworks popping up, but there are not many in-depth articles on how they fit together. This series will look at a very specific stack and how it can be used to create an application.


Here is what we will cover:

* Starting The Sails Project
* Sails Server-Side Views
* Adding dependencies
* Angular Controllers
* Sails Models
* Syncing With The Server

No comment yet.
Scoop.it!

Requiring Versus Browserifying Angular

Requiring Versus Browserifying Angular | JavaScript for Line of Business Applications | Scoop.it

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

No comment yet.
Scoop.it!

Sample Mobile Application with AngularJS

Sample Mobile Application with AngularJS | JavaScript for Line of Business Applications | Scoop.it

In recent months, I have been sharing different versions of the Employee Directory sample application built with different technology stacks, different frameworks, and different back-end (REST services) implementations. Recent versions include:

Employee Directory with Backbone.js, RequireJS, and Twitter BootstrapEmployee Directory with Backbone.js, RequireJS, Topcoat and PhoneGap

A number of you have asked for a version of the application built with AngularJS. So here it is.

You can experience the application below...

No comment yet.
Scoop.it!

Facilitate use of RequireJS in AngularJS with angularAMD

angularAMD simplifies the use of RequireJS in a AngularJS webapp, optionally supporting on-demand loading of 3rd party modules such as UI Bootstrap.

To see it in action, open your favorite Developer Tools for your browser and see controller and service javascripts being loaded as you changes the tab.

No comment yet.
Scoop.it!

RequireJS-AngularJS solutions for (almost) every constraint

So, you like RequireJS. No, you probably adore it. Enough to want to evangelise it’s benefits to anyone who will listen. And now you have AngularJS, which is pretty neat. Or so you think. At least, you probably are using it on your project.

There’s one problem. Your team has not bought into the benefits of module loaders. They think nothing of putting a zillion script tags in your HTML. It doesn’t matter whether the opposing faction is one tech lead, or a few peer developers. Or maybe they are fine with the idea of module loading, but balk at the idea of wrapping all their Javascript code in “ugly” define()’s.

I’ll describe ways to inject RequireJS into your AngularJS projects with minimal disruption, depending upon the set of constraints you find yourself saddled with. I usually say that there’s no “best” way to use RequireJS in your project. However, there are certainly preferred ways to use it, and I’ll note them as I go along.

No comment yet.