FIT3077 Lecture Notes - Lecture 11: Business Logic
Model-View-Controller Architectural Pattern
View
●Manages the display of information
●Where soware interacts with something (people, machines, other soware)
●To enable the interacon, soware has interfaces
●More work goes towards the interfaces that into the ‘core’ of the system since its what he
users interact with
Model
●Manages the behaviour and data of the application
●The structure and constraints of the model are oen referred to as business logic
●Example: University informaon system
○Consists of enes like student, mark, unit, course
○Relaonships between these enes
○Unites can have other units as prerequisites
Controller
●Interprets user inputs
●Responsible for controlling the applicaon logic and acts as the coordinator between the
View and the Model
User Interactions
Two kinds of interacons between the model and the user:
1. User can inspect aspects of the model
●Eg. staff asking system to see a list of student enrolled in a unit
2. User can change the data in model
●Student user can enroll themselves in a unit
Document Summary
Whe(cid:396)e so(cid:332)(cid:449)a(cid:396)e i(cid:374)te(cid:396)a(cid:272)ts (cid:449)ith so(cid:373)ethi(cid:374)g (cid:894)people, (cid:373)a(cid:272)hi(cid:374)es, othe(cid:396) so(cid:332)(cid:449)a(cid:396)e(cid:895) To e(cid:374)a(cid:271)le the i(cid:374)te(cid:396)a(cid:272)(cid:415)o(cid:374), so(cid:332)(cid:449)a(cid:396)e has i(cid:374)te(cid:396)fa(cid:272)es. Mo(cid:396)e (cid:449)o(cid:396)k goes to(cid:449)a(cid:396)ds the i(cid:374)te(cid:396)fa(cid:272)es that i(cid:374)to the (cid:858)(cid:272)o(cid:396)e(cid:859) of the s(cid:455)ste(cid:373) si(cid:374)(cid:272)e its (cid:449)hat he use(cid:396)s i(cid:374)te(cid:396)a(cid:272)t (cid:449)ith. Manages the behaviour and data of the application. The st(cid:396)u(cid:272)tu(cid:396)e a(cid:374)d (cid:272)o(cid:374)st(cid:396)ai(cid:374)ts of the (cid:373)odel a(cid:396)e o(cid:332)e(cid:374) (cid:396)efe(cid:396)(cid:396)ed to as (cid:271)usi(cid:374)ess logi(cid:272) Co(cid:374)sists of e(cid:374)(cid:415)(cid:415)es like stude(cid:374)t, (cid:373)a(cid:396)k, u(cid:374)it, (cid:272)ou(cid:396)se. U(cid:374)ites (cid:272)a(cid:374) ha(cid:448)e othe(cid:396) u(cid:374)its as p(cid:396)e(cid:396)e(cid:395)uisites. Espo(cid:374)si(cid:271)le fo(cid:396) (cid:272)o(cid:374)t(cid:396)olli(cid:374)g the appli(cid:272)a(cid:415)o(cid:374) logi(cid:272) a(cid:374)d a(cid:272)ts as the (cid:272)oo(cid:396)di(cid:374)ato(cid:396) (cid:271)et(cid:449)ee(cid:374) the. T(cid:449)o ki(cid:374)ds of i(cid:374)te(cid:396)a(cid:272)(cid:415)o(cid:374)s (cid:271)et(cid:449)ee(cid:374) the (cid:373)odel a(cid:374)d the use(cid:396): (cid:1005). Eg. sta aski(cid:374)g s(cid:455)ste(cid:373) to see a list of stude(cid:374)t e(cid:374)(cid:396)olled i(cid:374) a u(cid:374)it (cid:1006). Stude(cid:374)t use(cid:396) (cid:272)a(cid:374) e(cid:374)(cid:396)oll the(cid:373)sel(cid:448)es i(cid:374) a u(cid:374)it. Bu(cid:374)dle e(cid:448)e(cid:396)(cid:455)thi(cid:374)g togethe(cid:396) i(cid:374)to o(cid:374)e (cid:373)odule : the s(cid:455)ste(cid:373) Ui o(cid:271)je(cid:272)ts k(cid:374)o(cid:449) a(cid:271)out the (cid:373)odel o(cid:271)je(cid:272)ts (cid:271)e(cid:272)ause the(cid:455) update the(cid:373) i(cid:374) (cid:396)espo(cid:374)se to use(cid:396) a(cid:272)(cid:415)o(cid:374)s.