JavaScript for Li...
Follow
Find tag "jQuery"
240.9K views | +514 today
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...
Scoop.it!

Trimming Down jQuery With Grunt

Trimming Down jQuery With Grunt | JavaScript for Line of Business Applications | Scoop.it

In the past several releases, the jQuery team has reorganized their file structure to make the blacklisting process more effective, by placing less common pieces of functionality in their own files. In this article we’ll look at how to blacklist jQuery modules, which modules you should remove, and how to automate the whole thing.

more...
No comment yet.
Scoop.it!

jQuery: Using Only What You Need

jQuery: Using Only What You Need | JavaScript for Line of Business Applications | Scoop.it

With the ever-increasing importance of mobile, performance on the web has never been more critical. Because of its popularity, jQuery is often targeted as too big because of its size.

The good news is, as of jQuery 2.1, jQuery uses AMD to organize its dependencies internally. This means you can use AMD to load individual pieces of jQuery, and not the whole library. In this article you’ll see which jQuery modules are available, and how to use them in an AMD context. For each, I’ll show how many bytes you save by using an AMD approach. Finally, we’ll look at how to write jQuery plugins that leverage these new modules.

more...
No comment yet.
Scoop.it!

Replacing jQuery with Vanilla JavaScript

Replacing jQuery with Vanilla JavaScript | JavaScript for Line of Business Applications | Scoop.it

For some sites, you may be using jQuery for some basic functionality. In this article, we’ll explore the opportunity to replace jQuery in those situations with plain vanilla JavaScript. As we’ll see, it can offer some potential performance benefits and, perhaps more importantly, an opportunity to learn.

Breaking away from jQuery is also a great way to take control of how you code. If a jQuery function doesn’t do exactly what you want it to do, a good understanding of JavaScript can help you remake the function in your own image.

Moving away from jQuery will require some elbow grease but is much easier than it seems. Below we’ll see just how powerful vanilla JavaScript coupled with new HTML5 APIs are as we backwards engineer a technique I use in most of my projects.


more...
No comment yet.
Scoop.it!

With Binding Magic! Writing Single Page Application with JQuery Mobile and Knockoutjs

Greetings! Its nice to have yet another post regarding knockoutjs. Today i am going to define how we can create Single Page Application using JQuery Mobile and Knockoutjs. You may already have seen some posts on this topic so what’s new in here? The only thing is that i am going to implement the technique which i defined here. Please go through this post of mine and you will thoroughly understand how easy it is to make SPA with JQuery Mobile andknockoutjs.This is pretty simple and gives a good control over the application. After we finish these steps the application will be ready for phone gap to get hands on it. So lets get started.

more...
No comment yet.
Scoop.it!

jGestures: a jQuery plugin for gesture events

A jQuery plugin that enables you to add gesture events such as 'pinch', 'rotate', 'swipe', 'tap' and 'orientationchange' just like native jQuery events. Includes event substitution: a "tapone" event can be triggered by "clicking", a "swipe" by performing a swipe-ish mousegesture.

Brings 27 new events to your bag.

more...
No comment yet.
Scoop.it!

Combining WinJS, TypeScript, jQuery and Knockout

Combining WinJS, TypeScript, jQuery and Knockout | JavaScript for Line of Business Applications | Scoop.it
A tutorial on getting started with building Windows Store apps using TypeScript. It shows you how to use frameworks you already know, like jQuery and Knockout.

In this tutorial we’re going to build a very simple Windows Store application that uses jQuery and Knockout to get some data from the internet and show this in a GridView. I’ll show you how you create a new project, get all the the TypeScript definitions you need, get data from a web service and bind that to the GridView control. I’m assuming you have at least a little TypeScript knowledge. 

more...
No comment yet.
Scoop.it!

Writing A Better JavaScript Library For The DOM

Writing A Better JavaScript Library For The DOM | JavaScript for Line of Business Applications | Scoop.it

In this article, Maksim Chemerisuk introduces live extensions and better-dom - a new Javascript library for working with the DOM.The objective was to review existing APIs and solutions and to build a clearer, testable and lightweight Javascript...

 

Lately, I have started to see more and more problems with jQuery, at least my use of it. Most of the problems are with jQuery’s core and can’t be fixed without breaking backwards compatibility — which is very important. I, like many others, continued using the library for a while, navigating all of the pesky quirks every day.

more...
No comment yet.
Scoop.it!

Integrating jQuery Chosen plugin with EmberJS and Bootstrap

Integrating jQuery Chosen plugin with EmberJS and Bootstrap | JavaScript for Line of Business Applications | Scoop.it

I would like to show you how Chosen can be quickly integrated into your EmberJs application together with Twitter Bootstrap.

I’m currently working on web application. We use JavaScript MVC web framework called EmberJs. It is very cool framework, and I will write about it more in the future. Ember has small set of views and input-helpers. Just using them is not always enough to build solid and rich application. Fortunately there are tons of controls available online, and it is quite easy to write your own controls with Ember.

Most of online available controls/plugins are based on jQuery (no surprises, of course) and they use plain javascript objects. Ember wraps javascript objects into Ember.Object, so it allows for data binding, data tracking and other advanced features, but on other hand it makes impossible to use vast majority of web components right away. You need to adapt them in order to to use them with Ember.

Having component created with Ember would result in application-specific html-tag, that would use JavaScript logic defined by you. Something like: <my-own-html-tag… that does and shows what you want.

Chosen. One of the controls we wanted to use was Chosen. “Chosen is a jQuery plugin that makes long, unwieldy select boxes much more user-friendly.” It allows you to have nice multi-selects that look like one below:

more...
No comment yet.
Scoop.it!

jquery-mockjax

jquery-mockjax | JavaScript for Line of Business Applications | Scoop.it
jquery-mockjax - The jQuery Mockjax Plugin provides a simple and extremely flexible interface for mocking or simulating ajax requests and responses
more...
No comment yet.
Scoop.it!

chai-jq - jQuery Assertions for Chai

Chai is a wonderful JavaScript test assertion library that I rely on extensively (usually using it in conjunction with the Mocha test framework library). Chai has an intuitive, natural-language approach to assertions that enables you tests to read almost like an English narrative. Chai also supports plugins which extend the base assertion API.

Chai is quite often used for frontend JavaScript testing, and specifically for testing jQuery elements in an application web page. There is an existing chai-jquery plugin for Chai, which is extensive and really quite neat. Unfortunately, it has a few issues with overriding built-in Chai assertions like have and length in ways that changes the underlying Chai API.

With that motivation in mind, I hacked together a quick jQuery plugin, chai-jq for Chai that has a separate $-prefixed namespace to avoid collisions with existing Chai assertions, and put the project up on GitHub.

more...
No comment yet.
Scoop.it!

Combining AngularJS with Existing (jQuery) Components

Combining AngularJS with Existing (jQuery) Components | JavaScript for Line of Business Applications | Scoop.it

A common question when looking at AngularJS for the first time is about how to combine it with existing JavaScript code and components. For jQuery UI in particular, the team around AngularJS has created the AngularUI project (http://angular-ui.github.com/) which provides an easy way to use jQuery UI with Angular.). For other frameworks - or especially for your custom DOM-manipulating code - the necessary steps might not be as obvious at the first glance.

Most existing components (especially in the jQuery-world) usually work in a different way. Without Angular, when you wanted to achieve a certain behavior, like displaying a date-picker, you would usually go with a jQuery UI extension (like 'datepicker') and use call similar to $("#someinput").datepicker({...}). This would extend a standard <input> element with an ID of someinput to be turned into a datepicker.

In this command's options, you would have usually specified a callback to be invoked whenever the user selects/changes the date in the input box. But you wouldn't do this just for a single datepicker -- no, this kind of jQuery UI-extension would be littered throughout your business code for nearly every input control in your HTML. After all, your datepickers need access to the underlying model values to restrict the input to valid ranges and to perform additional validation if necessary. This mix of business code and DOM-manipulating code is sometimes the reason for maintenance headaches of JavaScript developers.

With this in mind, you can see the conundrum: how do you take classic JavaScript code (with this mix of DOM interactions and event handlers with direct manipulation of underlying business objects) and put it into the well defined structure of AngularJS?


more...
No comment yet.
Scoop.it!

jbone - Replacement jQuery for Backbone in browsers

jbone - Replacement jQuery for Backbone in browsers | JavaScript for Line of Business Applications | Scoop.it

JavaScript Library for DOM manipulation in modern browsers with jQuery-compatible API.

Replacement jQuery for Backbone in browsers (2kb gzipped)

more...
No comment yet.
Scoop.it!

jQuery Performance Tips Cheat Sheet

jQuery Performance Tips Cheat Sheet | JavaScript for Line of Business Applications | Scoop.it

I was hunting for jQuery performance tricks for a while to tune my heavy dynamic web app. After digging in a lot of articles decided to make a list of the best common performance tips. I also built a handy jQuery Performance Cheat Sheet that can be printed or placed on my desktop.

* Selectors performance tips
* DOM manipulation performance tips
* Events performance tips
* Testing jQuery
* General jQuery performance tips


more...
No comment yet.
Scoop.it!

Revealing the Magic of JavaScript

Revealing the Magic of JavaScript | JavaScript for Line of Business Applications | Scoop.it
This article examines some of the "magic tricks" performed by modern frameworks. The author then pulls back the curtain to show how the magic works.
  • Creating DOM Elements From a String
  • Revealing AngularJS Dependency Injection
  • Adopting Ember’s Computed Properties
  • The Crazy React Templates
  • Summary
more...
No comment yet.
Scoop.it!

How do I "think in AngularJS" if I have a jQuery background?

How do I "think in AngularJS" if I have a jQuery background? | JavaScript for Line of Business Applications | Scoop.it

Suppose I'm familiar with developing client-side applications in jQuery, but now I'd like to start using AngularJS. Can you describe the paradigm shift that is necessary ? Here are a few questions that might help you frame an answer:

* How do I architect and design client-side web applications differently? * What is the biggest difference?
* What should I stop doing/using; what should I start doing/using instead?
* Are there any server-side considerations/restrictions?

more...
No comment yet.
Scoop.it!

Velocity.js - Accelerated JavaScript animation

Velocity.js: A jQuery library for performant JavaScript animation.


Velocity is a jQuery plugin that re-implements $.animate() to produce significantly greater performance (making Velocity also faster than CSS animation libraries) while including new features to improve animation workflow.

Velocity works everywhere — back to IE8 and Android 2.3. Under the hood, Velocity uses jQuery's $.queue(), and thus interoperates seamlessly with jQuery's $.animate(), $.fade(), and $.delay(). Since Velocity's syntax is identical to $.animate()'s, none of your code needs to change.

Jan Hesse's insight:

technical explanation:

http://davidwalsh.name/css-js-animation

more...
No comment yet.
Scoop.it!

Getting started with jQuery

jQuery is the new favorite of web developers. This lightweight JavaScript library makes developers love writing JavaScript code again! What needed 20 lines of code first is now reduced to 3 lines. Who wouldn’t be enthusiastic?! Microsoft showed its love for the library by fully integrating it in Visual Studio. I dare to ask: Should you stay behind? In this session, we’ll take a look at jQuery and we’ll teach you what you need to know to get on your way. More specifically, we’ll look at selectors, attributes, working with WCF, jQuery UI and much more.

more...
No comment yet.
Scoop.it!

PropertyCross: WebApp Frameworks compared (with actual code)

PropertyCross: WebApp Frameworks compared (with actual code) | JavaScript for Line of Business Applications | Scoop.it
Helping you select a cross-platform mobile framework - Apps using jQuery Mobile, Sencha Touch, Titanium and more


Some of the frameworks deliver a native user interface, whereas others construct a native-like interface using HTML5 technologies. When selecting a framework it is important to test the end-user experience that the framework delivers and ensure you are happy with any compromises.

The code-sharing which can be realistically achieved with each framework varies considerably. To aid in this comparison there is a build script which produces code metrics for guidance. Although, as developers I am sure you are aware that lines-of-code metrics are flawed.

It is also worth investing quite a bit of time familiarising yourself with tools provided by each framework. The cost and quality of these varies considerably.

more...
No comment yet.
Scoop.it!

Create a "load more" widget using AngularJS, Ajax and Bootstrap 3

Create a "load more" widget using AngularJS, Ajax and Bootstrap 3 | JavaScript for Line of Business Applications | Scoop.it

Step 1: Getting the data ready
Step 2: Creating a basic scaffolding
Step 3: Creating a Factory
Step 4: Interacting with the DOM (Document Object Model)

more...
No comment yet.
Scoop.it!

jQuery .data() considered potentially harmful

I've recently refactored out a couple of uses of jQuery's data method, and I'd like to explain why.

In case you've not seen it before, data gives you access to a key/value store attached a single element. You use it with the same kind of get/set syntax found in other jQuery methods:...

There are a few problems with this method, and I'd advise against using it.

Unlike most other jQuery methods, if you call data on a list of elements, it affects only the first one. This makes reasoning about code that uses data hard: you must ask, "might this be a list? Which element is this affecting?"

 
more...
No comment yet.
Scoop.it!

JavaScript Performance Techniques

This talk presents a number of ways on when to use jQuery and how you can write efficient code with an emphasis on performance. It covers important techniques like event delegation and lazy evaluation, the how-to’s on being cognizant of performance factors and speed gains from various code enhancements. Presentation Slides »

This talk presents a number of ways on when to use jQuery and how you can write efficient code with an emphasis on performance. It covers important techniques like event delegation and lazy evaluation, the how-to’s on being cognizant of performance factors and speed gains from various code enhancements.

more...
No comment yet.
Scoop.it!

pjscrape: A web-scraping framework written in Javascript, using PhantomJS and jQuery

pjscrape: A web-scraping framework written in Javascript, using PhantomJS and jQuery | JavaScript for Line of Business Applications | Scoop.it

pjscrape is a framework for anyone who's ever wanted a command-line tool for web scraping using Javascript and jQuery. Built to run with PhantomJS, it allows you to scrape pages in a fully rendered, Javascript-enabled context from the command line, no browser required.

Features:
* Client-side, Javascript-based scraping environment with full access to jQuery functions
* Easy, flexible syntax for setting up one or more scrapers
* Recursive/crawl scraping
* Delay scrape until a "ready" condition occurs
* Load your own scripts on the page before scraping
* Modular architecture for logging and writing/formatting scraped items
* Client-side utilities for common tasks
* Growing set of unit tests


more...
No comment yet.
Scoop.it!

Writing performant and quality Jquery code

Writing performant and quality Jquery code | JavaScript for Line of Business Applications | Scoop.it

There are a lot of articles around the web about jquery and javascript performances. So, this is not a final article about the argument, but here I’m just trying to sumarize a bunch of speed tips and some of my advices, to improve your code.  Better code means faster apps and jank free websites, and fast rendering and reactivity means a better user experience.

First of all, we should keep in mind one important thing: jquery is javascript. This means we must adopt same coding conventions, styles guide and best practices for both of them.

So, first of all if you don’t know much about javascript performance improvements, I recomend you to read here and there before starting to mess up with jquery.

However, when you use jquery is a good and strongly recommended practice to follow those guidelines:

more...
No comment yet.
Scoop.it!

Angular for the jQuery developer

Angular for the jQuery developer | JavaScript for Line of Business Applications | Scoop.it

One of the most commonly asked questions about learning AngularJS is how to think about it when coming from a jQuery background where manually manipulating the DOM tree is a requirement to adding interactivity to our web pages.

jQuery itself is simply a DOM manipulation utility belt. It is an imperative wrapper around DOM manipulation, not a tool for building web apps. We obviously can use jQuery to build dynamic websites, but that’s like using a hammer to cut through wood… Why not just buy a saw and do it right?

In this post, we’ll walk through how to think in Angular and provide a mental model for structuring how to think about building better, faster, more stable web apps with AngularJS.

Throughout this section, we’re working through a jQuery application and demonstrating how to build it in Angular.

more...
No comment yet.
Scoop.it!

AngularJS for jQuery Developers

AngularJS for jQuery Developers | JavaScript for Line of Business Applications | Scoop.it

AngularJS is a sweet web app framework. It comes with decent official documentation and samples, it looks superior among a large number of frameworks in an almost-real-world application test (the famousTodoMVC project), and there are cool presentations and screencasts about it all over the web.

But for a developer who has not used frameworks similar to Angular before, and has mostly worked withJavaScript libraries like jQuery, there may be some difficulty in shifting from the jQuery mindset to the Angular mindset. At least there was for me, and I’d like to share some notes–maybe this will be useful to someone.

* Not a Library
* Declarative, rather than Imperative
* Two-way Data Binding
* Dependency Injection
* Data Access

more...
No comment yet.