please wait, architecting….

Hello there. Since my last post I have done quite a bit for the architecture for the app. The most difficult bit has been making a project management tool work for me. All I need is a Gantt Chart software that does not cost an arm and a leg, has a smooth UI/UX and can display tasks in a to-do list. Maybe I should build my own software, but I digress. Let me cover what I have done over the past week. 

This Week

More like the past 3 weeks. I had meant to publish this Dev Log about 2 weeks ago. This post covers only a week’s worth of work, and I am going to pretend that the past 2 weeks never happened for this project. I let myself get distracted figuring out project management tools, making YouTube videos, and dealing with natural disasters. 

Activity Diagrams

The biggest activity this week was diagraming my activities. For every use case on the Core Use Case Diagram, I developed an activity diagram based on the specification. I even included the specified pragmatic flows as branch logic. 

One of my favorites is the one for changing the quantity of an inventory item using stepper buttons or a text field. Because of all the checks and guards against data entry errors, a simple feature turns into something very complicated. The smaller, and simpler, activity diagrams are not likely to remain that way, especially as I begin to design the UI later this week. 

Component Diagrams

Initially I struggled with creating the component diagrams. Design is easy when it comes to what the user does. However, breaking it into loosely coupled objects while optimizing for code reuse is not so easy. I eventually came up with the diagram below:

QrtrMstr Core Component Diagram

I have divided the app into three subsystems so far. These are the Profile Controller Subsystem, Multipeer Connectivity Subsystem, and View Controllers Subsystem. At this stage of the project, the component diagram is incomplete. The View Controllers Subsystem is based on my UI design. A UI design that requires wireframes that I have not made yet. 

Class Diagram

From the component diagram I was able to squeeze one class diagram out before the end of the week. This one still needs work as well. You can see it in the diagram below: 

Profile Controller Class Diagram

A big change I am going to try and include with the new structure, is getting rid of the stored shopping list. A big chunk of the bugs I was trying to fix in the QuarterMaster app have been because the shopping list is stored separately but must communicate with the pantry. By making the shopping list a computed property from the inventory, the logic will be simpler and contain less bugs. 

I am going to try and write a new class for tracking changes and works with any data type. By making it work with any, I might be able to track more than just the inventory. The only issue is the Codable framework that allows me to save JSON files does not like ambiguous data types such as Any. 

Next Week

Project Plan

From this point on, I am going to use a project plan to keep track of work to be done on the QuarterMaster Rearchitecture project. Project Plans are always better with Gantt Charts. So, I made one in GanttProject. 

QrtrMstr Rearchitecture Project, Remaining Tasks

The component and class diagrams I made before give me a good breakdown for each system in the app. Combined with the activity diagrams, I can also write tests for each module. By developing with unit tests, I will not have to worry about the User Interface until later. There is some overlap in the project plan above, but some tasks will probably be smaller than I plan, others are going to be a pain.

Finish Core Architecture

The most important goal this week is to finish the architecture for QuarterMaster Core. Packages such as the MultiPeer Connectivity still need to be programmed, and I also still need to flesh out how the ChangeLog will work. 

Build UI Wireframes

With a new architecture, I want to try and make the User Interface easier and more intuitive to navigate. For very small inventories, the current presentation is okay, when the inventory exceeds 25-30 items, it becomes increasingly difficult to simply browse the inventory. I have also noted with users inside my test group, they have difficulty figuring out the peer to peer sharing features. 

Begin Coding Business Logic

The big task will be writing the code as I have architected it. As much as I want to say that it will be smooth, I expect it will be tedious as there are a lot of helper functions to be written. Overall, I am looking forward to getting the app fixed. If I can keep to the project plan, I hope to ship the new core app by the end of the month.