diff --git a/diagrams_source/README.txt b/diagrams_source/README.txt new file mode 100644 index 0000000..87ffbcd --- /dev/null +++ b/diagrams_source/README.txt @@ -0,0 +1,31 @@ +This is where we put the original versions of images so that we can update them if needed. + +_opt versions of the files are compressed/optimised and are the versions that are embedded in the Wiki. + +Optimizing SVG files: + +svgcleaner seems to be the best tool for reliably shrinkifying SVG files (does a better job of using groups to apply shared styles than scour): + +https://github.com/RazrFalcon/svgcleaner + +Available in Arch as community/svgcleaner. + +Run using: + +svgcleaner file.svg file_opt.svg + +if you want the output in a human readable form rather than one massive line: + +svgcleaner --indent=1 file.svg file_opt.svg + +Optimising PNG files: + +oxipng seems to be the best of the commonly available PNG optimisers. It has support for Zopfli which generally offers better compression than zlib. + +https://github.com/shssoichiro/oxipng + +Available in Arch as community/oxipng. + +Run using: + +oxipng --strip safe --alpha --zopfli -o max --out file_opt.png file.png diff --git a/diagrams_source/clipart/h2_disconnect.svg b/diagrams_source/clipart/h2_disconnect.svg new file mode 100644 index 0000000..7cd2d70 --- /dev/null +++ b/diagrams_source/clipart/h2_disconnect.svg @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/diagrams_source/clipart/h2_disconnect_opt.svg b/diagrams_source/clipart/h2_disconnect_opt.svg new file mode 100644 index 0000000..4ce5904 --- /dev/null +++ b/diagrams_source/clipart/h2_disconnect_opt.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/diagrams_source/lab02/domain_model.puml b/diagrams_source/lab02/domain_model.puml new file mode 100644 index 0000000..f93aa05 --- /dev/null +++ b/diagrams_source/lab02/domain_model.puml @@ -0,0 +1,59 @@ +@startuml +hide empty members + +skinparam { + Style StrictUML + ClassAttributeIconSize 0 + ClassStereotypeFont { + Size 12 + Style plain + } + Defaultfontsize 14 + Classfontsize 16 + Roundcorner 8 + Padding 2 + RankSep 100 + NodeSep 120 +} + +class Customer { + - customerId : Integer <> <> + - username : String <> + - firstName : String + - surname : String + - password : String + - emailAddress : String + - shippingAddress : String + -- +} + +class Product { + - productId : String <> + - name : String + - description : String + - category : String + - listPrice : BigDecimal + - quantityInStock : BigDecimal + -- +} + +class Sale { + - saleId : Integer <> <> + - date : LocalDateTime + - status : String + -- + + getTotal() : BigDecimal + + addItem(saleItem : SaleItem) : void +} + +class SaleItem { + - quantityPurchased : BigDecimal + - salePrice : BigDecimal + -- + + getItemTotal() : BigDecimal +} + +Sale -up-> "**1..1**\r-customer " Customer +Sale -right-> "-items\r**0..*** " SaleItem +SaleItem -up-> "**1..1**\r-product " Product +@enduml diff --git a/diagrams_source/lab02/domain_model.svg b/diagrams_source/lab02/domain_model.svg new file mode 100644 index 0000000..9c2e859 --- /dev/null +++ b/diagrams_source/lab02/domain_model.svg @@ -0,0 +1,76 @@ +Customer-customerId : Integer «unique» «generated»-username : String «unique»-firstName : String-surname : String-password : String-emailAddress : String-shippingAddress : StringProduct-productId : String «unique»-name : String-description : String-category : String-listPrice : BigDecimal-quantityInStock : BigDecimalSale-saleId : Integer «unique» «generated»-date : LocalDateTime-status : String+getTotal() : BigDecimal+addItem(saleItem : SaleItem) : voidSaleItem-quantityPurchased : BigDecimal-salePrice : BigDecimal+getItemTotal() : BigDecimal1..1-customer-items0..*1..1-product \ No newline at end of file diff --git a/diagrams_source/lab02/domain_model_opt.svg b/diagrams_source/lab02/domain_model_opt.svg new file mode 100644 index 0000000..8be89d0 --- /dev/null +++ b/diagrams_source/lab02/domain_model_opt.svg @@ -0,0 +1 @@ +Customer-customerId : Integer «unique» «generated»-username : String «unique»-firstName : String-surname : String-password : String-emailAddress : String-shippingAddress : StringProduct-productId : String «unique»-name : String-description : String-category : String-listPrice : BigDecimal-quantityInStock : BigDecimalSale-saleId : Integer «unique» «generated»-date : LocalDateTime-status : String+getTotal() : BigDecimal+addItem(saleItem : SaleItem) : voidSaleItem-quantityPurchased : BigDecimal-salePrice : BigDecimal+getItemTotal() : BigDecimal1..1-customer-items0..*1..1-product \ No newline at end of file diff --git a/diagrams_source/lab02/main_menu_mockup.png b/diagrams_source/lab02/main_menu_mockup.png new file mode 100644 index 0000000..9b6c0fb --- /dev/null +++ b/diagrams_source/lab02/main_menu_mockup.png Binary files differ diff --git a/diagrams_source/lab02/main_menu_mockup_opt.png b/diagrams_source/lab02/main_menu_mockup_opt.png new file mode 100644 index 0000000..0948dde --- /dev/null +++ b/diagrams_source/lab02/main_menu_mockup_opt.png Binary files differ diff --git a/diagrams_source/lab02/merging_topic_branches_opt.svg b/diagrams_source/lab02/merging_topic_branches_opt.svg index e4afd15..fbac361 100644 --- a/diagrams_source/lab02/merging_topic_branches_opt.svg +++ b/diagrams_source/lab02/merging_topic_branches_opt.svg @@ -1 +1 @@ -TeamCheckout master and pull to get team's recent changesStep 1Currently checked out branch is indicated by a black borderTopicMasterTopicStartWe have an unmerged topic branch Checkout topic and merge masterStep 2MasterMergeTeamTopicMasterTeamTopicResultStep 3Checkout master and merge topicMasterTeamTopicMergeMasterTopicResultMasterDelete merged topicStep 4Master +TeamCheckout master and pull to get team's recent changesStep 1Currently checked out branch is indicated by a black borderTopicMasterTopicStartWe have an unmerged topic branch Checkout topic and merge masterStep 2MasterMergeTeamTopicMasterTeamTopicResultStep 3Checkout master and merge topicMasterTeamTopicMergeMasterTopicResultMasterDelete merged topicStep 4Master \ No newline at end of file diff --git a/diagrams_source/lab02/product_editor_dialog_mockup.png b/diagrams_source/lab02/product_editor_dialog_mockup.png new file mode 100644 index 0000000..31c7bad --- /dev/null +++ b/diagrams_source/lab02/product_editor_dialog_mockup.png Binary files differ diff --git a/diagrams_source/lab02/product_editor_dialog_mockup_opt.png b/diagrams_source/lab02/product_editor_dialog_mockup_opt.png new file mode 100644 index 0000000..c73190d --- /dev/null +++ b/diagrams_source/lab02/product_editor_dialog_mockup_opt.png Binary files differ diff --git a/diagrams_source/lab06/add_new_product_sequence.puml b/diagrams_source/lab06/add_new_product_sequence.puml new file mode 100644 index 0000000..92f94ba --- /dev/null +++ b/diagrams_source/lab06/add_new_product_sequence.puml @@ -0,0 +1,69 @@ +@startuml +' style tweaks to make the diagram a little more readable +skinparam { + Style StrictUML + RoundCorner 5 + ParticipantPadding 10 + Padding 2 + defaultFontSize 14 + SequenceStereotype { + Font { + Size 12 + Style plain + } + } + Database { + BorderColor #A80036 + } +} + +actor User as user +participant ":Main" as main +participant ":MainMenu" as menu << frame >> +participant ":ProductEditor" as dialog << dialog >> +participant "dao\n:ProductJdbiDAO" as dao <> +participant "categoryModel\n:SimpleListModel" as model +participant "product\n:Product" as product << domain >> +database "H2\nDatabase" as db + +create dao +main -> dao : «construct» + + +create menu +main -> menu : «construct(dao)» + +user -> menu++ : clicks 'Add New Product' + +create dialog +menu -> dialog++ : « construct (dao)» + +dialog -> dao : getCategories() +dao++ +dao -> db++ : select distinct category from product +return query result +return categories + +create model + +dialog -> model : « construct » + +dialog -> model++ : updateItems(categories) +model-- + +dialog-- + +user -> dialog : enters product details into input components + +user -> dialog++ : clicks 'Save' + +create product +dialog -> product : « construct  from user input » + +dialog -> dao++ : saveProduct(product) +dao -> db++ : insert into product (...) values (...) +db-- +dao-- + +destroy dialog +@enduml diff --git a/diagrams_source/lab06/add_new_product_sequence.svg b/diagrams_source/lab06/add_new_product_sequence.svg new file mode 100644 index 0000000..004e1e6 --- /dev/null +++ b/diagrams_source/lab06/add_new_product_sequence.svg @@ -0,0 +1,149 @@ +User:MainH2Database«construct»«Product DAO »dao:ProductJdbiDAO«construct(dao)»« frame »:MainMenuclicks 'Add New Product'« construct (dao)»« dialog »:ProductEditorgetCategories()select distinct category from productquery resultcategories« construct »categoryModel:SimpleListModelupdateItems(categories)enters product details into input componentsclicks 'Save'« construct  from user input »« domain »product:ProductsaveProduct(product)insert into product (...) values (...) \ No newline at end of file diff --git a/diagrams_source/lab06/add_new_product_sequence_opt.svg b/diagrams_source/lab06/add_new_product_sequence_opt.svg new file mode 100644 index 0000000..e5bd354 --- /dev/null +++ b/diagrams_source/lab06/add_new_product_sequence_opt.svg @@ -0,0 +1 @@ +User:MainH2Database«construct»«Product DAO »dao:ProductJdbiDAO«construct(dao)»« frame »:MainMenuclicks 'Add New Product'« construct (dao)»« dialog »:ProductEditorgetCategories()select distinct category from productquery resultcategories« construct »categoryModel:SimpleListModelupdateItems(categories)enters product details into input componentsclicks 'Save'« construct  from user input »« domain »product:ProductsaveProduct(product)insert into product (...) values (...) \ No newline at end of file diff --git a/diagrams_source/lab09/web_get_products_sequence.puml b/diagrams_source/lab09/web_get_products_sequence.puml new file mode 100644 index 0000000..18e7668 --- /dev/null +++ b/diagrams_source/lab09/web_get_products_sequence.puml @@ -0,0 +1,61 @@ +@startuml +' style tweaks to make the diagram a little more readable +skinparam { + Style strictuml + RoundCorner 5 + BoxPadding 35 + ParticipantPadding 15 + Padding 2 + + Sequence { + ' make activations yellow too + LifeLineBackgroundColor #FDFDCD + + ' make stereotypes less ugly + Stereotype { + Font { + Size 11 + Style plain + } + } + } + + Database { + BorderColor #A80036 + } + +} + +Actor Customer as user + +box " Web Browser " #white + Participant "Products\nPage" as page << HTML >> + user -> page++: views page + participant "products-list" as controller <> + participant "axios" as axios <> +end box + +box "Web Server" #white + Participant "Server" as service << Jooby >> + Participant "ProductModule" as module << Jooby >> + Participant "ProductDAO" as dao << DAO >> +end box + +database "Database" as db + +page -> controller++ : « mounted » +controller -> controller++ : getAllProducts() +controller -> axios++ : get("/api/products") +axios -> service++ : HTTP GET /api/products +service -> module++ : get("/api/products") +module -> dao++ : getProducts() +dao -> db++ : select * from products +return result +return products +return products +return JSON encoded products +return JSON encoded products +return JavaScript products +return products merged with template + +@enduml diff --git a/diagrams_source/lab09/web_get_products_sequence.svg b/diagrams_source/lab09/web_get_products_sequence.svg new file mode 100644 index 0000000..5de6f9b --- /dev/null +++ b/diagrams_source/lab09/web_get_products_sequence.svg @@ -0,0 +1,128 @@ +Web BrowserWeb ServerCustomer« HTML »ProductsPage«Vue »products-list«HTTP client »axios« Jooby »Server« Jooby »ProductModule« DAO »ProductDAODatabaseviews page« mounted »getAllProducts()get("/api/products")HTTP GET /api/productsget("/api/products")getProducts()select * from productsresultproductsproductsJSON encoded productsJSON encoded productsJavaScript productsproducts merged with template \ No newline at end of file diff --git a/diagrams_source/lab09/web_get_products_sequence_opt.svg b/diagrams_source/lab09/web_get_products_sequence_opt.svg new file mode 100644 index 0000000..3678169 --- /dev/null +++ b/diagrams_source/lab09/web_get_products_sequence_opt.svg @@ -0,0 +1 @@ +Web BrowserWeb ServerCustomer« HTML »ProductsPage«Vue »products-list«HTTP client »axios« Jooby »Server« Jooby »ProductModule« DAO »ProductDAODatabaseviews page« mounted »getAllProducts()get("/api/products")HTTP GET /api/productsget("/api/products")getProducts()select * from productsresultproductsproductsJSON encoded productsJSON encoded productsJavaScript productsproducts merged with template \ No newline at end of file diff --git a/tiddlers/content/labs/lab01/_Labs_01_Exercise_ Create a Project.md b/tiddlers/content/labs/lab01/_Labs_01_Exercise_ Create a Project.md index 68a449d..7400e15 100644 --- a/tiddlers/content/labs/lab01/_Labs_01_Exercise_ Create a Project.md +++ b/tiddlers/content/labs/lab01/_Labs_01_Exercise_ Create a Project.md @@ -18,7 +18,7 @@ Add the code that prints `hello world` to the output console. - {{$:/core/images/tip}} Tip: You can use a template --- type `sout` and hit < Space">>. We will show you how to view the list of templates later in this lab. + <> Tip: You can use a template --- type `sout` and hit < Space">>. We will show you how to view the list of templates later in this lab. 8. Run the class. Right click the class (either in the project pane, or the background of the source window) and select <>. You can also use the < F6">> key shortcut to run the file. diff --git a/tiddlers/content/labs/lab01/_Labs_01_Exercise_ Create a Project.md.meta b/tiddlers/content/labs/lab01/_Labs_01_Exercise_ Create a Project.md.meta index 6ecc799..63979d0 100644 --- a/tiddlers/content/labs/lab01/_Labs_01_Exercise_ Create a Project.md.meta +++ b/tiddlers/content/labs/lab01/_Labs_01_Exercise_ Create a Project.md.meta @@ -3,4 +3,4 @@ section: 3 tags: lab01 lab title: /Labs/01/Exercise: Create a Project -type: text/x-markdown +type: text/x-markdown \ No newline at end of file diff --git a/tiddlers/content/labs/lab01/_Labs_01_Exercise_ Debugging.md b/tiddlers/content/labs/lab01/_Labs_01_Exercise_ Debugging.md index 8da33a4..c7a5d80 100644 --- a/tiddlers/content/labs/lab01/_Labs_01_Exercise_ Debugging.md +++ b/tiddlers/content/labs/lab01/_Labs_01_Exercise_ Debugging.md @@ -39,4 +39,4 @@ If you have a variable that is an object then you can drill down into the object to examine its contents. -**Try to remember to use the debugger — if your program isn’t working the way you intended it to then the debugger will definitely help you figure out why.** \ No newline at end of file +<> **Try to remember to use the debugger — if your program isn’t working the way you intended it to then the debugger will definitely help you figure out why.** \ No newline at end of file diff --git a/tiddlers/content/labs/lab01/_Labs_01_TiddlyWiki.tid b/tiddlers/content/labs/lab01/_Labs_01_TiddlyWiki.tid index c0c4276..d1085af 100644 --- a/tiddlers/content/labs/lab01/_Labs_01_TiddlyWiki.tid +++ b/tiddlers/content/labs/lab01/_Labs_01_TiddlyWiki.tid @@ -7,20 +7,18 @@ We will be using TiddlyWiki for delivering the lab content in INFO202. You saw this in INFO201 so the following is a quick refresher: -* When you have completed a section you can close it with the @@.ou-button-image {{$:/core/images/close-button}}@@ button at the top right of each section. +* When you have completed a section you can close it with the <> button at the top right of each section. -* You can save the current state of your progress by clicking the @@.ou-button-image {{$:/core/images/permaview-button}}@@ icon on the side bar to the right. This will change the URL to include the state which you can then bookmark. If you open the bookmark the page will reappear in the exact state that you left it in. +* You can save the current state of your progress by clicking the <> button on the side bar to the right. This will change the URL to include the state which you can then bookmark. If you open the bookmark the page will reappear in the exact state that you left it in. -* You can reset back to the original state using the @@.ou-button-image - {{$:/core/images/home-button}}@@ icon on the side bar on the right. This will close all open sections, so you will lose your progress. +* You can reset back to the original state using the <> button on the side bar on the right. This will close all open sections, so you will lose your progress. -* You can reopen a closed section by clicking its link in the 'Contents' section for that lab, or use the 'Contents' pane in the side bar. +* You can reopen a closed section by clicking its link in the 'Contents' section for that lab, or use the 'Contents' tab in the side bar. * There is a search box in the side bar on the right that can search the entire document. -* If you want a printed copy of this document, first reset the document back to its default state by clicking the @@.ou-button-image {{$:/core/images/home-button}}@@ home button and then the <> button to open all of the sections, then click the @@.ou-button-image {{$:/core/images/print-button}}@@ button on the side bar on the right to print the document in is current state. +* If you want a printed copy of this document, first reset the document back to its default state by clicking the <> home button and then the <> button to open all of the sections, then click the <> on the side bar on the right to print the document in is current state. -* You can show and hide the side bar using the @@.ou-button-image - {{$:/core/images/chevron-right}}@@ button at the top right of the document. +* You can show and hide the side bar to make more room for the content using the <> button at the very top right of the document. -* You can download a copy of this document for offline use using the @@.ou-button-image {{$:/core/images/save-button}}@@ icon on the side bar on the right. Note that this is the only proper way to save the document. Using the browser's 'save page' feature will likely result in a corrupted document. Most features should be available offline, however PlantUML diagrams rely on an external server, so those diagrams might not appear if you have no Internet access. \ No newline at end of file +* You can download a copy of this document for offline use using the <> button on the side bar on the right. Note that this is the only proper way to save the document. Using the browser's 'save page' feature will likely result in a corrupted document. Most features should be available offline, however PlantUML diagrams rely on an external server, so those diagrams might not appear if you have no Internet access. \ No newline at end of file diff --git a/tiddlers/content/labs/lab02/_Labs_02_Sharing Code Snippets.md b/tiddlers/content/labs/lab02/_Labs_02_Sharing Code Snippets.md index e38c786..5d00334 100644 --- a/tiddlers/content/labs/lab02/_Labs_02_Sharing Code Snippets.md +++ b/tiddlers/content/labs/lab02/_Labs_02_Sharing Code Snippets.md @@ -10,14 +10,18 @@ 1. Click <>. Secret mode allows you to give the URL to other people and they will be able to see the code, but it will not be visible to other GitBucket users. *Private* mode means that only you can see it, and *Public* mode means that everyone can see it. -1. Copy the URL in the browser's location bar. Open another tab using the browser's private/incognito mode, and paste the URL. You will need to log in to GitBucket again, since using private mode is pretty much the same as using an entirely different computer. You should be able to see your code. +1. Copy the URL in the browser's location bar. Open another tab using the browser's private/incognito mode, and paste the URL. You will need to log in to GitBucket again, since using incognito mode is pretty much the same as using an entirely different computer. You should be able to see your code. - You would share the URL with your team members so that they can view the snippet. + You would share this URL with your team members so that they can view the snippet. 1. Delete your Snippet using the <> button. -If you have error messages or stack traces that you want to share with INFO202 teaching staff, then please use the Snippets feature. We do not like receiving screenshots of text. If you send us a screenshot of text, then you may receive a reply in the form of a low-resolution screenshot of an email message that chops off the right and bottom thirds of the message (that is pretty typical of the sort of screenshots we get from students). +If you have error messages or stack traces that you want to share with INFO202 teaching staff, then please use the Snippets feature. We do not like receiving screenshots of text. If you send us a screenshot of text, then you may receive a reply in the form of a screenshot of an email message that chops off the right and bottom thirds of the message (that is pretty typical of the sort of screenshots we get from students). -Create a **secret** snippet that contains your stack trace (copy/paste it from the NetBeans output pane), and include the URL in your message when you email us. Do **not** use private snippets for this purpose --- we do not have access to private snippets. Note that you do **not** need to use snippets to send us code --- we can already access your code assuming you have committed and pushed it --- snippets are primarily about error messages and stack traces that you want to share. +Create a **secret** snippet that contains your stack trace (copy/paste it from the NetBeans output pane), and include the URL (the URL in the browser's location bar --- not the clone URL) in your message when you email us. + +<> Do **not** use private snippets for this purpose --- we do not have access to private snippets. + +Note that you do **not** need to use snippets to send us code --- we can already access your code assuming you have committed and pushed it --- snippets are primarily about error messages and stack traces that you want to share. diff --git a/tiddlers/content/labs/lab02/_Labs_02_images_Main Menu Mockup.png b/tiddlers/content/labs/lab02/_Labs_02_images_Main Menu Mockup.png index 9b6c0fb..0948dde 100644 --- a/tiddlers/content/labs/lab02/_Labs_02_images_Main Menu Mockup.png +++ b/tiddlers/content/labs/lab02/_Labs_02_images_Main Menu Mockup.png Binary files differ diff --git a/tiddlers/content/labs/lab02/_Labs_02_images_Main Menu Mockup.png.meta b/tiddlers/content/labs/lab02/_Labs_02_images_Main Menu Mockup.png.meta index 835a695..928ca42 100644 --- a/tiddlers/content/labs/lab02/_Labs_02_images_Main Menu Mockup.png.meta +++ b/tiddlers/content/labs/lab02/_Labs_02_images_Main Menu Mockup.png.meta @@ -1,3 +1,3 @@ -tags: image +tags: image lab lab02 title: /Labs/02/images/Main Menu Mockup -type: image/png +type: image/png \ No newline at end of file diff --git a/tiddlers/content/labs/lab02/_Labs_02_images_Merging Topic Branches.svg b/tiddlers/content/labs/lab02/_Labs_02_images_Merging Topic Branches.svg index e4afd15..d17922e 100644 --- a/tiddlers/content/labs/lab02/_Labs_02_images_Merging Topic Branches.svg +++ b/tiddlers/content/labs/lab02/_Labs_02_images_Merging Topic Branches.svg @@ -1 +1 @@ -TeamCheckout master and pull to get team's recent changesStep 1Currently checked out branch is indicated by a black borderTopicMasterTopicStartWe have an unmerged topic branch Checkout topic and merge masterStep 2MasterMergeTeamTopicMasterTeamTopicResultStep 3Checkout master and merge topicMasterTeamTopicMergeMasterTopicResultMasterDelete merged topicStep 4Master +TeamCheckout master and pull to get team's recent changesStep 1Currently checked out branch is indicated by a black borderTopicMasterTopicStartWe have an unmerged topic branch Checkout topic and merge masterStep 2MasterMergeTeamTopicMasterTeamTopicResultStep 3Checkout master and merge topicMasterTeamTopicMergeMasterTopicResultMasterDelete merged topicStep 4Master diff --git a/tiddlers/content/labs/lab02/_Labs_02_images_Product Editor Dialog Mockup.png b/tiddlers/content/labs/lab02/_Labs_02_images_Product Editor Dialog Mockup.png index 31c7bad..c73190d 100644 --- a/tiddlers/content/labs/lab02/_Labs_02_images_Product Editor Dialog Mockup.png +++ b/tiddlers/content/labs/lab02/_Labs_02_images_Product Editor Dialog Mockup.png Binary files differ diff --git a/tiddlers/content/labs/lab02/_Labs_02_images_Product Editor Dialog Mockup.png.meta b/tiddlers/content/labs/lab02/_Labs_02_images_Product Editor Dialog Mockup.png.meta index 9a981b7..b204082 100644 --- a/tiddlers/content/labs/lab02/_Labs_02_images_Product Editor Dialog Mockup.png.meta +++ b/tiddlers/content/labs/lab02/_Labs_02_images_Product Editor Dialog Mockup.png.meta @@ -1,3 +1,3 @@ -tags: image +tags: image lab lab02 title: /Labs/02/images/Product Editor Dialog Mockup -type: image/png +type: image/png \ No newline at end of file diff --git a/tiddlers/content/labs/lab02/_Labs_02_images_Project Domain Model.tid b/tiddlers/content/labs/lab02/_Labs_02_images_Project Domain Model.tid index 17ea6a3..bcdcb80 100644 --- a/tiddlers/content/labs/lab02/_Labs_02_images_Project Domain Model.tid +++ b/tiddlers/content/labs/lab02/_Labs_02_images_Project Domain Model.tid @@ -1,68 +1,7 @@ created: 20200702091026430 modified: 20200707005526287 -tags: image +tags: image lab lab02 title: /Labs/02/images/Project Domain Model type: text/vnd.tiddlywiki -[[plantuml[ -@startuml - -hide empty members - -skinparam { - Style StrictUML - ClassAttributeIconSize 0 - ClassStereotypeFont { - Size 12 - Style plain - } - Defaultfontsize 14 - Classfontsize 16 - Roundcorner 8 - Padding 2 - RankSep 100 - NodeSep 120 -} - -class Customer { - - customerId : Integer <> <> - - username : String <> - - firstName : String - - surname : String - - password : String - - emailAddress : String - - shippingAddress : String - -- -} - -class Product { - - productId : String <> - - name : String - - description : String - - category : String - - listPrice : BigDecimal - - quantityInStock : BigDecimal - -- -} - -class Sale { - - saleId : Integer <> <> - - date : LocalDateTime - - status : String - -- - + getTotal() : BigDecimal - + addItem(saleItem : SaleItem) : void -} - -class SaleItem { - - quantityPurchased : BigDecimal - - salePrice : BigDecimal - -- - + getItemTotal() : BigDecimal -} - -Sale -up-> "**1..1**\r-customer " Customer -Sale -right-> "-items\r**0..*** " SaleItem -SaleItem -up-> "**1..1**\r-product " Product -@enduml -]]] +Customer-customerId : Integer «unique» «generated»-username : String «unique»-firstName : String-surname : String-password : String-emailAddress : String-shippingAddress : StringProduct-productId : String «unique»-name : String-description : String-category : String-listPrice : BigDecimal-quantityInStock : BigDecimalSale-saleId : Integer «unique» «generated»-date : LocalDateTime-status : String+getTotal() : BigDecimal+addItem(saleItem : SaleItem) : voidSaleItem-quantityPurchased : BigDecimal-salePrice : BigDecimal+getItemTotal() : BigDecimal1..1-customer-items0..*1..1-product diff --git a/tiddlers/content/labs/lab03/_Labs_03_Testing the Product Data Access Class.md b/tiddlers/content/labs/lab03/_Labs_03_Testing the Product Data Access Class.md index 3cf7ef7..48c30b5 100644 --- a/tiddlers/content/labs/lab03/_Labs_03_Testing the Product Data Access Class.md +++ b/tiddlers/content/labs/lab03/_Labs_03_Testing the Product Data Access Class.md @@ -40,9 +40,12 @@ } def ignored=""" - .gradle/ - build/ - bin/ + .gradle + .classpath + .project + build + bin + dist *.zip *.tgz *.class diff --git a/tiddlers/content/labs/lab05/_Labs_05_Create the Database.md b/tiddlers/content/labs/lab05/_Labs_05_Create the Database.md index c13e785..6b23c5c 100644 --- a/tiddlers/content/labs/lab05/_Labs_05_Create the Database.md +++ b/tiddlers/content/labs/lab05/_Labs_05_Create the Database.md @@ -30,7 +30,7 @@ If that doesn't work you will need to use the *Open With* feature by right clicking to open the <> file with *Terminal*. Once that is set up you should be able to double click the file to launch H2. - You should notice an icon appear in your system tray (it looks like a yellow 3D cylinder). If you see this icon then the H2 server is running and you will be able to connect to any databases running on this server. + You should notice a <> icon appear in your system tray. If you see this icon then the H2 server is running and you will be able to connect to any databases running on this server. 1. Now we need to create a database. Right click the H2 icon in the system tray and select <>. diff --git a/tiddlers/content/labs/lab06/_Labs_06_Project Tasks.tid b/tiddlers/content/labs/lab06/_Labs_06_Project Tasks.tid index 7e71ebe..507a76e 100644 --- a/tiddlers/content/labs/lab06/_Labs_06_Project Tasks.tid +++ b/tiddlers/content/labs/lab06/_Labs_06_Project Tasks.tid @@ -31,77 +31,4 @@ To give you an idea of what we are expecting, the following is an example of what the 'add new product' diagram looks like now that we have a database, and DAO injection (click for the source): -[[plantuml[ -@startuml - -' style tweaks to make the diagram a little more readable -skinparam { - Style StrictUML - RoundCorner 5 - ParticipantPadding 10 - Padding 2 - defaultFontSize 14 - SequenceStereotype { - Font { - Size 12 - Style plain - } - } - Database { - ' the default border does not match the normal colors (bug?), so fix this - BorderColor #A80036 - } -} - -actor User as user -participant ":Main" as main -participant ":MainMenu" as menu << frame >> -participant ":ProductEditor" as dialog << dialog >> -participant "dao\n:ProductJdbiDAO" as dao <> -participant "categoryModel\n:SimpleListModel" as model -participant "product\n:Product" as product << domain >> -database "H2\nDatabase" as db - -create dao -main -> dao : «construct» - - -create menu -main -> menu : «construct(dao)» - -user -> menu++ : clicks 'Add New Product' - -create dialog -menu -> dialog++ : « construct (dao)» - -dialog -> dao : getCategories() -dao++ -dao -> db++ : select distinct category from product -return query result -return categories - -create model - -dialog -> model : « construct » - -dialog -> model++ : updateItems(categories) -model-- - -dialog-- - -user -> dialog : enters product details into input components - -user -> dialog++ : clicks 'Save' - -create product -dialog -> product : « construct  from user input » - -dialog -> dao++ : saveProduct(product) -dao -> db++ : insert into product (...) values (...) -db-- -dao-- - -destroy dialog - -@enduml -]]] \ No newline at end of file +{{/Labs/06/images/Save Product Sequence Diagram}} \ No newline at end of file diff --git a/tiddlers/content/labs/lab06/_Labs_06_images_Save Product Sequence Diagram.svg b/tiddlers/content/labs/lab06/_Labs_06_images_Save Product Sequence Diagram.svg new file mode 100644 index 0000000..5182ed1 --- /dev/null +++ b/tiddlers/content/labs/lab06/_Labs_06_images_Save Product Sequence Diagram.svg @@ -0,0 +1 @@ +User:MainH2Database«construct»«Product DAO »dao:ProductJdbiDAO«construct(dao)»« frame »:MainMenuclicks 'Add New Product'« construct (dao)»« dialog »:ProductEditorgetCategories()select distinct category from productquery resultcategories« construct »categoryModel:SimpleListModelupdateItems(categories)enters product details into input componentsclicks 'Save'« construct  from user input »« domain »product:ProductsaveProduct(product)insert into product (...) values (...) diff --git a/tiddlers/content/labs/lab06/_Labs_06_images_Save Product Sequence Diagram.svg.meta b/tiddlers/content/labs/lab06/_Labs_06_images_Save Product Sequence Diagram.svg.meta new file mode 100644 index 0000000..9ee57d6 --- /dev/null +++ b/tiddlers/content/labs/lab06/_Labs_06_images_Save Product Sequence Diagram.svg.meta @@ -0,0 +1,5 @@ +created: 20200702091026430 +modified: 20200707005526287 +tags: lab06 lab image +title: /Labs/06/images/Save Product Sequence Diagram +type: image/svg+xml \ No newline at end of file diff --git a/tiddlers/content/labs/lab09/_Labs_09_Filtering by Category.md b/tiddlers/content/labs/lab09/_Labs_09_Filtering by Category.md index b7f45d2..27aae6e 100644 --- a/tiddlers/content/labs/lab09/_Labs_09_Filtering by Category.md +++ b/tiddlers/content/labs/lab09/_Labs_09_Filtering by Category.md @@ -33,7 +33,7 @@ This is using template literals to add a path parameter to the URI. Template literals are strings that contain embedded variables. They are perfect for creating URI variables that contain path parameters. - <>Note the backticks (the reverse speech mark character --- it is just to the left of the '1' at the top left on most keyboards). You can read more about template literals at: + <> Note the backticks (the reverse speech mark character --- it is just to the left of the '1' at the top left on most keyboards). You can read more about template literals at: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals diff --git a/tiddlers/content/labs/lab09/_Labs_09_View Products Sequence Diagram.tid b/tiddlers/content/labs/lab09/_Labs_09_View Products Sequence Diagram.tid index a67e88c..d192e88 100644 --- a/tiddlers/content/labs/lab09/_Labs_09_View Products Sequence Diagram.tid +++ b/tiddlers/content/labs/lab09/_Labs_09_View Products Sequence Diagram.tid @@ -5,64 +5,6 @@ To help you to understand what is happening when the products page is viewed, refer to the following sequence diagram: -[[plantuml[ -@startuml +{{/Labs/09/images/View Products Sequence Diagram}} -' style tweaks to make the diagram a little more readable -skinparam { - Style strictuml - RoundCorner 8 - - Sequence { - ' make activations yellow too - LifeLineBackgroundColor #FDFDCD - - ' make stereotypes less ugly - Stereotype { - Font { - Size 11 - Style plain - } - } - } -} - -skinparam { - BoxPadding 35 - ParticipantPadding 5 -} - -Actor Customer as user - -box " Web Browser " #white - Participant "Products\nPage" as page << HTML >> - user -> page++: views page - participant "products-list" as controller <> - participant "axios" as axios <> -end box - -box "Web Server" #white - Participant "Server" as service << Jooby >> - Participant "ProductModule" as module << Jooby >> - Participant "ProductDAO" as dao << DAO >> -end box - -page -> controller++ : « mounted » -controller -> controller++ : getAllProducts() -controller -> axios++ : get -axios -> service++ : HTTP GET /api/products - -service -> module++ : get("/api/products") -module -> dao++ : getProducts() -return products -return products -return JSON encoded products -return JSON encoded products -return JavaScript products -return products merged with template - -@enduml - -]]] - -Feel free to use this diagram as the starting point for the dagram that is required for milestone 3. Click the diagram above for the source code. \ No newline at end of file +Feel free to use this diagram as the starting point for the diagram that is required for milestone 3. Click the diagram for the source code. \ No newline at end of file diff --git a/tiddlers/content/labs/lab09/_Labs_09_images_View Products Sequence Diagram.svg b/tiddlers/content/labs/lab09/_Labs_09_images_View Products Sequence Diagram.svg new file mode 100644 index 0000000..c13f55f --- /dev/null +++ b/tiddlers/content/labs/lab09/_Labs_09_images_View Products Sequence Diagram.svg @@ -0,0 +1 @@ +Web BrowserWeb ServerCustomer« HTML »ProductsPage«Vue »products-list«HTTP client »axios« Jooby »Server« Jooby »ProductModule« DAO »ProductDAODatabaseviews page« mounted »getAllProducts()get("/api/products")HTTP GET /api/productsget("/api/products")getProducts()select * from productsresultproductsproductsJSON encoded productsJSON encoded productsJavaScript productsproducts merged with template diff --git a/tiddlers/content/labs/lab09/_Labs_09_images_View Products Sequence Diagram.svg.meta b/tiddlers/content/labs/lab09/_Labs_09_images_View Products Sequence Diagram.svg.meta new file mode 100644 index 0000000..9ea30d9 --- /dev/null +++ b/tiddlers/content/labs/lab09/_Labs_09_images_View Products Sequence Diagram.svg.meta @@ -0,0 +1,4 @@ +section: +tags: lab09 lab image +title: /Labs/09/images/View Products Sequence Diagram +type: image/svg+xml \ No newline at end of file diff --git a/tiddlers/content/labs/lab12/_Labs_12_Database Roles.md b/tiddlers/content/labs/lab12/_Labs_12_Database Roles.md index 6ff2ab1..907569b 100644 --- a/tiddlers/content/labs/lab12/_Labs_12_Database Roles.md +++ b/tiddlers/content/labs/lab12/_Labs_12_Database Roles.md @@ -36,7 +36,7 @@ 2. Copy the code into the H2 console and run it. -3. Disconnect from the database and reconnect using the `account_user` user. Can your query the customer table? What about the product table? +3. Disconnect from the database using the <> button and reconnect using the `account_user` user. Can you query the customer table? What about the product table? 4. Using connection pools with roles is a bit clunky because JDBC connection pools are per-user. We are going to have to create several connection pools, so we are going to need to have several `JdbiDaoFactory` classes --- one for each role. diff --git a/tiddlers/content/labs/lab12/_Labs_12_Database Roles.md.meta b/tiddlers/content/labs/lab12/_Labs_12_Database Roles.md.meta index ba631e3..83874cf 100644 --- a/tiddlers/content/labs/lab12/_Labs_12_Database Roles.md.meta +++ b/tiddlers/content/labs/lab12/_Labs_12_Database Roles.md.meta @@ -1,4 +1,4 @@ -section: 6 +section: 5 tags: lab lab12 title: /Labs/12/Database Roles type: text/x-markdown \ No newline at end of file diff --git a/tiddlers/content/labs/lab12/_Labs_12_Encrypting the Database.md b/tiddlers/content/labs/lab12/_Labs_12_Encrypting the Database.md index d24d6db..79d5660 100644 --- a/tiddlers/content/labs/lab12/_Labs_12_Encrypting the Database.md +++ b/tiddlers/content/labs/lab12/_Labs_12_Encrypting the Database.md @@ -34,7 +34,7 @@ alter user sa set password 'somepassword'; ``` -2. Disconnect (use the little red zig-zag icon at the top left of the H2 console), and reconnect as `sa` using the new password. +2. Disconnect and reconnect as `sa` using the new password. 3. In order to encrypt the database it can't have any active connections so disconnect again, and shut down your server in NetBeans. diff --git a/tiddlers/content/labs/lab12/_Labs_12_Encrypting the Database.md.meta b/tiddlers/content/labs/lab12/_Labs_12_Encrypting the Database.md.meta index 2c007ad..ff29ea0 100644 --- a/tiddlers/content/labs/lab12/_Labs_12_Encrypting the Database.md.meta +++ b/tiddlers/content/labs/lab12/_Labs_12_Encrypting the Database.md.meta @@ -1,4 +1,4 @@ -section: 7 +section: 6 tags: lab lab12 title: /Labs/12/Encrypting the Database type: text/x-markdown \ No newline at end of file diff --git a/tiddlers/content/labs/lab12/_Labs_12_Stronger Passwords.md.meta b/tiddlers/content/labs/lab12/_Labs_12_Stronger Passwords.md.meta index 92ba900..9527918 100644 --- a/tiddlers/content/labs/lab12/_Labs_12_Stronger Passwords.md.meta +++ b/tiddlers/content/labs/lab12/_Labs_12_Stronger Passwords.md.meta @@ -1,4 +1,4 @@ -section: 8 +section: 7 tags: lab lab12 title: /Labs/12/Stronger Passwords type: text/x-markdown \ No newline at end of file diff --git a/tiddlers/system/common-svg/$__ou_clipart_h2.png b/tiddlers/system/common-svg/$__ou_clipart_h2.png new file mode 100644 index 0000000..ba59bf6 --- /dev/null +++ b/tiddlers/system/common-svg/$__ou_clipart_h2.png Binary files differ diff --git a/tiddlers/system/common-svg/$__ou_clipart_h2.png.meta b/tiddlers/system/common-svg/$__ou_clipart_h2.png.meta new file mode 100644 index 0000000..44e18d0 --- /dev/null +++ b/tiddlers/system/common-svg/$__ou_clipart_h2.png.meta @@ -0,0 +1,3 @@ +tags: clipart +title: $:/ou/clipart/h2 +type: image/png \ No newline at end of file diff --git a/tiddlers/system/common-svg/$__ou_clipart_h2_disconnect.svg b/tiddlers/system/common-svg/$__ou_clipart_h2_disconnect.svg new file mode 100644 index 0000000..2da5cfd --- /dev/null +++ b/tiddlers/system/common-svg/$__ou_clipart_h2_disconnect.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tiddlers/system/common-svg/$__ou_clipart_h2_disconnect.svg.meta b/tiddlers/system/common-svg/$__ou_clipart_h2_disconnect.svg.meta new file mode 100644 index 0000000..18724f6 --- /dev/null +++ b/tiddlers/system/common-svg/$__ou_clipart_h2_disconnect.svg.meta @@ -0,0 +1,3 @@ +tags: clipart +title: $:/ou/clipart/h2_disconnect +type: image/svg+xml \ No newline at end of file diff --git a/tiddlers/system/macros/$__ou_macros_Icons.tid b/tiddlers/system/macros/$__ou_macros_Icons.tid index 5b871a9..a34341c 100644 --- a/tiddlers/system/macros/$__ou_macros_Icons.tid +++ b/tiddlers/system/macros/$__ou_macros_Icons.tid @@ -8,10 +8,39 @@ {{$:/core/images/warning}} \end +\define icon(path) +{{$path$}} +\end + +\define tip() +{{$:/core/images/tip}} +\end + !Usage: ```plaintext +<> Don't run with scissors. +``` +Produces: + +<> Don't run with scissors. + +
+ +```plaintext <> Pay attention! ``` Produces: -<> Pay attention! \ No newline at end of file +<> Pay attention! + +
+ + +```plaintext +<> +``` +Produces: + +<> + +The path is a Tiddler that contains an image. \ No newline at end of file