separation-of-concerns

EmberJS: Good separation of concerns for Models, Stores, Controllers, Views in a rather complex application?

陌路散爱 提交于 2020-01-10 14:16:16
问题 I'm doing a fairly complex emberjs application, and tying it to a backend of APIs. The API calls are not usually tied to any particular model, but may return objects of various types in different sections of the response, e.g. a call to Events API would return events, but also return media assets and individuals involved in those events. I've just started with the project, and I'd like to get some expert guidance on how best to separate concerns to have a clean maintainable code base. The way

Dojo declarative vs. programmatic creation of Select elements with stores

半腔热情 提交于 2020-01-04 10:06:56
问题 I'm trying to hook up a Select element with a Dojo store. The Select element is declared in HTML and I'm trying to give it a store in some JavaScript code. It seems the Dojo documentation recommends against this and is in favor of programatically creating the Select element when using a store. However this is a yellow flag to me because I like to keep creation of HTML elements separate from their behavior. In this case, it would be ideal if I could keep the Select element in HTML and hook up

Whats a recommended solution structure for a somewhat large website in asp.net

一曲冷凌霜 提交于 2020-01-01 00:48:53
问题 Im currently trying to refactor a project(asp.net mvc) that doesnt have any separation at all. just folders :s The project has a bunch of EF Code First classes (People.cs, Exam.cs, Message.cs, etc) The project has several repositories (which all use EF Data Context) And of course a lot of controllers and viewmodels We have a Tests Project but we arent very good at TDD so its not something we are really working on as of now. I would like to have a clearer separation on the different

Separate specific configuration in Dockerfile

霸气de小男生 提交于 2019-12-25 03:32:22
问题 I have a design problem with a docker image. I created a simple Nginx image and add some configuration in extra files. Here is my Dockerfile : FROM debian:wheezy RUN apt-get update && apt-get install -y wget && \ echo "deb http://packages.dotdeb.org wheezy all" >> /etc/apt/sources.list && \ echo "deb-src http://packages.dotdeb.org wheezy all" >> /etc/apt/sources.list && \ wget http://www.dotdeb.org/dotdeb.gpg && apt-key add dotdeb.gpg && \ apt-get update && apt-get install -y nginx RUN rm -rf

Where to put restrictions on entities when separating Business layer from Data Layer

不问归期 提交于 2019-12-23 12:35:31
问题 I am attempting to create the the business and data layers for my big ASP.NET MVC application. As this is the first time for me attempting a project of this scale I am reading some books and trying to take good care at separating things out properly. Usually my applications mix the business logic and data access layers, and multiple business entities are intertwined in the single class (which has confused me a few times when I was trying to figure out where to add things). Most of what I have

How to nest collection routes?

妖精的绣舞 提交于 2019-12-22 18:24:08
问题 I use the following routes configuration in a Rails 3 application. # config/routes.rb MyApp::Application.routes.draw do resources :products do get 'statistics', on: :collection, controller: "statistics", action: "index" end end The StatisticController has two simple methods: # app/controllers/statistics_controller.rb class StatisticsController < ApplicationController def index @statistics = Statistic.chronologic render json: @statistics end def latest @statistic = Statistic.latest render json

Dependency Injection - Does it violate Separation of Concerns?

☆樱花仙子☆ 提交于 2019-12-22 08:54:44
问题 Does Dependency Injection violate the Separation of Concerns as it pertains to an n-tier architecture? Suppose you have the following projects: MyApp.Data MyApp.Business MyApp.Web If I were to use DI to tell the Business Layer which Data Context to use, wouldn't this violate SoC? This would mean the UI (MyApp.Web) would have to have knowledge of the Data Access Layer (MyApp.Data) to tell the Business Layer (MyApp.Business) which context to use, right? public class WebForm { public void Save

Dependency Injection - Does it violate Separation of Concerns?

邮差的信 提交于 2019-12-22 08:54:09
问题 Does Dependency Injection violate the Separation of Concerns as it pertains to an n-tier architecture? Suppose you have the following projects: MyApp.Data MyApp.Business MyApp.Web If I were to use DI to tell the Business Layer which Data Context to use, wouldn't this violate SoC? This would mean the UI (MyApp.Web) would have to have knowledge of the Data Access Layer (MyApp.Data) to tell the Business Layer (MyApp.Business) which context to use, right? public class WebForm { public void Save

Place client-side JavaScript templates in HTML or JavaScript?

百般思念 提交于 2019-12-22 06:00:24
问题 Should client-side templates like the following (using underscore's templating engine): <p class="foo"><%= bar %></p> be placed in an separate HTML file, or a separate JavaScript file? I know it could work both ways. For example, a JavaScript file could just contain a list of string variables like so: var cute = '<p class="the"><%= unicorn %></p>'; var fb = '<p class="new-design"><%= sucks %></p>'; But I have also seen the following: <script type="text/template" id="omg-template"> <span id=

Concerns about separating front-end and back-end with a NodeJS UI server [closed]

倾然丶 夕夏残阳落幕 提交于 2019-12-21 04:42:37
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 5 years ago . During the last months, we at work have been looking for a solution to the following problem: front-end developers can't easily modify the appearance of the website without the help of back-end devs. Our culture as a team is mostly based on full-stack frameworks such as