8000 GitHub - csLupius/chat_room: Learning Socket.io and Design Pattern
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Nov 8, 2018. It is now read-only.

csLupius/chat_room

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chat App

In this project I am trying to learn socket.io by doing a public chat room. I am using MVC design pattern with Object Literal Javascript

Getting Started

To be able to host and use this application

Using Object Literal

Using Javascript with Object Literal Method gives clarity to javascript page In my opinion it is easy to read and easy to expand upon

View Creation

With Object Literal method if someone wants to create a View, can do it in 4 easy steps;

  • Create Object from CoreView, this Object has everything needed var NewView = Object.create(CoreView)
  • Giving NewView a name to link with template var NewView.name = 'NewView'
    • In this version If no name is specified TemplateManager will throw error and break app
    • Templates have to be .html documents
    • View's name value must be same with template file name like NewView.html
  • And use initialize with parent element as argument NewView.initialize(document.body)
  • And finally display, if true given as argument View will be added to top of parents childnodes NewView.display()

Releases

No releases published

Packages

No packages published
0