![Page 1: Hypertext transfer family of protocols (HTTP, HTTPS, SOAP) CSE 870 Miniproject on Frameworks Advanced Software Engineering Contact: Dr. B. Cheng, chengb](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2f5503460f94c49851/html5/thumbnails/1.jpg)
Hypertext transfer family of protocols (HTTP, HTTPS, SOAP)
CSE 870 Miniproject on FrameworksAdvanced Software Engineering
Contact: Dr. B. Cheng, chengb at cse dot msu dot edu
Matt Gerber
Adithya Krishnamurthy
![Page 2: Hypertext transfer family of protocols (HTTP, HTTPS, SOAP) CSE 870 Miniproject on Frameworks Advanced Software Engineering Contact: Dr. B. Cheng, chengb](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2f5503460f94c49851/html5/thumbnails/2.jpg)
Agenda
• Overview of Protocols• Overview of Frameworks• Class diagrams• Design pattern used• State diagrams• Demo• Conclusions
![Page 3: Hypertext transfer family of protocols (HTTP, HTTPS, SOAP) CSE 870 Miniproject on Frameworks Advanced Software Engineering Contact: Dr. B. Cheng, chengb](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2f5503460f94c49851/html5/thumbnails/3.jpg)
Overview of Protocols - HTTP• Request/Response protocol: Client or User Agent (UA) initiates a
request and a server responds.• HTTP Message elements
– Message Types: Request or Response– Message Headers: field-name ":" [ field-value ]
Example: Content-Type: text/html– Message Body: payload associated with request or response.– Message Length: Length of the message body.– General Header Fields: Cache-Control, Date, Pragma, Transfer-Encoding
• Request– Request Line: Method Request-URI HTTP-Version CRLF
Example: GET http://www.msu.edu/index.html HTTP/1.1
• Response– Status Line: HTTP-Version Status-Code Reason-Phrase CRLF
Example: HTTP/1.1 206 Partial content
![Page 4: Hypertext transfer family of protocols (HTTP, HTTPS, SOAP) CSE 870 Miniproject on Frameworks Advanced Software Engineering Contact: Dr. B. Cheng, chengb](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2f5503460f94c49851/html5/thumbnails/4.jpg)
Overview of Protocols - HTTPS
• Secure message-oriented protocol that works in conjunction with HTTP
• Secure wrapper around unsecure HTTP message - HTTP over SSL
• HTTPS Message elements– Same as those of HTTP except the range of headers is different and the bodies are
cryptographically enhanced.
• Request– Request Line: Secure * Secure-HTTP/1.4
• Response– Status Line: HTTPS-Version Status-Code Reason-Phrase CRLF
Example: Secure-HTTP/1.4 200 OK
• Message Authenticity Code (MAC)– Used to verify message integrity and sender authenticity
– MAC = hex(H(Message||[<time>]||<shared key>))
![Page 5: Hypertext transfer family of protocols (HTTP, HTTPS, SOAP) CSE 870 Miniproject on Frameworks Advanced Software Engineering Contact: Dr. B. Cheng, chengb](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2f5503460f94c49851/html5/thumbnails/5.jpg)
Overview of Protocols - SOAP
• SOAP stands for Simple Object Access Protocol
• XML based protocol to let applications exchange information over HTTP
• SOAP is platform and language independent
• SOAP Message elements:– Envelope element: <soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope">
– Header (Optional): <soap:Header>… </soap:Header>
– Body:
<soap:Body>
<x>5</x>
</soap:Body>
![Page 6: Hypertext transfer family of protocols (HTTP, HTTPS, SOAP) CSE 870 Miniproject on Frameworks Advanced Software Engineering Contact: Dr. B. Cheng, chengb](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2f5503460f94c49851/html5/thumbnails/6.jpg)
Agenda
• Overview of Protocols• Overview of Frameworks• Class diagrams• Design pattern used• State diagrams• Demo• Conclusions
![Page 7: Hypertext transfer family of protocols (HTTP, HTTPS, SOAP) CSE 870 Miniproject on Frameworks Advanced Software Engineering Contact: Dr. B. Cheng, chengb](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2f5503460f94c49851/html5/thumbnails/7.jpg)
Overview of Frameworks• Inheritance
class Fruit { //...
} class Apple extends Fruit {
//... }
• Compositionclass Fruit {
//... } class Apple {
private Fruit fruit = new Fruit(); //...
}
![Page 8: Hypertext transfer family of protocols (HTTP, HTTPS, SOAP) CSE 870 Miniproject on Frameworks Advanced Software Engineering Contact: Dr. B. Cheng, chengb](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2f5503460f94c49851/html5/thumbnails/8.jpg)
Overview of Frameworks
• Whitebox Framework– Only abstract classes in framework with no implementation
– Lays down the control flow and structure of the system (Lowest Common Denominator approach)
– Implementation of framework based on inheritance
– Most flexible but hardest to understand and implement
Framework
Implementation
![Page 9: Hypertext transfer family of protocols (HTTP, HTTPS, SOAP) CSE 870 Miniproject on Frameworks Advanced Software Engineering Contact: Dr. B. Cheng, chengb](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2f5503460f94c49851/html5/thumbnails/9.jpg)
Overview of Frameworks
• Graybox Framework– Combination of abstract and concrete classes in framework
– Some common implementation moved back to framework classes
– Implementation of framework based on inheritance and composition
– Less flexible but easier to understand and implement than Whitebox
Framework
Implementation
FrameworkImplementation
![Page 10: Hypertext transfer family of protocols (HTTP, HTTPS, SOAP) CSE 870 Miniproject on Frameworks Advanced Software Engineering Contact: Dr. B. Cheng, chengb](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2f5503460f94c49851/html5/thumbnails/10.jpg)
Overview of Frameworks
• Blackbox Framework– Mostly concrete classes in Framework
– Most of common implementation moved back to framework classes
– Implementation of framework based on composition
– Least flexible but easiest for clients to understand and implement.
FrameworkImplementation
![Page 11: Hypertext transfer family of protocols (HTTP, HTTPS, SOAP) CSE 870 Miniproject on Frameworks Advanced Software Engineering Contact: Dr. B. Cheng, chengb](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2f5503460f94c49851/html5/thumbnails/11.jpg)
Agenda
• Overview of Protocols• Overview of Frameworks• Class diagrams• Design pattern used• State diagrams• Demo• Conclusions
![Page 12: Hypertext transfer family of protocols (HTTP, HTTPS, SOAP) CSE 870 Miniproject on Frameworks Advanced Software Engineering Contact: Dr. B. Cheng, chengb](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2f5503460f94c49851/html5/thumbnails/12.jpg)
Whitebox Class diagram - Framework
![Page 13: Hypertext transfer family of protocols (HTTP, HTTPS, SOAP) CSE 870 Miniproject on Frameworks Advanced Software Engineering Contact: Dr. B. Cheng, chengb](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2f5503460f94c49851/html5/thumbnails/13.jpg)
Whitebox Class diagram - Implementation
![Page 14: Hypertext transfer family of protocols (HTTP, HTTPS, SOAP) CSE 870 Miniproject on Frameworks Advanced Software Engineering Contact: Dr. B. Cheng, chengb](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2f5503460f94c49851/html5/thumbnails/14.jpg)
Whitebox Class diagram - Implementation
![Page 15: Hypertext transfer family of protocols (HTTP, HTTPS, SOAP) CSE 870 Miniproject on Frameworks Advanced Software Engineering Contact: Dr. B. Cheng, chengb](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2f5503460f94c49851/html5/thumbnails/15.jpg)
Graybox Class diagram - Framework
![Page 16: Hypertext transfer family of protocols (HTTP, HTTPS, SOAP) CSE 870 Miniproject on Frameworks Advanced Software Engineering Contact: Dr. B. Cheng, chengb](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2f5503460f94c49851/html5/thumbnails/16.jpg)
Graybox Class diagram - Implementation
![Page 17: Hypertext transfer family of protocols (HTTP, HTTPS, SOAP) CSE 870 Miniproject on Frameworks Advanced Software Engineering Contact: Dr. B. Cheng, chengb](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2f5503460f94c49851/html5/thumbnails/17.jpg)
Blackbox Class diagram - Framework
![Page 18: Hypertext transfer family of protocols (HTTP, HTTPS, SOAP) CSE 870 Miniproject on Frameworks Advanced Software Engineering Contact: Dr. B. Cheng, chengb](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2f5503460f94c49851/html5/thumbnails/18.jpg)
Blackbox Class diagram - Framework
![Page 19: Hypertext transfer family of protocols (HTTP, HTTPS, SOAP) CSE 870 Miniproject on Frameworks Advanced Software Engineering Contact: Dr. B. Cheng, chengb](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2f5503460f94c49851/html5/thumbnails/19.jpg)
Blackbox Class diagram - Implementation
![Page 20: Hypertext transfer family of protocols (HTTP, HTTPS, SOAP) CSE 870 Miniproject on Frameworks Advanced Software Engineering Contact: Dr. B. Cheng, chengb](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2f5503460f94c49851/html5/thumbnails/20.jpg)
Agenda
• Overview of Protocols• Overview of Frameworks• Class diagrams• Design pattern used• State diagrams• Demo• Conclusions
![Page 21: Hypertext transfer family of protocols (HTTP, HTTPS, SOAP) CSE 870 Miniproject on Frameworks Advanced Software Engineering Contact: Dr. B. Cheng, chengb](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2f5503460f94c49851/html5/thumbnails/21.jpg)
Design pattern used• Template Method
– Design pattern that defines the program skeleton of an algorithm.
– Algorithm itself is concrete but the methods that are called from it need not be.
– Subclasses can override the methods called from the algorithm but not the algorithm itself.
– Therefore the subclasses provide the concrete behavior that can vary and the general flow is determined by the template method.
![Page 22: Hypertext transfer family of protocols (HTTP, HTTPS, SOAP) CSE 870 Miniproject on Frameworks Advanced Software Engineering Contact: Dr. B. Cheng, chengb](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2f5503460f94c49851/html5/thumbnails/22.jpg)
Design pattern used• Template Method
+GetResponse()+BuildRequest()+GetResponseType()
Request
+BuildRequest()+GetResponseType()
HTTPRequest
// open connectionConnection.Open();
// send requestrequest = BuildRequest();Connection.Write(request);
// read responseresponse = Connection.ReadToEnd();
// get the type of response dynamicallyresponseType = GetResponseType();responseType.new(response);
Framework
Implementation
![Page 23: Hypertext transfer family of protocols (HTTP, HTTPS, SOAP) CSE 870 Miniproject on Frameworks Advanced Software Engineering Contact: Dr. B. Cheng, chengb](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2f5503460f94c49851/html5/thumbnails/23.jpg)
Agenda
• Overview of Protocols• Overview of Frameworks• Class diagrams• Design pattern used• State diagrams• Demo• Conclusions
![Page 24: Hypertext transfer family of protocols (HTTP, HTTPS, SOAP) CSE 870 Miniproject on Frameworks Advanced Software Engineering Contact: Dr. B. Cheng, chengb](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2f5503460f94c49851/html5/thumbnails/24.jpg)
State Diagrams
![Page 25: Hypertext transfer family of protocols (HTTP, HTTPS, SOAP) CSE 870 Miniproject on Frameworks Advanced Software Engineering Contact: Dr. B. Cheng, chengb](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2f5503460f94c49851/html5/thumbnails/25.jpg)
State Diagrams
![Page 26: Hypertext transfer family of protocols (HTTP, HTTPS, SOAP) CSE 870 Miniproject on Frameworks Advanced Software Engineering Contact: Dr. B. Cheng, chengb](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2f5503460f94c49851/html5/thumbnails/26.jpg)
State Diagrams
![Page 27: Hypertext transfer family of protocols (HTTP, HTTPS, SOAP) CSE 870 Miniproject on Frameworks Advanced Software Engineering Contact: Dr. B. Cheng, chengb](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2f5503460f94c49851/html5/thumbnails/27.jpg)
State Diagrams
![Page 28: Hypertext transfer family of protocols (HTTP, HTTPS, SOAP) CSE 870 Miniproject on Frameworks Advanced Software Engineering Contact: Dr. B. Cheng, chengb](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2f5503460f94c49851/html5/thumbnails/28.jpg)
State Diagrams
![Page 29: Hypertext transfer family of protocols (HTTP, HTTPS, SOAP) CSE 870 Miniproject on Frameworks Advanced Software Engineering Contact: Dr. B. Cheng, chengb](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2f5503460f94c49851/html5/thumbnails/29.jpg)
Agenda
• Overview of Protocols• Overview of Frameworks• Class diagrams• Design pattern used• State diagrams• Demo• Conclusions
![Page 30: Hypertext transfer family of protocols (HTTP, HTTPS, SOAP) CSE 870 Miniproject on Frameworks Advanced Software Engineering Contact: Dr. B. Cheng, chengb](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2f5503460f94c49851/html5/thumbnails/30.jpg)
Agenda
• Overview of Protocols• Overview of Frameworks• Class diagrams• Design pattern used• State diagrams• Demo• Conclusions
![Page 31: Hypertext transfer family of protocols (HTTP, HTTPS, SOAP) CSE 870 Miniproject on Frameworks Advanced Software Engineering Contact: Dr. B. Cheng, chengb](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2f5503460f94c49851/html5/thumbnails/31.jpg)
Conclusions
• There are 3 different kinds of frameworks!• Client perspective must be considered while
designing frameworks.• Tradeoff is between ease of use and flexibility.• Using design patterns in frameworks is a good
thing!
![Page 32: Hypertext transfer family of protocols (HTTP, HTTPS, SOAP) CSE 870 Miniproject on Frameworks Advanced Software Engineering Contact: Dr. B. Cheng, chengb](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2f5503460f94c49851/html5/thumbnails/32.jpg)
Thank You!
Questions?