Design Choices from Dinosaur Days…

I’ve been doing the software thing for quite a few years now.  Over the many years, I’ve seen a ton of design patterns, even before they were called as such.  One of the design patterns I’ve seen, coded, forgotten, remembered, recoded, is the UI framework.  I’ve gone through at least a few over the years, starting from coding up text based menus in Turbo Pascal, to the current crop of DHTML based frameworks.  I’ve coded my own in 2D, 3D, and with animation to boot.

I find myself here, once against considering the UI pattern.  What’s the new thing this time around?  Well, the basic pattern is well understood and executed on multiple platforms.  There are frameworks such as SilverLight, JQuery, Qt, whatever.  Pick your platform, your favorite language, the intended reach, and you’ll find at least 2 or three options which are sure to suit your needs.

So, why bother doing anything else these days?  Aren’t we done yet?  Can’t we move on?  Well…

These days, I find myself wanting to run software on platforms that aren’t exactly mainstream as yet.  For example, which library should I use to display something on the Microtouch display screen/hardware?  Sure, I can use the little sample library that comes with it, but that’s a slightly different API than I would use to display stuff on my regular sized computer screen.

I could turn to OpenGL(ES), but that’s not necessarily on that particular device, although it is on myriad others.

There’s another factor to consider.  Today, we have FPGA development boards readily available.  This adds an interesting wrinkle to the development scape.   I can easily conceive of programming an FPGA to suit my exact needs in terms of being a 3D/2D graphics and solid modeling engine.  Rather than continuing to try and fit myself into the constraints of OpenGL/OpenCL/nVidia/AMD/intel, I can just code up my own “processor” to be exactly what I need it to be.  I need core Matrix4 capabilities, with double precision floating point numbers.  I need fast memory fills, sqrt, trig, and some other core functions.  Beyond that, I don’t need that much.  So, paying even $65 for a graphics card/chip, is extra cost I don’t need.

But, what to put on that FPGA custom chip?

Well, I need basic 2D library, so support the simple primitives: point, line, rect, ellipse, polygon.  I can of course utilize these primitives and implement 3D, but if I can get triangle clipping, and depth buffer/testing, I’d pretty much be set.  Everything else can build upon that.

So, back to the UI library?  Well, after implementing UI libraries many times, I think I’ve gotten down to the nuggets, and it is not the same as simply picking one of the current crop of UI frameworks, and ‘porting’ it.  There is need for a new set of UI libraries, that take into account being implemented on hardware that can be easily specialized to meet some specific needs.  Now wouldn’t that be a great way to start the new year?  Creating an FPGA image that was specifically designed to deal with UI for 3D modeling/printing?


2 Comments on “Design Choices from Dinosaur Days…”

  1. Dimiter "malkia" Stanev says:

    For 2D library cairo might be a good fit –

  2. I’ve seen references to Cairo in the past, but have never actually tried it myself. The one thing that bothers me about using different libraries is they are typically hard to build. If Cairo is easy enough to build as LuaJIT itself is, then maybe it’s a good consideration.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s