Cake build Flashcards
What is cake and what was it based on?
Cake is a scripting tool using C# DSL. Based in the famous make tool for unix systems (1976)
What is DSL?
Domain system language.
What is the dependency-tracking model (aka dependency-based programming)?
You tell which tasks the specific tasks depend on (instead of calling one after another).
What benefit the dependency-tracking model gives?
You can run specific jobs and the dependent jobs will be run naturally.
Why would I use Cake in a C# project? What other reason (which is actually more important) than the first one?
because you’ll be using a single language for everything. Rich ecosystem of integrations (built-in tools) - integrate with everything you need.
How to use a built-in tool? Is it difficult?
as simple as doing an using statement.
What tools integrate with cake?
see:
https://pasteboard.co/JH67c5r.png
How does cake work? which compiler does it use?
cake is a c# script which is parsed and compiled by Roslyn ON THE FLY.
Can I run regular .NET code in cake? Which namespaces are available to us by default?
yes. cake.core.dll and cake.common.dll are available by default to us.
How would we import an assembly if we did not have cake (think on powershell)? How does cake solve it?
We would need to store the dlls (and its dependencies) manually. Cake solve it by allowing referencing nuget packages (awesome).
What is a Task (Task = cake alias)? What does it execute?
meant to do one single thing (such as compile the application). Execute an anonymous function (aka lamba)
What is fluent interface?
Is when you can chain call to methods together (Task.DependsOn().Does(() =>)
Does the order of the fluent interface chaning methods matter?
Yes.. top down
What are the four basic building blocks of cake?
Task, IsDependentOn, RunTarget, Argument.
What does the WithCriteria alias do? What happens when not met?
Asserts a condition. halts and throw error if false.