Presentation is loading. Please wait.

Presentation is loading. Please wait.

Software Architecture Martin Nally. Who am I? And why am I here?

Similar presentations


Presentation on theme: "Software Architecture Martin Nally. Who am I? And why am I here?"— Presentation transcript:

1 Software Architecture Martin Nally

2 Who am I? And why am I here?

3 What most software looks like inside

4 What is design? 1 [countable] a plan or drawing produced to show the look and function or workings of a building, garment, or other object before it is built or made. 2 [uncountable, countable] the general arrangement of the different parts of something that is made, such as a building, book, machine, etc. 3 [uncountable, countable] the purpose, planning, or intention that exists or is thought to exist behind an action, fact, or material object. Most importantly, the design signifies the ideas that guide construction

5 What is architecture? 1 [uncountable] the art and study of designing buildings – to study architecture 2 [uncountable] the design or style of a building or buildings – the architecture of the eighteenth century – modern architecture 3 [countable, uncountable] (computing) the design and structure of a computer system

6 What is the difference? “The design of a piece of software” vs “The architecture of the software” The second is either: – A) The highest-level and most difficult to change aspects of design – B) A vulgar grammatical error commonly made by computer programmers (and increasingly others) You choose.

7 What to read There is a lot out there, much of it bad Here are two I like

8 What makes good design? Parsimony Clarity of structure Consistency – “Blaauw and I believe that consistency underlies all principles. A good architecture is consistent in the sense that, given a partial knowledge of the system, one can predict the remainder” Orthogonality Propriety Generality

9 But you can’t really get it from books It takes a lot of practice. Key elements: – strong organizing ideas – the relentless pursuit of simplicity and order. The highest achievement is making it appear so clear and simple that people will think the problem wasn’t very hard or the solution very clever. “Perfection is achieved not when there is nothing more to add but when there is nothing more to take away” – Antoine de Saint Exupery

10 Let’s look at an example How do you integrate multiple applications into a single coherent system – A large web-site – An EAI (Enterprise application integration) system – A system of tools that support a development process

11 SCM Defect Tool Test Tool Requirements Tool SOA Test 1 Test 3 Bug 3 Bug 4 Bug 1 Bug 2 Change 2 Change 1 Build 1 Build 2 Data Reqt 1 Reqt 3 Reqt 2 Reqt 4 Data Build Tool Copy of Bug 2 Test 2 Copy of Test 2

12 SCM Defect Tool Test Tool Requirements Tool Service Bus Test 1 Test 3 Bug 3 Bug 4 Bug 1 Change 2 Change 1 Build 1 Build 2 Data Reqt 1 Reqt 3 Reqt 2 Reqt 4 Data Build Tool

13 Central repository SCM Defect Tool Test Tool Test 1 Test 3 Change 2 Change 1 Build 1 Build 2 Reqt 1 Reqt 3 Reqt 2 Reqt 4 Build Tool Query and reporting Bug 3 Bug 4 Bug 1 Requirements Tool

14 Build Tool SCM Test Tool Requirements Tool Defect Tool Defect ToolB A new one - Linked data Build 1 Change 2 Build 2 Change 1 Bug 2 Bug 3 Bug 4 Bug 1 Test 4 Test 1 Test 3 Test 2 Reqt 1 Reqt 2 Reqt 4 Reqt 3 SCM B

15 What is Linked Data? (TBL) 1.Use URIs as names for things 2.Use HTTP URIs so that people can look up those names. 3.When someone looks up a URI, provide useful information, using the standards (RDF*, SPARQL) 4.Include links to other URIs. so that they can discover more things.

16 What is Linked Data? (MPN) This world-wide web thing looks promising – I think it might catch on Two main things power the web – The HTTP protocol provides a universal API – HTML provides a universal content language We could do the same for data – The HTTP protocol (again) – RDF

17 How does this relate to REST? It’s the same, except – Nobody really does REST – they just say they do – REST does not specify a data model People use JSON, which lacks meaning

18 What is REST? A post-hoc analysis of the design of the WWW, written up by Roy Fielding “distributed hypermedia” – Client-Server – Stateless – Cache – Uniform Interface – Layered System – Code on demand

19 Doing violence to REST Wunderground PWS upload protocol – Uses GET to ‘post’ new records !! http://weatherstation.wunderground.com/weatherstati on/updateweatherstation.php?ID=KCASANFR5&PASSW ORD=XXXXXX&dateutc=2000-01- 01+10%3A32%3A35&winddir=230&windspeedmph=12 &windgustmph=12&tempf=70&rainin=0&baromin=29. 1&dewptf=68.2&humidity=90&weather=&clouds=&sof twaretype=vws%20versionxx&action=updateraw – Why?

20 “Swagger: A simple, open standard for describing REST APIs”

21 What is wrong with this? “REST APIs must be hypertext-driven” - Roy “A REST API should spend almost all of its descriptive effort in defining the media type(s) used for representing resources and driving application state, or in defining extended relation names and/or hypertext- enabled mark-up for existing standard media types. Any effort spent describing what methods to use on what URIs of interest should be entirely defined within the scope of the processing rules for a media type (and, in most cases, already defined by existing media types). [Failure here implies that out-of-band information is driving interaction instead of hypertext.]” - Roy

22 But really – does it matter? Playing fast and loose with ideas will have consequences I was recently asked: “How can I verify the links in my API? Answer: – If you wrote a swagger-style API, you will have to write special code – If you wrote a true REST API, any standard crawler will do. “Crawlability” is a good test for several common REST mistakes

23 More REST violence - Docker curl http://172.17.0.1/containers/jsonhttp://172.17.0.1/containers/json curl –X POST –d ‘{“Image”: image_name}’ –H “Content-Type: application/json” http://172.17.0.1/containers?name=inst1 http://172.17.0.1/containers?name=inst1

24 And more

25 Do you really understand it? 3 levels of understanding of math – I can use the formula to solve a problem – I can prove the formula – I see the big idea behind the proof In programming (? – make up your own) – I can use the API – I can design an API – I see the big idea behind the design – I can tell you why all the other design options are inferior or infeasible


Download ppt "Software Architecture Martin Nally. Who am I? And why am I here?"

Similar presentations


Ads by Google