Branch prediction is necessary to reduce penalties from branches in modern deep pipelines. It predicts the direction (taken or not taken) and target of branches. Common techniques include bimodal prediction using saturating counters and two-level prediction using branch history tables and pattern history tables. Real processors use hybrid predictors combining different techniques. Mispredictions require flushing the pipeline and incur a performance penalty.
This document compares and contrasts IPv4 and IPv6. It begins by defining Internet Protocol (IP) and its purpose of identifying hosts and enabling location addressing. It then describes IPv4, including its 32-bit address structure, address notation, and class-based allocation that resulted in address exhaustion issues. The document also covers IPv6's 128-bit addresses that provide vastly more capacity to address this problem. Key differences between IPv4 and IPv6 are outlined, such as IPv6's elimination of NAT. The concepts of subnetting, supernetting, and private address ranges are also introduced to optimize IPv4 network design.
Memory Management & Garbage CollectionAbhishek Sur
The document discusses .NET memory management and garbage collection. It explains that memory is allocated on the managed heap for reference types using new. The garbage collector removes objects from the heap that are no longer referenced to free up memory. It compacts the heap during garbage collection to improve performance. While the garbage collector handles managed memory, it does not free unmanaged resources so classes use finalizers/destructors or implement IDisposable to release unmanaged resources.
The document discusses internetworking models and the OSI reference model. It provides details on each of the 7 layers of the OSI model:
1. The Application layer handles communication between applications and users.
2. The Presentation layer translates and formats data for transmission.
3. The Session layer establishes and manages communication sessions between devices.
4. The Transport layer segments data, establishes logical connections, and ensures reliable delivery between hosts.
This document discusses the SIPSIMPLE SDK framework for developing rich SIP applications. It provides an overview of SIPSIMPLE's features such as support for HD audio, MSRP chat, file transfer, desktop sharing and presence. It also gives examples of how to implement VoIP calling, instant messaging, file transfer and desktop sharing. Finally, it lists some sample applications and resources that demonstrate how to use SIPSIMPLE to develop SIP clients and servers.
This document discusses IP addressing and classful addressing in TCP/IP networking. It covers the following key points:
- IP addresses are 32-bit addresses that uniquely identify devices on the Internet. They are organized into classes A, B, C, D and E based on the binary pattern of the address.
- Classful addressing allocates address blocks to organizations based on these classes. However, this led to inefficient address usage and rapid depletion of available addresses.
- Subnetting and supernetting were introduced to allow better allocation of addresses within the original classful blocks through the use of subnet and supernet masks. However, classful addressing is now mostly obsolete.
The document discusses IP addressing and IPv6. It defines what an IP address is, how it is written in dotted decimal notation, and its structure including the network prefix and host number. It describes problems with the original IP address classification scheme and how subnetting and CIDR addressed these. It also summarizes IPv6, including its 128-bit address size which vastly increases the available address space compared to IPv4.
This document provides an overview of the Unified Modeling Language (UML) including its building blocks, diagrams, and the Rational Unified Process (RUP) methodology. It defines UML, explains its advantages for visualizing, specifying, and constructing systems. It describes the different types of UML elements including structural things like classes and interfaces, behavioral things like interactions and state machines, and grouping and annotational things. It also outlines the different UML diagrams for modeling a system from various perspectives and the four phases of the iterative RUP methodology.
Branch prediction is necessary to reduce penalties from branches in modern deep pipelines. It predicts the direction (taken or not taken) and target of branches. Common techniques include bimodal prediction using saturating counters and two-level prediction using branch history tables and pattern history tables. Real processors use hybrid predictors combining different techniques. Mispredictions require flushing the pipeline and incur a performance penalty.
This document compares and contrasts IPv4 and IPv6. It begins by defining Internet Protocol (IP) and its purpose of identifying hosts and enabling location addressing. It then describes IPv4, including its 32-bit address structure, address notation, and class-based allocation that resulted in address exhaustion issues. The document also covers IPv6's 128-bit addresses that provide vastly more capacity to address this problem. Key differences between IPv4 and IPv6 are outlined, such as IPv6's elimination of NAT. The concepts of subnetting, supernetting, and private address ranges are also introduced to optimize IPv4 network design.
Memory Management & Garbage CollectionAbhishek Sur
The document discusses .NET memory management and garbage collection. It explains that memory is allocated on the managed heap for reference types using new. The garbage collector removes objects from the heap that are no longer referenced to free up memory. It compacts the heap during garbage collection to improve performance. While the garbage collector handles managed memory, it does not free unmanaged resources so classes use finalizers/destructors or implement IDisposable to release unmanaged resources.
The document discusses internetworking models and the OSI reference model. It provides details on each of the 7 layers of the OSI model:
1. The Application layer handles communication between applications and users.
2. The Presentation layer translates and formats data for transmission.
3. The Session layer establishes and manages communication sessions between devices.
4. The Transport layer segments data, establishes logical connections, and ensures reliable delivery between hosts.
This document discusses the SIPSIMPLE SDK framework for developing rich SIP applications. It provides an overview of SIPSIMPLE's features such as support for HD audio, MSRP chat, file transfer, desktop sharing and presence. It also gives examples of how to implement VoIP calling, instant messaging, file transfer and desktop sharing. Finally, it lists some sample applications and resources that demonstrate how to use SIPSIMPLE to develop SIP clients and servers.
This document discusses IP addressing and classful addressing in TCP/IP networking. It covers the following key points:
- IP addresses are 32-bit addresses that uniquely identify devices on the Internet. They are organized into classes A, B, C, D and E based on the binary pattern of the address.
- Classful addressing allocates address blocks to organizations based on these classes. However, this led to inefficient address usage and rapid depletion of available addresses.
- Subnetting and supernetting were introduced to allow better allocation of addresses within the original classful blocks through the use of subnet and supernet masks. However, classful addressing is now mostly obsolete.
The document discusses IP addressing and IPv6. It defines what an IP address is, how it is written in dotted decimal notation, and its structure including the network prefix and host number. It describes problems with the original IP address classification scheme and how subnetting and CIDR addressed these. It also summarizes IPv6, including its 128-bit address size which vastly increases the available address space compared to IPv4.
This document provides an overview of the Unified Modeling Language (UML) including its building blocks, diagrams, and the Rational Unified Process (RUP) methodology. It defines UML, explains its advantages for visualizing, specifying, and constructing systems. It describes the different types of UML elements including structural things like classes and interfaces, behavioral things like interactions and state machines, and grouping and annotational things. It also outlines the different UML diagrams for modeling a system from various perspectives and the four phases of the iterative RUP methodology.
The Open Systems Interconnection model (OSI model) is a conceptual model that characterizes and standardizes the communication functions of a telecommunication or computing system without regard to their underlying internal structure and technology.
The document discusses data link layer protocols, including LLC, MAC, and Ethernet standards. It describes the functions of the physical layer, data link layer, and logical link control sublayer. It also covers IP addressing schemes like IPv4 addresses, network classes, public vs private addresses, and subnetting. CIDR is introduced as a method to improve address space utilization and routing scalability on the internet.
The document discusses transport layer protocols TCP and UDP. It provides an overview of process-to-process communication using transport layer protocols. It describes the roles, services, requirements, addressing, encapsulation, multiplexing, and error control functions of the transport layer. It specifically examines TCP and UDP, comparing their connection-oriented and connectionless services, typical applications, and segment/datagram formats.
The document discusses naming in distributed systems. It covers desirable features of naming systems like location transparency and location independence. It differentiates between human-oriented and system-oriented names. It also discusses name spaces, name servers, name resolution including recursive and iterative approaches, and name caching.
This document discusses leftist heaps, which are a type of priority queue implemented as a variant of a binary heap. Leftist heaps maintain the property that the right descendant of each node has a lower rank, or distance to the nearest leaf node, than the left descendant. This property helps keep the tree balanced during operations like insertion and merging of heaps that have a time complexity of O(log n). Deletion of the minimum element involves disconnecting and merging the left and right subtrees.
The document compares the OSI reference model and the TCP/IP model. The OSI reference model has 7 layers - physical, data link, network, transport, session, presentation and application layer. It was developed by ISO as a standard for network communication. The TCP/IP model has 4 layers - link, internet, transport and application layer. It is the communication protocol used for the internet and defines the rules for communication between computers over the internet. TCP and IP work together, with TCP handling communication between applications and networks, and IP handling communication between computers.
When we desire a communication between two applications possibly running on different machines, we need sockets. This presentation aims to provide knowledge of basic socket programming to undergraduate students. Basically, this presentation gives the importance of socket in the area of networking and Unix Programming. The presentation of Topic (Sockets) has designed according to the Network Programming Subject, B.Tech, 6th Semester syllabus of Punjab Technical University Kapurthala, Punjab.
1.What is IP address
2.When & how it was devised
3.IPV4 Features & its functionality
4.Benefits of IPV4 & Devices supporting IPV4
5.Problems of IPV4 & What happened to IPV5
6.What led to IPV6
7.IPV6 Features & Functionality
8.Benefits of IPV6 & supporting devices
9.How transition from IPV4 to IPV6 will happen
10.Problems & challenges that are anticipated & Conclusion
TCP and UDP are transport layer protocols used for data transfer in the OSI model. TCP is connection-oriented, requiring a three-way handshake to establish a connection that maintains data integrity. It guarantees data will reach its destination without duplication but is slower than UDP. UDP is connectionless and used for applications requiring fast transmission like video calls, but does not ensure packet delivery and order. Both protocols add headers to packets with TCP focused on reliability and UDP on speed.
Heap Sort in Design and Analysis of algorithmssamairaakram
Brief description of Heap Sort and its types.it includes Binary Tree and its types. analysis and algorithm of Heap Sort. comparison b/w Heap,Qucik and Merge Sort.
IP addressing provides a unique identifier for devices on a network. There are two main types - static and dynamic. IP addresses are 32-bit numbers divided into network and host portions. Classes A, B, and C determine the portions. Subnetting and CIDR allow flexible allocation. Special addresses like private and link-local are never used publicly. IPv6 uses 128-bit addressing. Tools like ping, tracert, and pathping test network connectivity. Mobile IP uses home and care-of addresses to maintain connectivity as devices move between networks, with home and foreign agents facilitating address changes. Inefficiency can occur via double crossing or triangle routing.
The document discusses various database recovery techniques including log-based recovery, shadow paging recovery, and recovery with concurrent transactions. Log-based recovery uses a log to record transactions and supports either deferred or immediate database modification. Shadow paging maintains a shadow page table to allow recovery to a previous state. Checkpointing improves recovery performance. Recovery for concurrent transactions uses undo and redo lists constructed during the recovery process.
ER DIAGRAM TO RELATIONAL SCHEMA MAPPING ARADHYAYANA
1) Entity types from ER diagrams are converted to tables, with attributes becoming columns and the entity's key becoming the primary key. Multi-valued attributes become separate tables linked by foreign keys.
2) Weak entities become tables with a composite primary key of the strong entity's primary key and the weak entity's key.
3) Relationships are represented by either adding foreign keys between tables or creating a separate table for many-to-many relationships containing foreign keys from the related tables.
This document discusses protocol architectures and the TCP/IP model. It introduces the need for a protocol architecture to break communication tasks into layers. It describes the key layers of the TCP/IP model used in the Internet, including the physical, network access, internet, transport, and application layers. It also compares TCP/IP to the OSI model and discusses how traditional applications differ from newer multimedia applications in their network requirements.
Syntax-Directed Translation: Syntax-Directed Definitions, Evaluation Orders for SDD's, Applications of Syntax-Directed Translation, Syntax-Directed Translation Schemes, and Implementing L-Attributed SDD's. Intermediate-Code Generation: Variants of Syntax Trees, Three-Address Code, Types and Declarations, Type Checking, Control Flow, Back patching, Switch-Statements
The document discusses IP addresses and the differences between IPv4 and IPv6. It defines what an IP address is and explains the classes of IPv4 addresses including Class A, B, C, D and E. It also defines IPv6, noting it uses 128-bit addresses represented by 8 groups of hexadecimal digits separated by colons. The key differences between IPv4 and IPv6 are that IPv4 uses 32-bit addresses in dot-decimal notation while IPv6 uses 128-bit addresses in hexadecimal colon-separated notation and has a much larger address space.
This document discusses remote invocation and summarizes key aspects of remote procedure call (RPC). It describes RPC as extending normal function calling such that the called and calling procedures are not in the same address space. RPC involves invoking remote elements through methods like request-reply protocol and remote method invocation. The document outlines the steps of an RPC call, including how client and server stubs are used to package requests and unpack responses to allow remote procedures to be called like local procedures.
A binary tree is a tree data structure where each node has at most two children, described as left and right. There are different types of binary trees including full binary trees where each node has 0 or 2 children, and complete binary trees where all levels are fully filled except the lowest, which is filled from left to right. The document discusses properties of binary trees like the maximum number of nodes on each level and relationships between numbers of nodes and edges. It also describes common traversal techniques like preorder, inorder and postorder that visit nodes in different sequences, and provides pseudocode for algorithms to perform these traversals using a stack.
Repository Pattern: Un buon design al servizio della testabilità.
Le slides si riferiscono al talk tenuto in Mikamai Milano durante i TDD Meetup di Milano, il 02/05/2017
Code Contracts and Generics: implementing a LINQ-enabled RepositoryAndrea Saltarello
In questa sessione vedremo come implementare il Repository pattern in modo da creare un Data Access Layer interrogabile mediante query LINQ, delegando l'effettiva esecuzione delle stesse ad O/RM quali Entity Framework e/o NHibernate.
The Open Systems Interconnection model (OSI model) is a conceptual model that characterizes and standardizes the communication functions of a telecommunication or computing system without regard to their underlying internal structure and technology.
The document discusses data link layer protocols, including LLC, MAC, and Ethernet standards. It describes the functions of the physical layer, data link layer, and logical link control sublayer. It also covers IP addressing schemes like IPv4 addresses, network classes, public vs private addresses, and subnetting. CIDR is introduced as a method to improve address space utilization and routing scalability on the internet.
The document discusses transport layer protocols TCP and UDP. It provides an overview of process-to-process communication using transport layer protocols. It describes the roles, services, requirements, addressing, encapsulation, multiplexing, and error control functions of the transport layer. It specifically examines TCP and UDP, comparing their connection-oriented and connectionless services, typical applications, and segment/datagram formats.
The document discusses naming in distributed systems. It covers desirable features of naming systems like location transparency and location independence. It differentiates between human-oriented and system-oriented names. It also discusses name spaces, name servers, name resolution including recursive and iterative approaches, and name caching.
This document discusses leftist heaps, which are a type of priority queue implemented as a variant of a binary heap. Leftist heaps maintain the property that the right descendant of each node has a lower rank, or distance to the nearest leaf node, than the left descendant. This property helps keep the tree balanced during operations like insertion and merging of heaps that have a time complexity of O(log n). Deletion of the minimum element involves disconnecting and merging the left and right subtrees.
The document compares the OSI reference model and the TCP/IP model. The OSI reference model has 7 layers - physical, data link, network, transport, session, presentation and application layer. It was developed by ISO as a standard for network communication. The TCP/IP model has 4 layers - link, internet, transport and application layer. It is the communication protocol used for the internet and defines the rules for communication between computers over the internet. TCP and IP work together, with TCP handling communication between applications and networks, and IP handling communication between computers.
When we desire a communication between two applications possibly running on different machines, we need sockets. This presentation aims to provide knowledge of basic socket programming to undergraduate students. Basically, this presentation gives the importance of socket in the area of networking and Unix Programming. The presentation of Topic (Sockets) has designed according to the Network Programming Subject, B.Tech, 6th Semester syllabus of Punjab Technical University Kapurthala, Punjab.
1.What is IP address
2.When & how it was devised
3.IPV4 Features & its functionality
4.Benefits of IPV4 & Devices supporting IPV4
5.Problems of IPV4 & What happened to IPV5
6.What led to IPV6
7.IPV6 Features & Functionality
8.Benefits of IPV6 & supporting devices
9.How transition from IPV4 to IPV6 will happen
10.Problems & challenges that are anticipated & Conclusion
TCP and UDP are transport layer protocols used for data transfer in the OSI model. TCP is connection-oriented, requiring a three-way handshake to establish a connection that maintains data integrity. It guarantees data will reach its destination without duplication but is slower than UDP. UDP is connectionless and used for applications requiring fast transmission like video calls, but does not ensure packet delivery and order. Both protocols add headers to packets with TCP focused on reliability and UDP on speed.
Heap Sort in Design and Analysis of algorithmssamairaakram
Brief description of Heap Sort and its types.it includes Binary Tree and its types. analysis and algorithm of Heap Sort. comparison b/w Heap,Qucik and Merge Sort.
IP addressing provides a unique identifier for devices on a network. There are two main types - static and dynamic. IP addresses are 32-bit numbers divided into network and host portions. Classes A, B, and C determine the portions. Subnetting and CIDR allow flexible allocation. Special addresses like private and link-local are never used publicly. IPv6 uses 128-bit addressing. Tools like ping, tracert, and pathping test network connectivity. Mobile IP uses home and care-of addresses to maintain connectivity as devices move between networks, with home and foreign agents facilitating address changes. Inefficiency can occur via double crossing or triangle routing.
The document discusses various database recovery techniques including log-based recovery, shadow paging recovery, and recovery with concurrent transactions. Log-based recovery uses a log to record transactions and supports either deferred or immediate database modification. Shadow paging maintains a shadow page table to allow recovery to a previous state. Checkpointing improves recovery performance. Recovery for concurrent transactions uses undo and redo lists constructed during the recovery process.
ER DIAGRAM TO RELATIONAL SCHEMA MAPPING ARADHYAYANA
1) Entity types from ER diagrams are converted to tables, with attributes becoming columns and the entity's key becoming the primary key. Multi-valued attributes become separate tables linked by foreign keys.
2) Weak entities become tables with a composite primary key of the strong entity's primary key and the weak entity's key.
3) Relationships are represented by either adding foreign keys between tables or creating a separate table for many-to-many relationships containing foreign keys from the related tables.
This document discusses protocol architectures and the TCP/IP model. It introduces the need for a protocol architecture to break communication tasks into layers. It describes the key layers of the TCP/IP model used in the Internet, including the physical, network access, internet, transport, and application layers. It also compares TCP/IP to the OSI model and discusses how traditional applications differ from newer multimedia applications in their network requirements.
Syntax-Directed Translation: Syntax-Directed Definitions, Evaluation Orders for SDD's, Applications of Syntax-Directed Translation, Syntax-Directed Translation Schemes, and Implementing L-Attributed SDD's. Intermediate-Code Generation: Variants of Syntax Trees, Three-Address Code, Types and Declarations, Type Checking, Control Flow, Back patching, Switch-Statements
The document discusses IP addresses and the differences between IPv4 and IPv6. It defines what an IP address is and explains the classes of IPv4 addresses including Class A, B, C, D and E. It also defines IPv6, noting it uses 128-bit addresses represented by 8 groups of hexadecimal digits separated by colons. The key differences between IPv4 and IPv6 are that IPv4 uses 32-bit addresses in dot-decimal notation while IPv6 uses 128-bit addresses in hexadecimal colon-separated notation and has a much larger address space.
This document discusses remote invocation and summarizes key aspects of remote procedure call (RPC). It describes RPC as extending normal function calling such that the called and calling procedures are not in the same address space. RPC involves invoking remote elements through methods like request-reply protocol and remote method invocation. The document outlines the steps of an RPC call, including how client and server stubs are used to package requests and unpack responses to allow remote procedures to be called like local procedures.
A binary tree is a tree data structure where each node has at most two children, described as left and right. There are different types of binary trees including full binary trees where each node has 0 or 2 children, and complete binary trees where all levels are fully filled except the lowest, which is filled from left to right. The document discusses properties of binary trees like the maximum number of nodes on each level and relationships between numbers of nodes and edges. It also describes common traversal techniques like preorder, inorder and postorder that visit nodes in different sequences, and provides pseudocode for algorithms to perform these traversals using a stack.
Repository Pattern: Un buon design al servizio della testabilità.
Le slides si riferiscono al talk tenuto in Mikamai Milano durante i TDD Meetup di Milano, il 02/05/2017
Code Contracts and Generics: implementing a LINQ-enabled RepositoryAndrea Saltarello
In questa sessione vedremo come implementare il Repository pattern in modo da creare un Data Access Layer interrogabile mediante query LINQ, delegando l'effettiva esecuzione delle stesse ad O/RM quali Entity Framework e/o NHibernate.
Come funzionano i Retrieval-Augmented Generators (RAG) e quanto i database vettoriali sono fondamentali per poter memorizzare e utilizzare le sorgenti dati aziendali e personali?
CQRS, ovvero: 2 stack, uno per "leggere" e l'altro per "scrivere". Se per "scrivere" abbiamo l'imbarazzo della scelta (Domain Model, Command, Event Sourcing, ...) per leggere, invece, apparentemente c'è poco da dire. "Apparentemente", appunto. Parliamone :-)
This set of design patterns are related to Enterprise Patterns. In it you can find, J2EE, Presentation, Business & Integration Patterns (such as: ApplicaCon Controller, Data Transfer Object (DTO), Business Object (BO) & Data Access Object (DAO) among others ...)
Never Mind the Bollocks: here's the Domain Driven DesignAndrea Saltarello
La lettura del Blue Book può generare reazioni che vanno dal "Cargo cult" (a.k.a. "non avrai altro Modello all’infuori di me") a "’sta roba non mi serve: io faccio gestionali, non applicazioni che lanciano i razzi sulla Luna".
Previa una attualizzazione dei concetti del Blue Book, che ha ormai compiuto 10 anni, in questa sessione affronteremo leggende metropolitane e falsi miti e implementeremo DDD mostrando poche slide e tanto codice.
2. Mi presento
Christian Nastasi
Software Architect & Technical Coach
Sviluppo Software dal 1999
Esperienza di quasi 2 anni a Londra
Email: christian.nastasi@gmail.com
Linkedin: /in/cnastasi/
3. Disclaimer
● Non possiedo la verità assoluta, questo è solo uno dei
tanti approcci possibili
● Fra 1 anno probabilmente scriverò codice in maniera
completamente differente
● Questo talk era stato ideato sotto forma di workshop,
per questioni di tempistiche è stato ridotto e certe
tematiche potrebbero essere incomplete.
4. A Repository mediates between the domain and
data mapping layers, acting like an in-memory
domain object collection.
Client objects construct query specifications
declaratively and submit them to Repository for
satisfaction.
Objects can be added to and removed from the
Repository, as they can from a simple collection of
objects, and the mapping code encapsulated by the
Repository will carry out the appropriate
operations behind the scenes.
Martin Fowler
Repository Pattern: Definizione
Un Repository fa da intermediario tra il dominio
(business logic) ed il layer di persistenza, agendo come
una collezione di oggetti di dominio, salvati in
memoria.
Gli oggetti “cliente” costruiscono le query
dichiarativamente e le inviano al Repository per essere
eseguite.
Gli oggetti possono essere aggiunti e rimossi nello
stesso modo in cui viene fatto per una collezione di
oggetti. Il codice relativo alla persistenza è incapsulato
all’interno del repository, che si occuperà di eseguire le
operazioni appropriate “dietro le quinte”
Martino Cacciatore di uccelli
5. Repository Pattern: Definizione
Un Repository è un’astrazione che ci permette di separare i dati
da come vengono utilizzati a come vengono memorizzati.
L’astrazione è quella della collezione di oggetti con interfaccia
CRUD.
6. Repository Pattern: Definizione
Le query vanno scritte in modo dichiarativo: significa che
dobbiamo indicare soltanto cosa vogliamo ottenere.
Il come è compito del Repository, che incapsula al suo interno le
logiche di persistenza.
7. Repository Pattern: Esempio di interfaccia
interface EntityRepository
{
public function get (int $id):?Entity;
public function getBy (Criteria $criteria):Iterator;
public function getAll():Iterator;
public function save (Entity $entity);
public function delete (Entity $entity);
public function exists (Entity $entity):bool;
}
8. Caso di studio: Blog MVP
- As a user I want to publish a post
- As a user I want to see all my posts
- As a user I want to publish a comment on a post
- As a user I want to see all the comments of a post
9. Step 0: Codice Monolitico
- Classe monolitica
- Logica e persistenza mischiate nello
stesso posto
- Non si possono usare i mock
- Necessità di un database di test
10. Step 1: Dividiamo le responsabilità
+ Codice suddiviso logicamente
- Logica e persistenza mischiate nello
stesso posto
- Non si possono usare i mock
- Necessità di un database di test
11. Step 2: Separiamo la logica dalla persistenza
+ Codice suddiviso logicamente
+ Logica e persistenza separate
- Non si possono usare i mock
- Necessità di un database di test
12. Step 3: Incapsuliamo i dati in modelli
+ Codice suddiviso logicamente
+ Logica e persistenza separate
+ Si possono usare i mock
- Necessità di un database di test
13. Entità
Un’entità è un modello che rappresenta un oggetto di dominio e che può
essere identificato univocamente attraverso un id.
Istanze differenti dello stesso oggetto ma con un id identico rappresentano la
stessa entità e sono pertanto uguali.
14. Step 4: Refactoring dei Manager
+ Codice suddiviso logicamente
+ Logica e persistenza separate
+ Si possono usare i mock
- Necessità di un database di test
15. Step 5: Refactoring dei Repository
+ Codice suddiviso logicamente
+ Logica e persistenza separate
+ Si possono usare i mock
+ Necessità di un database di test
18. Vantaggi
+ Si può mutare il layer di persistenza senza incidere sul funzionamento
della logica
+ Utilizzando un Repository In-memory i tempi per eseguire i test di unità
si accorciano e non c’è bisogno di ripulire il DB ogni volta.
+ Incoraggia un design DRY (don’t repeat yourself)
+ Il layer di persistenza potrebbe essere di qualsiasi natura, anche remoto
(Utile in una logica a microservices)