当应该使用数据库驱动的开发以及何时应该使用域驱动开发时,任何人都可以得到很好的答案.这两种发展方法都在其受尊重的领域中具有重要意义.但我不清楚哪种方法适合哪种情况.有什么建议?
任何人都可以通过很好的例子向我解释可插拔适配器的概念吗?
根据Martin Fowler的说法"有些东西可以公开,但这并不意味着你已经发布了它." 这是否意味着这样的事情:
public interface IRollsRoyceEngine
{
void Start();
void Stop();
String GenerateEngineReport();
}
public class RollsRoyceEngine : IRollsRoyceEngine
{
public bool EngineHasStarted { get; internal set; }
public bool EngineIsServiceable { get; internal set; }
#region Implementation of IRollsRoyceEngine
public void Start()
{
if (EngineCanBeStarted())
EngineHasStarted = true;
else
throw new InvalidOperationException("Engine can not be started at this time!");
}
public void Stop()
{
if (EngineCanBeStopped())
EngineHasStarted = false;
else
throw new InvalidOperationException("Engine can not be started at this …Run Code Online (Sandbox Code Playgroud)