Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take 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
5 votes
2 answers
181 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 ...
user avatar
1 vote
1 answer
40 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 ...
user avatar
1 vote
1 answer
117 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 ...
user avatar
  • 299
2 votes
2 answers
264 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 ...
user avatar
0 votes
1 answer
23 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 ...
user avatar
  • 300
0 votes
2 answers
50 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 ...
user avatar
2 votes
1 answer
116 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 ...
user avatar
1 vote
1 answer
1k 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 (...
user avatar
0 votes
1 answer
36 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 ...
user avatar
  • 111
1 vote
1 answer
36 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 ...
user avatar
0 votes
2 answers
95 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 ...
user avatar
-3 votes
1 answer
78 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 ...
user avatar
  • 1
4 votes
4 answers
803 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 ...
user avatar
1 vote
1 answer
125 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 ...
user avatar
1 vote
1 answer
63 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 ...
user avatar
2 votes
2 answers
127 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 ...
user avatar
23 votes
3 answers
6k 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 ...
user avatar
1 vote
0 answers
22 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 ...
user avatar
  • 169
-4 votes
1 answer
687 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 ...
user avatar
1 vote
0 answers
44 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 ...
user avatar
  • 334
0 votes
1 answer
83 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 ...
user avatar
  • 109
1 vote
1 answer
62 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 ...
user avatar
  • 197
2 votes
2 answers
145 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 ...
user avatar
  • 677
1 vote
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 ...
user avatar
2 votes
1 answer
74 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://...
user avatar
0 votes
1 answer
201 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, ...
user avatar
  • 534
0 votes
1 answer
2k 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 ...
user avatar
1 vote
0 answers
1k 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 ...
user avatar
1 vote
1 answer
367 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....
user avatar
  • 2,424
3 votes
1 answer
102 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 ...
user avatar
2 votes
1 answer
969 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 ...
user avatar
0 votes
1 answer
121 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 ...
user avatar
  • 339
1 vote
1 answer
174 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/...
user avatar
  • 141
3 votes
3 answers
1k 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 ...
user avatar
  • 689
3 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 ...
user avatar
  • 477
-1 votes
2 answers
67 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 ...
user avatar
  • 9
0 votes
1 answer
268 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 ...
user avatar
  • 4,761
0 votes
1 answer
660 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 ...
user avatar
  • 123
0 votes
3 answers
771 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 ...
user avatar
  • 3,357
-1 votes
6 answers
4k views

C++ namespace name isolation

It's been considered for a reason, that using for namespaces/names is side-effect-prone, and generally, fully qualified names should be preferred. I've come up with an approach on that, which I ...
user avatar
1 vote
2 answers
486 views

What is the name of the interface-implementation pattern applied to modularisation?

At work we have a project where we're pushing pieces of the monolith into modules. (A java project making smaller maven modules that we pull in via maven dependencies). The pattern we're using pushes ...
user avatar
  • 4,761
1 vote
1 answer
446 views

Perfect video processing pipeline?

I'm working on a modular video processing pipeline. It's currently presented as a tree of modules. Each module has a set of "results" and can dynamically request data results from other modules. Each ...
user avatar
  • 127
1 vote
1 answer
74 views

KPI Module structure

My plan's to develop a module for easy customer KPI handling across projects. It should consist of a small SDK to put 2-3 lines of code in the project, a "template"/model for a SQL table (code first ...
user avatar
  • 111
2 votes
1 answer
73 views

Convention where to place unexportable functions

For the example's sake let's say there is a given file math.js. Think of it as a module containing many reusable functions. The content of file is: export function area(shape) { normalize(shape) ...
user avatar
28 votes
2 answers
66k views

Classes vs. modules in Python

Python has many modules (such as re) that perform a specific set of actions. You can call the functions of this module and get results, and the module as a whole has an idea behind it (in this case, ...
user avatar
  • 657
1 vote
1 answer
823 views

Class vs Module - When classes are needed to be in module?

I am developing an application that has a lot of options like local database CRUD operations, file IO, web APIs calling, notifications, user preference settings, services, widgets etc. At start it ...
user avatar
  • 153
1 vote
0 answers
83 views

SonarQube Recommends Unsynchronized Class

I adopt a software architecture where I have one single data access in the persistence layer. Indeed, the persistence layer is a mere java application (JAR file) that I consider as an dependency, ...
user avatar
0 votes
2 answers
110 views

Ensure correct execution order in a plugin/module architecture

Imagine a simple module-based architecture, there is the Core system that contains an array of random values. It's possible to create modules/plugins that will interact with this array. Plugin A ...
user avatar
  • 103
3 votes
1 answer
1k views

What is the difference between Applicative and Generative Modules, and Type Classes?

Reading the comments to this blog post made me realize I don't know much about some really interesting functional mechanisms between languages like Haskell, OCaml and Standard ML. I'd love a high-...
user avatar
1 vote
0 answers
514 views

How to Make Reusable Classes/Package in Laravel for Billing which uses PaymentExpress?

I am working on a Laravel Project where we are Payment Express. What currently we are doing is that we have Payment Express Class with static function (Not a single property) like given below: Class ...
user avatar
  • 137