-
Notifications
You must be signed in to change notification settings - Fork 4
DesignPrinciples
Dawn has a number of design principles that (I hope) are evident in the way it is architected and the way it effects your application. These may evolve with time, but only very slowly. They are core to they way Dawn has developed and serve as a benchmark for the value of new features.
If there is one thing Dawn must never do, it is to make your code hard to test.
ActionScript is far from a perfect language, however, it does have some real strengths, and when your code plays to those strengths it can make all the difference to the quality of your code base. Dawn must strive to make leveraging the language second nature.
The compiler can find all sorts of problems long before your ever run your code, but only if you keep your code type safe. Features in Dawn must encourage type safety wherever possible.
Static state (such as singletons) riddle code with inflexibility, make testing almost impossible and bypass many of the benefits of OOP. Dawn should never require code to maintain any static state, or have any itself.
ActionScript’s type system, while limited, is still one of its greatest assets. Since we have types it would be mad not to use them, and yet most so many ActionScript APIs are string based e.g. events. Dawn will use types over primitives wherever possible.
Configuration is no fun to write, particularly when if feels like repetition. Dawn should only require configuration when it is absolutely necessary, and configuration should preferably be written in ActionScript.