modularity

How to decompose a system into modules?

感情迁移 提交于 2019-12-12 07:38:17
问题 The effectiveness of a "modularization" is dependent upon the criteria used in dividing the system into modules. What I want is, suggest some criteria which can be used in decomposing a system into modules. 回答1: Cohesion: the functionality in a module is related. Low coupling: you have minimum dependencies between modules. Coordinated lifecycle: changes to functionality within a module tends to occur at the same time. Usually a consequence of high cohesion. 回答2: I think the Single

How to run a progress bar (that gets % increments every x seconds) in parallel to an ajax call?

僤鯓⒐⒋嵵緔 提交于 2019-12-11 16:33:51
问题 This is part of my object: const qwData = { // Initialize functions init: function() { this.cacheDom(); this.bindEvents(); }, // Cache vars cacheDom: function() { this.dataDisplayed = false; this.countUsers = <?php echo $_SESSION['all_users_count_real']; ?>; this.$form = $('#frm_reportit'); this.start_date = this.$form[0][9].value; this.end_date = this.$form[0][10].value; this.dateCount = this.countDays(this.start_date, this.end_date); this.show = document.querySelector('#btn-show'); this

use of D.Knuth pseudo-random generator

孤街浪徒 提交于 2019-12-11 13:58:03
问题 I need to write a physical simulation software, and I need to use the pseudo-random generator written by D.Knuth, cause it best fits my needs. Though I know how to use it within a hard block of code (a mere #include "rng-double.c"), I can't quite understand how to include it in a modular program where it is needed both within the main and inside some libraries that I then link back into the main through header files. The only functions that I need are ranf_start(seed) to seed the generator

using Fail-fast approach when developing modular applications

孤街醉人 提交于 2019-12-11 07:56:40
问题 When developing modular applications is it quiet obvious that we need to use Fail-fast systems? When creating modules if there is an error condition the module cannot handle, it should report the error(like throw an exception..)without worrying who will handle it. It looks like this can be used as a guideline when developing modules. Is there any issues with this? Edit :Example In module.dll public class SomeClass:ISomeInterface { public void CreateFile(string filename) { //The module have no

Using knitr to produce complex dynamic documents

放肆的年华 提交于 2019-12-11 03:48:52
问题 The minimal reproducible example (RE) below is my attempt to figure out how can I use knitr for generating complex dynamic documents , where "complex" here refers not to the document's elements and their layout, but to non-linear logic of the underlying R code chunks. While the provided RE and its results show that a solution , based on such approach might work well, I would like to know : 1) is this a correct approach of using knitr for such situations; 2) are there any optimizations that

Can Prism be modular when calling webservices?

瘦欲@ 提交于 2019-12-11 02:34:32
问题 I am playing around creating a demo prism application. The application I have has a shell project and another module that has a prism service and a view (and a view-model). (mostly based off of Mike Taulty's videos, but in WPF rather than silverlight). I setup the prism-service to call my web service. It seemed all setup right, but when I call this code: MyServiceReferenceClient myServiceReferenceClient = new MyServiceReferenceClient(); I got this error: Could not find default endpoint

Webpack / ES6: how to import stylesheets

霸气de小男生 提交于 2019-12-10 14:37:37
问题 I see repositories like bootstrap starting to include additional tags in their package.json file such as 'style' and 'less.' How can I use these tags to import assets? package.json { "name": "bootstrap", "style": "dist/css/bootstrap.css", "sass": "scss/bootstrap.scss", "main": "./dist/js/npm" } I am using ES6 modules and webpack. I want to do be able to import my stylesheets using the style tag in package.json. Currently I am doing something like this: my_stylesheets.less @import "~bootstrap

Grails solution for OSGI-like live modularity?

纵饮孤独 提交于 2019-12-10 12:07:35
问题 I'm working on a grails based multipurpose billing system which offers different kinds of payment gateways, server modules and notifications modules to it's users. Currently all modules are implemented as grails services bundled with the app, but I'd like to let people create their own modules, but without having to share my source code with them. So basically I need some grails application aware (I want to be able to work with grails domains and other grails specific objects in an injected

Modular android project - how?

安稳与你 提交于 2019-12-10 09:42:14
问题 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 a map with POIs, another one an event calendar and a third one pre-defined city guides. The modules contain views to be loaded in activities of the core module (like dashboards where each module puts its item/picture). They also contain activities

Is there a way to modularize a JavaFX application?

爷,独闯天下 提交于 2019-12-09 13:16:15
问题 I've started toying with JavaFX 2 and I really like the ease with which one can create a UI with FXML. However, once you get past the basic examples and you need a UI with many windows, it seems illogical to have the definition for the whole application's UI in a single FXML file. Is it possible to write separate components in separate FXML files and then include them as needed? Say for example that I wanted a window to popup when the user clicks on an item from the main menu; could I write