Last active
December 19, 2015 08:09
-
-
Save deian/5923678 to your computer and use it in GitHub Desktop.
Chat app description
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deian.net/hails-tutorial.html | |
<iframe src="/messages#last"></iframe> | |
--------------------------------------------- | |
GET /message |^| --> get all from DB | |
| | find + next | |
| | --> html refresh 2; + list messages | |
| | --> #last | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
- sam: what the heck? | | | |
<li id="last"> deian : w00t w00t </li> |v| | |
--------------------------------------------- | |
--------------------------------------------| | |
GET /message/new | --> POST /message: insert DB | |
| --> redir /message/new | |
sam: [ ] [send] | | |
| | |
--------------------------------------------| | |
Goal: have an interactive chat (html-only implementation) | |
The first iframe should display _all_ the posted messages, always | |
scrolling to the bottom and refreshing every 1-2 seconds. | |
The second iframe should take user input. It should post the message | |
to the chat (write to DB) and redirect back so that the user can type | |
another message. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment