JavaScript is a functional language, where functions are first-class citizens. Sometimes, rather than trying to encapsulate all behaviour inside one object or another, it's easier to just define the function. Something I've found myself doing is defining an object whose only purpose is to hold references to my utility functions. So, other modules in my code will require this utility object, that has several functions attached to it, and may only use one of them. So why not define widely-used functions as AMD modules?
Showing posts with label module. Show all posts
Showing posts with label module. Show all posts
Tuesday, April 29, 2014
Monday, November 3, 2008
Enomaly ECP update
First things first. ECP 2.1.1, which is a minor maintenance release, will hopefully be released this week. This release only contains bug fixes and minimal interface enhancements.
On the ECP 2.2 front, there have been lots of enhancements made in the configuration core module. The main change here is the addition of several classes that provide managed python attributes. These classes are also instantiated by the configuration module. Each managed attribute has the ability to either retrieve or store a configuration value depending on how the attribute is used. Under the covers, the attributes use Variable.load() and Variable.save(). So far, this implementation has fitted nicely into the code where configuration values are needed.
The code looks much cleaner with simple dot notation as opposed to several Variable.load() calls.
On the ECP 2.2 front, there have been lots of enhancements made in the configuration core module. The main change here is the addition of several classes that provide managed python attributes. These classes are also instantiated by the configuration module. Each managed attribute has the ability to either retrieve or store a configuration value depending on how the attribute is used. Under the covers, the attributes use Variable.load() and Variable.save(). So far, this implementation has fitted nicely into the code where configuration values are needed.
The code looks much cleaner with simple dot notation as opposed to several Variable.load() calls.
Labels:
configuration
,
ecp
,
enomalism
,
enomaly
,
module
Subscribe to:
Posts
(
Atom
)