Domain Driven Design – how the layers should be organized?

Speaking in terms of more “classical” DDD, yes domain objects are typically not allowed anywhere outside of the domain. But it is not an absolute rule that domain objects are not used in the presentation layer. For example, Naked Objects represents a school of thought where domain objects are used directly. I myself adhere mostly … Read more

Should ‘using’ directives be inside or outside the namespace in C#?

There is actually a (subtle) difference between the two. Imagine you have the following code in File1.cs: // File1.cs using System; namespace Outer.Inner { class Foo { static void Bar() { double d = Math.PI; } } } Now imagine that someone adds another file (File2.cs) to the project that looks like this: // File2.cs … Read more

Spark code organization and best practices [closed]

I think you can subscribe Apache Spark, databricks channel on youtube, listen more and know more, especially for the experiences and lessons from others. Apache Spark databricks Spark Technology Center here is some videos recommended: SparkUI Visualization slide SparkUI Visualization Spark in Production: Lessons from 100+ Production Users slide Spark in Production: Lessons from 100+ … Read more

Can maven projects have multiple parents?

Even though maven projects have single parent, they can import any number of other pom’s like this: <dependencyManagement> <dependencies> <dependency> <groupId>org.example</groupId> <artifactId>my-shared-dependencies</artifactId> <version>0.0.1-SNAPSHOT</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> This has two important differences compared to a parent: Plugins defined in the imported pom won’t be imported Dependencies defined in the imported pom won’t be added … Read more

How should I organize Python source code? [closed]

The article Eric pointed to is awesome because it covers details of organising large Python code bases. If you’ve landed here from Google and are trying to find out how to split one large source file into multiple, more manageable, files I’ll summarise the process briefly. Assume you currently have everything in a file called … Read more

Including one C source file in another?

Used properly, this can be a useful technique. Say you have a complex, performance critical subsystem with a fairly small public interface and a lot of non-reusable implementation code. The code runs to several thousand lines, a hundred or so private functions and quite a bit of private data. If you work with non-trivial embedded … Read more