User Tools

Site Tools


devops:software_architecture

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
devops:software_architecture [2016/05/23 06:10] – [Builds] skipidardevops:software_architecture [2024/01/11 09:09] (current) skipidar
Line 11: Line 11:
 |Baseline| Build, according to a cadence / milestone. Will probably be released. | |Baseline| Build, according to a cadence / milestone. Will probably be released. |
  
-{{http://i520.photobucket.com/albums/w327/schajtan/2016-05-23_08-00-44_zpsyosqksd1.png?600}}+{{https://lh3.googleusercontent.com/-dN06ZdaCy6Q/WsdI_sbHVdI/AAAAAAAAAHM/BngAA7lDZ8AVVWVk9aiwKZLHRdcwJtq6wCHMYCw/s0/2018-04-06_12-16-28.png?600}} 
 + 
 + 
 + 
 +===== Summary ===== 
 + 
 +- Design Patterns 
 + aus GOF 
 +  
 + 
 +- MVC 
 + 
 + 
 +- API:  
 +HAL, HATEOAS, REST 
 + - HATEOAS -  
 +  
 + - architecture pattern 
 + Hypermedia As The Engine Of The Aookication State 
 +  
 + - REST 
 + GET - safe, idempotent 
 + PUT  
 + POST - Idempotent 
 + DELETE - Idempotent 
 + PATCH 
 +  
 +  
 + 
 +See https://stackify.com/soap-vs-rest/ 
 +  
 +  
 +  * Java RMI 
 +    * RMI you can have references to remote objects and invoke their methods 
 + RMI stands out when the need to develop something more complex than a pure client-server architecture arises 
 +  
 +  * Java RPC 
 +    * With RPC you can just call remote functions exported into a server,In Java, when you talk about RPC, you are talking about SOAP and Web Services. 
 +    * Lost its popularity, REST is the solution of choice. 
 +    * SOAP - "Simple Object Access Protocol" 
 +        * If you need ACID-compliant transactions, SOAP is the way to go.  
 + - CORBA 
 + -Common Object Request Broker Architecture 
 + 
 +  
 +  * REST - Representational state transfer. The general consensus among experts these days is that REST is the typically preferred protocol unless there’s a compelling reason to use SOAP 
 +      * REST allows a greater variety of data formats, whereas SOAP only allows XML. 
 +      * Simple 
 +      * uses HTTP layer 
 +  
 + 
 +  
 +  
 +  
 +  
 +  * architecture principles  
 +      * SOLID 
 +            * Single-responsibiity Principle 
 +            * Open-Cosed 
 +            * Liskov substitution principles  
 +            * Interface segregation principle 
 +               * client should NOT implement interfaces / methods they dont use 
 +            * Dependency Inversion principle 
 + -  
 +  
 +- 4+1 View: https://de.wikipedia.org/wiki/4%2B1_Sichtenmodell 
 + 
 +  * 1 Logical View 
 +    * Diagram: https://de.wikipedia.org/wiki/Klassendiagramm 
 +    * Diagram2: https://en.wikipedia.org/wiki/Communication_diagram 
 +    * Diagram3: https://en.wikipedia.org/wiki/Sequence_diagram 
 + 
 + 
 +  * 2 Development view 
 +    * Diagram: https://en.wikipedia.org/wiki/Package_diagram 
 + 
 + 
 +  * 3 Process view 
 +    * Diagram: https://en.wikipedia.org/wiki/Activity_diagram 
 + 
 + 
 + 
 +  * 4 Physical view / deployment view 
 +    * Diagram: https://en.wikipedia.org/wiki/Deployment_diagram 
 + 
 +  * +1 Scenarios 
 +    * Diagram: https://en.wikipedia.org/wiki/Use_case_diagram 
 + 
 + 
 + 
 +===== Object-Oriented Programming OOP ===== 
 + 
 +=== Polymorphism === 
 + 
 +Polymorphism in Java has two types:  
 + 
 +Runtime polymorphism (dynamic binding) and Compile time polymorphism (static binding).  
 + 
 +Method overriding is an example of dynamic polymorphism, while method overloading is an example of static polymorphism. 
 + 
 + 
 + 
 + 
 +=== Binding ===  
 + 
 +<color #22b14c>Binding</color>: association of method definition to the method call. 
 + 
 +<color #22b14c>Static binding</color>: The binding of static, private and final methods. These methods cannot be overridden, type of class is determined at compile time. 
 + 
 +<color #22b14c>Dynamic binding</color>: Determined at run time. Methods are not static, private, nor final. 
 + 
 +<sxh java> 
 +class Dog { 
 +    public void bark(){ 
 +        System.out.println("dog bark"); 
 +    } 
 +
 +class Hound extends Dog { 
 +    public void bark(){ 
 +        System.out.println("hound bark"); 
 +    } 
 +
 + 
 + 
 + 
 +public class OverridingTest1 { 
 +    public static void main(String [] args){ 
 +        Dog dog = new Dog(); // var of type dog resolves method bark at runtime 
 +        dog.bark(); // dog bark 
 +    } 
 +
 + 
 +public class OverridingTest2 { 
 +    public static void main(String [] args){ 
 +        Dog dog = new Hound(); // use Hound, where method bark is overridden 
 +        dog.bark(); // hound bark. var of type dog resolves method bark at runtime 
 +    } 
 +
 + 
 +</sxh> 
 + 
 + 
 + 
 +=== Method Overriding === 
 + 
 +Method overriding is an example of **dynamic polymorphism**. 
 + 
 +Method overriding, in object-oriented programming, is a language feature that allows a subclass or child class to provide a specific implementation of a method that is already provided by one of its superclasses or parent classes. 
 + 
 +<sxh java> 
 +class Dog { 
 +    public void bark(){ 
 +        System.out.println("dog bark"); 
 +    } 
 +
 +class Hound extends Dog { 
 +    public void bark(){ 
 +        System.out.println("hound bark"); 
 +    } 
 +
 +</sxh> 
 + 
 +=== Method Overloading === 
 + 
 +Method overloading is an example of **static polymorphism**. 
 + 
 +Method overloading in java is a feature that allows a class to have **more than one method with the same name**, but with **different parameters** 
 + 
 +<sxh java> 
 +public void Square ( int number )  
 +
 +    int square = number * number; 
 +    System.out.printIn(“Method with Integer Argument Called:“+square); 
 +
 + 
 +public void Square(double number) 
 +
 +    double square = number * number;  
 +    System.out.printIn(“Method with double Argument Called:“+square); 
 +
 + 
 +public void Square(long number) 
 +{  
 +    long square = number * number; 
 +    System.out.printIn(“Method with long Argument Called:“+square); 
 +
 +</sxh> 
 + 
 + 
 + 
 +===== Async programming ===== 
 + 
 +Exlained with Python 
 + 
 +by re-implementing "await" with scheduler 
 + 
 +https://www.heise.de/hintergrund/Asynchrones-Programmieren-async-minus-await-7527129.html 
 + 
 + 
 + 
devops/software_architecture.1463983835.txt.gz · Last modified: (external edit)