Posts Tagged prototype

Wacom Bamboo Tablet Experience


My awesome first tablet design

My awesome first tablet design

(This post was started using my new tablet!)

Well, I suppose that now that I have a tablet, I oughta start practicing. You see, I’ve never been one to have exceptional handwriting skills, so it’s a good thing that I now have a computer that can understand my handwriting better than my 8th-grade Spanish teacher could. I used to get a LOT of zeros on my homework.

(At this point, I’m back to my keyboard because my hand began cramping up. I tried, at least… Typing at 90WPM  on my keyboard is superior to writing using a plastic pen on a mat.)

I’ve long dreamed of owning a graphics tablet, for quick mockups (I included my first here. Creative Commons license, feel free to derive from its awesomeness.) I picked up the Wacom Pen & Touch. Three days in, it has been fun to play with; while it hasn’t been 100% everything that I ever imagined it would be, I think that it may be more of a learning curve issue rather than an issue with the technology itself. I’m used to using a mouse that I have to throw all over a mousepad, not a pen and a tablet that maps 1:1 with my monitor (originally, it mapped to both monitors before I turned off the second monitor in the tablet settings.)

One of the troubles I was having was that it seemed somewhat laggy when I was using my pen on Windows 7 with Photoshop CS3. I noticed mostly that when I was writing, I couldn’t add small details well (look at how crazy all of the lines in my As are); it would sort of stick and think it was supposed to pull up some kind of command menu. I’d like to blame it on myself, as a user error… but it isn’t at all obvious how I fix that issue, if it is one.

Regardless, I’m going to soldier on and try a few more mockups before passing more severe judgement. There are probably some hidden settings somewhere to fix; and once I have those figured out, I’ll post a follow-up on how I did it. Hopefully I do it. Don’t crush my dreams, Wacom.

Tags: , ,

Drawing Inspiration – an Overview on Sketchflow

Microsoft Expression Blend Screenshot
Image via Wikipedia

If you’ve downloaded Blend 3- or if you’ve heard a bit about it- you may have heard of the prototyping tool Sketchflow. It’s an extension of the Microsoft Expression Blend tool, and allows you to quickly design a site’s flow, page by page, and then define the components within it.
I started playing around with Sketchflow when I was tasked with coming up with a “grand master plan” for a project that I wanted to take on. Creating the page flow seemed easy enough; it wasn’t long before I had a nice little tree drawn that covered everything from the first page to the last, with neat little arrows directing the user’s flow. When you hit F5 (or build), you’re taken to a compiled version of the site, from which you can navigate to each of your pages. Pretty neat.
The real power came out when I started dropping in labels, textboxes, and buttons, and then attaching events from each of those buttons to navigate to other pages. Suddenly, I was able to take my prototype to the next level- instead of bits of scrap paper, I was creating an interactable demo that I could show off, that saved notes and annotations for later reviewal.  As soon as I had it figured out (mostly), I showed the other person that I was working with how to set up, and within a matter of minutes, we were designing away.
There’s a big difference when you can show off a “working” prototype instead of a few concept drawings; you could get a feel for the flow of the application, and because it felt more real, you could do a bit more of a gut-check. It felt closer to production, even though it really wasn’t any further than that scrap paper; and it took about as much time (in fact, probably less, edits are easier in digital format). And if you do feel inclined to shuffle around dead plants, you can always export the whole project as a Word doc.
P.S., one small hint- the “sketch” style is not on by default. It’s hidden under the controls chevron, if you click the triangle next to “Styles” and then “Sketchflow”. It is a HUGE PAIN to change styles… which kind of baffles me.

Reblog this post [with Zemanta]

Tags: , ,

Javascript Prototyping, an Adventure

Lately, I’ve more or less been the go-to guy at work for Javascript issues. Several times daily, I’ve been helping other people out with Javascript (something I like to do; keeps me sharpened on the art of browser scripting), whether it be an issue with Ajax or something strange with variable initialization (check that your variable’s not a keyword! make sure the src is set correctly!). So there I was, thinking myself somewhat of an expert on the subject, as my ego has a habit to coerce me into, until I came upon the Javascript “prototype”. Not to be confused with the popular Javasript framework, but rather a method to add methods to objects. Essentially, it is a plausible way to extend current objects and really use Javascript as an object-oriented language. And what with my affinity towards C#, this was perfect.

I decided that I’d first start with my Ajax framework, DeviantAjax. The framework was something I started a while back, beginning with Gevalum’s rudimentary system; I took the few base functions and threw them nicely in a file with comments. However, this wasn’t exactly anything new or groundbreaking; I wanted to put out a framework that was simple and easy (KISS), but still offered more than any wizened developer could throw together in a matter of minutes.

DA, as we’ll call it from here on out, would be different than the other frameworks (the three that come to mind are script.aculo.us, Prototype, and jQuery). It wouldn’t include all of the animation stuff and all the extra DOM code of the others; rather, it’d be for Ajax alone. It’d be a way for beginners to use the magic and a way for gurus to get a head start on a project.

So, first things first: I began with a Page object. Pleased with this, I began to add things into it’s prototype, like so:

function Page() {
    ajaxes = new Array();
}

Page.prototype = {
    SetAjaxRequestMax: function(ajaxObjectsToCreate){
        …
    },
    FillElement: function (element,source,postData,ajaxObjectIndex){
        …
    }
}

Excellent! I could make a new page – var MyPage = new Page(); – and it looked like good ol’ C# (well, close enough, anyway.) I could even call MyPage.SetAjaxRequestMax(4)! And that was great, except now I wanted to add functions to FillElement. So, I added a FillElement.prototype block inside of my FillElement, with functions like Set, OnLoad, OnRequestOK, and OnRequestBad. Except… prototype doesn’t quite work like that. You can’t put the prototype declaration inside the FillElement function, as I found out after several hours.

So, instead, the framework began to look more like:

_ajaxObjectArray = new Array();

function Page() {
   
}

function EvalAjaxPost(){};
function SetAjaxRequestMax(){};

SetAjaxRequestMax.prototype = {
    Set: function(ajaxObjectsToCreate){
        if(window.XMLHttpRequest){
            for(x=0; x<ajaxObjectsToCreate; x++){
                _ajaxObjectArray[x] = new XMLHttpRequest();
            }
        }else if(window.ActiveXObject){
            for(x=0; x<ajaxObjectsToCreate; x++){
                _ajaxObjectArray[x] = new ActiveXObject(“Microsoft.XMLHTTP”);
            }
        }
    }
};

FillElement.prototype = {
    Post: function(element,source,postData,ajaxObjectIndex){
        …
    },
    …
}

Page.prototype.SetAjaxRequestMax = new SetAjaxRequestMax();
Page.prototype.FillElement = new FillElement();

Now it started working better. I’d set the AjaxRequestMax on the HTML file it was used in, and then I could initialize and use FillElement objects- FillElement.Post(“div1″,…);. Cool.

So, the purpose of prototype, and how it works:
Prototype is a way to add methods onto objects. For example, you could add functions onto strings, like so:

function Reverse(){
    for (n=this.length-1;n>=0;n–){
        document.write(this.charAt(n))
    }
}
String.prototype.writeback=Reverse();

And use it like “jack”.Reverse(); and get a result. It’s Monkeypatching at it’s best. It also really lends itself to OO Javascript development, which is always a plus.

The next thing I’m trying to figure out is how to get other functions in the prototype (OnRequestOK, for example) to run on the FillElement object when I run Post and get a certain result. Feel free to leave any ideas in the comments, and otherwise I’ll be posting part 2 soon.

Check out my testing page (which may or may not be broken, if I’m working on it) and the zip file for yourself; it’s creative commons licensing, so do whatever you want.

Tags: , ,