Software Engineering Project Fundamentals with UML and Networking
190 likes | 285 Vues
Learn about TCP, UDP, DNS, socket programming, Java network programming, UML diagrams, and more. Understand project specifications and software design concepts.
Software Engineering Project Fundamentals with UML and Networking
E N D
Presentation Transcript
Software Engineering 3156 Fall 2001 Section 1 24-Sep-01 #5: Project, OOA, UML Phil Gross
Administrivia • Recitation looking like Friday 10am • Anyone planning to use C++? • Project is here 2
Project Stuff • Going over it in class • Will be mutating during the next week • Have three weeks to do specification 3
TCP • One of the protocols on top of IP • Quite popular, but not popular enough to call the whole shebang TCP/IP • Packets will be delivered reliably, once, in order • Will request retransmissions if packets are dropped • Supports multiple recipients per machine with idea of “port” 4
UDP • Alias datagrams • Adds ports to IP, but nothing else • I.e. totally unreliable, packets may be delivered out of order, not at all, multiply, etc. • Used for real-time data 5
Services Listening On Ports • Servers have programs running in the background, waiting for connections on a particluar port • Telnet on 23 • FTP on 21 • Mail (SMTP) on 25 • HTTP on 80 • Many more 6
RFCs • Define entire structure of Internet • Collection of publicly available documents • www.faqs.org/rfcs 7
DNS / nslookup • IP only understands 4-byte address • Has no understanding of www.columbia.edu • DNS (Domain Name System) is an amazing distributed database • Translates names to numbers, globally 8
Socket Programming • Basic client (java.net.*) • http://java.sun.com/docs/books/tutorial/networking/sockets/readingWriting.html • Open a socket to destination machine • Get Input and Output streams from socket • Read and write • Close streams, then sockets 9
Socket Programming II • Basic Server • Listen on a port • Call accept • You will sleep until a connection happens • Then you will have a socket • http://java.sun.com/docs/books/tutorial/networking/sockets/clientServer.html 10
Java Network Programming • Makes networking extremely easy • One of the reasons why Java was hyped so hard in the early days • Turn that stream into an ObjectOutputStream and send objects across the network • C++ much trickier • ACE Framework helps 11
Specifications • UML diagrams • Use case diagrams; • Class diagrams; • Sequence diagrams; • For AI teams, state diagrams. 12
Use Case Diagrams • Neither Janak nor I like these much • The idea is necessary • Silly little stick-figure diagrams less so 13
Class Diagram • The “guts”of UML • Show static class relationships • Generalization = inheritance • Classes, Attributes, and Operations 14
Other Attributes • Association = “has a” • Have multiplicities • And, by extension, mandatory/optional • Can also have role name • Navigability • Constraints/contracts • Composition 15
Sequence Diagrams • Show lifetime of objects • And their interaction • “lifelines” arranged vertically • Same info as collaboration diagram • Has numeric annotations on static diagram 16
State Diagrams • Sloppy FSMs • States, transitions between them • Formal FSM: set of states, set of transitions, transition functions from (state, transition) to new state, set of initial states, set of final or accepting states 17
OOA 1 • Noun extraction • Stepwise refinement of description • Extract nouns • Abstract nouns are often attributes • Rest of nouns are candidates to be classes • Verbs usually become events or actions 18
Event Model • Publishers and Subscribers • Usually implies asynchronous • synchronous is RPC • Reliable or unreliable • Broadcast or multicast 19