RE: canvas example

> This is an odd example, IMO -
> http://canui.sourceforge.net/canui/canui.js is a huge amount of
> code

I am the author of that library. I was not aware of this discussion
and only found it recently on google. Sorry if I'm a bit late.

canui.js is a huge amount of code because it also includes jquery,
which I now think was a dubious decision. I don't clearly remember the
reason for that, but I guess I wanted to eliminate external
dependencies.

The minimized canui code is about 100k. The library has 20 files,
making it about 285k uncompressed. This is not a small library.

> Textbox, Tooltip, Buttons, Combobox, Image, Label, Link - recreates
> built-in (input) elements. List, Menu, Progress, Dialog - is easily
> done with divs; there are multiple libraries that do this already.

The point was not in any way to replace html elements or things that
standard html could do. I am usually of the opinion that if the
browser can do it, don't touch it. Browsers are much smarter than
developers.

The library started as a user interface for a game I was working on
and was themed appropriately. However, working on the ui eventually
became more interesting that working on the game; the library became
something of a proof of concept after I realized that nothing like
that really existed.

Once most of the controls I wanted to implement were grossly working,
I lost interest in the details. The project is currently dead and I
don't foresee working on it in the future.

> The example controls won't work well on mobile devices.

I know. I developed it on a desktop and only realized that when I
tried it on an ipad.

> They add no new functionality to the existing set of input elements
> / libraries.

Definitely not, but that was never the point.

> I can see developers using canvas where they get new functionality
> not possible today.

Yes. I can imagine someone using this library as a starting point for
a user interface in a game for example, or in whatever needs both a
canvas and a user interface. If you only need an interface, don't use
canui, use html.

> I don't think any serious web developer will spend time / add risk
> to their project to get (16 year old!) Windows 95 styling.

Sure. But again, I think you're overestimating the goals of the
project. It was never about reimplementing the native ui of the
browser, it was about a user interface for canvas application that
became a proof of concept.

As for theming, appearance was not even on my list. Rectangles and
lines are much simpler and faster to draw. Some of the tests I did on
chrome and internet explorer were rather slow compared to firefox.

I also run windows 7 with the classic (windows 95) theme because it is
faster with any kind of remote connection, it has always been more
fluid on older machines I had and, honestly, I don't care for a pretty
user interface.

--
Jonathan Mcdougall

Received on Thursday, 22 December 2011 17:32:43 UTC