Tuesday, October 21st, 2014
- Chad Killingsworth – Missouri State University
Location: Pavilion Ballroom East
- Found himself working more and more on the client side of things
- would love to use node.js on server (not there yet)
- What is a JS App?
- More JS than server-side business logic
- Single page application
- Large portion on front-end
- Problem – people end up with huge, single JS libs.
- We put up with client code that we would never stand for on the server.
Maintainable JS methodologies
- Namespaced code. Aliases are evil ($ is an example).
- A well structured class hierarchy.
- Keep each class in own file. Keep them small.
- Decouple code (MVC on client code)
- Use dependency management (require JS)
- all of them have tools to unwind multi-files.
- LargeScripr application require build systems
- Unit testing?
- Moving beyond linters and compressors.
- JS compiled into better js!
- Uglify.js is a good start
- Run type errors are preventable.
- has 3000 lines of code
- Ave lines per code has 216 lines
- Uncompiled: 590 KB
- Gzip 129 KB
- Closure 91 KB, 32 KB gzip!
- WS only (unwind)
- Simple optimizations (compressor)
- Advanced (dictated coding style, and assume certain things)
- Will throw away any code you are not using
- Type safety
- Significance performance boosts
- Can’t use jQuery (unless you use extern to leave jQuery alone)
- You must write code in a specific style