There should never be more than one reason for a class to change
What is Single Responsibility Principle?
Dependency injection separates the creation of a client's dependencies from the client's behavior, which allows program designs to be loosely coupled and to follow the ____________ and ___________ principles.
Dependency Inversion and Single Responsibility
The metaphor of _________ in regards to unclean code was originally suggested by Ward Cunningham.
What is Technical Dept?
_________ are special attributes with the v- prefix. Their job is to reactively apply side effects to the DOM when the value of its expression changes. (see the following emboldened text for a code example)
<img v-for="item in items" />
<span v-if="canShowSpan" />
<template v-slot:header />
What is a Directive?
C# Design Patterns are generalized into what 3 categories.
What are Creation, Structural and Behavior Patterns?
Software entities (i.e Classes, Modules, Functions, ect) should be open for extension, but closed for modifications.
What is Open-Closed Principle?
Dependency injection involves these four roles.
What is service, client, interface and injector roles?
This term describes the number of times code can be repeated before it should be refactored.
What is the Rule of Three?
This Vue feature allows you to add and remove CSS classes based on a boolean view-model property. It also allows you to bind inline style values to a view model.
What is Class and Style Bindings?
This creation pattern lets you ensure that a class has only one instance. It also provides a global access point to this instance.
What is Singleton Pattern?
Applying this principle means decomposing "fat" interfaces into simpler units-of-works so that a class is not forced to implement what it does not need.
What is Interface Segregation Principle?
An object that is depending on the service(s) it uses
What is client role.
_________ is a systematic process of improving code without creating new functionality and can transform a mess into clean code and simple design.
What is Refactoring?
This Vue feature provides the following capabilities
1) its value is cached and based on its reactive dependencies
2) immediately returns the previous results without having to re-run the evaluation code again
3) automatically re-evaluates its value when one or more of its dependencies change
What are Computed Properties?
This creation pattern lets you copy an existing object without making your code depend on its class (or classes).
What is Prototype Pattern?
Applying this principle prevents the following Bad Design issues:
1. Rigidity: changing causes too many cascade changes
2. Fragility: changes cause unexpected system breakage
3. Immobility: you cannot port the code because of entanglement
What is Dependency Inversion Principle?
This role defines how a client may use the service(s)
What is Interface role?
Name 4 of the ten reasons for Technical Dept.
1) Business pressure
2) Delayed refactoring
3) Failing to combat the strict coherence of components
4) Incompetence
5) Lack of understanding of the consequences of technical debt
6) Long-term simultaneous development in several branches
7) No Compliance Monitoring (AKA Code Review)
8) No Documentation
9) No Team Communication/Interaction
10) No Tests
This directive is responsible attaching and event to a method on your Vue instance.
What is the v-on directive?
This creation pattern uses factory methods to create objects without having to specify exact classes.
class BaseFactory { virtual IButton CreateButton(); }
class WPFFactory : BaseFactory { override IButton CreateButton() => return new WPFButton(); }
class VueFactory : BaseFactory { override IButton CreateButton() => return new VButton(); }
What is Factory Pattern?
This method is a clear violation of this key principle.
void DrawShape(Shape s)
{
if (s.GetType() == typeof(Square))
DrawSquare(s);
else if (s.GetType() == typeof(Circle))
DrawCircle(s);
}
Daily Double
The intent behind dependency injection is to achieve __________ concerning the construction and use of objects; which increases readability and code reuse.
What is Separation of Concerns?
Bloaters, Object-Orientation Abusers, Change Preventers, Dispensable and Couplers are the 5 categories of what refactoring term?
Daily Double
By default the v-model directive syncs the input upon each 'input' event. Using this modifier would cause the sync to occur after the 'change' event.
What is the lazy modifier?
This creation pattern lets you produce families of related objects without specifying their concrete classes. It leverages another creation pattern that is similarly named.
What is Abstract Factory Pattern?