PageRenderTime 9ms CodeModel.GetById 2ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

Unknown | 60 lines | 50 code | 10 blank | 0 comment | 0 complexity | b117588d8af5ce3aa95d4cd0446fe0cd MD5 | raw file
 1h1. Djehuty
 3h2. A Framework Built on a Philosophy
 5	It is our belief that the importance lies not in the implementations of
 6	software, but rather the eventual usage of that software. If premature
 7	optimization is an evil of our trade, and since implementations once
 8	verified for correctness are merely useful for profiling, then premature
 9	implementation is just as evil.
11	The proof of this is rather intuitive, and we will leave the exercise to
12	the reader. A piece of this proof, however, is better said than left unknown.
13	This is the fact that developers see the benefit in forking implementations.
14	This will remain true. When implementations are forked, it is necessary to
15	also fork the tests. Yet if one was going to code a new implementation of
16	a procedure, why would they fork the implementations and not simply fork
17	the tests? All implementations are rooted at a single set of tests.
19	Furthermore, any implementation must be verifiable with the same tests. This
20	implies that any implementation must share an interface. An interface, as
21	defined here, is the view of the implementation seen by the user that
22	provides expected public behaviors. The view of the implementation is known
23	via the interface, and the public behavior is known via the test.
25	Why is this important? It makes software engineering trivial. With the
26	dependencies in place as described in the above paragraph, we know the
27	order to produce any implementation. The correct development path is Tests
28	then Interfaces then Implementations, where one will reuse as much to the
29	left as possible. For any implementation, there is only one interface and
30	one set of tests.
32	When one writes a new piece of code, it must ask itself whether or not it is
33	an implementation of an interface that already exists. If so, it will simply
34	fork this interface and the tests and watch them fail. The developer will
35	call it a day when the tests succeed. After this, two implementations may
36	be profiled against one another.
38	If an interface does not exist, a developer will write the tests. This is a 
39	good practice for many reasons. It will allow the developer to consider
40	first the public behaviors of the implementation. These will suggest what needs
41	to be hidden or revealed to the user. Knowing this will lend itself to
42	developing the interface. At first the tests will fail. After the interface is
43	written, the tests will fail, but they will be complete. Only the behavior
44	is incorrect. After this point, it is the same as if the tests were forked.
45	The developer will write the implementation until the tests succeed.
47	Overall, this style of development will lead to a completely verifiable and
48	extensible system. Implementations can be switched out either statically or
49	dynamically with regard to profiling considerations or size considerations.
50	This can happen without any further development concerns of the user. Also,
51	there will be no concern over whether or not one implementation will alter
52	the behavior of another. Each implementation will be equivalent in that
53	their behaviors will be consistant.
55	The Djehuty Framework is then not primarily concerned with being a set
56	of libraries or a standard library. It is concerned with being a set of
57	tests and interfaces. It is the goal of this project to allow innovation
58	without headache and the ease of deployment, verifiability, and consistency
59	in the realm of software development.