Csnover/dojo-boilerplate. Working with Dojo and AMD in Production. In our recent post on dgrid and Dojo Nano, we showed a technique of using nested require statements in order to make use of optimized layers using the Dojo build system.
As a refresher, a layer is Dojo’s terminology for a file that combines many JavaScript resources into a single file. This improves the performance of your web application by minimizing the number of HTTP requests. The technique we originally presented was a quick and simple approach: While this works, it’s not ideal because you will need to modify your source when switching between development and production environments which is suboptimal. While you could of course fix this with PHP or some other server-side approach for your initial require statement, there are many simple alternative techniques that you can make directly to your markup.
Single-layer builds Ideal for: A quick, simple, single-layer application In the original blog post, we focused on building simple nano and baseless builds. Top level modules Conclusion. Effortless Offline with OfflineRest. There is growing support in browsers for offline capabilities with the HTML 5 specification for local storage, offline notifications, and offline application cache, but adapting an application to store changes locally and do synchronization when connectivity is restored remains a major challenge for developers.
Dojo 1.2′s new dojox.rpc.OfflineRest module automates the local storage of data and synchronization by leveraging the Dojo Data and REST abstractions. The OfflineRest module augments the JsonRest service in Dojo such that requests are cached in local storage for offline access, and modification requests (put, post, and delete) modify the cache and are recorded for delivery to the server; immediately if online, otherwise when connectivity is restored. Furthermore, JsonRest is the core engine used by JsonRestStore. Our demonstration of OfflineRest is a simple database of hiking trails. IBM WebSphere Application Server Feature Pack for Web 2.0 and Mobile Showcase Sample.
Dojox.app 1.8 proposal. ToDo App. MVC. Unscriptable.com. Dojo Tips 'n' Tricks. EmbedJS - Build Your Own Framework. Dojo Foundation Blog. Maqetta was officially announced today as the newest Dojo Foundation project.
There’s a nice Maqetta eWeek article, and below is the full press release for the newest project to join the Dojo Foundation: IBM Contributes Maqetta – HTML5 Visual Authoring Tools – to Open Source Community Free Web Hosting and Downloads Available at Maqetta.org ARMONK, NY – 10 Apr 2011: IBM today announced the open source contribution of Maqetta to the Dojo Foundation. Maqetta provides WYSIWYG authoring of HTML5 user interfaces using drag/drop assembly, and supports both desktop and mobile user interfaces.
HTML5 is an umbrella term for dozens of new features that ship in modern browsers (desktop and mobile) that allow rich user interfaces, graphics, multimedia and fast performance using open standards. The Maqetta application itself is authored in HTML5/Ajax, and therefore runs in the browser without requiring additional plugins or downloads. “Browser-based tools represent the new frontier. Globalization Guidelines: Locale and Resource Bundle. Locale Setting in Dojo There is a slight difference in the locale naming conventions between Dojo and Java.
Dojo uses “-” (hyphen) as the separator for concatenate language code, country code, and variants, whereas Java uses an “_” (underline). Populating your Grid using dojo.data. Making Functions with hitch and partial. In this tutorial, you'll learn the basics of the Function object—and how to bind contexts to functions using dojo.hitch.
Real-time Stores. Web applications based on real-time stores give users a level of immediacy not possible with traditional web applications, allowing them to see data as it changes.
The Dojo object store interface, which is the data model foundation of Dojo applications, was designed to support real-time data updates. Working with Dates in Dojo. Prototyping with dijit.Declaration. In this tutorial, you'll learn about the special dijit.Declaration widget, which was designed to allow you to quickly prototype custom widgets—all using declarative syntax.
Difficulty: Intermediate Dojo Version: 1.6 Getting Started Have you ever had a need to develop a custom widget using Dijit's infrastructure? What if you wanted to quickly prototype something without having to go through infrastructure setup—such as creating your own namespace to develop in, setting up the correct directory structure, making sure the module paths are all correct, etc.? What if you wanted to do all of it in a single HTML file, using declarative syntax? Vector Graphics with Dojo's GFX. Vector graphics can have many advantages, including flawless scaling with maximum portability.
Get started with Dojo Mobile 1.7. Introduction Mobile web usage is growing exponentially.
As more people become comfortable with smartphones, or other mobile devices, to browse the web, there's an increasing need for mobile-optimized websites and web applications. Forms and Validation. In this tutorial, you'll learn how to make use of the validation helpers in dojox.validate with your Dijit-based form widgets to create customizable, validating forms—all on the client side.
Difficulty: Beginner Dojo Version: 1.6 Getting Started dojox.validate is a set of utility functions for common validation tasks, such as checking for a valid e-mail address, valid ZIP code (both the US and Canada), valid phone numbers, and more. It was designed for pure programmatic use—but also for use by various validation-based Dijits. In this tutorial, we'll look at what's available in dojox.validate, how to use the functionality directly, and how to use the functionality with widgets such as dijit.form.ValidationTextBox. To get started, simply dojo.require the validation project, like so: That's all there is to it to get the basic validation functionality, which includes the following methods: It can also take an array of formats to check against, like so:
Dojo Tutorial: Getting Jiggy with JSONP. You didn’t think that with just 18 days left until DojoConf 2011 we would leave you hanging and not post another tutorial in our new dojo tutorial everyday series did you?
I thought not! Here’s today’s tutorial! Getting Jiggy with JSONP JSON with Padding (JSONP) has become a common technique for accessing cross-domain resources from the browser.