No edit summary |
m (Text replacement - "1000 Steps Program" to "Bootcamp") |
||
(9 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
This is '''Chapter 1''' of the ''[https://wiki.mdriven.net/index.php/Category:1000_Steps_Program | This is '''Chapter 1''' of the ''[https://wiki.mdriven.net/index.php/Category:1000_Steps_Program 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. | Whenever you lose your way, you can backtrack to a step that touches upon your current main point and follow along from there. | ||
Line 29: | Line 29: | ||
== Chapter 1: Start MDrivenDesigner, Basic Modeling, Classes, and Associations, Press Play == | == Chapter 1: Start MDrivenDesigner, Basic Modeling, Classes, and Associations, Press Play == | ||
<blockquote>Throughout this training process, we'll | <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. | ||
Go to [https://mdriven.net/ mdriven.net] and let's begin! | |||
[[File:0.0.png|frameless|605x605px]] </blockquote>1. To use MDriven Designer, you have '''two''' options (see: [https://www.youtube.com/watch?v=81jCg2EWdYw MDriven Shorts| How to install MDriven Designer?]): | [[File:0.0.png|frameless|605x605px]] </blockquote>1. To use MDriven Designer, you have '''two''' options (see: [https://www.youtube.com/watch?v=81jCg2EWdYw MDriven Shorts| How to install MDriven Designer?]): | ||
Line 39: | Line 39: | ||
Start MDrivenDesigner by clicking the "'''Run with ClickOnce'''" link at: https://mdriven.net/designer. | Start MDrivenDesigner by clicking the "'''Run with ClickOnce'''" link at: https://mdriven.net/designer. | ||
* You can choose to always run the MDriven Designer online using "Run with ClickOnce". | * You can choose to always run the MDriven Designer online using "'''Run with ClickOnce'''". | ||
<u>'''Option 2: (Red)'''</u> | <u>'''Option 2: (Red)'''</u> | ||
You can decide to download and install the MDriven Designer, running it locally and making it available offline. | You can decide to download and install the MDriven Designer, running it '''locally''' and making it available '''offline'''. | ||
* Download using either Google Chrome or Microsoft Edge (Internet Explorer is not a viable option). | * Download using either Google Chrome or Microsoft Edge (Internet Explorer is not a viable option). | ||
** Downloading may take some time if there is a new version. | ** Downloading may take some time if there is a new version. | ||
* If you're using Chrome, install the | * If you're using Chrome, install the '''[https://chromewebstore.google.com/detail/cegid-peoplenet-clickonce/jkncabbipkgbconhaajbapbhokpbgkdc?utm_source=ext_app_menu Cegid Peoplenet ClickOnce launcher]''' extension from the Chrome Web Store (Microsoft Edge does not need a plug-in). | ||
[[File:1.1.2 corrected.png|frameless|791x791px]] | [[File:1.1.2 corrected.png|frameless|791x791px]] | ||
Line 53: | Line 53: | ||
3. Create the [[Documentation:Class|class]] <code>Person</code> and save the model. | 3. Create the [[Documentation:Class|class]] <code>Person</code> and save the model. | ||
* From now on, save the model often, using "CTRL + S." | * From now on, save the model often, using "'''CTRL + S'''." | ||
4. Create an [[Training:Derived attributes & associations|attribute]], <code>Name</code>, of type string in class <code>Person</code>. Remember to Save | 4. Create an [[Training:Derived attributes & associations|attribute]], <code>Name</code>, of type string in class <code>Person</code>. Remember to Save. | ||
5. Press the Play button on the left of the top menu. Choose [[Documentation:XML|XML]] persistence. Select "Start system", then "Show debugger". | 5. Press the Play button on the left of the top menu. Choose [[Documentation:XML|XML]] persistence. Select "'''Start system'''", then "'''Show debugger'''". | ||
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> | 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]]. | * Note the empty result list - you have no <code>Person</code> [[Documentation:Objects|objects]]. | ||
7. In the debugger, bring up a Seeker - Search will be empty. Create 2 <code>Person</code> objects by selecting "Create New" and adding 2 rows. | 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. | ||
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. | 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." | * 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. | * Click on the box under "Name" and input your name. | ||
* Repeat this to add "SomeOtherDude" (or some other name) as Person 2. | * 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. | 9. Save the created Person objects from the save button in the Debugger. | ||
Line 92: | Line 92: | ||
21. <code>Diagram1</code> may be empty - drag and drop the <code>Person</code> class from the tree onto the diagram. | 21. <code>Diagram1</code> may be empty - drag and drop the <code>Person</code> 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. | 22. Press the "[[Documentation:Start Introduction|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." | 23. Right-click the diagram. Choose "'''Add class'''." | ||
24. Rename the new class to <code>Car</code>. | 24. Rename the new class to <code>Car</code>. | ||
Line 100: | Line 100: | ||
25. Use zoom buttons or ctr-wheel to zoom in on your diagram. | 25. Use zoom buttons or ctr-wheel to zoom in on your diagram. | ||
26. Enter AssociationMode by pressing the [[ | 26. Enter AssociationMode by pressing the [[Test|association]] arrow in the tool button. | ||
27. Click-drag-hold association from | 27. Click-drag-hold association from '''Person''' - hold mouse - move to '''Car''' - release. | ||
28. Rename the | 28. Rename the '''Cars''' association-end name to <code>CarsIUsedToOwn</code>. Make sure it has cardinality '''0..*''' (zero to many). | ||
29. Rename the | 29. Rename the '''Person''' association-end name to <code>PreviousOwner</code>. Make sure it has cardinality '''0..1''' (zero to one). | ||
30. Add an attribute to class Car with the name <code>RegistrationNumber</code> of type [[Documentation:String|string]]. | 30. Add an attribute to class '''Car''' with the name <code>RegistrationNumber</code> of type [[Documentation:String|string]]. | ||
31. Find the | 31. Find the '''Car''' in the tree by using the search box. | ||
32. Double-click the | 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 | 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 <code>Diagram1</code> by finding it in the tree. | 34. Find your way back to <code>Diagram1</code> by finding it in the tree. | ||
Line 122: | Line 122: | ||
36. Click on the person with your name. | 36. Click on the person with your name. | ||
37. Note the new multilink button for | 37. Note the new multilink button for '''CarsIUsedToOwn''' - click it. | ||
38. Use the "Add New" button to create 3 | 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''. | 39. Click on the auto form for each car. Give them RegistrationNumber '''OldCar1''', '''OldCar2''', and '''OldCar3'''. | ||
40. Save the Debugger data. | 40. Save the Debugger data. | ||
Line 132: | Line 132: | ||
=== Next Chapter === | === Next Chapter === | ||
[[The_1000_steps_program_to_MDriven_Chapter_2]] | [[The_1000_steps_program_to_MDriven_Chapter_2]] | ||
[[Category: | [[Category:Bootcamp]] |
Latest revision as of 21:30, 18 August 2024
This is Chapter 1 of the 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.
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. To use MDriven Designer, you have two options (see: MDriven Shorts| How to install MDriven Designer?):
Option 1: (Blue)
Start MDrivenDesigner by clicking the "Run with ClickOnce" link at: https://mdriven.net/designer.
- You can choose to always run the MDriven Designer online using "Run with ClickOnce".
Option 2: (Red)
You can decide to download and install the MDriven Designer, running it locally and making it available offline.
- Download using either Google Chrome or Microsoft Edge (Internet Explorer is not a viable option).
- Downloading may take some time if there is a new version.
- If you're using Chrome, install the Cegid Peoplenet ClickOnce launcher extension from the Chrome Web Store (Microsoft Edge does not need a plug-in).
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.