Short Answer Reviews Flashcards
What is Dependency Injection
- Dependency injection is providing objects with their dependencies instead of having them construct them themselves.
- Dependencies can be injected by any means, constructor injection or setter injection.
- Dependency injection makes testing easier. It decouples the creation of an object and gives the ability to replace dependencies
Front End Load Time Techniques
- Minification: Combine Scripts and CSS to minimize bloated files. Load one single file
- Caching: Reduce server calls, storing certain files in the cache.
- CDN: Load from nearest server and compressed for delivery
- Optimize Assets and Smart Comprehension: Scale assets based on user case
Front-End Testing
- Implement useability and accessibility Standards
- Test tools that allow you to see all end users testing.
Code Structure and Efficiencies
- Segment and Organize code for increase comprehension
- Mark with Appropriate Docstrings and variable names
- Indicate constraints and edge cases.
Inheritance
Inheritance is when a child’s class inherits from all properties and characteristics from the parent’s class, creating a class hierarchy.
Composition
Composition enables the creation of complex types by combining objects of other types, rather than inheriting from base or part. It contains instances of other classes
Procedural Programming
Operates on functions, where the entire program operates on a sequence of functions.
Object-Oriented Programming
Focuses on real-world objects that encapsulates data and priorities the states and behaviors of objects
Abstraction
Abstraction helps simplify the programming process and displays data that are relevant and hides complexity
Polymorphism
Polymorphism in Java is the ability of an object to take many forms. To put it simply, polymorphism in Java allows us to perform the same action in many different ways. Any Java object that can pass more than one IS-A test is polymorphic in Java. Polymorphism takes two forms:
- Runtime polymorphism
- Compile-time polymorphism
Encapsulation
Encapsulation is a class that conceals data fields and methods that achieve functions, though they become accessible through access modifiers
Manipulators
Similar to helping functions, Manipulators modifies input/output stream using an objects’ insertion and extraction operators.
Constructor Rules
- A constructor does not have return type
- The name of the constructor is the same as the name of the class
- A constructor cannot be abstract, final, static, and synchronized
- You can use access specifiers
Abstract class / methods
An abstract class is a class that is declared abstract—it may or may not include abstract methods. Abstract classes cannot be instantiated, but they can be subclassed.
An abstract method is a method that is declared without an implementation
Static and Dynamic Binding
Association of method call to the method body is known as binding. There are two types of binding: Static Binding that happens at compile time and Dynamic Binding that happens at runtime.