background preloader

Javascript

Facebook Twitter

Investigation HTML/JS.

Contenteditable

Flex to HTML5 Considerations. The web application landscape has shifted rapidly in the past six months. Due to Adobe’s changing view of the Flash Platform, many companies who have relied on technologies like Flex are looking to migrate to HTML5. This transition can be tricky both for an organization as well as its developers. Here are five steps that should be some of the first an organization takes in this process: 1. Choose a Client-Side MVC Architecture Many developers will quickly become overwhelmed when examining the options for HTML5 web application frameworks. Within JavaScript you will find frameworks that differ greatly on each of these points. There are several key points to consider when making this decision for your organization: How documented is the framework?

If your company is attempting to decide on an MVC architecture, I would recommend examining Backbone JS, Ember JS, Angular JS, and ExtJS / Sencha Touch. In addition, your team can augment the framework that you have chosen over time. 2. 3. 4. 5. JS. What is the current state of the art in HTML canvas JavaScript libraries and frameworks. Cocos2D JavaScript - Game Engine for HTML5 Canvas.

Javascript drag and drop

Patterns For Large-Scale JavaScript Application Architecture. Today we're going to discuss an effective set of patterns for large-scale JavaScript application architecture. The material is based on my talk of the same name, last presented at LondonJS and inspired by previous work by Nicholas Zakas. Who am I and why am I writing about this topic? I'm currently a JavaScript and UI developer at AOL helping to plan and write the front-end architecture to our next generation of client-facing applications. As these applications are both complex and often require an architecture that is scalable and highly-reusable, it's one of my responsibilities to ensure the patterns used to implement such applications are as sustainable as possible. I also consider myself something of a design pattern enthusiast (although there are far more knowledgeable experts on this topic than I). I've previously written the creative-commons book 'Essential JavaScript Design Patterns' and am in the middle of writing the more detailed follow up to this book at the moment. 1. 2. 3.

Large-scale JavaScript Application Architecture. Five Tools for Managing Complexity in Large-Scale JavaScript Projects - Signals Blog. JavaScript lacks many of the tools and culture that define a clear 'right way' to approach large-scale projects. Yet it's still possible to build and maintain complex software with JavaScript. But how? For the last year, I've been involved in the development of a chemical structure editor written in JavaScript. ChemWriter is an interactive, graphically-oriented component that combines many characteristics of a drawing program with chemistry domain knowledge. In the course of developing ChemWriter, we've experimented with many tools and approaches for managing complexity as the capabilities of the software increased. Google Closure. ChemWriter is a component consisting of over 14,000 lines of JavaScript code spread over 112 source files and 14 packages, and is backed by over 1,600 automated tests.

Webgl. KineticJS HTML5 Canvas JavaScript Library Framework. Ember.js - About. Cocoa-like segmented control in pure CSS3 - A snap from llorca. iPhone Style Tab Control with HTML, CSS and JavaScript « CSS3 Wizardry. Works with Desktop Safari, Desktop Google Chrome, Desktop Firefox 4, Android, iPhone, iPod Touch and iPad.Please not that this was originally designed for Android/iPhone/iPad use. It can be used on modern desktop browsers. Just note that the attached example will only work with Firefox 4 or later because it uses CSS3 transitions for navigation. If you’ve used an iPhone or iPad, you’ve seen them.

Actually, Apple uses them on the operating system. The interaction is simple and immediate. Let’s go over the markup for the tab control. As you can see, the markup is very straightforward and we can easily reuse the pattern through an application as necessary. Here’s the markup. This will give us a tab control that looks like this: Now we’re going to create the JavaScript to make the tabs function. Anyway, here’s the code that creates the tab: If you look at the argument passed in, setupTabs expects a selector indicating the parent element that the tab control abides in. Should be: and the line: How to enable locale switching in a XULRunner application. This article is for developers who have localised their XUL application using DTD entity files and want to provide their users with a mechanism to switch the locale in the application itself.

Normally the application locale is inherited from the OS environment of the host system, however there are situations when you might want to give users the option to override the default setting and choose a different locale. Here is an outline of the solution: 1. Modify the application preferences First, you need to tell XULRunner that your application wishes to ignore the default OS locale and that it will do its own choosing instead. Edit the application preferences file and set "intl.locale.matchOS" to false. Your application is now going to ignore the OS locale, so it would be a good idea to define one to fall back on using the preference "general.useragent.locale". defaults/preferences/prefs.js 2.

Screenshot of sample locale switching control 3. Sample chrome/chrome.manifest 4. Turning arguments into an array | mennovanslooten.nl. In JavaScript, when you're dealing with functions that don't have a fixed number of arguments, there's a neat, built-in, local variable called arguments which almost is an array of all the arguments that have been passed to that function. Almost, but not quite. Luckily there's a simple way to close the gap and turn the arguments variable into something more manageable. Here's a quick example of how arguments can be used: function add() { for(var i = 0, total = 0; i < arguments.length; i++) { total += arguments[i]; } alert(total); } add(1, 2, 3); // alerts 6 add(1, 2, 3, 4); // alerts 10 This function can deal with any number of arguments and alerts the sum of them. Simple enough. As you can see, the arguments variable is available locally and seems to behave as an array: It has a length property and you can access the individual arguments with [index].

Instead of adding numbers, let's see if we can concatenate strings: Thanks to crisp for pointing out this method to me. Google I/O 2011: Kick-Ass Game Programming with Google Web Toolkit.