Skip to content
/ welcome Public

A composable multi-tab webapp built on websockets and Hoplon

Notifications You must be signed in to change notification settings

tiples/welcome

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tiples/welcome

A composable multi-tab webapp built on websockets and Hoplon. Websockets make social applications like chat reasonably simple to implement, but they are also helpful when you need to update the data being viewed by a user. (more) But why use Hoplon?

Hoplon is a system for generating all the DOM elements you will need and then updating them as your data changes. For the Welcome program, Hoplon generates all the views but the only visible view is the one the user has selected. Hoplon uses Javelin and provides a spreadsheet-like dataflow, which makes it easy to trigger changes to the view when either the user generates an event or when a message is received from the server.

This program shows how to compose a webapp. There are 3 views: welcome, profile and contacts. The Welcome program will let you login as Sam, Fred or Kris and then displays "Welcome user-name" along with the welcome, profile and contacts tabs. Access control on the server determines which tabs are available for each user. Sam and Fred have access to the welcome, profile and contacts tabs, while Kris can only access the welcome and profile tabs.

For each tab there is some logic in the client and more in the server. A websocket is used for messaging between the client and server. Either can send a message. And messages can be broadcast to all users which have access to the same tab.

To run this program, enter the command "boot dev" from the welcome repository directory on your computer and then point your browser to http://localhost:8000/.

Account names (Sam, Fred, Kris) have the same password, but lowercase. I.E. "sam", "fred" and "kris" respectively.

See the wiki for more information.

About

A composable multi-tab webapp built on websockets and Hoplon

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published