Top Banner
Porozumění kódu a návrh systémů pomocí produktu Visual Studio ® 2010 Michael Juřek
15

© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.

Dec 14, 2015

Download

Documents

Maleah Lampen
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.

Porozumění kódu a návrh systémůpomocí produktuVisual Studio® 2010Michael Juřek

Page 2: © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.

Existující kód

− Bývá těžké mu porozumět již po několika letech, měsících či dnech od vytvoření

Page 3: © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.

Udržitelnost a kontrola

− Na začátku víme, co chceme. Průběžná kontrola je ale obtížná. Často vzniká něco co nechceme – obtížně udržovatelný kód.

Page 4: © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.

Porozumění existujícímu kódu

Vyjádření záměru Zajištění záměru

Pohyb správným směrem...

Page 5: © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.

Staňte se objevitelem− Historické dokumenty

jsou pouze částí příběhu− Skutečná pravda je

obsažena v kódu− Zjistit pravdu může být

obtížné

Page 6: © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.

Porozumění prostřednictvím interaktivní vizualizace

Page 7: © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.

Demo:Architecture Explorer

Generování sekvenčního diagramu

Page 8: © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.

Vyjádření záměru

− Zvyšuje šanci na jeho realizaci− Obrázek je lepší než 1000 slov

− Standardní UML diagramy− Diagram vrstev

− Model -> kód anebo kód-> model – Visual Studio podporuje oba přístupy− Částečně formou přicházejících Power Tools

Page 9: © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.

Unified Modeling Language (UML)−Podporované diagramy

− Activity− Class− Component− Sequence− Use Case

−Integrace s pracovními položkami

−Dobrá podpora pro verzování modelu

Page 10: © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.

Demo:UML

Page 11: © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.

Kód unášený proudem

−Kód je často unášen pryč od původního záměru:−Neplánované závislosti−Přebírání novými lidmi−...

Page 12: © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.

Layer Diagram

−Vizualizace zamýšleného designu

−Validace oproti implementaci

−Na požádání nebo jako součást buildu

Page 13: © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.

Validace architektury při buildu

demo

Page 14: © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.

Porozumění existujícímu kódu

Vyjádření záměru Zajištění záměru

Pohyb správným směrem...

Page 15: © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.

© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.

The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after

the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.