Creating a custom build with Dojo Toolkit Web Builder

logo
Do you want to use only a small piece of Dojo? Does Dojo have a really cool feature you want but you don’t want to take the entire library?

Continue reading

Advertisements

How to add swipe support to your web application

logoAre you creating a web application that you want to be able to be used on a tablet? Then you might want to check out the Dojo toolkit. Dojo provides a very simple way to handle swipe events in your web application. In this post I used the dojox.gesture package. Why would you want to use Dojo?  Here are a few good reasons from the documentation:

dojox/gesture has been designed with the following rationale:

  • Device neutral – The target is to be compatible with most popular devices(single touch gestures should also work well on desktops).
  • Compatibility and reusability – Applicable and can be used with dijit widgets, dojo core(dnd), dojox/mobile or dojox/charting etc.
  • Scalability – A modularized event processing mechanism makes it very easy to extend with more customized gestures.

As of version 1.7, here is the list of devices and browsers:

dojox/gesture is working well with:

1. Desktops – IE8+, FF 3.6+, Chrome v10+, Safari 5+
2. Touch devices – Android 2.2/2.3 – iOS 3/4

In the code below I put a listener on the entire body of the HTML where I tagged the <body> element with the id “body”.

function registerSwipeListener(){
	require([ "dojo", "dojox/gesture/swipe" ], 
		function(dojo, swipe, tap){

                        //connect the listener to the "body" element
			dojo.connect(dojo.byId("body"), swipe.end, function(e){

			if (current_view != "edit"){
                                //Check and which which difference is bigger since
                                //we only support up, down, left, right
				if (Math.abs(e.dx) > Math.abs(e.dy)){
					if (e.dx > 0){
						viewerMoveLeft();
					}else{ 
						viewerMoveRight();
					}
				}else{
					if (e.dy > 0){
						viewerMoveUp();
					}else{
						viewerMoveDown();
					}				
				}
			}		
		});
	});

 

Nice gallery of HTML5 sites

There a lot of great ideas and designs on this site, a must see – html 5 Gallery

HTML5 gallery has two primary aims, the first is to showcase sites that use HTML5 for markup, so that we can see how people have interpreted the specification and how they’ve implemented it. This leads me on to the secondary aim which is to help people learn about html5 and how it should be used and how to implement it.

Cool HTML5 site

Been plugging around the net and found this neat little site that shows off some really neat games written in HTML5. The site links to a bunch of other sites where the games are hosted. You can quickly see how powerful this technology is.

HTML5Games site

 

HTML5, CSS and Dojo it is

After my last post and a bunch of research over the weekend I have decided to do this next personal project in HTML5, CSS and Dojo versus Flash or Java Applets. Thank you to everyone who responded on Twitter, Facebook and this blog – original post. So don’t be surprised if I start blogging about that project on a regular basis. The client, my wife, is still a bit shady on exactly what she wants so I am sure I will be doing and re-doing again and again. 🙂

Continue reading

You have to admit, Flash is shiny

Today I went through a bunch of tutorials and flows in the WebSphere Commerce Management Center – which just happens to be a Flash application written with OpenLazlo. The application is very responsive and its basically a “rich application” with full drag and drop, copy paste, and context menus all within the browser. Check out the screen shot of the center running in FireFox:

Click to make larger

I was practicing some customer scenarios and learning the different pieces of the Commerce product. Today I played with associations and marketing campaigns. But that’s not what I am blogging about tonight. Continue reading

First impressions of Maqetta

I will start off by saying first off this is an excellent first drop. I was a little frustrated with FireFox 4 as I could not get Maqetta to work at all so I immediately tried Chrome and voila, things started to work. It looks like the tool has a lot of function but still needs a lot of fine tuning…

Continue reading