Python Forum
OOP and module approaches in a simple app monitoring list of servers
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
OOP and module approaches in a simple app monitoring list of servers
#1
Hi there,

I have a simple web app (python & flask) which shows a list of Oracle databases as a list, from where we can open a page with details about individual database. Part of the information is entered manually ("owner", "comment"), some info is retrieved from the database by SQL (say "database name", "number of sessions"). The databases are periodically checked to get that info.
The list of the databases is stored in a separated Oracle database.
Let's consider there are just two pages a page with the list of databases, there is a page of individual database info which is also used to enter a new database.

You can imagine it as a very simple app monitoring a list of servers stored in a database showing their statuses and some additional info. In my case the servers are Oracle databases.

The app is done, but I am wondering how you would design it structure.

1. How would you organize this project as modules?
2. How would you organize this project in terms of OOP? I can see classes "database", "monitor", but not sure should be there class DatabaseList, should factory pattern be applied, etc
Reply
#2
This sounds like an interview question, lol.

(Oct-31-2019, 08:10 PM)hjzxxzjcz Wrote: I can see classes "database", "monitor", but not sure should be there class DatabaseList
What benefit would you get from having a DatabaseList class, that you wouldn't also get from a list of databases? If you can't answer that, then you shouldn't make one.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Monitoring a Directory for new mkv and mp4 Files lastyle 3 1,627 May-07-2023, 12:33 PM
Last Post: deanhystad
  how to manage crypto trading flooding data from exchange servers Mikeardy 0 1,233 Dec-26-2021, 08:31 PM
Last Post: Mikeardy
  Improves performance on socket multi-threaded servers for object detection pennant 1 1,896 Aug-31-2021, 08:43 AM
Last Post: Larz60+
  monitoring the temperature of the CPU with Python apollo 2 8,718 Apr-13-2021, 05:39 PM
Last Post: apollo
  IoT Air Monitoring System project_science 0 1,929 Mar-26-2021, 08:14 PM
Last Post: project_science
  Help with applying this instrument monitoring code to multiple inputs. Kid_Meier 1 2,091 Mar-04-2020, 12:01 PM
Last Post: Kid_Meier
  Cannot import list from another module? t4keheart 1 2,271 Feb-17-2020, 10:25 PM
Last Post: t4keheart
  Creating a List with many variables in a simple way donnertrud 1 2,033 Jan-11-2020, 03:00 PM
Last Post: Clunk_Head
  2 approaches to start webscrapping - question zarize 2 1,812 Nov-27-2019, 02:06 PM
Last Post: zarize
  Create a directory structure across many servers metro17 1 1,745 Nov-05-2019, 03:35 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020