The last few weeks, a public dispute has been going on between Joel Spolsky and Robert C Martin (Uncle Bob) about Test-Driven Development and about the SOLID principles of OO design. Here is a summary and review of the match.
Programming languages that offer more power and flexibility have been lately gaining momentum. Johnatan Tang highlights, however, the flexibility vs. productivity tradeoff in terms of program structure. Whereas multi-dispatch languages provide more flexibility in arranging code, traditional object orientation makes organizing programs easier.
From the beginning, the .NET stack had first class support for unmanaged libraries. By using P/Invoke one can access most of the Win32 API and support for COM opens up developers to a wealth of applications and third-party libraries. But should .NET developers actually take advantage of this?
The goal of modeling domain concepts through objects set by OOP has for a long time been handled in insufficient ways. In this article we introduce the concept of Composite Oriented Programming, and show how it avoids the issues with OOP and reignites the hope of being able to compose domain models with reusable pieces.
Believe it or not, C# is going to have full support for optional and named parameters. This, and other features intended for COM support, will be included in C# 4. There was also a rumor about parameterized properties.
In .NET 4 types will no longer be restricted to a single assembly. A single type, or part of a type, can be extracted from one assembly and placed into another. Why would you do this? Well first off all, to reduce the cost of including the Office Primary Interopt Assemblies from several megabytes to about 2KB by only including what you actually need.
Kasper Sørensen has created a new open source project at eobjects.dk called MetaModel. The project is a common domain model, query engine, and optimizer for different types of datastores, such as relational databases and flat files. MetaModel is a Java library that provides a fluent, object-oriented interface for SQL compliant queries.
Blogger Gustavo Duarte cursed in church when he said that learning new programming languages is often a waste of time. He said that "In reality learning a new language is a gritty business in which most of the effort is spent on low-value tasks with poor return on time invested.". But not everyone agreed.
In his latest blog post, Michael Feathers argued that object oriented programming languages offer some built-in features that facilitate testing and are therefore more recovery friendly than functional languages. Proponents of functional languages expressed strong disagreement with this statement, which provoked a very passionate debate in the blog community.
Dependency Injection seems like a shiny new tool in the toolbox. Andrew McVeigh tells us that DI shares a long history with architecture description languages (ADLs), simple yet sophisticated languages for component-based development through descriptive wiring. This article looks at the history of ADLs and sheds light on possible future directions of dependency injection.
Jay Bazuzi, once Development Lead for the C# Editor, is leaving Microsoft, and he wrote some surprisingly harsh parting words for his friends before he left; things like “OO isn’t a fad” and that “It’s OK to use someone else’s code”.
Designing for flexibility and robustness: Asynchronous message model, OOP and Functional Programming
According to Pragmatic Programmers it is preferable in OOP to avoid design based on returning values. Michael Feathers argues that it may also be better to use the asynchronous message model that might be instrumental for improving adaptability and robustness. This maps well to the Erlang model though opposing some of the principles of pure functional programming.
Bob Martin of Object Mentor presents the first of his five principles of agile design. Beginning with an explanation of the real purpose of object-oriented design - the management of dependencies - Bob walks through a code example to illustrate how dependencies can be managed with abstractions, and that good designs are those in which high-level abstractions do not depend on low-level details.
What are some of the code-level practices of highly effective developers? Robert Miller wrote a detailed article on Java.NET covering 5 practices which could apply to any language, including minimalist constructors, methods with clear focus and intent, minimizing logic in mutating methods, and minimizing dependendies between behaviour methods.