I've struggled a lot with myself over whether I should use OpenGL or Direct3D. There is no blanket answer to this question that anyone can tell you. Both APIs have a very different feel and which one you prefer can only be decided on your own.Read More
In the Roslyn preview that was released at Build 2014 the way references to global assmeblies are added was changed. Before the preview I could use code like this:
var compilation = Compilation.Create(assemblyName, new CompilationOptions(OutputKind.DynamicallyLinkedLibrary)) .AddReferences(MetadataReference.CreateAssemblyReference("mscorlib")) .AddReferences(MetadataReference.CreateAssemblyReference("System")) .AddReferences(MetadataReference.CreateAssemblyReference("System.Core")) .AddReferences(new MetadataFileReference(this.GetType().Assembly.Location)) .AddSyntaxTrees(syntaxTree);
The static factory method "MetadataReference.CreateAssemblyReference" added a reference to global assemblies such as "mscorlib.dll" or "System.dll". In the Roslyn preview, the same be achieved like so:
var assemblyPath = Path.GetDirectoryName(typeof(object).Assembly.Location); var compilation = CSharpCompilation.Create(assemblyName) .WithOptions(new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary)) .AddReferences(new MetadataFileReference(Path.Combine(assemblyPath, "mscorlib.dll"))) .AddReferences(new MetadataFileReference(Path.Combine(assemblyPath, "System.dll"))) .AddReferences(new MetadataFileReference(Path.Combine(assemblyPath, "System.Core.dll"))) .AddReferences(new MetadataFileReference(Assembly.GetEntryAssembly().Location)) .AddSyntaxTrees(syntaxTree);
Seems like all the cool kids these days have converted their websites to completely static ones. I'm looking at you Mr. Haacked. I thought this was a pretty cool idea and a chance to really refresh my website so I decided to take a stab at it. It's currently a work in progress.
I ended up writing my own tool I call Gatsby to do it. I also set up the whole deploy process myself involving pushing to Github which then informs my website to pull from the Github repository. Hopefully that will be a blog post in the not too distance future.
Sorry for any inconvenience.
Component Glue is an IoC container and you use it of course to wire up your object graphs for you. Component Glue can also build your object graphs for you automatically if there are no interfaces involved. Take this example:
In After.cs, you can see that Component Glue is able to build the entire object graph for us. This will include all future dependencies as well so long as interfaces don't come into play. Should an interface be needed, you can just bind that single component.
This is a very powerful thing. If one component needs to take on a dependency, just ask for it in the constructor and Component Glue will handle it for you.