Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [modules]

Modules are independent software components that result from the decomposition of a larger software into more manageable pieces.

Filter by
Sorted by
Tagged with
0 votes
1 answer
81 views

Is it bad practice to export all the names from one module both as named exports and as a default export?

I like to export the names in my modules both as individual named exports and grouped together in a default export. Like this: // mod.js export function f() {} export const x = true export default {f,...
Blue Nebula's user avatar
5 votes
5 answers
2k views

How to think when grouping functionality into modules

What are some commonly used strategies when it comes to divide software into modules, other than there should not be any cyclic dependency between any modules? Some ways I think of Group everything ...
user877329's user avatar
2 votes
2 answers
145 views

How to develop a desktop software with components based on several different technologies

If I give a real example, I want to create a desktop software that includes: electron js app that communicates with react js using IPC channels. I need to communicate with software that only has a ...
Ali Shefaee's user avatar
0 votes
1 answer
298 views

What's the best way to import a python module in a python module without cluttering the modules namepace? [closed]

Let's say I am writing a python module module.py. Which provides functionalities for other parts of my code. Of course, the module has to import other modules. A simple example: import abc as _abc ...
HerpDerpington's user avatar
5 votes
1 answer
2k views

Does a programming language with ML-style modules need packages?

This is a clarification of a closed question. I've limited the scope as requested. First, a few definitions, following e.g. A modular module system. Consider any programming language with a selected ...
Corbin's user avatar
  • 146
0 votes
1 answer
255 views

Decoupling modules of a monolith

As part of an migration from .NET Framework to .NET Core we're looking to decouple elements of our monolith into more manageable modules. Ideally following a clean architecture/DDD/microservice ...
Andy Cox's user avatar
  • 103
0 votes
2 answers
101 views

Logical architecture based on modules and SPI

I'm looking for the most proper way to design a modular application with ServiceLoader. --MAIN IDEA-- module app.view | exports app.view.View interface that defines UI api module app.engine | exports ...
SmallDevice's user avatar
1 vote
0 answers
84 views

How to structure an ERP system in a modular way, with module hierarchy and where do application layers stand in this?

I built an asset management system (a web application) using C# ASP.NET in MVC structure. My project is built upon the ASP.NET Boilerplate template, which includes 5 layers by default. These layers ...
Emre Can Serteli's user avatar
0 votes
4 answers
259 views

Code for interface and the type erasure problem

As a design priciple I was taught: Programe para una interfaz, no para una implementación. Es decir, no se deben declarar las variables con el tipo de los herederos sino con el tipo de los supertipos....
EmmanuelMess's user avatar
2 votes
2 answers
322 views

Modularity vs pure functions

I often come across this dilemma in my own code and wondered if there is a term for this and if there is a single solution to it. Let me illustrate it with a pseudocode example of making a table from ...
deSKase's user avatar
  • 139
1 vote
2 answers
925 views

Modules Design and Communication Between Them

I'm trying to design a monolithic application following DDD and clean code. Lets say I have Users, User Types, Products, Product Types and Purchases. I want to implement using different modules. At ...
Amdguez's user avatar
  • 41
6 votes
2 answers
223 views

Why does CPython has both C and .python versions of modules?

The CPython implementation seems to have the same modules written both in C (e.g., datetime in .c) and also in .py for the same module (e.g., datetime in .py). My question is which version is used ...
multigoodverse's user avatar
2 votes
1 answer
1k views

How to integrate Androidx Paging-3 in Clean Architecture?

This blog on "Clean Architecture" describes how to build a modular Android application along with using Clean Architecture. In that example project, the author places the business logic in a ...
Sourav Kannantha B's user avatar
1 vote
1 answer
632 views

How to define vertical slice in a system whose horizontal slices are defined by Java modules?

For the project I'm working on I was thinking to create a Java Module for each layer of my system: servlet-presentation defines the implementation of the presentation layer. It is composed by Java ...
cidra's user avatar
  • 333
2 votes
2 answers
512 views

Design of a modular application

I'm developing an application (Java) in a modular architecture. I have two approaches in mind and I'm not sure which one will be "better code" in case of maintenance and conventions. I have ...
SmallDevice's user avatar
0 votes
1 answer
32 views

Modularized authentication providers for Spring application

At our company, we have multiple products which share authentication settings. In particular, we use Spring LDAP, but since our use case and configuration is more complex, we would like to use ...
JohnEye's user avatar
  • 300
0 votes
2 answers
205 views

How to version modules that depend on different framework versions

I work as a Website developer. We use a framework for building the backend of our sites. This framework recently released a new major version with lots of breaking changes. We have some sites using ...
Patrick Hollweck's user avatar
3 votes
1 answer
439 views

Shared library and modules with versioning

I have different versions of modules and they should all work together with the same shared library which could also have different versions like displayed in the image below: From a daily use ...
TomatenSalat's user avatar
1 vote
1 answer
3k views

What is the idiomatic way to split code between separate files in Rust?

Coming from the world of C#, where, despite sharing namespaces, it's quite common for every class to have its own file, I find that Rust codebases seem to have a complete different sort of philosophy (...
Brian Reading's user avatar
0 votes
1 answer
89 views

When and where should I start background services defined in DI modules

We use Dependency Injection extensively using the Ninject library in our .NET based products. Most of our code is neatly packaged in Ninject modules. Some of these modules contain background services ...
Wouter's user avatar
  • 111
1 vote
1 answer
43 views

CLI and Lib package, where to put module loading code

My Software contains a lib package, a cli package and an arbitrary number of plugin packages. The plugin packages do the algorithmic work. The lib package basically just executes the plugins and ...
danielr1996's user avatar
0 votes
2 answers
132 views

What's the pattern to share database to other module in security perspective?

In a large iOS application, I have a database module which is dedicated to handle application databases with read/write public APIs for other module. UI module has a feature to share the database, in ...
Sazzad Hissain Khan's user avatar
-3 votes
1 answer
536 views

What is the rule for making functions private in Python modules?

I was wondering what's the principle behind it, and whether I should treat all functions from module that are not used anywhere else at the time as private, and mark them with underscore prefix so ...
tikej's user avatar
  • 101
4 votes
4 answers
2k views

What is module in Software engineering context?

In Software engineering , I usually see that the word module when written it usually followed by a bracket (components, packages, classes … etc.) meaning that a module can be a class or a package or a ...
John adams's user avatar
1 vote
1 answer
218 views

Component based architectures in JS / PHP: what indicators suggest that a UI element ought to be written as an importable component?

N.B. Several months after initially asking this question (and not coming up with any satisfactory answers) I am now learning to use HTML Custom Elements / WebComponents. It seems the same question ...
Rounin's user avatar
  • 285
1 vote
1 answer
121 views

Tips for module naming and criteria for grouping files in a directory

It appeared, that I have in my pet project two abstractions: asset loaders and drawing tasks. For each abstraction I have some classes representing them (currently a single class for drawing task ...
Yaroslav Kishchenko's user avatar
2 votes
2 answers
464 views

How could I reuse common JS modules between several projects?

At my company, we are developing pretty simple React Native and sometimes mobile-only React apps. Most of them have some similar logic, such as 'sign-in by phone' flow, some payments stuff, etc., and ...
kuzkokov's user avatar
23 votes
3 answers
8k views

Why are module-specific prefixes widely used for function names in C modules?

In some C projects, function names start with a common prefix indicative of the module name, for example: mymodule_do_this_stuff(); mymodule_do_that_stuff(); Is there a justification for doing so ...
user6007354's user avatar
1 vote
0 answers
34 views

How to lay out a core java module with an Android GUI layer on top

How can I use Java modules in an Android app repository? In particular, what directory structure should I use? I have a project in mind for which I would like to have a GUI-independent core Java 9 ...
Anakhand's user avatar
  • 149
-3 votes
1 answer
1k views

What is informational cohesion?

I try to understand what cohesion means when designing modules. Myers states in his book "Composite structured design": An informational-strength module has the following definition: It ...
flexibleHammer's user avatar
1 vote
0 answers
68 views

How to organize an App composed of Features in Qt?

When developing a somewhat larger application, with 3-4 screens or so, what is the most common way to organise the code? I've read that organize-by-feature trumps organize-by-type, so I was ...
xtofl's user avatar
  • 334
0 votes
1 answer
404 views

How to set up import main module while developing a Python package

This is a matter of naming, structuring and conventions. I am developing a simple python package. in a directory "PKG" I have 3 files: __init__.py: # import the main module import PKG.main # in ...
maciek's user avatar
  • 109
1 vote
1 answer
98 views

Transpiling in npm modules

While recently creating a module for shared functionality between our projects I stumbled upon this question. Should the module be occupied with transpilation of code to older browsers that our ...
Leon's user avatar
  • 197
2 votes
2 answers
246 views

Separating namespaces from files in Python

I'm writing a Python library in which various objects are represented as Python classes. However, the user is not supposed to create instances of those classes directly. Instead, there are a set of ...
N. Virgo's user avatar
  • 894
2 votes
1 answer
2k views

Java package naming conventions (in maven modular project)

Until now I have been using simple strategy for packages naming in my maven-modular projects. Each package name contains name of the module in which it is placed. For example, simple project would ...
Norbert Dopjera's user avatar
2 votes
1 answer
84 views

Design Pattern to implement a settable JavaScript Module variable

I am writing a client to talk to a server API in JavaScript. I have an OOP background but am trying to embrace modern EcmaScript. So I started with this: customerApi.js: const baseUrl = "http://...
user210757's user avatar
0 votes
1 answer
276 views

What was the distinction between module interface files and module implementation files before Oberon?

I'm reading the book "The Go Programming Language" and this sentence in the preface section "The Origins of Go" has me puzzled: One major stream of influence comes from languages by Niklaus Wirth, ...
Wildcard's user avatar
  • 544
0 votes
1 answer
3k views

How to have parent and child modules in Maven that both package as jar files?

I have an unresolvable dependency issue in a Maven project; different pieces of code depend on different versions of dependency A (i.e. most code needs A:0.15; some needs A:0.18). Fortunately, the ...
kingledion's user avatar
1 vote
0 answers
2k views

Multi module Maven project or separate repositories?

Consider the following architecture: Application A Application B Commons-Util A and B share a lot of functionality. That's why we plan to extract the shared code into a commons library. I am aware ...
Adrian Krebs's user avatar
1 vote
1 answer
412 views

What is it that is so hard about ES6 modules for Node? [closed]

It seems like ES6 imports for Node have been a bugbear for a while. There is the --experimental-modules flag, or options like using Babel - but AFAIK ES6 modules still aren't supported in vanilla Node....
dwjohnston's user avatar
  • 2,563
3 votes
1 answer
109 views

Is there a recommended design/architecture when developing a JavaScript module?

Practicing some of the ES7 features, I started developing a class to perform some actions on the DOM and use the new features. I used Babel to make it work on the browser, and the code looks something ...
Alvaro Montoro's user avatar
2 votes
1 answer
1k views

Private/Hiding dependencies between Maven modules

Given three project modules X, Y and Z on a Maven based project, and Y depends of Z and X of Y and X should not know that Y depends of Z, being this: X -> Y Y -> Z X -X> Z What is the best way to ...
SEISCOOL's user avatar
0 votes
1 answer
175 views

Abstract data communication in modular design

I'm doing the analysis for a software which I've had in mind for a long time. Its purpose is to turn sound into an image, apply graphical transformations on it, and turn it back into sound to hear the ...
qreon's user avatar
  • 339
1 vote
1 answer
207 views

How to create a framework in Express.js

I'm trying to figure out how to create a Node.js/Express.js application that is a framework for hosting and running third-party code in my application, and what are the appropriate JavaScript/Node/...
jia103's user avatar
  • 141
3 votes
3 answers
2k views

Should I divide C++ program into multiple interacting applications?

We are discussing proposal to split a big C++ program into multiple separate executables that would communicated using shared memory. The shared data structures are large, so we do not want to use ...
h22's user avatar
  • 937
4 votes
2 answers
2k views

How does java 9 manage module versions?

I was going through a fantastic talk by Alex and nearly all the things he spoke made sense to me except for the given thing. Link In a nutshell how does module manage versions. If I have a module v1 ...
log N's user avatar
  • 487
-1 votes
2 answers
68 views

How do I let other developers integrate modules into my content generator?

Background: I'm building a desktop app where user ability to develop mods is critical. At its bare bones it is a content generator where the content has many layers, and users can develop their own ...
James's user avatar
  • 9
0 votes
1 answer
328 views

What is a good versioning strategy to achieve 'fail fast' with chains of dependent maven submodules?

My organisation modularised their monolith into maven modules in dependencies up to four deep. Originally we used the maven plugin to auto-increment the version numbers in the pom every time someone ...
hawkeye's user avatar
  • 4,829
0 votes
1 answer
743 views

Making an existing project modular

Context: I have recently joined a new company where they have a particular folder structure in the project where they have different modules in different folders in a single project. Each module ...
noob's user avatar
  • 123
0 votes
3 answers
906 views

Same JavaScript on different web pages

I have a web site with several web pages. Each page requires some JavaScript: i.e. different JavaScript for different pages, which some JavaScript that's common to every page. Some of the JavaScript ...
ChrisW's user avatar
  • 3,417