Bootcamp:Chapter 1
No edit summary
No edit summary
 
(79 intermediate revisions by 5 users not shown)
Line 1: Line 1:
This is '''Chapter 1''' of the ''1000 Steps Program'' where you will master the steps in a gradual and detailed manner. Each step has been carefully thought out for easy understanding and progress.  
<message>Write the content here to display this box</message>
This is '''Chapter 1''' of <u>[[:Category:Bootcamp|Bootcamp]]</u>''.'' Each step has been carefully thought out for easy understanding and progress. You will master the steps gradually and in detail. 


Whenever you lose your way, you can backtrack to a step that touches upon your current main point and follow along from there.
Whenever you lose your way, you can backtrack to a step that touches upon your current main point and follow along from there.


Here is the video for Steps 1 - 40: https://youtu.be/Z_jLDZMafXk
=== '''Video 1: The Basics''' ===
<html>


'''Video 1: Mdriven Education Steps 1 - 40: The Basics'''
<p class="video-warn">
{| class="wikitable"
  To make your experience smooth, we set the main tags mentioned in the video to the right bar menu of this mini-player. Choose an interesting subtitle on the list and immediately get to the exact theme navigation item place in the video. Now you can pick any topic to be instructed on without watching the whole video.
|Title
</p>
|Content
|Time(Segment Start)
|-
|Introduction
|
|[https://www.youtube.com/embed/Z_jLDZMafXk Introduction]
|-
|Getting started
|Download Mdriven Designer, create a new file, and save.
|[https://www.youtube.com/embed/Z_jLDZMafXk?start=42 Getting started at 00:42]
|-
|Class, attribute, debugger
|Create a class and create an attribute, using the debugger
|[https://www.youtube.com/embed/Z_jLDZMafXk?start=130 Class, attribute, debugger at 2:10]
|-
|Seeker and objects
|Seeker, create objects
|[https://www.youtube.com/embed/Z_jLDZMafXk?start=308 Seeker and objects at 5:08]
|-
|Search
|Search function, tree, and right-side menu
|[https://www.youtube.com/embed/Z_jLDZMafXk?start=562 Search at 9:22]
|-
|Association
|Association/relation, Cardinality/multiplicity, Autodiagram
|[https://www.youtube.com/embed/Z_jLDZMafXk?start=666 Association at 11:06]
|-
|Multilink
|Multilink
|[https://www.youtube.com/embed/Z_jLDZMafXk?start=1020 Multilink at 17:00]
|}


=== Start MDrivenDesigner, Basic Modelling, Classes, and Associations, Press Play ===
<div class="video">
  <div class="video__wrapper">
    <iframe src="https://www.youtube.com/embed/Z_jLDZMafXk?si=pI3RXc4oYFpriDEl" title="YouTube video player" frameborder="0" allowfullscreen></iframe>
  </div>
  <div class="video__navigation">
<span data-video="Z_jLDZMafXk" data-start="00" tabindex="0"> <strong> Steps 1 - 40 </strong> </span>
    <span class="navigation-item" data-video="Z_jLDZMafXk" data-start="00" tabindex="0"> Introduction </span>
    <span class="navigation-item" data-video="Z_jLDZMafXk" data-start="42" tabindex="0"> Getting started </span>
    <span class="navigation-item" data-video="Z_jLDZMafXk" data-start="130" tabindex="0"> Class, attribute, debugger </span>
    <span class="navigation-item" data-video="Z_jLDZMafXk" data-start="308" tabindex="0"> Seeker and objects </span>
    <span class="navigation-item" data-video="Z_jLDZMafXk" data-start="562" tabindex="0"> Search </span>
    <span class="navigation-item" data-video="Z_jLDZMafXk" data-start="666" tabindex="0"> Association </span>
    <span class="navigation-item" data-video="Z_jLDZMafXk" data-start="1020" tabindex="0"> Multilink </span>
  </div>
</div>


1. Start MDrivenDesigner by clicking the "ClickOnce" link on https://mdriven.net/designer.
</html>


2. Create a new empty model. Save the file as <code>c:\temp\MDrivenEducation\Start.modlr</code> or equivalent.
== Chapter 1: Start MDrivenDesigner, Basic Modeling, Classes, and Associations, Press Play ==
<blockquote>Throughout this training process, we'll familiarize you with the [[Training:MDriven Designer Overview Series|MDriven Designer]] using the example of a car management system. This includes creating elements like Cars and a Car Factory and adding people such as a Car Owner and Car Dealer. Every chapter adds a different piece to the overall system.


3. Create a class <code>Person</code> and save the model; from now on, save the model often, using "CTRL + S."
Go to [https://mdriven.net/ mdriven.net] and let's begin!


4. Create an attribute <code>Name</code> of type string in class <code>Person</code>.
'''1.''' Follow the <u>Installation instructions</u> in the [[Training:Bootcamp/Start|Before Starting Guide]].  </blockquote>'''NOTE:''' Click on the step/number to access the corresponding images.


5. Press Play. Choose XML persistence. Select "Start system" then "Show debugger".
'''[[Training:Chapter 1 Images#Step 2|2]].''' Create a new empty model. Save the file on your device as<code>c:\temp\MDrivenEducation\Start.modlr</code> or equivalent.


6. In the debugger, in an Expression box, write the OCL expression to show all instances of your class Person with the operator <code>allinstances</code>; note the empty result list - you have no Person objects.
'''[[Training:Chapter 1 Images#Step 3|3]].''' Create the [[Documentation:Class|class]] <code>Person</code> and save the model.
* From now on, save the model often, using "'''CTRL + S'''."
'''[[Training:Chapter 1 Images#Step 4|4]].''' Create an [[Training:Derived attributes & associations|attribute]], <code>Name</code>, of type string in class <code>Person</code>. Remember to Save.


7. In the debugger, bring up a Seeker, search -> empty. Create 2 person objects.
'''[[Training:Chapter 1 Images#Step 5|5]].''' Press the Play button on the left of the top menu. Choose [[Documentation:XML|XML]] persistence. Select "'''Start system'''", then "'''Show debugger'''".


8. In the AutoForm for person 1, give it your name; in person 2, write some other name.
'''[[Training:Chapter 1 Images#Step 6|6]].''' In the [[Documentation:Ocl debugger|Debugger]], in an Expression box, write the [[Training:OCL Expressions|OCL expression]] to show all instances of your class <code>Person</code> with the operator "[[Documentation:OCLOperators allInstances|allinstances]]": <code>person.allinstances</code>
* Note the empty result list - you have no <code>Person</code> [[Documentation:Objects|objects]].
'''[[Training:Chapter 1 Images#Step 7|7]].''' In the debugger, bring up a '''[[Training:Seeker view|Seeker]]''' - Search will be empty. Create 2 <code>Person</code> objects by selecting "'''Create New'''" and adding 2 rows.


9. Save the created Person objects from the save button in the debugger.
'''[[Training:Chapter 1 Images#Step 8|8]].''' In the [[Documentation:AutoForms–get more with less faster|AutoForm]] for '''Person 1''', give it your name. For '''Person 2''', write some other name.
* In the Seeker for '''Person''', select the first row, right-click, and press the word "Open."
* Click on the box under "Name" and input your name.
* Repeat this to add "'''SomeOtherDude'''" (or some other name) as '''Person 2'''.
'''[[Training:Chapter 1 Images#Step 9|9]].''' Save the created Person objects from the save button in the Debugger.


10. Find the saved XML file on disk in the same location as your model file.
'''[[Training:Chapter 1 Images#Step 10|10]].''' Find the saved XML file on disk in the same location as your model file.


11. Open the XML file with Notepad or another app, find your name, and close the file.
'''[[Training:Chapter 1 Images#Step 11|11]].''' Open the XML file with Notepad or another app, find your name, and close the file.


12. In the debugger expression box, use the expression to find all persons from step 6. Note the result - two rows.
'''[[Training:Chapter 1 Images#Step 12|12]].''' In the Debugger Expression box, use the expression from Step 6 to find all persons: <code>person.allinstances</code>
* Note the result - two rows.
'''13.''' Close the Debugger, close the Play dialog, and close [[Training:MDriven Designer Overview Series|MDriven Designer]]. Save, if asked, then restart by performing Step 1.


13. Close the Debugger, close the Play dialog, and close MDrivenDesigner. Save, if asked, then restart by performing step 1.
'''14.''' Open recent files - select your file, press play, and go into the Debugger as in <u>Step 5</u>.


14. Open recent files - your file, press play, and go into the Debugger as in step 5.
'''15.''' Perform <u>Step 12</u>. Check that your 2 person-objects survived.


15. Perform step 12. Ensure your 2 person-objects survived.
'''16.''' Close the Debugger and close the play-dialog (system prototyper).


16. Close the Debugger and close the play-dialog(system prototyper).
'''[[Training:Chapter 1 Images#Step 17|17]].''' Find the class <code>Person</code> in the tree to the right by filling in the search box on top of the tree.


17. Find the class <code>Person</code> in Tree to the right by filling in the search box on top of the tree.
'''[[Training:Chapter 1 Images#Step 18|18]].''' Note 2 rows: one is the class, and the other result is the property. Select <code>Person</code> in the tree. Look at the [[Documentation:Property inspector|property inspector]] below the tree. Change its default color to cyan (or whatever looks nice).


18. Note 2 rows: one is the class, and the other result is the property. Select <code>Person</code> class in the tree. Look at the property inspector below the tree. Change its default color to cyan (or whatever looks nice).
'''19.''' In the search box, press escape or clear search box.
* Note the tree structure of the entire model in the tree. You can always find things in the model here.
'''[[Training:Chapter 1 Images#Step 20|20]].''' Find <code>Diagram1</code> in the tree - double click to open it.


19. In the search box, press escape or clear search box - note the tree structure of the entire model in the tree. You can always find things in the model here.
'''21.''' <code>Diagram1</code> may be empty - drag and drop the <code>Person</code> class from the tree onto the diagram.


20. Find diagram1 in the tree - double click to open.
'''[[Training:Chapter 1 Images#Step 22|22]].''' Press the "[[Documentation:Start Introduction|Start!]]" in the top left corner to show the Start wizard if it does not already show.


21. Diagram1 may be empty - drag and drop Person class from Tree onto diagram.
'''[[Training:Chapter 1 Images#Step 23|23]].''' Right-click the diagram. Choose "'''Add class'''."


22. Press the "Start!" in the top left corner to show Start-wizard, if it does not already show.
'''24.''' Rename the new class to <code>Car</code>.


23. Right-click the diagram. Choose "Add class."
'''25.''' Use zoom buttons or ctr-wheel to zoom in on your diagram.


24. Rename the new class to <code>Car</code>.
'''26.''' Enter AssociationMode by pressing the [[Documentation:Association|association]] arrow in the tool button.


25. Use zoom buttons or ctr-wheel to zoom in on your diagram.
'''[[Training:Chapter 1 Images#Step 27|27]].''' Click-drag-hold association from '''Person''' - hold mouse - move to '''Car''' - release.


26. Enter AssociationMode by pressing the association arrow in the tool button.
'''28.''' Rename the '''Cars''' association-end name to <code>CarsIUsedToOwn</code>. Make sure it has cardinality '''0..*''' (zero to many).


27. Click-drag-hold association from <code>Person</code> - hold mouse - move to Car - release.
'''[[Training:Chapter 1 Images#Step 29|29]].''' Rename the '''Person''' association-end name to <code>PreviousOwner</code>. Make sure it has cardinality '''0..1''' (zero to one).


28. Rename the <code>Cars</code> association-end name to <code>CarsIUsedToOwn</code>. Make sure it has cardinality 0..* (zero to many).
'''[[Training:Chapter 1 Images#Step 30|30]].''' Add an attribute to class '''Car''' with the name <code>RegistrationNumber</code> of type [[Documentation:String|string]].


29. Rename the <code>Person</code> association-end name to <code>PreviousOwner</code>. Make sure it has cardinality 0..1 (zero or one).
'''[[Training:Chapter 1 Images#Step 31|31]].''' Find the '''Car''' in the tree by using the search box.


30. Add an attribute to class Car with the name <code>RegistrationNumber</code> of type string.
'''[[Training:Chapter 1 Images#Step 32|32]].''' Double-click the '''Car''' in the tree. Note that the screen is not your diagram - it is an auto diagram.


31. Find the <code>Car</code> in the tree by using the search box.
'''33.''' Note the link in the auto diagram to class '''Person''' . Click class '''Person'''. Note, also, the auto diagram shifts to center '''Person''' and shows '''Car''' on the side.


32. Double-click the <code>Car</code> in the tree; note that the screen is not your diagram - it is an auto diagram.
'''34.''' Find your way back to <code>Diagram1</code> by finding it in the tree.


33. Note the link in the auto diagram to class <code>Person</code> . Click class <code>Person</code>. Note, also, the auto diagram shift to center <code>Person</code> and show <code>Car</code> on the side.
'''[[Training:Chapter 1 Images#Step 35|35]].''' Select the Play button, choose XML persistence, click on Debugger, and execute the expression to list all instances of Person (<code>person.allinstances</code>).


34. Find your way back to the diagram1 by finding it in the tree.
'''[[Training:Chapter 1 Images#Step 36|36]].''' Click on the person with your name.


35. Play-button, XML persistence, debugger, Expression to list allinstances of Person.
'''[[Training:Chapter 1 Images#Step 37|37]].''' Note the new multilink button for '''CarsIUsedToOwn''' - click it.


36. Click on the person with your name.
'''[[Training:Chapter 1 Images#Step 38|38]].''' Use the "'''Add New'''" button to create 3 '''CarsIUsedToOwn'''.


37. Note the new multilink button for <code>CarsIUsedToOwn</code> - click it.
'''39.''' Click on the auto form for each car. Give them RegistrationNumber '''OldCar1''', '''OldCar2''', and '''OldCar3'''.


38. Use add new button to create 3 cars I used to own.
'''[[Training:Chapter 1 Images#Step 40|40]].''' Save the Debugger data.
 
39. Click up the auto form for each car; give them registrationNumber OldCar1 to OldCar3.
 
40. Save the debugger data.


=== Next Chapter ===
=== Next Chapter ===
[[The_1000_steps_program_to_MDriven_Chapter_2]]
[[Training:Bootcamp:Chapter 2|Bootcamp:Chapter 2]]
[[Category:1000 Steps Program]]
[[Category:Bootcamp]]

Latest revision as of 05:37, 20 August 2024

This is Chapter 1 of Bootcamp. Each step has been carefully thought out for easy understanding and progress. You will master the steps gradually and in detail.

Whenever you lose your way, you can backtrack to a step that touches upon your current main point and follow along from there.

Video 1: The Basics

To make your experience smooth, we set the main tags mentioned in the video to the right bar menu of this mini-player. Choose an interesting subtitle on the list and immediately get to the exact theme navigation item place in the video. Now you can pick any topic to be instructed on without watching the whole video.

Steps 1 - 40 Introduction Getting started Class, attribute, debugger Seeker and objects Search Association Multilink

Chapter 1: Start MDrivenDesigner, Basic Modeling, Classes, and Associations, Press Play

Throughout this training process, we'll familiarize you with the MDriven Designer using the example of a car management system. This includes creating elements like Cars and a Car Factory and adding people such as a Car Owner and Car Dealer. Every chapter adds a different piece to the overall system.

Go to mdriven.net and let's begin!

1. Follow the Installation instructions in the Before Starting Guide.

NOTE: Click on the step/number to access the corresponding images.

2. Create a new empty model. Save the file on your device asc:\temp\MDrivenEducation\Start.modlr or equivalent.

3. Create the class Person and save the model.

  • From now on, save the model often, using "CTRL + S."

4. Create an attribute, Name, of type string in class Person. Remember to Save.

5. Press the Play button on the left of the top menu. Choose XML persistence. Select "Start system", then "Show debugger".

6. In the Debugger, in an Expression box, write the OCL expression to show all instances of your class Person with the operator "allinstances": person.allinstances

  • Note the empty result list - you have no Person objects.

7. In the debugger, bring up a Seeker - Search will be empty. Create 2 Person objects by selecting "Create New" and adding 2 rows.

8. In the AutoForm for Person 1, give it your name. For Person 2, write some other name.

  • In the Seeker for Person, select the first row, right-click, and press the word "Open."
  • Click on the box under "Name" and input your name.
  • Repeat this to add "SomeOtherDude" (or some other name) as Person 2.

9. Save the created Person objects from the save button in the Debugger.

10. Find the saved XML file on disk in the same location as your model file.

11. Open the XML file with Notepad or another app, find your name, and close the file.

12. In the Debugger Expression box, use the expression from Step 6 to find all persons: person.allinstances

  • Note the result - two rows.

13. Close the Debugger, close the Play dialog, and close MDriven Designer. Save, if asked, then restart by performing Step 1.

14. Open recent files - select your file, press play, and go into the Debugger as in Step 5.

15. Perform Step 12. Check that your 2 person-objects survived.

16. Close the Debugger and close the play-dialog (system prototyper).

17. Find the class Person in the tree to the right by filling in the search box on top of the tree.

18. Note 2 rows: one is the class, and the other result is the property. Select Person in the tree. Look at the property inspector below the tree. Change its default color to cyan (or whatever looks nice).

19. In the search box, press escape or clear search box.

  • Note the tree structure of the entire model in the tree. You can always find things in the model here.

20. Find Diagram1 in the tree - double click to open it.

21. Diagram1 may be empty - drag and drop the Person class from the tree onto the diagram.

22. Press the "Start!" in the top left corner to show the Start wizard if it does not already show.

23. Right-click the diagram. Choose "Add class."

24. Rename the new class to Car.

25. Use zoom buttons or ctr-wheel to zoom in on your diagram.

26. Enter AssociationMode by pressing the association arrow in the tool button.

27. Click-drag-hold association from Person - hold mouse - move to Car - release.

28. Rename the Cars association-end name to CarsIUsedToOwn. Make sure it has cardinality 0..* (zero to many).

29. Rename the Person association-end name to PreviousOwner. Make sure it has cardinality 0..1 (zero to one).

30. Add an attribute to class Car with the name RegistrationNumber of type string.

31. Find the Car in the tree by using the search box.

32. Double-click the Car in the tree. Note that the screen is not your diagram - it is an auto diagram.

33. Note the link in the auto diagram to class Person . Click class Person. Note, also, the auto diagram shifts to center Person and shows Car on the side.

34. Find your way back to Diagram1 by finding it in the tree.

35. Select the Play button, choose XML persistence, click on Debugger, and execute the expression to list all instances of Person (person.allinstances).

36. Click on the person with your name.

37. Note the new multilink button for CarsIUsedToOwn - click it.

38. Use the "Add New" button to create 3 CarsIUsedToOwn.

39. Click on the auto form for each car. Give them RegistrationNumber OldCar1, OldCar2, and OldCar3.

40. Save the Debugger data.

Next Chapter

Bootcamp:Chapter 2

This page was edited 30 days ago on 08/20/2024. What links here