Foundations of Programming, AKA, the ALT.NET FREE Book!!

“Foundations of Programming, Building Better Software” is a new eBook by Karl Seguin. The book does not say in its introduction that it’s all ALT.NET-ish, it starts by introducing what ALT.NET is, it’s goals etc, afterwards, all the topics the book covers are inspired by ALT>NET frequent topics. This includes Domain Driven Design (DDD), Dependency Injection (DI), Object Relational Mapping (ORMs), Mocking, etc…

Here’s what Channel9 had to say about it (which is how I originally found it too):

Karl Seguin recently released a great free 79 page eBook for .NET developers covering design patterns, unit testing, mock objects, memory management, object relational mapping, and more.  Get it while it’s free!

Now, if I did my job well getting your interest, then you may want to get to the best part:

Foundations of Programming, Building Better Software – EBook Download

IF you’re not interested yet, I know this must get your most interest in the book, the table of contents (highlighting chapter titles in bold):

About the Author ……………………………………………………………………………………………………………….6
ALT.NET …………………………………………………………………………………………………………………………..7
Goals ……………………………………………………………………………………………………………………………8
Simplicity ………………………………………………………………………………………………………………………8 YAGNI…………………………………………………………………………………………………………………………..8
Last Responsible Moment………………………………………………………………………………………………….9
DRY ……………………………………………………………………………………………………………………………..9
Explicitness and Cohesion ………………………………………………………………………………………………….9
Coupling ……………………………………………………………………………………………………………………….9
Unit Tests and Continuous Integration …………………………………………………………………………………9
In This Chapter……………………………………………………………………………………………………………..10
Domain Driven Design………………………………………………………………………………………………………..11
Domain/Data Driven Design……………………………………………………………………………………………..11
Users, Clients and Stakeholders ………………………………………………………………………………………..12
The Domain Object ………………………………………………………………………………………………………..13
UI ………………………………………………………………………………………………………………………………15
Tricks and Tips ………………………………………………………………………………………………………………16
Factory Pattern ………………………………………………………………………………………………………….16
Access Modifiers ………………………………………………………………………………………………………..17
Interfaces ………………………………………………………………………………………………………………..17
Information Hiding and Encapsulation …………………………………………………………………………….18
In This Chapter……………………………………………………………………………………………………………..19
Persistence……………………………………………………………………………………………………………………..20
The Gap ………………………………………………………………………………………………………………………20
DataMapper ………………………………………………………………………………………………………………..20
We have a problem …………………………………………………………………………………………………….23
Limitations……………………………………………………………………………………………………………….24
In This Chapter……………………………………………………………………………………………………………..25
Dependency Injection ………………………………………………………………………………………………………..26
Sneak Peak at Unit Testing……………………………………………………………………………………………….27
Don’t avoid Coupling like the Plague ………………………………………………………………………………….28
Dependency Injection……………………………………………………………………………………………………..28
Constructor Injection…………………………………………………………………………………………………..28
Frameworks……………………………………………………………………………………………………………..30
A Final Improvement …………………………………………………………………………………………………..32
In This Chapter……………………………………………………………………………………………………………..33
Unit Testing…………………………………………………………………………………………………………………….34
Why Wasn’t I Unit Testing 3 Years Ago?………………………………………………………………………………35
The Tools …………………………………………………………………………………………………………………….36
nUnit ………………………………………………………………………………………………………………………36
What is a Unit Test …………………………………………………………………………………………………………38
Mocking ……………………………………………………………………………………………………………………..38
More on nUnit and RhinoMocks………………………………………………………………………………………..41
UI and Database Testing ………………………………………………………………………………………………….42
In This Chapter……………………………………………………………………………………………………………..42
Object Relational Mappers ………………………………………………………………………………………………….43
Infamous Inline SQL vs. Stored Procedure Debate …………………………………………………………………43
NHibernate ………………………………………………………………………………………………………………….46
Configuration……………………………………………………………………………………………………………46
Relationships …………………………………………………………………………………………………………….49
Querying …………………………………………………………………………………………………………………50
Lazy Loading ……………………………………………………………………………………………………………..51
Download ……………………………………………………………………………………………………………………52
In This Chapter……………………………………………………………………………………………………………..52
Back to Basics: Memory ……………………………………………………………………………………………………..53
Memory Allocation………………………………………………………………………………………………………..53
The Stack …………………………………………………………………………………………………………………53
The Heap …………………………………………………………………………………………………………………54
Pointers …………………………………………………………………………………………………………………..55
Memory Model in Practice……………………………………………………………………………………………….57
Boxing …………………………………………………………………………………………………………………….57
ByRef………………………………………………………………………………………………………………………58
Managed Memory Leaks ……………………………………………………………………………………………..61
Fragmentation …………………………………………………………………………………………………………..61
Pinning ……………………………………………………………………………………………………………………62
Setting things to null …………………………………………………………………………………………………..63
Deterministic Finalization ………………………………………………………………………………………………..63
In This Chapter……………………………………………………………………………………………………………..63
Back to Basics: Exceptions …………………………………………………………………………………………………..64
Handling Exceptions ……………………………………………………………………………………………………….64
Logging……………………………………………………………………………………………………………………65
Cleaning Up ………………………………………………………………………………………………………………65
Throwing Exceptions ………………………………………………………………………………………………………67
Throwing Mechanics …………………………………………………………………………………………………..67
When To Throw Exceptions ………………………………………………………………………………………….68
Creating Custom Exceptions …………………………………………………………………………………………….69
In This Chapter……………………………………………………………………………………………………………..72
Back to Basics: Proxy This and Proxy That……………………………………………………………………………….73
Proxy Domain Pattern …………………………………………………………………………………………………….74
Interception…………………………………………………………………………………………………………………75
In This Chapter……………………………………………………………………………………………………………..77
Wrapping It Up ………………………………………………………………………………………………………………..78

The book cover has the www.codebetter.com URL, the community blogs whose owners originally started ht ALT.NET movement (I wrote about it very early back). I suspected it even before reading the table of contents!

Oh my. This is the book I always wanted to either read or write. Now I only have one option!!!

Share With Friends:

How did I learn that?

As a bonus for coming here, I'm giving away a free newsletter for web developers that you can sign up for from here.

It's not an anything-and-everything link list. It's thoughtfully collected picks of articles and tools, that focus on Angular 2+, ASP.NET (4.x/MVC5 and Core), and other fullstack developer goodies.

Take it for a test ride, and you may unsubscribe any time.

You might also want to support me by checking these out [Thanks]: