Basic Assignments
 
Options & Settings
 
Main Time Information
Color Code: Yellow
Assigned To: Brandon Moore
Created By: Brandon Moore
Created Date/Time: 10/7/2019 9:22 am
 
Action Status: Blank (new)
Show On The Web: Yes - (public)
Priority: 0
 
Time Id: 5010
Template/Type: Brandon Time
Title/Caption: Mini training with Alan
Start Date/Time: 10/10/2019 10:00 am
End Date/Time: 10/10/2019 11:15 am
Main Status: Active

click to enlarge - photo by: Brandon Moore - Alan did a presentation on spaghetti code and how to help organize the our code to where we are going.
 
 


Uploaded Media/Content & Other Files (2)
Media Name   File Type Date Description
meeting_with_alan_10-10-19.mp4   Video 10/10/2019 After the meeting, Russell, Alan, and Dustin went on and did some more training and concepting. This is the Zoom session recording from there meeting. Just here as a reference.
alan_talking_about_spaghetti_code.mp4   Video 10/10/2019 This is a video recording of our training session this morning. Alan was presenting on how to recognize and avoid what is called spaghetti code or code that is not setup for reuse and organization.

Those at the meeting were: Alan, Steve, Brandon, Dustin, Wayne, Eric, Russell, Bryan, and Josh.


Notes:

Alan did a small training session on getting away from spaghetti code. - see attached for the video recording.

- Spaghetti code may be quicker at the time, but it can come back to haunt you. If you have lots of duplicate code that needs to be updated, you just made it harder on the maintenance side of things. It comes down to reuse, efficiency, layers (MVC - model, view, controller), and built-in intelligence.

- The intelligence is not in the page... it becomes a layer of abstraction (aka separation of data, logic, and visual pieces).

- In an MVC model, here are some of the pieces. The View is just the display (UI or user interface objects) - no real logic here. Just do or show this. The Controller is the underlying logic that is virtually the engine and/or the brains. This element does all of the logic and operations. It doesn't know where the data comes from, it just knows what to do with it. The Model is basically the backend data. There have been multiple conversations that talk about the view-model, the controller-model, etc. Basically, different ways to pull in the data and divide and conquer.

- Wayne Andersen has been trying to help us to head in that direction, meaning more of an MVC type model.

- Inside of adilas, we use a lot of CFC's (ColdFusion components) as a controller and/or a controller-model. We are seeing a need to break these CFC's into smaller parts and pieces.

- Alan was talking about our CFC's and how we are trying to break them up - we are starting to break things in DAO's (data access object). These could be things such as invoiceDAO, bankDAO, customerDAO, depositDAO, etc. Basically, a DAO for each topic and/or section.

- The guys would like to use existing functions, but right now, they are somewhat spread all over the system. So, they tend to re-write a new function and/or try to tweak an existing one to do everything that they needed, even though that same CFC or method may also be used in other places. It starts to create some non-efficiencies in some ways. Also, because the CFC's are somewhat spread all over, the guys may not know where to go to look for either existing pieces and/or where to put the new code. The result is, you start getting some light spaghetti coding.

- Talking about objects, classes, inheritance and how that works with code.

- Organizing things into smart objects - using methods such as create, update, remove, find by id, find all, find custom, etc. This gets into getters and setters and making the data access objects smaller and more usable. They were talking about using lists, arrays, and structs to do database queries vs writing out queries line by line. Basically, if we create methods and/or functions, then they (those new objects and their methods) start doing all of the other query operations.

- Going back to DAO's inside of adilas. Alan started talking about services. These are basically the wrapper logic that talks to DAO. For example, invoice service deals with the invoice DAO, the deposit service deals with the deposit DAO, etc.

- We talked about the existing CFC's inside of adilas. Originally they were setup in things such as assets, liabilities, maintenance, management, reports, requests, searches, security, etc. We then added numbers to those as they got bigger and bigger. For example: we have search_1 through search_15 with tons of different methods in each section. They all belong there, they just aren't very searchable. We have assets 1-13, cart 1-4, liabilities 1-7, maintenance 1 -14, etc. It is categorized, but it was setup a little bit too broad. It would be so much better if we had an invoice service that showed all methods dealing with invoices. Those invoice services would interact with the invoice DAO's. Then, if you wanted to look-up what has already been done with invoices, you would know where to go and what to do.

- Classes and classification - classes and sub classes (going from broad to more specific to even more specific or a subset within that classification set or sub set). They were talking about a sample of dogs... all dogs bark, all dogs walk, all dogs run. However, each type of dog has a slightly different bark, speed, color, size, etc. Each individual within those classes and sub classes have specific data that is tied to them. For example: Sally, the German Shepherd is going to be different than Billy the beagle. They were talking about objects, instances, etc.

- We are going to be doing more and more training as we go forward.

After the meeting, Alan, Dustin, and Russell jumped on a Zoom meeting to talk about some other options. See attached for that video as well, if you are interested. Great meeting and I think that the guys enjoyed it.