Questions tagged [modularity]

Modularity describes the degree to which a system’s components may be separated and recombined. It refers to both the tightness of coupling between components, and the degree to which the “rules” of the system architecture enable (or prohibit) the mixing and matching of components.

Modular programming is a software design technique that increases the extent to which software is composed of separate, interchangeable components. This is done by breaking down program functions into modules, each of which accomplishes one function and contains everything necessary to accomplish this.

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

http://en.wikipedia.org/wiki/Modularity

http://en.wikipedia.org/wiki/Modular_programming

729 questions
3
votes
1 answer

Modularity calculation for weighted graphs in igraph

I used the fastgreedy algorithm in igraph for my community detection in a weighted, undirected graph. Afterwards I wanted to have a look at the modularity and I got different values for different methods and I am wondering why. I included a short…
Gilean0709
  • 1,098
  • 6
  • 17
3
votes
3 answers

How to extend or isolate a constant value in AngularJS when using modules?

To keep my code clean I'm in the habit of defining url's as constants in my AngularJs applications, looking like: var myApp = angular.module('myApp', ['myModule']); myApp.constant('URL', { google: 'http://www.google.com', facebook:…
Bas Slagter
  • 9,831
  • 7
  • 47
  • 78
3
votes
2 answers

Modular android project - how?

My scenario I have to implement a "modular" android app. There is a core module from which I should be able to invoke other modules. Each module provides a different feature to the user. Imagine I am making a city guide, then one module may contain…
Antiohia
  • 1,142
  • 13
  • 37
3
votes
1 answer

Network Modularity Optimisation in Prolog

I am looking at network modularity optimisation in prolog. I want to maximise Q where Q is the sum of the module scores for each module. A Module score is the number of edges in a module (Lm) divided by the number of edges in the network (L) minus…
user27815
  • 4,767
  • 14
  • 28
3
votes
3 answers

Dynamically Loading External Modules in a C Program?

I'm sure this problem has been solved before and I'm curious how its done. I have code in which, when run, I want to scan the contents of a directory and load in functionality. Specifically, I am working with a scripting engine that I want to be…
dave mankoff
  • 17,379
  • 7
  • 50
  • 64
3
votes
1 answer

the correct use and interpretation of `modularity()`

In the igraph ?modularity section there is example code given as g <- graph.full(5) %du% graph.full(5) %du% graph.full(5) g <- add.edges(g, c(1,6, 1,11, 6, 11)) wtc <- walktrap.community(g) modularity(wtc) #[1] 0.5757575 modularity(g,…
user1320502
  • 2,510
  • 5
  • 28
  • 46
3
votes
0 answers

Gradle: How can I access files from one subproject in another subproject via configuration?

I have a gradle build with many subprojects. One subproject generates a WAR and needs to include xhtml files from ui-module subprojects that will be included in the WAR. At the moment I search for the ui-modules programatically and copy the files.…
zilluss
  • 41
  • 2
3
votes
1 answer

Best PHP modular framework?

I am using CodeIgniter to develop my projects. Now I'm thinking to move from MVC to HMVC (modular architecture). I don't want to use the CodeIgniter HMVC extension as it is not very famous. I want to learn a new Modular MVC framework. These are my…
stackflow
  • 2,112
  • 6
  • 32
  • 45
3
votes
2 answers

web2py: How can I execute code before calling the controllers?

In web2py, is there a way to have a piece of common code be executed before all controllers are called? For example, I want to add some code that will log client IPs to a log of requests to enable analysis. I could simply make the first line of…
srmark
  • 7,942
  • 13
  • 63
  • 74
3
votes
2 answers

modular development with rails

I am developping a multi-server web application and I am wondering what are in ruby/rails the best practices concerning modularity. Basically I am looking for the best way to share my ActiveRecord models from the rails application up to my…
Erick
  • 5,969
  • 10
  • 42
  • 61
3
votes
1 answer

How to write modular network code?

I have an assignment in which I have to implement a few network protocols. The assignment includes communication over ideal connections (that do not lose or corrupt data) and connections that do corrupt the data. I would like to make this as modular…
Paul Manta
  • 30,618
  • 31
  • 128
  • 208
3
votes
1 answer

Modularity in Android application

I'm developing Android application in which complexity and features are increasing. Since I'm new I android develop (object programming in general) I need some methods for building modular android application in order to reduce the effort required…
GVillani82
  • 17,196
  • 30
  • 105
  • 172
3
votes
1 answer

Error when apply 'apply' function to 'modularity' function

Today I fail to apply apply function to modularity function, where the latter function is in the 'igraph' package. Followings are the codes and results" > library(igraph) > g = graph.full(2) > modularity(g, 1:2) [1] -0.5 > apply(FUN = modularity,…
alan gao
  • 51
  • 1
3
votes
4 answers

Can I store a logical comparison in a string?

I am trying to modularise a lengthy if..else function. $condition = "$a < $b"; if($condition) { $c++; } Is there any way of translating the literal string into a logical expression?
3
votes
3 answers

How do I protect my Python codebase so that guests can't see certain modules but so it still works?

We're starting a new project in Python with a few proprietary algorithms and sensitive bits of logic that we'd like to keep private. We also will have a few outsiders (select members of the public) working on the code. We cannot grant the outsiders…
a paid nerd
  • 30,702
  • 30
  • 134
  • 179