Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [modules]

The tag has no usage guidance.

0
votes
0answers
21 views

Golang Modules/vgo - local changes

We are trying to use Go-Modules We have reusable repo : "github/mycompany/funcs" many repo's use this, example : "github/mycompany/eCom/basket.go" A new ticket says : "basket should support export ...
0
votes
1answer
135 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....
2
votes
0answers
63 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 ...
1
vote
1answer
63 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 ...
0
votes
1answer
55 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 ...
1
vote
1answer
128 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/...
2
votes
3answers
250 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 ...
0
votes
0answers
43 views

Framework handling MVC web application's modules

I'm building a MVC framework for web application. The application will be composed of modules that can be developed separately. The AppKernel class (which is the entry point or the CompositionRoot) of ...
2
votes
2answers
839 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 ...
-1
votes
2answers
64 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 ...
0
votes
1answer
136 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 ...
0
votes
0answers
100 views

Best way to divide application logic form own company and clients

I work on an ruby-on-rails application for a company (The Company) providing services to another companies. Currently there are two kinds of users: employees of The Company and client-companies' users....
0
votes
1answer
286 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 ...
0
votes
3answers
170 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 ...
-3
votes
6answers
1k 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 ...
1
vote
2answers
70 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 ...
3
votes
0answers
230 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 ...
1
vote
1answer
63 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 ...
2
votes
1answer
71 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) ...
11
votes
1answer
22k 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, ...
0
votes
1answer
342 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 ...
0
votes
0answers
59 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, ...
0
votes
2answers
85 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 ...
0
votes
1answer
668 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-...
1
vote
0answers
342 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 ...
2
votes
2answers
134 views

When should I nest one module inside another?

Assume I'm working on a JavaScript application and make extensive use of the module pattern with one file per module. Now suppose I have two folders/modules: one for module A and another for module B. ...
17
votes
2answers
6k views

Why packages and modules are separate concepts in Java 9?

Java 9 will have modules in addition to packages. Usually languages have one or the other. And most programmers perceive two terms as synonyms. Modules are built on top of packages, treating them as ...
2
votes
1answer
88 views

Design patterns to limit cross module logic

I have a web application which has a shopping cart with cart items. The cart items are added to the user session, so must be serializable. I have a checkout class which takes the cart items and saves ...
7
votes
2answers
1k views

Is Module Pattern in JavaScript is useful only for singleton creation?

Some articles (JavaScript Module Pattern In Depth, Mastering The Module Pattern) describe defining modules in JavaScript like in the snippet below (from Addy Osmani's "Learning JavaScript Design ...
2
votes
1answer
836 views

How to structure big Node.JS modules

I am working on a rather big Node.JS project with several thousand lines of code. It's not a homepage, but acts more like a configurable general purpose application server. As such it brings some ...
9
votes
1answer
2k views

Convention to where to declare module.exports on Javascript files

Is there any convention to where we should declare the module.exports no Javascript/Node.js module files? Should it be in the beginning of the file like: module.exports = Foo; function Foo() { ...
2
votes
2answers
2k views

writing a controller file in Python

I need some advice on my idea to write a controller file in Python, and not like the C in MVC type controller but a more simpler idea. Just a Python script that controls the operation of some other ...
1
vote
1answer
847 views

Should I use autoloaders in modules?

Lets say I'm running a PHP app like Magento, PrestaShop. Now these system have their own complex autoloaders to load controllers based on routes, required classes, models, etc. Most of the time as a ...
1
vote
1answer
2k views

Should I automatically install needed modules?

I'm writing a program for my grandpa. Occasionally an update will require a new module that's not installed on his computer. I don't want to have to manually install new modules every time, but he's ...
3
votes
1answer
106 views

Are there any problems with defining a single-source “module” in C using conditional compilation to separate the “header” from “source”

I'm writing a project that I want to keep small in the sense of being very densely-coded and a single source file. But it's growing large enough that navigating the file is becoming tiresome, so I ...
0
votes
1answer
752 views

Setting up folders and importing modules in Python

I'm building an app to automate some processes that are annoying to do by hand (looking in a file, taking certain information out of a file, building another file with that information). My project ...
1
vote
1answer
989 views

Program design - how to improve it and how to avoid coupling (Python)?

In the Python program structure below there are two modules with functions. Problem description: Functions are used inside other functions all over the place. Strong coupling (dependency). For ...
1
vote
1answer
1k views

Python, namespace vs module with underscores

I'm developing a project that uses several independent modules, but all related to the same project. However, I face this choice: module names with underscore vs. namespaces. For example there is ...
4
votes
2answers
148 views

Does modular programming refer to modules or programs?

As far as I can tell, the main idea in modular programming is: program pieces that work well; complex behaviour results from piece_a and piece_b working together Though, I am not sure if it ...
1
vote
0answers
106 views

Modular application - dependency as separate module?

I have a modular application written in Java based on NetBeans Modules (those details probably aren't so important :-) ) and I'd like to add another module written in Clojure language. Clojure ...
2
votes
1answer
117 views

The meaning of 'fully traversable namespaces' in JavaScript

During research into architecture of single page applications, I came across the following resource by Mikito Takada, written around 2013: http://singlepageappbook.com/ In his introduction he ...
1
vote
2answers
1k views

How to make scalable modules in a div element

I'm interested in creating web modules that are encapsulated by a div element in a manner that, by simply resizing the div, everything in that div scales to the dimensions of that div proportionately (...
0
votes
1answer
862 views

Publish Modules from a Java Project on Github and integrate into IntelliJ [closed]

What is the best practice to work with several Java modules from different GitHub sources using IntelliJ? This might be an odd qeustion but I do not know what the standard workflow is to achieve what ...
1
vote
1answer
149 views

Ideal export in terms of size for asynchronous module definitions in JavaScript?

When creating AMD modules you can export whatever you like whether it be an object or a function. I vaguely recall reading a recommendation somewhere to export just one thing; the idea being "keep it ...
4
votes
2answers
3k views

PHP package management with/without Composer

I noticed that many (large) PHP applications use Composer for managing the dependencies. I'm currently trying to figure out if I should switch to Composer (at the moment I'm simply keeping my ...
5
votes
1answer
213 views

How to introduce Google Analytics code in a modular way?

We are working on a very large codebase. It's basically a web-based operating system, with its own file system and applications. The system's UIs are generated dynamically with Javascript. We've ...
3
votes
1answer
172 views

How to tell that a Javascript code already needs AMD (RequireJS, …)?

At some point code is complicated less if you introduce a new abstract than if you continue as it was. Some trigger should fire in a head of a programmer. Like, I was coding fine, but now I've added ...
0
votes
2answers
1k views

Is it a bad practice to keep database schema scripts (DDL) and manipulation (DML) scripts in different modules

we have a project structure like the following "module-shared" module depends on "module-database" module and some other modules depend on "module-shared" but no other module depends on "module-...
0
votes
2answers
1k views

Confused about javascript module pattern implementation

I have a class written on a project I'm working on that I've been told is using the module pattern, but it's doing things a little differently than the examples I've seen. It basically takes this form:...
3
votes
1answer
397 views

Is there a term for this coding practice?

One of the incidental complexities of introducing features to an existing system is that the programmer often has to touch several areas of code that are not immediately adjacent. Over the long haul ...