Yesterday after doing a quick sketch of the UI on the back of an envelope, well a notepad, I started to implement the initial draft of the UI for my little synth web app.
It went quite well. UIBinder seemed to do its stuff and I was in general happy with the outcome. It is clearly not going to stand the test of time but getting something rough and ready is the goal of these initial phases.
Then a little problem occurred. I am going to need to draw quite a bit in this app. The HTML canvas is a prime candidate to do this after all if I am going to require the audio tag then the canvas will be available on any browser my apps work in.
I look in the incubator project for gwt. Yep canvas support is there so I go ahead download and add it to the project. Add jars to a gwt project still takes a while for me. I then start to mess with the GWTCanvas element. Integrates fine into the UIBinder stuff and I get a simple box drawing. Then I decide to write some text to the screen. Oops GWTCanvas does not support text even though the HTML canvas widget does. As fair as I can tell GWTWidget only supports a subset of HTML canvas features because it works on Internet Explorer 6. Mmmm I think that is no good to me.
Searching the web and no alternative reveals itself. I am determined to not drop into Flash or use a Java Applet for this so what are my options.
Well I could stick my head in the sand and focus on other stuff and hope with IE9 and FireFox 4 round the corner either the incubator project or someone else will provide a wrapping for the HTML canvas sometime in the near future. Or I could do a very minimal wrapping and use it as chance to learn about this area of GWT. It would be minimal in the sense as soon as an alternative wrapping appeared I would switch.
The geek in me is pulling me towards the minimal wrapping but I think I will work on it in parallel with other features to help keep my focus and not get lost in geeky coding fun.
It went quite well. UIBinder seemed to do its stuff and I was in general happy with the outcome. It is clearly not going to stand the test of time but getting something rough and ready is the goal of these initial phases.
Then a little problem occurred. I am going to need to draw quite a bit in this app. The HTML canvas is a prime candidate to do this after all if I am going to require the audio tag then the canvas will be available on any browser my apps work in.
I look in the incubator project for gwt. Yep canvas support is there so I go ahead download and add it to the project. Add jars to a gwt project still takes a while for me. I then start to mess with the GWTCanvas element. Integrates fine into the UIBinder stuff and I get a simple box drawing. Then I decide to write some text to the screen. Oops GWTCanvas does not support text even though the HTML canvas widget does. As fair as I can tell GWTWidget only supports a subset of HTML canvas features because it works on Internet Explorer 6. Mmmm I think that is no good to me.
Searching the web and no alternative reveals itself. I am determined to not drop into Flash or use a Java Applet for this so what are my options.
Well I could stick my head in the sand and focus on other stuff and hope with IE9 and FireFox 4 round the corner either the incubator project or someone else will provide a wrapping for the HTML canvas sometime in the near future. Or I could do a very minimal wrapping and use it as chance to learn about this area of GWT. It would be minimal in the sense as soon as an alternative wrapping appeared I would switch.
The geek in me is pulling me towards the minimal wrapping but I think I will work on it in parallel with other features to help keep my focus and not get lost in geeky coding fun.
No comments:
Post a Comment