17
User Interface; Graphical User Interface;Jabber XMPP-Core

User Interface; Graphical User Interface;Jabber XMPP-Core

  • Upload
    amora

  • View
    45

  • Download
    1

Embed Size (px)

DESCRIPTION

User Interface; Graphical User Interface;Jabber XMPP-Core. Communicating between two presence-aware entities. XML Stream Starts with Ends with Stream is unidirectional; but two streams allowed over one TCP connection initial stream and response stream XML Stanza - PowerPoint PPT Presentation

Citation preview

Page 1: User Interface;  Graphical User Interface;Jabber XMPP-Core

User Interface; Graphical User

Interface;Jabber XMPP-Core

Page 2: User Interface;  Graphical User Interface;Jabber XMPP-Core

6.893 Spring 2004: User Interface Larry Rudolph

Communicating between two

presence-aware entitiesXML Stream

Starts with <stream>

Ends with </stream>

Stream is unidirectional; but two streams allowed over one TCP connection

initial stream and response stream

XML Stanza

the stuff (packets) of the streampresence, message, iq are the only upper-level types

Page 3: User Interface;  Graphical User Interface;Jabber XMPP-Core

6.893 Spring 2004: User Interface Larry Rudolph

A basic sessionC: <?xml version='1.0'?> <stream:stream to='example.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>S: <?xml version='1.0'?> <stream:stream from='example.com' id='someid' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>... encryption, authentication, and resource binding ...C: <message from='[email protected]' to='[email protected]' xml:lang='en'>C: <body>Art thou not Romeo, and a Montague?</body>C: </message>S: <message from='[email protected]' to='[email protected]' xml:lang='en'>S: <body>Neither, fair saint, if either thee dislike.</body>S: </message>C: </stream:stream>S: </stream:stream>

Page 4: User Interface;  Graphical User Interface;Jabber XMPP-Core

6.893 Spring 2004: User Interface Larry Rudolph

A session gone badC: <?xml version='1.0'?> <stream:stream to='example.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>S: <?xml version='1.0'?> <stream:stream from='example.com' id='someid' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>... encryption, authentication, and resource binding ...C: <message xml:lang='en'> <body>Bad XML, no closing body tag! </message>S: <stream:error> <xml-not-well-formed xmlns='urn:ietf:params:xml:ns:xmpp-streams'/> </stream:error>S: </stream:stream>

Page 5: User Interface;  Graphical User Interface;Jabber XMPP-Core

Motivating GUI via IM

Page 6: User Interface;  Graphical User Interface;Jabber XMPP-Core

Email, Instant messages, chat

Email: send message based on name

must know name, but can guess it.

IM: can only send message to buddycan have both sides agree to be buddies.

Chat: can only send message to “room”

must connect to “room” to get messages

Asynchronouslike “computation”

Semi-synchronouslike “interactive”

Semi-synchronouslike “parallelism”

Page 7: User Interface;  Graphical User Interface;Jabber XMPP-Core

Big Idea: Abstraction

“Any problem in computer programming can be solved by adding a level of abstraction”

“Performance can be improved in programs by removing a level of abstraction”

Indirection used to support abstraction

Page 8: User Interface;  Graphical User Interface;Jabber XMPP-Core

Big Idea for IM: Indirection

“Publish and subscribe” Publish “presence” with a server

Subscribe to relevant published entities

Once when registering and whenever logon

“Interact”direct communication

(mediated) indirect communication

Page 9: User Interface;  Graphical User Interface;Jabber XMPP-Core

Hard vs Soft State

Hard State: server knows buddy list

can send status of each buddy to requester

Soft State: client knows buddy listcan ask status of each buddy

But indirection always requires hard state

Page 10: User Interface;  Graphical User Interface;Jabber XMPP-Core

Instant Messaging

Clients register with server

When client logs on, others subscribe

Client sends message to server, server forwards to recipient

can only send messages to registered/published recipients

Supported operations:Register, Unregister, Logon, Logoff, Send/Rec, Add/Remove Buddy, etc.

Page 11: User Interface;  Graphical User Interface;Jabber XMPP-Core

Many disconnected

piecesClient-Server protocol (messier than just this)

Client code

User Interface Code

Semantics of interactione.g. send only to published & subscribed entities

Page 12: User Interface;  Graphical User Interface;Jabber XMPP-Core
Page 13: User Interface;  Graphical User Interface;Jabber XMPP-Core

User InterfaceWant to disconnect application from user interface

Application should work independent of UI

Character display and keyboard or fancier

main difference was number of columns and lines

Graphical user interfacemake big assumptions about h/w abilities

not really independent of GUI

Page 14: User Interface;  Graphical User Interface;Jabber XMPP-Core

Evolution

Page 15: User Interface;  Graphical User Interface;Jabber XMPP-Core

Separating events from

handlersRegister handler for event

Two different types of events:within application

within window system.

Events connect the two pieces but are developed separately.

Page 16: User Interface;  Graphical User Interface;Jabber XMPP-Core

Separation of GUI description

Glade

Page 17: User Interface;  Graphical User Interface;Jabber XMPP-Core

No semantic content

why bad? no error correction