This is Chapter 9. Here is the first part: The 1000 steps program to MDriven, Chapter 8 (the previous chapter)
You can find the video here: https://youtu.be/MPqx5af3QCM
Video 9: MDrivenEducationVideo - Chapter 9: Inheritance and Statemachines
Title | Content | Time(segment start) |
Introduction | Introduction | 00:00 |
Aligning items | How to align Items in the viewmodels | 00:27 |
Inheritance | Generalization mode, inheritance, superclasses, subclasses | 05:22 |
Abstract classes | Abstract classes | 14:30 |
Repetition | More inheritance/repetition | 20:30 |
Statemachines | Statemachines intro, states | 27:27 |
Triggers and entry | Statemachines, triggers and entry actions | 30:45 |
Guards | Statemachines, guards | 37:30 |
Class actions for triggers | Statemachines, Class actions for triggers | 48:03 |
Webapplication example | Showing statemachines in the webapplication | 50:41 |
In this chapter we introduce UML inheritance and UML state-machines
Chapter 9, Inheritance and statemachines
265 Remove the 20pixel marging on the buttons and apply Align Items property End instead to make everything end up at the bottom line
266 Test out combinations of Justify content and Align Items, and direction to familiarize yourself with ways to control flow of UI-widgets
267 Introduce the new class CarDealer
268 Introduce the new class CarOwner
269 Add generalization arrows from CarDealer to CarOwner and from Person to CarOwner
270 Add the Attribute Name:String to CarOwner and save - notif the error . make sure you understand why Name is reported as doublet - fix by remove name of Person
271 Make sure you understand Subclass and Super class - look up these aericles on the wiki https://wiki.mdriven.net/index.php/UML_Inheritance https://wiki.mdriven.net/index.php/UML_School#Lesson_3:_UML_Inheritance
272 Add new association from CarOwner to Car - name the Cars end CurrentlyOwnedCars
273 Delete the old link with currently owned car, update autoforms save and check errors
274 delete the combobox that showed the now removed currently owned car in the Person form
275 Add new class CarTransferOwnershipDocument, new association from Car(0..1) to CarTransferOwnershipDocument(*)
276 Add Association from CarOwner to CarTransferOwnershipDocument, call link DocumentsForSales(*) and Seller(0..1)
277 Add another Association from CarOwner to CarTransferOwnershipDocument, call link DocumentsForPurchase(*) and Buyer(0..1)
278 Add CarFactory and make it subclass to CarOwner
279 Add ScrapYard and make it subclass to CarOwner
280 Add a State machine on Class Car
281 Add a State in the statemachine of the car called BrandNew
282 Add another state InOwnershipTransaction
283 Add a Transition arrow from BrandNew to InOwnershipTransaction
284 Call the trigger of the transition InitiateSale
285 Add yet another state called OwnershipStable
286 Add a transition from InOwnershipTransaction to OwnershipStable, name the trigger CloseSale
287 Add a transition from OwnershipStable to InOwnershipTransaction, reuse the trigger InitiateSale on this transition
288 Create an Entry Action in state InOwnerShipTransaction, create a CarTransferOwnershipDocument and add it to the cars list of CarTransferOwnershipDocuments, also assign the seller of the new CarTransferOwnershipDocument to the current owner of the Car
289 Add a an association from CarTransferOwnershipDocument to Car, call the single end CurrentTransaction - set the Cars end to not Navigable
290 In the Entry Action in state InOwnerShipTransaction assignmen the CurrentTransation to the created document
291 Go to Guard of CloseSale - and check the currentTransation has a Buyer
292 In the OwnershipStable add an Entry action that removes the car from seller currentlyownedcars and add it to the buyer currentlyownedcars
293 In the OwnershipStable add an Entry action add an update of the sellers CarsOwnerUsedToOwn
294 On the transition between BrandNew and InOwnerShipTransaction add a guaurd that check that there is a CarOwner
295 On the InitiateSale trigger - add a ClassAction for trigger
296 On the CloseSale trigger - add a ClassAction for trigger
297 Refresh the AutoForms
298 Save and test on the web, Create a CarFactory, call it BWM in Munich, Add a Car to this CarFactory
299 Initiate the Sale, check that you get a CarTransferOwnershipDocument
300 Assign a buyer in the CarTransferOwnershipDocument, then close the sale, check that owner is switched
301 Set the default representation of CarOwner to self.Name