Architectural Patterns implementation by using notification handler module prototype

Overview

Architectural Patterns implementation by using notification handler module prototype

Patterns Covered in this code
  • Adapter
  • Indirection
  • Singleton
  • Factory
  • Mediator
About the code

This project implements the required patterns in required scenario by fetching the dummy data from the database.

The required patterns are implemented based on the scenario of sending notification alerts to the different users based on the preference of the method of receiving the notification tols by the users.

Student and teacher classes are controlled by the by respective controller classes and then notification mediator and other classes handles other things.

Restrictions about the code

Currently, only the teacher can send notification to the students and this process uses only semester number which is shared by both the students and the teachers. Meaning that a will currently teach only a specific semester. You can add data dummy data in the sqlite database file directly by using any editor that supports the functionality.

About Error Handling of the Code

As this code will be later plugged into other code so the error handling is done by raising Exception() class exception. Later these exceptions can be replaced by the respective classes.

How to run this code
  • The driver class for this code is teacher_controller.py

  • This code requires some configurations to run, so they need to be added correctly in config.json our code provides a sample file with the sample required values named as config_sample.json

  • You need to do the above step according to the values in the database but sample config file currently contains correct data according to current database file and for now the db file name can only be changed by changing code file

  • This code can be run in two ways. First by python >= 3 (needs to be installed) by using following command in the same directory as the code

    python ./teacher_controller.py

  • The other way this code can be run is by using the docker install by clicking on it if not

  • First build the image by using following command in the same directory as code

    docker build . [IMAGE_NAME]

    Replace image name with any name you like but convention is using [DOCKER_ID]/[IMAGE_NAME]

  • The docker image will use docker volume to mount all the to the docker container, so you do not have to rebuild the image every time.

  • While staying in the same folder as the code run

    Windows

    docker run -v ${PWD}:/patterns [IMAGE_NAME]

    replace the [IMAGE_NAME] with your built image name

    Linux/Mac

    docker run -v "$(pwd)":/patterns [IMAGE_NAME]

  • If you need to change id or message then just run docker run app again as told in above point

Owner
Muhammad Umair
Muhammad Umair
Flames Calculater App used to calculate flames status between two names created using python's Flask web framework.

Flames Finder Web App Flames Calculater App used to calculate flames status between two names created using python's Flask web framework. First, App g

Siva Prakash 4 Jan 02, 2022
Load, explore and analyse data from Scotland and rest of the world related to Covid19.

Streamlit Examples This is my first attempt with Streamlit. It is an open-source framework, free, Python-based and easy to use tool to build and deplo

Eyad Elyan 12 Mar 01, 2021
Data Poisoning based on Adversarial Attacks using Non-Robust Features

Data Poisoning based on Adversarial Attacks using Non-Robust Features Usage python main.py [-h] [--gpu | -g GPU] [--eps |-e EPSILON] [--pert | -p PER

Jonathan E. 1 Nov 02, 2021
Anonfiles files leaker via keyword.

Anonfiles files leaker via keyword

Trac3D1y 6 Nov 23, 2022
A platform for developers 👩‍💻 who wants to share their programs and projects.

Fest-Practice-2021 This project is excluded from Hacktoberfest 2021. Please use this as a testing repo/project. A platform for developers 👩‍💻 who wa

Mayank Choudhary 40 Nov 07, 2022
Have an idea for a Python package? Register the name on PyPI 💡

Register Package Names on PyPI Have an idea for a Python package? Thought of a great name? Register it on PyPI, before someone else does! A tool that

Alex Ioannides 1 Jul 15, 2022
Mommas-cookbook - A Repository About Mom's Recipes

Mommas Cookbook A Repository for Mom's Recipes Contents bacalhau à Gomes de Sá Beef-Rendang bacalhau à Gomes de Sá, recommended by @s0undt3ch One of t

1 Jan 08, 2022
A system for assigning and grading notebooks

nbgrader Linux: Windows: Forum: Coverage: Cite: A system for assigning and grading Jupyter notebooks. Documentation can be found on Read the Docs. Hig

Project Jupyter 1.2k Dec 26, 2022
Customisable coding font with alternates, ligatures and contextual positioning

Guide Ligature Support Links Log License Guide Live Preview + Download larsenwork.com/monoid Install Quit your editor/program. Unzip and open the fold

Andreas Larsen 7.6k Dec 30, 2022
An easy way to access the Scratch API!

The majority of people are likely here because they want to easily access the Scratch API!

rgantzos 0 May 04, 2022
A webdav demo using a virtual filesystem that serves a random status of whether a cat in a box is dead or alive.

A webdav demo using a virtual filesystem that serves a random status of whether a cat in a box is dead or alive.

Marshall Conover 2 Jan 12, 2022
Hspice-Wave-Generator is a tool used to quickly generate stimuli souces of hspice format

Hspice-Wave-Generator is a tool used to quickly generate stimuli souces of hspice format. All the stimuli sources are based on `pwl` function of HSPICE and the specific complex operations of writing

3 Aug 02, 2022
🤖🧭Creates google-like navigation menu using python-telegram-bot wrapper

python telegram bot menu pagination Makes a google style pagination line for a list of items. In other words it builds a menu for navigation if you ha

Sergey Smirnov 9 Nov 27, 2022
Script to calculate the italian fiscal code of a person.

fiscal_code Hi! This is my first public repository, so please be kind if it is not well formatted or it contains errors. I started learning Python abo

FrancescoDiMuro 1 Nov 20, 2021
A collection of resources on neural rendering.

awesome neural rendering A collection of resources on neural rendering. Contributing If you think I have missed out on something (or) have any suggest

1.8k Dec 30, 2022
2021华为软件精英挑战赛 程序输出分析器

AutoGrader 0.2.0更新:加入资源分配溢出检测,如果发生资源溢出会输出溢出发生的位置。 如果通过检测,会显示通过符号 如果没有通过检测,会显示警告,并输出溢出发生的位置和操作

54 Aug 14, 2022
Request ID propagation for ASGI apps

ASGI Correlation ID middleware Middleware for loading and receiving correlation IDs from request HTTP headers, and making them available in applicatio

snok 170 Jan 02, 2023
A collection of full-stack resources for programmers.

A collection of full-stack resources for programmers.

Charles-Axel Dein 22.3k Dec 30, 2022
A curses based mpd client with basic functionality and album art.

Miniplayer A curses based mpd client with basic functionality and album art. After installation, the player can be opened from the terminal with minip

Tristan Ferrua 102 Dec 24, 2022
The official FOSSCOMM 2021 CTF by [email protected]

FOSSCOMM 2021 CTF Table of Contents General Info FAQ General Info Purpose: This CTF is a collaboration between the FOSSCOMM conference and the Machina 2 Nov 14, 2021