- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我试图在一个asp.net项目中实现模块化设计,将应用程序划分为不同的模块,如人力资源、库存管理系统等。由于我试图保持不同的模块彼此独立,所以我将这些模块分开每个模块都是一个单独的 Visual Studio 解决方案,具有 UI、BLL、DAL 甚至单独的数据库架构。
到目前为止,我认为这是开发管理系统和 ERP 的常见做法,但我在过去三天搜索网络,但几乎找不到任何有关开发模块化应用程序的完整帮助内容。我发现的大部分内容只是解释内聚和耦合概念的理论,而不是现实世界的场景。所以我想知道
热烈欢迎任何想法、链接。
最佳答案
这是个人观点,值得商榷。
I separated these modules in such a way that each module is a separate Visual studio solution having UI, BLL, DAL and even a separate database schema.
听起来完全是矫枉过正。过度抽象会让你的应用程序在维护、支持和增强方面遇到困难。您需要将模块分成单独的解决方案吗?有那么大吗?
Is it the right approach of separating modules?
不,我认为这完全是过度设计。我建议使用项目来分隔模块。而不是单独的解决方案。解决方案的问题在于它需要外部依赖管理工具,这需要花费大量的精力来引入和后期维护。
How the real world modular applications are developed?
使用抽象(接口(interface)和抽象类)和单独的项目。
How should the different modules communicate with each other yet they stay independent of each other.
通过使用接口(interface)、DI、IOC、TDD
I think there should be a core application which makes use of these modules, how should the core application communicate with these modules?
Core
不与模块通信。事实上,理想情况下它不应该依赖于任何其他项目/库。这使得在大型解决方案中引用和使用变得简单。
There is some data, entities , objects which are common to each module, should I put them in the core modules in order for other modules to use them (I think this will make the modules coupled to core) or should every modules maintain its own copy of data + define those object, (which I think voilates DRY)
我强烈建议使用 Core
项目的单个副本。请参阅this questions了解原因的详细信息。
关于asp.net - 模块化软件设计,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16316288/
每个人(希望)都在努力实现代码模块化。我想要做的是有 1 个主要的 Sass 文件,它导入我的所有模块,这些模块是局部的,如果需要,这些局部可以调用它们自己的局部组。我想要的是,不是在我的代码库中调用
如何在 xslt 转换中模块化一组重复的输出?例如,我有如下内容(伪代码)。 并
假设我有几个简单的模型驻留在 food.py 中: import peewee as pw db = pw.SqliteDatabase('food.db') class BaseModel(pw.M
我正在开始一个新的 Angular 项目并尝试模块化我的所有代码——我厌倦了拥有大量的 app.js 文件,而且因为我正在为一家公司开发一个平台,所以我的代码整洁且模块化以便于测试、清洁和易于过渡到
所以,有人告诉我,在 nodeJS 中传递 request 和或 response 变量是“不好的做法”。但这意味着你的大部分代码都必须在 server.js 文件中,这使得它变得困惑而且有点难看。
有一个想法:函数(在 FP 中)可以以与 OOP 中的组件类似的方式组成。对于 OOP 中的组件,我们使用接口(interface)。对于函数,我们可以使用委托(delegate)。目标是实现分解、模
有没有办法将 SQL 代码模块化,使其更具可读性和可测试性? 我的 SQL 代码经常变成一长串复杂的嵌套连接、内连接等,难以编写和调试。相比之下,在像 Javascript 或 Java 这样的过程语
我想知道大公司如何倾向于在他们的页面上模块化组件。 Facebook 就是一个很好的例子: There's a team working on Search that has its own CSS,
我正在寻找在 WPF 中构建模块化应用程序模型的解决方案。目前,我使用 Devexpress POCO MVVM 来构建我的 WPF 应用程序,但缺乏模块化的可扩展性,我正在寻找适合我当前设计并允许构
我制作了一个 Gradle 项目,它使用类加载器从子目录资源/文本中加载文本文件。此时它可以工作,但是当我将项目转换为模块化 JavaFX 程序时,相同的类加载器函数会给出 NullPointerEx
假设我有一个通用类模块: export class MyCalc { data = {} ... } 并说我想扩展更多功能: export class MyCalcLoader {
我的模板文件变得越来越大并且过于复杂(大约 200 行(长)代码,9 级缩进),因此它也变得容易出错。我正在寻找一个简单的解决方案,它可以让我轻松访问 $scope 变量和函数。 我的第一个想法是使用
许多人说要将外部 CSS 和 JavaScript 文件的数量保持在最低限度以减少往返时间。例如,Google 建议每个网站最多分别使用两个 CSS 和 JavaScript 文件。 问题是,作为“模
我试图找出为什么我的 Promise 链执行无序,尽管编写了一个非嵌套的 then 链。我的函数已经模块化,以减少链中发生的代码膨胀(我期望有五个 then 方法),并且我不确定这些模块中的某些内容是
关闭。这个问题是opinion-based 。目前不接受答案。 想要改进这个问题吗?更新问题,以便 editing this post 可以用事实和引文来回答它。 . 已关闭 8 年前。 Improv
我使用 create-react-app 创建了一个样板 React 应用程序。 现在,在我的 App.js 文件中 import classes from './App.css'; 我做到了
Java 模块系统是否应该阻止模块通过反射访问其他模块,而不声明正确的模块依赖关系? 例如,在编译这个 hello world Java 11 类时,它从另一个模块调用类,正如预期的那样,它不会编译,
关闭。这个问题需要更多focused .它目前不接受答案。 想改进这个问题吗? 更新问题,使其只关注一个问题 editing this post . 关闭 9 年前。 Improve this qu
我的应用程序上有许多不同的“控制元素”:下拉菜单、选项卡、菜单等。在同一页面上,有许多相同的控件。当编写 JavaScript 来处理与每个控件关联的不同事件时,我试图使我的代码尽可能干燥。挑战之一是
处理以下场景的模块化方式是什么:应用程序具有所有标题标签(h1、h2、h3 等)的通用样式。特定组件 Widget.jsx 可以使用这些标题中的任何一个,但 h1 标签具有特殊样式。在 CSS 的“旧
我是一名优秀的程序员,十分优秀!