When you are given an example of refactoring, I’m tired of seeing the level of data access with string literals for replaceable connection strings of IConnectionStringProvider.
eg:
public DataSet GetCustomers()
{
string connectionString = "SQLClient;Blah;Blah";
using(SqlConnection conn = new SqlConnection(connectionString))
...
to that
public DataSet GetCustomers()
{
string coonectionString = connectionStringProvider.GetConnectionString();
using(SqlConnection conn = new SqlConnection(connectionString))
...
In the world of Domain Driven Design, I’m tired of seeing that a domain is a client that has many orders, which also have many OrderLineItems. Please explain Aggregate Roots using something more interesting, please!
Or am I completely losing it, and rethinking these simplified ones is the best way to teach these ideas?
Ooh and using forms to explain inheritance ...
What examples do you use to teach these concepts?