2.2 The classical waterfall

It is time to enhance the trivial example of the previous section to a more complex classical waterfall project (figure 2.3).
Figure 2.3: a waterfall project
\includegraphics[width=\textwidth,height=.4\textheight]{tutorial/second}
The corresponding faces file is:
   1 # -*- coding: iso8859-15 -*-
   2 from faces import *
   3 from faces.lib import report
   4 from faces.lib import gantt
   5 
   6 def My_Project():
   7     start = "2005-1-16"
   8     
   9     def Specification():
  10         effort = "1w"
  11 	
  12     def Design():
  13         start = up.Specification.end
  14         effort = "1w"
  15 	
  16     def Implementation():
  17         start = up.Design.end
  18 		    
  19         def Module1():
  20             effort = "1w"
  21 	    
  22         def Module2():
  23             effort = "1w 2d"
  24 	    
  25     def Installation():
  26         start = max(up.Implementation.Module1.end, 
  27                     up.Implementation.Module2.end)
  28         effort = "2d"
  29 	
  30     def Finished():
  31         start = up.Installation.end
  32         milestone = True
  33 	
  34 
  35 project = Project(My_Project)
  36 
  37 class Gantt(gantt.Standard):
  38     data = project
  39 
  40 
  41 class Report(report.Standard):
  42     data = project
  43     
  44     def make_report(self, data):
  45         for t in data: 
  46             yield (t.name, t.start, t.end, t.effort)
  47     

line 13
This line says the Design task starts when the Specification is finished. The expression up.Specification is the relative path to the task Specification. (see 2.2.1 The Path of Tasks)

lines 26-27
The python max returns the maximum of Module1.end and Module2.end. Therefore the line says: The installation starts, when both modules are finished. To get the same you could also write:
start = up.Implementation.end

line 32
The task is a milestone. Milestone have always an effort (and length) of 0.



Subsections