advertisement

Article:
  An Introduction to WebObjects
Subject:   Creative Namespaces and Syntactic Sugar
Date:   2004-05-18 02:09:06
From:   Trackback from http://www.semanticwave.com/blog/archives/000135.jsp anonymous2
Tim O'Brian reminds us in Creative Class Naming to add some flair to the namespaces that refer to our in-code data and actions. I have used this technique on many occasions, especially for ideas which may be dificult to explain (or to remember!). By way of O'Reilly Dev Blogs. You may not think that your company's fancy e-commerce system can afford to have an object named Bouncer, but I urge you to reconsider. Bouncer communicates the idea better that AuthenticationEnforcementObject or ServletSecurityFilter. Source Amen to that. Then there is syntactic sugar. Our friends =~ and && may not have a lot of flair, but help reduce the caffeine intake required to maintain a developer's interest in the task at hand. They add a lot of expressiveness to the code, not to mention compactness. Perl 6 has just about exhausted every combination of non-alpha characters, yet we want more. During one particularly long afternoon at Java, I was thinking about how unicode could be used to create new symbolic representations of the oft-used functions and classes in perl. Ok, I admit it. I was fantasizing about perl on the job. It gets worse. In text editors such as gvim, DBI could look like a tall stack of pancakes. CGI, like a spider. XML::DOM, a who knows what. WebObjects Builder expresses this concept a bit in the page editor. This wacky, programmers-only unicode character set could lead to quite an interesting keyboard (as if the shift key weren't enough trouble for some people)....