草庐IT

domain-driven-design

全部标签

c# - DDD 基础设施服务

我正在学习DDD,但我对基础设施层有点迷茫。据我所知,“所有优秀的DDD应用程序”都应该有4层:Presentation、Application、Domain和Infrastructure。应使用存储库访问数据库。存储库接口(interface)应该在域层和存储库实现中-在基础设施中(引用DDD:WheretokeepdomainInterfaces,theInfrastructure?)。应用程序、域和基础架构层应该/可能有服务(引用ServicesinDomain-DrivenDesign),例如,基础架构层中发送电子邮件的EmailService。但是,在基础设施层内部,我们有存

javascript - iframe contentWindow 在缩短 document.domain 后抛出拒绝访问错误

我通过以下方式动态创建IFRAME:varwrapUpIframe=document.createElement("iframe");wrapUpIframe.id='WrapUpDialog3';wrapUpIframe.src='WrapUpDialog.html';document.body.appendChild(wrapUpIframe);在动态创建之后,我的document.domain正在从Servername.dc.com缩短为仅dc.com,但是当我尝试访问contentWindow时,我得到了一个Accessisdenied错误:document.getElemen

javascript - D3 : Grayscale image display driven by 2D array data

有人知道如何使用d3显示灰度图像,即像素强度的二维数组吗?我似乎无法在任何地方找到它的任何例子,它会很棘手吗?任何帮助/链接/指针表示赞赏! 最佳答案 如果只想显示图像,请使用imageelement和“xlink:href”属性。例如:svg.append("image").attr("xlink:href","my.png").attr("width",960).attr("height",500);如果你想给灰度图像上色,请看这个colorizedheightmapexample它使用分位数来创建发散色标,并使用HCL插值来获

javascript - "Protocols, domains, and ports must match"问题

当我在控制台上查看时,我的网站有这些错误消息。谁能告诉我通常导致这些错误消息的问题是什么?Blockedaframewithorigin"mysite"fromaccessingaframewithorigin"facebook".Theframebeingaccessedset"document.domain"to"facebook",buttheframerequestingaccessdidnot.Bothmustset"document.domain"tothesamevaluetoallowaccess.contentscript_siteoverlay_bin.js:78B

javascript - 切换 Material Design Lite 复选框

我正在使用MaterialDesignLite复选框,并尝试使用JavaScript选中或取消选中该元素。我试过这个:document.getElementById("checkbox-1").checked=true;那是行不通的。我用jQuery尝试了同样的方法:$("#checkbox-1").prop('checked',true);那也没用。任何帮助将不胜感激。 最佳答案 目前,这个组件在1.0.0中有一个错误,它没有作为一个小部件公开。这已得到修复。目前在master中,几天后在1.0.1补丁中,它将以稳定的版本提供给每

javascript - 谷歌浏览器插件 : How to get domain from URL (tab. 网址)

使用GoogleChromeAPI的tab.urlvalue,从整个值中获取域的最佳方法是什么?在JavaScript中,我会使用window.location.protocol和window.location.hostname。例如这样的事情:vardomain=window.location.protocol+"//"+window.location.hostname;但是那获取的是扩展域而不是选项卡,所以不能使用该方法。因此,使用类似于下面的函数...我如何从tab.url值中删除域?functionshow_alert(){chrome.tabs.getSelected(nul

javascript - 即使正确设置了 document.domain,跨子域 ajax 请求也被拒绝

在我的应用程序中,我在一个子域(dev.u413.com)上有一个网站,我使用jQuery向另一个子域(api.u413.com)上的JSONapi发出ajax请求。当我检查Chrome开发工具和FirefoxFirebug中的请求时,我的请求似乎被Access-Control-Allowed-Origin阻止了。我将document.domain设置为当前域的后缀:document.domain='u413.com';。这是我的要求:$.ajax({dataType:'json',data:{parseAsHtml:true,cli:'help'},url:'http://api.u

javascript - 设置 document.domain 是否适用于所有(大多数)浏览器?

SameOriginPolicyDocumentation是这样说的:Thereisoneexceptiontothesameoriginrule.Ascriptcansetthevalueofdocument.domaintoasuffixofthecurrentdomain.Ifitdoesso,theshorterdomainisusedforsubsequentoriginchecks.Forexample,assumeascriptinthedocumentathttp://store.company.com/dir/other.htmlexecutesthefollowin

design-patterns - 主干 : Multiple views subscribing to a single collection's event? 这是一种不好的做法吗?

我有一个问题,我认为非常基本的问题但是:我只见过CollectionView和依赖于正在更新的集合的单一View的示例。如果您有多个View试图订阅一个集合事件,即重置、addOne、addAll等...关于做/不做这件事,我是否遗漏了一些要点?你有这方面的例子吗?这有意义吗?非常感谢任何信息varColl=Backbone.Collection.extend({model:SingleModel,url:'service',initialize:function(){console.log('collectioninited')}});varSingleModel=Backbone.

php - 建议 : building a non-database driven simple CMS in PHP

关闭。这个问题是opinion-based.它目前不接受答案。想要改进这个问题?更新问题,以便editingthispost可以用事实和引用来回答它.关闭8年前。Improvethisquestion我在一个需要非常简单的CMS的网站上工作-主页上基本上有一段文本需要客户进行编辑。他们当前的托管计划不允许使用数据库,包括一个数据库每月要额外花费X美元,我认为对于这样一个基本系统来说这是不必要的。该站点目前是使用Codeignitor构建的。我打算使用平面PHP或TXT文件来编写它的CMS部分,有没有值得考虑的替代方法,优点/缺点是什么?