Front end workflow Presentation at Coffee@DBG by Praveen Vijayan
Upcoming SlideShare
Loading in...5
×
 

Front end workflow Presentation at Coffee@DBG by Praveen Vijayan

on

  • 1,492 views

The primary objective of this presentation is to get an idea about end-to-end front-end workflow and useful tools. We will discuss hot tools like Yeoman, Grunt and Bower. But the session is not ...

The primary objective of this presentation is to get an idea about end-to-end front-end workflow and useful tools. We will discuss hot tools like Yeoman, Grunt and Bower. But the session is not limited to these tools - we will touch each phase of front-end development like boiler-plating, preprocessors, performance, documentation, code quality, reporting and architecture etc.

Statistics

Views

Total Views
1,492
Views on SlideShare
1,492
Embed Views
0

Actions

Likes
6
Downloads
26
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Front end workflow Presentation at Coffee@DBG by Praveen Vijayan Front end workflow Presentation at Coffee@DBG by Praveen Vijayan Presentation Transcript

    • Tooling for Modern Web App developer
    • About me Praveen Vijayan decodize.com @praveen_vijaya
    • Agenda
    • Javascript CSS HTML Boilerplate Backbone Angular Backbone + amd Normalize.css HTML5 Boilerplate Mobile Boilerplates Emailer Boilerplate Authoring abstractions Coffeescript Typescript Dart SCSS LESS Stylus Markdown JADE HAML Frameworks jQuery, Backbone, Angular, Ember Bootstrap, Topcoat, Pure, Foundation Bootstrap, html5 Boilerplate Iteration workflow Grunt, Brunch, Yeoman, Codekit, Prepros, Livereload Performance tuning and code quality Chrome dev tools, Heap profile, Timeline, Tracing, linting Frame rate Continuous painting Selector profile CSSLint Recess Network panel Validation W3C validator HTML inspector DOM Monster Optimization Uglifyjs Closure compiler r.js Cssmin YUI compressor cssoo Htmlmin Image optimization Shared understanding YUI Doc Docco KSS Styledocco
    • TODO Project
    • Model View Events
    • jQuery never tell how to structure your app
    • JS Structure Your
    • Model View View Adapter StructureJS MV * Model View Presenter Model View Controller Model View ViewController Model View ViewModel
    • ViewData
    • View View View
    • Model Collection View
    • MV*Frameworks MV*Library Spine JS VS ... ...
    • Scaling backbone apps
    • Backbone never tell how to create reusable modules and load it on demand
    • Asynchronous Module Definition (AMD) Modular Javascript
    • ModularJavascript Purpose Module?Highly decoupled, distinct pieces of functionality stored in modules Dependency References
    • ModularJavascript Two Steps 1. Define module 2. Require it
    • ModularJavascript
    • ModularJavascript Configuration Require module Define module & its dependencies1 2
    • ModularJavascript Combine related scripts together Minifies it via UglifyJS/ Closure Compiler Optimize CSS r.js optimizer $ node r.js -o baseUrl=. paths. jquery=some/other/jquery name=main out=main- built.js
    • ModularJavascript AMD loaders curljs ES6 Module
    • Test Driven Development TDD/BDD
    • TDD/BDD Why TDD? Design your code well Build confidence to use your code Don’t let same bug popup twice Seamless change requests adaption Automatic Documentation Continuous Integration
    • Fail PassRefactor TDD/BDD PROCESS
    • TDD/BDD Qunit Fixture Source file Tests
    • TDD/BDD Qunit Group test Test cases
    • TDD/BDD Qunit
    • Javascript transcompiler https://github.com/jashkenas/coffee-script/wiki/List-of-languages-that-compile-to-JS
    • c o ff e e s c ri p t
    • t y p e s c ri p t
    • Performance tuning & Optimization
    • Javascript lint Code Quality Tools for detecting potential problem in your javascript
    • Chrome dev tool Timeline
    • Chrome dev tool Profiling
    • Chrome dev tool Tracing chrome://tracing/
    • JavaScript performance http://jsperf.com/ http://dromaeo.com/
    • Documentation YUI Natural Docs Docco
    • Documentation
    • Continuous Integration & Code coverage
    • Codecoverage http://jsoverson.github.io/plato/examples/jquery/ Plato
    • Code coverage plato istanbul jscover blanket.js jscomplexity.org Tools
    • Continuous Integration Continuous integration – the practice of frequently integrating one's new or changed code with the existing code repository – should occur frequently enough that no intervening window remains between commit and build, and such that no errors can arise without developers noticing them and correcting them immediately CI -wikipedia
    • Travis-ci.org Tests Gitpush
    • Session Summary Structure your app Optimise it Document it Continuous integration
    • CSS
    • CSS Libraries Bootstrap Pure Foundation Topcoat inuit
    • CSS Preprocessors
    • What is CSS Preprocessors Stylesheet meta language that is interpreted into CSS $basecolor: #f1f1f1; body{ background: $basecolor } body { background: #f1f1f1; } SC SS C SS
    • CSS is Awesome! but Maintaining :) :(
    • S C S S
    • S C S S partials @import @extend @include @if @for %placeholder
    • Compiling Deployment Server Client Local Compile as part of deployment process (Capistrano, Fabric). Compile and cache up on request. Compile using javascript at browser end (not recommended) Compile using tools.
    • Tools Prepros
    • Online Tool
    • Preprocessors don't output bad code, bad developers do
    • Structure your CSS
    • Repetition Maintainability Decoupling Specificity
    • OOCSS BEM SMACSS Methodologies
    • OOCSS Purpose of OOCSS is to identify common pattern & encourage code reuse Main principles Separate structure and skin Separate container and content
    • BEMBlock : A block is an independent entity. Element : An element is a part of a block that performs a certain function. Blocks and elements constitute page content. Modifier : Similar block with slightly altered its appearance or behavior..
    • SMACSSBase : Base rules are the defaults. Layout : Divide the page into sections. Layouts hold one or more modules together. Module : are the reusable, modular parts of our design. State : are ways to describe how our modules or layouts will look when in a particular state. Is it hidden or expanded? Theme : are similar to state rules in that they describe how modules or layouts might look.
    • Living Style guide Create style guide as you code!!
    • Githubstyleguide https://github.com/styleguide/css
    • KSSstyleguide /* A button suitable for giving stars to someone. :hover - Subtle hover highlight. .stars-given - A highlight indicating you've already given a star. .stars-given:hover - Subtle hover highlight on top of stars-given styling. .disabled - Dims the button to indicate it cannot be used. Styleguide 2.1.3. */ a.button.star{ ... } a.button.star.stars-given{ ... } a.button.star.disabled{ ... }
    • KSS Styledoco
    • Performance Optimization
    • Performance
    • Performance
    • Performance
    • Session Summary Bootstrap using libraries Structure your CSS Optimise it Document it
    • HTML
    • JADE HAML Markdown
    • JADE
    • JADE Syntax Filters Code Iteration Conditionals Template inheritance Block append / prepend Includes Mixins
    • Performance optimization
    • Performanceoptimization tools Minify CSS, HTML, JS Concat CSS, JS Optimise image using optipng, jpegtran etc..
    • W3C Validator, HTML InspectorPerformanceoptimization tools
    • Performanceoptimization tools Pagespeed Yslow Webpagetest GTMetrix GA
    • Session Summary Use templating langs prudently Measure & Optimize for performance Validate your code
    • ToolingTooling
    • Yo Grunt Bower
    • Lightning-fast scaffolding Great build process Automatically compile CoffeeScript & Compass Automatically lint your scripts Built-in preview server Awesome Image Optimization Killer package management PhantomJS Unit Testing Yeoman It's a workflow collection of tools and best practices
    • Yeoman Yeoman = Yo + Grunt + Bower
    • Yeoman Install npm install -g yo grunt-cli bower npm install -g generator-webapp yo webapp Usage grunt server grunt test grunt
    • Yeoman
    • Anatomy Project folder App folder Grunt file Package json Unit tests Bower json
    • Grunt
    • Gruntfile.js Config Tasks Targets This file used to configure or define tasks and load grunt plugins
    • package.json Config This file contain all information about npm packages
    • Grunt
    • Grunt
    • Bower
    • A Project
    • Production Environment
    • Production Environment
    • Production Environment 180+ scss files, 550+ jade files
    • Demo
    • Thanks