Development on Va...
Follow
Find tag "jQuery"
9.3K views | +10 today
Development on Various Platforms
Your new post is loading...
Your new post is loading...
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Durandal’s Edge

Durandal’s Edge | Development on Various Platforms | Scoop.it

With so many SPA-style frameworks emerging in the last couple years, you may wonder what makes Durandal unique or different. Why would you want to choose it for your next project?  I’d like to share a few key points to that end…

Rather than re-invent the wheel, Durandal starts by combining and building on top of three existing libraries. Each of these libraries is very mature, has a large, active community and was strategically chosen because it meets one specific need very well. First we start with jQuery. In some ways you can think of it as a better DOM or the “missing JavaScript core library”. Next, we add in RequireJS, which gives us rich, declarative JavaScript modules. Finally, Knockout provides us with powerful two-way data-binding.

With these three libraries as a foundation, Durandal constructs a thin integration layer and transforms them into a powerful SPA framework. In addition to strategically connecting these libraries, Durandal adds new functionality. Some things Durandal adds are:  a client-side router, rich view composition, screen state management, pub/sub, simple conventions, modals/message boxes and more…


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Complex Single Page Application Architecture with Backbone

Complex Single Page Application Architecture with Backbone | Development on Various Platforms | Scoop.it

Over the past few months we've been developing the 2nd (and much improved) generation of the SOOMLA dashboard.  Though we use myriad front-side technologies, the jewel in the crown is Backbone.js.  Much has been written about Backbone, though still I find that most articles focus on HOW-TOs of models, views and events.  In this post, I’ll describe our dashboard’s Backbone architecture, with an attempt to zoom out a bit and understand the fundamentals of building complex, heavy single page applications (hereinafter SPA) with Backbone.  Disclaimer: this post is not about code, but about architecture concepts.  Therefore, the code examples won't be detailed to the bits and bytes, but they are all documented sufficiently to understand the idea.

We use:
* Require.js for dependency management and modular code.
* Backbone.js - for basic application structure and separation of concerns.
* Marionette.js - for composite application architecture and saving lots of Backbone boilerplate.
* underscore.js for general object, array and function utilities.
* undescore.string for extended string manipulation functionality.
* Handlebars.js - for client side templating.
* jQuery for DOM manipulation, AJAX, promises, and much more.
* These jQuery plugins: Qtip, SlimScroll, Isotope, jQuery UI sortable and jQuery validations.
* imagesloaded - for capturing and synchronizing image load events.
* Less - for CSS pre-processing.
* grunt.js - for build automation (tasks like pre-compilation, minifying and concatenating code).

 


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

AngularJS for jQuery Developers

AngularJS for jQuery Developers | Development on Various Platforms | 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 famous TodoMVC 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 with JavaScript 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.


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Ajax Control Toolkit Now Supports jQuery

Ajax Control Toolkit Now Supports jQuery | Development on Various Platforms | Scoop.it

This release of the Ajax Control Toolkit introduces a new jQueryExtender base class. This new base class enables you to create Ajax Control Toolkit controls with jQuery instead of the Microsoft Ajax Library.

Why are we rewriting Ajax Control Toolkits with jQuery?

There are very few developers actively working with the Microsoft Ajax Library while there are thousands of developers actively working with jQuery.

Because we want talented developers in the community to continue to contribute to the Ajax Control Toolkit, and because almost all JavaScript developers are familiar with jQuery, it makes sense to support jQuery with the Ajax Control Toolkit.

Also, we believe that the Ajax Control Toolkit is a great framework for Web Forms developers who want to build new ASP.NET controls that use JavaScript. The Ajax Control Toolkit has great features such as automatic bundling, minification, caching, and compression. We want to make it easy for ASP.NET developers to build new controls that take advantage of these features.

So in a jQuery world why is the Ajax Control Toolkit needed at all? Why not just use jQuery plugins instead of the Ajax Control Toolkit?

For example, there are lots of jQuery ToggleButton plugins floating around the Internet. Why not just use one of these jQuery plugins instead of using the Ajax Control Toolkit ToggleButton control?

There are three main reasons why the Ajax Control Toolkit continues to be valuable in a jQuery world:

1. Ajax Control Toolkit controls run on both the server and client

jQuery plugins are client only. A jQuery plugin does not include any server-side code. If you need to perform any work on the server – think of the AjaxFileUpload control – then you can’t use a pure jQuery solution.

2. Ajax Control Toolkit controls provide a better Visual Studio experience

You don’t get any design time experience when you use jQuery plugins within Visual Studio. Ajax Control Toolkit controls, on the other hand, are designed to work with Visual Studio. For example, you can use the Visual Studio Properties window to set Ajax Control Toolkit control properties.

3. Ajax Control Toolkit controls shield you from working with JavaScript

I like writing code in JavaScript. However, not all developers like JavaScript and some developers want to completely avoid writing any JavaScript code at all. The Ajax Control Toolkit enables you to take advantage of JavaScript (and the latest features of HTML5) in your ASP.NET Web Forms websites without writing a single line of JavaScript.

 


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

The wondrous world of JavaScript

The wondrous world of JavaScript | Development on Various Platforms | Scoop.it

If you’re following the latest trends in the web development world, you might have noticed that the last years the popularity of JavaScript increased a lot. Lots of frameworks became popular like Google’sAngularJS, ember.js and of course Backbone.js.

One of the first of these “big” frameworks was Backbone.js. JavaScript code before that time was usually unstructured, contained a lot of spaghetti code and was hard to maintain.
Backbone.js gave you the possibility to follow the MVC (Model-view-controller) design paradigm, or in their case, MVP (Model-view-presenter).

Backbone.js gave you the possibility to divide your application in logical parts andprovided data binding. Only that wasn’t enough of course, because applications needed more components like:
* A module system
* Templating
* Data binding
* Data synchronisation
* Widgets
* Testing framework

And so, other frameworks were born, like: RequireJS, CommonJS, Component, AngularJS, Twitter Bootstrap, Flight, Hogan.js, QUnit, Jasmine, … (and I can probably go on for another hour).


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Uncovering the Native DOM API

Uncovering the Native DOM API | Development on Various Platforms | Scoop.it

JavaScript libraries such as jQuery serve a great purpose in normalizing cross-browser behaviors in the DOM in such a way that it’s possible to use the same interface to interact with many different browsers. But they do so at a price. Part of that price, in the case of some developers, is having no idea what the heck the library is actually doing when we use it.

Heck, it works! Right? Well, no. You should know what’s happening behind the scenes, in order to better understand what you are doing. Otherwise, you would be just programming by coincidence.

In this article, I’ll explore some of the parts of the DOM API that are usually abstracted away behind a little neat interface in your library of choice, including Ajax, events and DOM querying.

* Meet: XMLHttpRequest
* Event Listeners
* Event Delegation
* Querying the DOM
* DOM Manipulation
* Conclusion


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Structuring Applications with JavaScript, Backbone and WordPress

Structuring Applications with JavaScript, Backbone and WordPress | Development on Various Platforms | Scoop.it
A talk on using Backbone to structure your JavaScript code within WordPress themes and plugins, delivered at WordCamp Chicago in June 2013

Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Ditching jQuery for Vanilla JS

Ditching jQuery for Vanilla JS | Development on Various Platforms | Scoop.it

One of the benefits of a framework like jQuery is that it smooths out all of the weird browser inconsistencies you might run into. But, all that abstraction and extra code adds a lot of weight and latency to a site.

Rather than trying to provide the same level of functionality for older browsers, I took a progressive enhancement approach to development. Older and less capable browsers get a basic experience. Newer browsers that support modern APIs get an enhanced one.

To be clear, I’m not advocating dropping support for older and less capable browsers. They still have access to all of the content. They just don’t always get the same layout or extra features.


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Using Ember.js with jQuery UI

You can also define some code to run every time an element is rendered. You can use this hook to wire up any JavaScript library to the element that Ember has created. 

All Ember views have a $ function, which is the normal jQuery function, scoped to the current element. You can also call this.$() to get back a jQuery object wrapping the element itself.

You can use this hook to do anything you want, allowing you to hook in any library you want. You would use this hook a lot like you’d use a jQuery(document).ready hook, but scoped to the view being created.

Ember also provides a willDestroyElement hook, which you can use to tear things down that you set up when the element was inserted. This is relatively rare, and is mostly used when interfacing with another toolkit that requires a teardown, or to tear down custom Ember observers.

 


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Have Javascript Frameworks Made Developers Dumber?

Have Javascript Frameworks Made Developers Dumber? | Development on Various Platforms | Scoop.it

You can’t argue that Javascript frameworks have been an incredibly massive help in the Javascript community. Thanks to John Resig and jQuery, we have many things to be grateful for including helping standardise annoying browser quirks and abstracting complicated methods of which require tens of lines of code. As much as Javascript frameworks have helped, have they made developers dumber?

If you are only learning the framework, are you learning the language it is built on-top of? You kind of are, I mean jQuery doesn’t completely replace Javascript with its own methods and ways of doing things, you still set arrays like you normally would, you still set variables, setTimeout and setIntervals, closures and other things in standard Javascript syntax, but is it enough? I am willing to bet there are web developers out there right now who wouldn’t be able to read half the things in the jQuery source code.


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Challenges & solutions - Architecture of a Modern Web Application - Mobile App

Challenges & solutions - Architecture of a Modern Web Application - Mobile App | Development on Various Platforms | Scoop.it

In this article we will learn to write mobile apps using native, hybrid and responsive development techniques for popular device platforms like iOS & Windows Phone for now and later Android & Black Berry.

The summary of the topics covered:

iOS Native App -> with Intro to Objective-C
Windows Phone Native App -> with Pricing, Device Overview and VS2012 Windows Phone Project
Mobile App Development - Possible Paths -> Native, Hybrid, HTML5
Hybrid Mobile App -> with PhoneGap, jQuery Mobile, KendoUI Mobile, Sencha Touch, HTML 5 Responsive Website


Via Jan Hesse
more...
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Data-grid using Knockout JS with paging and sorting

Data-grid using Knockout JS with paging and sorting | Development on Various Platforms | Scoop.it

We will build two types of data-grids (tables) in this article:
* One with AJAX based paging and sorting for displaying large number of records
* One with JavaScript based (no-postbacks/AJAX calls) paging and sorting for lesser number of records

In both of the above we want the following:
* Reusable, extensible, and maintainable JavaScript code
* Use Knockout JS (KO)

We would display a list of students, their age, school name, and school address in a data-grid (as shown in the image above).

In this article, I want to demonstrate the use of KO and some basic object oriented JavaScript. There are other good articles on CodeProject demonstrating, for example, the use of jqGrid with MVC 4. However here we will develop the entire data-grid (with paging/sorting functions) to have better control over the generated output.

Though I have used ASP.NET MVC 4 as backend to this project, other technologies (PHP etc.) can be used as well, as the client side code to generate data-grid is agnostic of backend technology. I will keep explaining any particular JavaScript constructs that are a bit tricky for users having only basic knowledge of JavaScript.


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

API-based Web Application with Backbone, Require.js and Slim framework

API-based Web Application with Backbone, Require.js and Slim framework | Development on Various Platforms | Scoop.it

A single-page application (SPA) was something I’ve been exploring for the last few months. I always liked the idea of moving certain responsibilities to the client’s side. After all, why would you like to waste server’s RAM/CPU to buil a HTML page (and pay for a transfer to deliver it) when a web browser is perfectly capable of doing that on its own? You will not only save money but also provide a better user experience. In addition to the performance, moving the presentation layer to the web browser gives a clearer division between back-end and front-end code.

 I used an extremely useful boilerplate for Backbone.js created by Thomas Davis as a foundation to create an example App which talks to a PHP back-end.

The back-end could be a plain PHP but instead I went for the Slim micro framework. It’s fast, very easy to learn and will enforce a better code structure. After all, this is one of the best use cases for a micro framework.



Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Refactoring to Backbone.js

Refactoring to Backbone.js | Development on Various Platforms | Scoop.it

Deciding mid-stride to adopt a JavaScript application framework exposes many difficult decisions. What should be targeted first? How does one deal with untested, legacy code? It can make transitions a scary, tedious process.

At Viget, we've found Backbone to be a great tool for bolstering existing code with greater structure and functionality. With an active community and a number of superset frameworks (such as Thorax and Marionette), it gives us flexible tools to tackle current problems with an outlet for more elegant solutions down the road.

We've started to trend towards a series of steps that help to translate code over in a safer, more testable way.

* PULL HTML CONSTRUCTION INTO A TEMPLATE
* BREAK OUT DATA PROCESSING
* FINISHING THINGS UP WITH BACKBONE.VIEWS


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

jQuery Autocomplete, MVC4, and WebAPI

jQuery Autocomplete, MVC4, and WebAPI | Development on Various Platforms | Scoop.it

This article will describe how to implement jQuery Autocomplete with ASP.NET WebAPI. jQuery Autcomplete is party of the jQuery UI library of widgets and it allows one to easily transform a textbox into an autocomplete textbox by providing a data source for the autocomplete values. 


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Writing a Javascript REST client with KnockoutJS, Bootstrap and jQuery

Writing a Javascript REST client  with KnockoutJS, Bootstrap and jQuery | Development on Various Platforms | Scoop.it

We will develop a client application that will run on web browsers, so we need to decide what tools and/or frameworks we will use.

For the base stack we don't really have much of a choice: The layout will be done in HTML, styling will be done in CSS and scripting in Javascript. No surprises here. While there are other choices, these guarantee that most modern browsers will run our application.

But these technologies alone would make for a rough development experience. For example, while Javascript and CSS work in all browsers, implementations differ, many times in subtle or obscure ways. There are three areas in which we would benefit from higher level cross-browser frameworks:

* Presentation and styling* REST request management* Templates and event handling

Let's review each and evaluate what options there are.


Via Jan Hesse
more...
No comment yet.