This appendix contains the final version of all project entities from the
sample project.
Entity business/customer - File "sample_project/project/business/customer.ef"
|
1 customer "Customer"
2 | A company/organization, its address, and a contact person
3
4 strings.long_string company_name "Company name"
5 address address "Address"
6 person contact "Contact person"
7 function call_customer "Call customer"
8 enum call_mode "Call modality"
9 function phone_call "Call cust. by phone"
10 function cell_call "Call cust. by cell."
11
12 ----------------------- DEFS
13 call_mode:
14 by_phone "By phone"
15 by_cell "By cell"
16
17 call_customer:
18 call_mode -> 0
19
20 phone_call:
21 0 -> 0
22
23 cell_call:
24 0 -> 0
25 ----------------------- DB
26 table:
27 company_name, address, contact
28 pkey:
29 company_name
30 ----------------------- LOGIC
31 class:
32 company_name, address, contact, call_customer, phone_call, cell_call
33 ----------------------- UI
34 full_view:
35 company_name
36 address
37 contact
38 phone_call
39 cell_call
40
41 compact_view:
42 company_name, contact
43 ----------------------- ADJUST
44 DB.table.create = "true"
45 LOGIC.class.phone_call.code = "callCustomer(BY_PHONE);"
46 LOGIC.class.cell_call.code = "callCustomer(BY_CELL);"
|
|
Entity business/project - File "sample_project/project/business/project.ef"
|
1 project "Project"
2 | A project within a company, some information about it, a project
3 | manager, the involved personnel, a project plan and budget
4
5 strings.name proj_name "Project name"
6 strings.id proj_id "Project id."
7 strings.description descr "Description"
8 link customer customer "Customer"
9 float budget "Budget (K$)"
10 list employee team_members "Team members"
11 link employee manager "Proj. manager"
12 link department department "Department"
13 bool internal "Internal"
14 thing plan "Proj. plan"
15 function cur_status "Current proj. status"
16 enum status "Proj. status"
17
18 ----------------------- DEFS
19 budget:
20 0/1000
21 status:
22 ok "OK"
23 late "Late"
24 danger "Danger"
25 cur_status:
26 plan, budget -> status
27 ----------------------- DB
28 table:
29 proj_id, proj_name, descr, customer, budget, team_members,
30 manager, department, internal
31 pkey:
32 proj_id
33 ----------------------- LOGIC
34 class:
35 proj_id, proj_name, descr, customer, budget, team_members,
36 manager, department, internal, cur_status
37 ----------------------- UI
38 full_view:
39 proj_name proj_id
40 customer descr
41 budget cur_status
42 manager team_members
43 department internal
44
45 compact_view:
46 proj_name, customer, budget
47 ----------------------- ADJUST
48 DB.table.create = "true"
|
|
Entity company/company - File "sample_project/project/company/company.ef"
|
1 company "Company"
2 | A commercial company, its address, personnel, customers and activities
3
4 strings.name company_name "Company name"
5 strings.description business "Business description"
6 address headquarters "Headquarters address"
7 list employee employees "Employees"
8 list department departments "Departments"
9 list customer customers "Customers"
10 list project projects "Projects"
11
12 ------------------------- DEFS
13 ------------------------- DB
14 table:
15 company_name, departments, headquarters, business
16
17 pkey:
18 company_name
19 ------------------------- LOGIC
20 class:
21 company_name, business, headquarters, employees, departments, customers, projects
22 ------------------------- UI
23 full_view:
24 company_name...........
25 business.customers.....
26 .........employees.....
27 .........projects......
28 .........departments...
29 headquarters...........
30 ------------------------- ADJUST
31 DB.table.create = "true"
32 UI.full_view.company_name.colspan = "3"
33 UI.full_view.business.rowspan = "4"
34 UI.full_view.headquarters.colspan = "3"
35 UI.full_view.employees.make_button = "true"
36 UI.full_view.departments.make_button = "true"
37 UI.full_view.projects.make_button = "true"
|
|
Entity company/department - File "sample_project/project/company/department.ef"
|
1 department "Department"
2 | A department within a company
3
4 strings.name dept_name "Dept. name"
5 strings.id dept_id "Dept. id."
6 link employee manager "Manager"
7 list employee members "Dept. members"
8 list project projects "Dept. projects"
9 function curr_projects "Current projects"
10
11 ----------------------- DEFS
12 curr_projects:
13 dept_id -> projects
14 ----------------------- DB
15 table:
16 dept_id, dept_name, manager, members
17 pkey:
18 dept_id
19 ----------------------- LOGIC
20 class:
21 dept_name, dept_id, manager, members, curr_projects
22 ----------------------- UI
23 full_view:
24 dept_name
25 dept_id
26 manager
27 members
28 curr_projects
29
30 compact_view:
31 dept_name, manager
32 ----------------------- ADJUST
33 DB.table.create = "true"
|
|
Entity company/employee - File "sample_project/project/company/employee.ef"
|
1 employee "Employee"
2 | An employee, some related information, and the department s/he works in
3
4 person person "Person"
5 person_info info "Pers. info"
6 link department dept "Department"
7 enum position "Position"
8 float salary "Salary ($)"
9 unique_id empl_id "Employee id."
10
11 ----------------------- DEFS
12 salary:
13 0/1000000
14 position:
15 president "President"
16 vice_president "Vice-president"
17 manager "Manager"
18 admin "Admin"
19 sales_rep "Sales rep."
20 engineer "Engineer"
21 ----------------------- DB
22 table:
23 empl_id, person, info, dept, position, salary
24 pkey:
25 empl_id
26 ----------------------- LOGIC
27 class:
28 empl_id, info, dept, position, salary
29 parent:
30 person
31 ----------------------- UI
32 full_view:
33 empl_id
34 person
35 dept
36 position
37 salary
38 info
39
40 compact_view:
41 empl_id, person, position
42 ----------------------- ADJUST
43 DB.table.create = "true"
|
|
Entity location/address - File "sample_project/project/location/address.ef"
|
1 address "Address"
2 | Address of an organization
3
4 strings.long_string street "Street"
5 strings.long_string city "City"
6 enum state "State or Province"
7 strings.short_string zip "Postal Code"
8 link country country "Country"
9 strings.long_string web_site "Web site"
10
11 ----------------------- DEFS
12 state:
13 not_applicable "Not applicable"
14 california "California"
15 new_york "New York"
16 texas "Texas"
17 ontario "Ontario"
18 quebec "Quebec"
19 yorkshire "Yorkshire"
20 kent "Kent"
21 asturias "Asturias"
22 galicia "Galicia"
23 ----------------------- DB
24 table:
25 street, city, state, zip, country, web_site
26 null:
27 state, web_site
28 ----------------------- LOGIC
29 class:
30 street, city, state, zip, country, web_site
31 ----------------------- UI
32 full_view:
33 street city
34 state zip
35 country web_site
36 ----------------------- ADJUST
37 DB.table.create = "false"
38 UI.full_view.web_site.init = "http://www."
|
|
Entity location/country - File "sample_project/project/location/country.ef"
|
1 country "Country"
2 | A national country
3
4 enum country_name "Country"
5 enum currency "Currency"
6
7 ----------------------- DEFS
8 country_name:
9 usa "USA"
10 canada "Canada"
11 japan "Japan"
12 france "France"
13 uk "UK"
14 espana "Espaņa"
15 india "India"
16
17 currency:
18 us_dollar "US dollar"
19 cnd_dollar "Canadian dollar"
20 yen "Yen"
21 french_franc "French franc"
22 uk_pound "UK pound"
23 peseta "Peseta"
24 rupia "Rupia"
25 euro "Euro"
26
27 ----------------------- DB
28 table:
29 country_name, currency
30
31 pkey:
32 country_name
33 ----------------------- LOGIC
34 class:
35 country_name, currency
36 ----------------------- UI
37 full_view:
38 country_name
39 currency
40 ----------------------- ADJUST
41 DB.table.create = "true"
|
|
Entity persons/person - File "sample_project/project/persons/person.ef"
|
1 person "Person"
2 | Commercial information about a person, basically name and
3 | how to reach him/her
4
5 strings.name first_name "First name"
6 strings.name last_name "Last name"
7 strings.email email_addr "Email address"
8 strings.telephone telephone "Telephone"
9 strings.telephone cell_phone "Mobile"
10
11 ----------------------- DEFS
12 ----------------------- DB
13 table:
14 last_name, first_name, email_addr, telephone, cell_phone
15 pkey:
16 last_name
17 null:
18 telephone, cell_phone
19 ----------------------- LOGIC
20 class:
21 first_name, last_name, email_addr, telephone, cell_phone
22 ----------------------- UI
23 full_view:
24 first_name last_name
25 email_addr
26 telephone cell_phone
27
28 compact_view:
29 last_name, telephone
30 ----------------------- ADJUST
31 DB.table.create = "false"
32 UI.full_view.email_addr.colspan = "2"
|
|
Entity persons/person_info - File "sample_project/project/persons/person_info.ef"
|
1 person_info "Personal information"
2 | Private information, to be kept distinct from employee info
3
4 range age "Age"
5 strings.ssn ssn "Social security #"
6 link country nationality "Nationality"
7 image photo "Photo"
8
9 ----------------------- DEFS
10 age:
11 18/120
12 ----------------------- DB
13 table:
14 age, ssn, nationality, photo
15 ----------------------- LOGIC
16 class:
17 age, ssn, nationality, photo
18 ----------------------- UI
19 full_view:
20 age photo
21 ssn
22 nationality
23
24 compact_view:
25 age
26 ----------------------- ADJUST
27 DB.table.create = "false"
28 UI.full_view.photo.size = "70x100"
29 UI.full_view.photo.rowspan = "3"
|
|
[Previous chapter]
[Next chapter]
[Back to top]
|