Questions tagged [modular-design]

Modular programming (also called "top-down design" and "stepwise refinement") is a software design technique that emphasizes separating the functionality of a program into independent, interchangeable modules, such that each contains everything necessary to execute only one aspect of the desired functionality.

Modular programming (also called "top-down design" and "stepwise refinement") is a software design technique that emphasizes separating the functionality of a program into independent, interchangeable modules, such that each contains everything necessary to execute only one aspect of the desired functionality.

Conceptually, modules represent a separation of concerns, and improve maintainability by enforcing logical boundaries between components.

Modules are typically incorporated into the program through interfaces.

A module interface expresses the elements that are provided and required by the module. The elements defined in the interface are detectable by other modules.

The implementation contains the working code that corresponds to the elements declared in the interface.

Source: Wikipedia

116 questions
1
vote
2 answers

Object instance type checking from another file

I have modularized my python code into three files. File1.py has a class definition with its methods and attributes defined inside of the class. File2.py serves as a layer between the input that comes to the program and then calls the methods and…
1
vote
0 answers

How do I know when to stop modularizing my code?

I'm not so sure if this is an important thing to worry about, but I want to develop good practices while I am still learning programming and, if possible, attenuate doubt. And learn a little bit of theory, too, while I am at it, I…
eg3
  • 25
  • 2
  • 6
1
vote
0 answers

Encountering "There is more than one bundle with the CFBundleIdentifier value" while trying to upload

I'm unable to publish my app. I've been building this modular project for a while now, and it was working perfectly. Until I had to publish it. Every time I try to upload it to the AppStore, It says upload failed with the following errors: ERROR…
Mario Mouris
  • 317
  • 1
  • 12
1
vote
1 answer

Cyclic dependencies and modular design

I’ve been dealing with a design problem for quite a while now, where cyclic dependencies are the fundamental problem, and I’m having some problems resolving it elegantly. I’m coming from C, where cyclic dependencies are both possible and quite…
Leandros
  • 16,805
  • 9
  • 69
  • 108
1
vote
4 answers

Modular (plug-in like) desktop application

I gonna make a desktop application which can be added/removed modules by adding/removing dlls (each module handled by a dll) or via configuration file. My goal is having a application like eclipse ide, there will be some basic functions (eclipse…
Tu Tran
  • 1,957
  • 1
  • 27
  • 50
1
vote
1 answer

TensorFlow: Loss function modular design

I would like to have a few loss functions, e.g.: def loss_equation(x, a, b): """L2 loss for matrix equation `a=bx`.""" a_test = tf.matmul(x, b) return tf.reduce_sum(tf.square(a-a_test)) def loss_regular(x): …
1
vote
2 answers

How to avoid php parsing the whole php file and includes and make it only parse what will be used?

I read somewhere that php parses the whole .php file every time it is executed. Some solution was proposed in there (that was not opcache), but I lost the website and I couldn't find it. Now I have an enormous php website that has many long…
algo
  • 108
  • 1
  • 11
1
vote
1 answer

In C++ modular programming, how do you assemble the .cpp and .h files?

I am currently working on a large project for school that is divided into 6 Milestones. In the first milestone, I am given the code to add into my files but I don't know how to assort them. What is the general convention to distribute code in…
Onur-Andros Ozbek
  • 2,998
  • 2
  • 29
  • 78
1
vote
1 answer

Modular JS: global functionality on 3 sections (checkboxes and radios) & Sholud I apply "rendering" in my code?

This is a section on my web app where a user can "subscribe" to a report sent in 3 different times: weekly, monthly, quarterly. (can choose 1 option from each of the three). I am struggling with both planning the best solution for this while…
Imnotapotato
  • 5,308
  • 13
  • 80
  • 147
1
vote
1 answer

Modular JS: Onclick checkbox => enable radio buttons for more options - What is the right way doing this using modular js?

This is my current code: https://jsfiddle.net/7fL6ocs9/1/ I have a 3 columns of radio buttons that should be enabled only by clicking the checkbox above them. What is the right way doing this using modular js? Selecting each checkbox separately in…
Imnotapotato
  • 5,308
  • 13
  • 80
  • 147
1
vote
0 answers

Angular 2 extension discovery

We have an Angular 2 app with a .NET backend. Both ends should support installation of additional external modules to be "installed". That is, an external module can provide: A new menu item A new screen New RESTful endpoints Some metadata, that…
Rok
  • 1,482
  • 3
  • 18
  • 37
1
vote
1 answer

BUG exported object won't change outside when modified

File A.js function Game() { this.id = Math.random(); this.endTimeout = setTimeout(() => { this.end(this); return }, this.duration * 60 * 1000); } Game.prototype.addPlayer = function(game, player, items) { console.log('addPlayer to…
needitohelp
  • 103
  • 2
  • 7
1
vote
1 answer

Why Orchard doesn't have model view controller?

I am working with orchard. writing such a project is my dream!.. so i started a research a bout that. which interested me about orchard, is while orchard is mvc project but why it doesn't have any model , view and controller in his web layer…
1
vote
1 answer

Inline templating does not work along with modularity?

I'm making a modular application: main.rb require "sinatra/namespace" require "haml" Dir.glob("servers/*/server.rb").each do |server| require_relative server end And I want to do inline templating: servers/some/server.rb namespace…
Nakilon
  • 34,866
  • 14
  • 107
  • 142
1
vote
1 answer

Modular cross project design / Create re-usable extensible base

Context: We're creating a new solution consisting of multiple app portals (for lack of a better term), each portal will need to leverage off of a base project that will already include some of my employed proprietary code, as well as any new…
Rohan Büchner
  • 5,333
  • 4
  • 62
  • 106