introdução à arquitetura de software

24
Introdução à Arquitetura de Software Rodrigo Veiga – PUC-Rio 05/04/2009 1

Upload: rodrigo-veiga

Post on 07-Jun-2015

2.297 views

Category:

Technology


3 download

DESCRIPTION

An introduction to software architecture.

TRANSCRIPT

Page 1: Introdução à Arquitetura de Software

1

Introdução à Arquitetura de Software

Rodrigo Veiga – PUC-Rio

05/04/2009

Page 2: Introdução à Arquitetura de Software

2

Agenda• Arquitetura – Definição• Histórico

– Evolução do Desenvolvimento– Trabalhos Pioneiros em Arquitetura de Software– Processo de Maturação

• Conceitos– Definição– Termos Relacionados– Conceitos errados– Architectural Concerns– Architectural Styles

• Critérios para uma boa Arquitetura• O Papel de Arquiteto de Software• Arquitetura Hoje• Grupos e Sites sobre o assunto• Bibliografia

Page 3: Introdução à Arquitetura de Software

3

Arquitetura

• “The art or science of building” (Oxford Dictionary)

• “Is an imitation of Nature” (Vitruvius on Architecture)

• “Should have Beauty (Venustas), Firmness (Firmitas) and Utility (Utilitas)” (Vitruvius on Architecture)

• “Arte ou a técnica de projetar e edificar o ambiente habitado pelo ser humano” (Wikipedia)

Page 4: Introdução à Arquitetura de Software

4

Arquitetura

• “Arte ou técnica de organizar e configurar espaços”(Wikipedia)

• “Se manifesta de duas formas: a atividade e o resultado físico” (Wikipedia)

• “Architecture defines the essential structure and organization of something abstracted in an appropriate pattern” (Rob Beckmann , Caro Systems)

Page 5: Introdução à Arquitetura de Software

5

“Every thing has an architecture” (Grady Booch)

“In all disciplines, architecture provides a mean for solving a common problem: assuring that a building, or bridge, or composition, or book, or computer, or network, or system has certain properties and behaviors when it has been built” (Beautiful Architecture)

Page 6: Introdução à Arquitetura de Software

6

Desenvolvimento de Software

1950 – linguagens de máquina

1958 – Fortran / operações agrupadas

1970s – Surgimento de Interfaces

Arquitetura de Software

Evolução ao longo das últimas décadas

Extraído de: An Introduction to Software Architecture, David Garlan and Mary Shaw, 1994

Page 7: Introdução à Arquitetura de Software

7

Arquitetura de Software

• Trabalhos Pioneiros– Edgar Dijkstra, 1968

• A Case against the GO TO Statement– Não apenas programar uma solução satisfatória– Introduz a idéia de que “a layered system results in

ease of development and maintenance”

– Fred Brooks Jr., 1975• The Mythical Man-Month

– “Every part must reflect the same philosophies and the same balancing of desiderata….Ease of use, then, dictates unity of design, conceptual integrity (Simplicity and Straightforwardness)”

Page 8: Introdução à Arquitetura de Software

8

Arquitetura de Software

• Trabalhos Pioneiros– David Lorge Parnas, 1972:

• On the Criteria to Be Used in Decomposing Systems into Modules

– “Information Hiding as the basis of decomposition for ease of maintenance and reuse”

– “The separation of Interface from implementation of components”

– Wolfram Bartussek e David Lorge Parnas, 1978: • Using Assertions About Traces to Write Abstract

Specifications for Software Modules– Princípios para detecção e tratamento de erros

(assertivas, exceções, etc)

Page 9: Introdução à Arquitetura de Software

9

Arquitetura de Software

Extraído de: The Golden Age of Software Architecture, Mary Shaw and Paul Clements, 2006

Processo de Maturação da Arquitetura de Software

Page 10: Introdução à Arquitetura de Software

10

Arquitetura de Software

• “Software architecture is what software architects do” (Kent Beck at OOPSLA 92)

• “Software Architecture is a game of trade-offs - a decision that improves one characteristic often diminishes another”(Beautiful Architecture)

• “Architecting software is different from physical systems” (Grady Booch)

• “A set of architectural (or design) elements that have a particular form” ou “Architecture = {elements, form, rationale}” (Perry and Wolf, 1992)

Page 11: Introdução à Arquitetura de Software

11

Arquitetura de Software

• “A software system architecture comprises– A collection of software and system components, connections, and

constraints– A collection of system stakeholders' need statements– A rationale which demonstrates that the components, connections, and

constraints define a system that, if implemented, would satisfy the collection of system stakeholders' need statements”

(Boehm et al., 1995)

• “Software architecture is the fundamental organization of a system, embodied in its components, their relationships to each other and the environment, and the principles governing its design and evolution”(IEEE 1471-2000)

• “Is a set of principal design decisions made about the system” (Software Architecture Foundations, Theory and Practice)

Page 12: Introdução à Arquitetura de Software

12

Arquitetura de Software• “Architecture establishes the context for design

and implementation” (Grady Booch)

CODE

implementation

design

architecture

“Architectural decisions are the most fundamental decisions; changing them will have significant ripple effects.”(Grady Booch)

Page 13: Introdução à Arquitetura de Software

13

Arquitetura de Software• Termos Relacionados

– Components• “An architectural element that encapsulates a subset of

system’s funcionality and/or data” (Software Architecture)

– Connections• “An architectural element that effects and regulates interactions

among components” (Software Architecture)

– Stakeholders• “Is an individual, team, or organization with interests in a system

(or part of it)” (Grady Booch)

– Models• “Is a simplification of reality, created in order to better

understand the system being created; a semantically closed abstraction of a system” (Grady Booch)

– Views / Dimensions• “A view is a representation of a whole system from the

perspective of a related set of concerns” (Grady Booch)

Page 14: Introdução à Arquitetura de Software

14

Arquitetura de Software• Termos Relacionados (cont.)

– Concerns• “Interests related with aspects that are important to one or

more stakeholders” (Grady Booch)

– Patterns• “Is a kind of rule that states a problem to be solved and a

solution to that problem” (Patterns of Software)

– Architecture Erosion / Entropy• “The consequences of actions that disorganizes a software

architecture over time” (Stephen J. Mellor foreword to Beautiful Architecture)

– Architecture Style• “Style is the classification of an architecture according to those

with similar patterns” (Grady Booch)

– Reference Architecture• “Is a set of principal design decisions that are simultaneously

applicable to multiple related systems” (Software Architecture)

Page 15: Introdução à Arquitetura de Software

15

Conceitos Errados sobre Arquitetura de Software

• “Architecture is just paper• Architecture and design are the same things• Architecture and infrastructure are the same

things• <my favorite technology> is the architecture• A good architecture is the work of a single

architect• Architecture can be represented in a single

blueprint (or is flat)• Architecture is a science• Architecture is an art”

(Handbook of Architecture, Grady Booch)

Page 16: Introdução à Arquitetura de Software

16

Arquitetura de Software

• Architectural Concerns(Adaptado de Beautiful Architecture e Patterns of Software)

Functionality

Usability

Modularity

Performance

Reusability

ScalabilityChangeability

Reliability

Habitability

Ecosystem

Security

Page 17: Introdução à Arquitetura de Software

17

Arquitetura de Software

• Architectural Styles (Software Architecture)

•Main Program and Subrotines•Object-Oriented

Language Influenced Styles

•Virtual Machines•Client-ServerLayered•Batch-sequential•Pipe-and-filterDataflow•Publish-subscribe•Event-based

Implicit Invocation

•P2PPeer-To-Peer

Page 18: Introdução à Arquitetura de Software

18

Critérios para uma boa Arquitetura

“One fact in one place Automatic Propagation High Modularity Simplicity: Simple but not Simpler Versatility Conceptual Integrity / Resist Entropy Elegance (Doing the most with least) Use of Patterns Standard Compliance Habitability / Comprehensibility Productivity Interoperability”

(Adaptado de: Beautiful Architectures, Handbook of Architecture, Patterns of Software)

Page 19: Introdução à Arquitetura de Software

19

O Papel de Arquiteto de Software

• Responsabilidades– Responsável pela Arquitetura– Manter a integridade da Arquitetura– Definir e validá-la– Facilitar a comunicação entre equipes– Atuar como mentor dos times

• Características– Tem que ter flexibilidade / adaptabilidade– Comunicação e Liderança– Não deve impor as regras / Saber ouvir– Visão holística

(Handbook of Software Architecture, Grady Booch)

Page 20: Introdução à Arquitetura de Software

20

O Papel de Arquiteto de Software

• Maus hábitos– Perfeccionismo– Inflexibilidade– Micromanagement– Isolacionismo

(Software Architecture)

Page 21: Introdução à Arquitetura de Software

21

Arquitetura de Software Hoje

• Crescimento de ferramentas e mecanismos que ajudam a manter a integridade da Arquitetura– Model Driven Design– Menos código para implementar mais funcionalidades

• Maior interoperabilidade– Orientação a serviços– Utilização de Agentes– Cada vez mais sistemas heterogêneos (várias linguagens)

• Virtualização, Cloud Computing• Processos

– Arquitetura deixando de ser encarada como uma fase de projeto, mas como uma necessidade de ponta a ponta

• Web 2.0– Novos níveis de exigência

Page 22: Introdução à Arquitetura de Software

22

Grupos e Sites sobre o assunto

– Pangea (http://pangeanet.org)– Highscalability (http://highscalability.com)– Infoq (http://www.infoq.com)– The Server Side (

http://www.theserverside.com)

Page 23: Introdução à Arquitetura de Software

23

Referências

• Diomidis Spinellis & Georgios ousios, Beautiful Architecture, O’Reilly 2009

• Revista MundoJava, edições 15 e 25• Richard N. Taylor, Nenrad Medvidovic, Eric M. Dashofy, Software

Architecture – Foundations, Theory and Practice, Wiley 2009• Richard P. Gabriel, Patterns of Software, 1996• Handbook of Software Architecture, Grady Booch, IBM• Mary Shaw and Paul Clements, The Golden Age of Software

Architecture, 2006• Visão Geral de Arquitetura de Software, Marco Aurélio S. Mendes,

Instituto GTI• David Garlan and Mary Shaw, An Introduction to Software

Architecture, 1994• Dewayne E. Perry & Alexander L. Wolf, Foundations for the Study

of Software Architecture, 1992• Ane Cristina Varoto, Visões em arquitetura de software, 2002

Page 24: Introdução à Arquitetura de Software

24

Referências

• Wikipedia– http://pt.wikipedia.org/wiki/Arquitetura, Acesso em 04/2009– http://pt.wikipedia.org/wiki/Arquitetura_de_software, Acesso

em 04/2009– http://pt.wikipedia.org/wiki/Arquitetura_(desambigua%C3%A

7%C3%A3o), Acesso em 04/2009

• Scaling Twitter: Making Twitter 10000 Percent Faster | High Scalability, http://highscalability.com/scaling-twitter-making-twitter-10000-percent-faster, Acesso em 04/2009

• A Quick Look at Architectural Styles and Patterns; http://www.infoq.com/news/2009/02/Architectural-Styles-Patterns, Acesso em 04/2009

• Architectural Styles, Patterns, and Metaphors; http://shapingsoftware.com/2008/08/10/architectural-styles-patterns-and-metaphors, Acesso em 04/2009