Jump to content

ATK Design Principles

From NusaATK
Revision as of 13:57, 23 December 2009 by bahtiar (talk | contribs) (Created page with 'ATK follows a number of design principles. Understanding these principles will help you understand how ATK works and will help you create applications more efficiently. == The H…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

ATK follows a number of design principles. Understanding these principles will help you understand how ATK works and will help you create applications more efficiently.

The Hollywood Principle

Most frameworks consists of components that have an API that allows you to invoke certain functionality. While of course ATK has these APIs as well, the most important parts of the framework follow what is called the so-called 'Hollywood Principe'.

The 'Hollywood Principle' gets its name from the process of recruiting actors for movies. At the end of a screening, the candidates would hear "Don't call us, we'll call you". For ATK, this means that the main application flow is not run by you as the developer of an application, but by ATK itself. To do its work, ATk will then call methods in your classes to get things done.

I.e. instead of you saying "hey present me a form" to ATK, ATK will turn things around. ATK knows when it needs to present a form, so instead it will say to you "I'm going to present a form; give me the fields you want to have in the form"

This makes ATK very powerful, but also slightly confusing to novice developers. They're not accustomed to this 'inversion of control', and furthermore, documenting the framework is a bit more difficult.