Friday, February 14, 2014

Very Simple Menu r1


The goal of the code and apps on Jaanga is to be a resource for people who know a lot about something and just a little about programming. A hero around here is Mr.doob. He states it bluntly on his Three.js site when he says:
The aim of the project is to create a lightweight 3D library with a very low level of complexity — in other words, for dummies.
We are at one with this mindset.

If you understand the equal sign, an 'if-then' statement and a 'for i = 0 to  i= 100', then reading the code on Jaanga should be quite straightforward.

Also, you do not need too know much about HTML and CSS.  The JavaScript Document Object Model or DOM is built into every browser and the DOM enables you to create and control every aspect of a web page from JavaScript alone. Thus all the Jaanga apps are 100% JavaScript for dummies.

Why try to simplify things?

It's not about simplifying things, it's about simplifying the programming part of things.

You are an architect or physicist or mathematician. Do you also need to be a wiz at jQuery or rule at Ruby?

No, you do not. And, more bluntly, the more time you spend on devising elegant programming code the less time you are spending on your own discipline.

Have a look at the Very Simple Menu demo and source code. Using just these few lines of code you could actually construct a Content Management System (CMS) that could access thousands of files. [And all of these files can even be hosted for you by GitHub free of charge, but that is another matter.]

As simple as this code is, it's worth remembering that this is just Very Simple Menu R1. Could the code be even simpler or the variables have better names? Could the commenting be more explicit?

R2 should be simpler and yet do more. Why not?


Links
Very Simple Menu Demo
Very Simple Menu Source Code





No comments:

Post a Comment