The Motley Fool Discussion Boards

Previous Page

Investing/Strategies / New Paradigm Investing

URL:  https://boards.fool.com/the-captain39s-ark-is-classy-34768939.aspx

Subject:  The Captain's ARK is Classy! Date:  3/4/2021  9:40 AM
Author:  captainccs Number:  117389 of 118078

By that I mean OOP but Classy is classier! 😇

My latest php framework is object oriented but since I was writing apps for a single user (me) I didn't have to think about a "User" class. That's what I've been coding these past two days, better than worrying about the market meltdown. ;)

Once you have a User class that carries its own data you no longer need relational databases to store the data, instead I'll have a single User database table that stores the User "objects" simplifying the database aspect of the app. For now the User class only saves and gets the users' data and the next step is to link it up with all the other classes like WhiteList and BlackList.

Getting there!

They say that we have two halves of the brain that work differently. In programming there is structure and process. I'm good at setting up structures but very often process or procedures just give me a headache. The guy who invented OOP later said that it was a poor name because OOP was not about objets but about message passing. Objects are structure while message passing is process! My OOP code most certainly is about objects and I limit message passing to the absolute minimum. Each object has to know where to find and get that data it needs. Further, each method or procedure has to know where to find and get that data it needs. Similar to GET and PUT I use "input" arrays where most of the data resides as a central repository. This is trading process for structure and eliminates message passing.

If the above is gibberish, don't worry about it. The computer gets it and that's what counts. 😇

The Captain
Copyright 1996-2021 trademark and the "Fool" logo is a trademark of The Motley Fool, Inc. Contact Us