Unleash the Power of JavaScript Tooling Telerik Software Academy End-to-end JavaScript Applications.

Slides:



Advertisements
Similar presentations
Windows Basic and Dynamic Disk Borislav Varadinov Telerik Software Academy academy.telerik.com System Administrator Marian Marinov CEO of 1H Ltd.
Advertisements

Hybrid or Native?! Doncho Minkov Telerik Software Academy Senior Technical Trainer
HTML Forms, GET, POST Methods Tran Anh Tuan Edit from Telerik Academy
Make swiftly iOS development Telerik Academy Telerik Academy Plus.
Amazon S 3, App Engine Blobstore, Google Cloud Storage, Azure Blobs Svetlin Nakov Telerik Software Academy academy.telerik.com.
RPN and Shunting-yard algorithm Ivaylo Kenov Telerik Software Academy academy.telerik.com Technical Assistant
Telerik School Academy ASP.NET MVC.
Shortest paths in edge-weighted digraph Krasin Georgiev Technical University of Sofia g.krasin at gmail com Assistant Professor.
Telerik Software Academy Telerik School Academy.
Coding JavaScript the expressive way Learning & Development Telerik Software Academy.
Asynchronous Programming with C# and WinRT
Touch and Gestures with Xamarin Forms
Telerik School Academy ASP.NET MVC.
Character sequences, C-strings and the C++ String class, Working with Strings Learning & Development Team Telerik Software Academy.
Hybrid or Native?! Doncho Minkov Telerik Software Academy Senior Technical Trainer
Done already for your convenience! Telerik School Academy Unity 2D Game Development.
Processing Sequences of Elements Telerik School Academy C# Fundamentals – Part 1.
With Mocha and Karma Telerik Academy Telerik Software Academy.
C# Fundamentals – Part I
Welcome to the JSON-stores world Telerik Software Academy Databases.
The Business Plan and the Business Model Margarita Antonova Volunteer Telerik Academy academy.telerik.com Business System Analyst Telerik Corporation.
What are ADTs, STL Intro, vector, list, queue, stack Learning & Development Team Telerik Software Academy.
Making JavaScript code by template! Learning & Development Team Telerik Software Academy.
Svetlin Nakov Telerik Software Academy academy.telerik.com Manager Technical Training Who, What, Why?
Access to known folders, using pickers, writing to and reading from files, caching files for future access George Georgiev Telerik Software Academy academy.telerik.com.
Processing Matrices and Multidimensional Tables Svetlin Nakov Telerik Software Academy academy.telerik.com Technical Trainer
Learning & Development Telerik Software Academy.
Reading and Writing Text Files Svetlin Nakov Telerik Software Academy academy.telerik.com Technical Trainer
Telerik Software Academy ASP.NET Web Forms.
Classical OOP in JavaScript Classes and stuff Telerik Software Academy
Optimization problems, Greedy Algorithms, Optimal Substructure and Greedy choice Learning & Development Team Telerik Software.
Using Selenium for Mobile Web Testing Powered by KendoUI Telerik QA Academy Atanas Georgiev Senior QA Engineer KendoUI Team.
NoSQL Concepts, Redis, MongoDB, CouchDB Svetlin Nakov Telerik Software Academy academy.telerik.com Manager Technical Training
New features: classes, generators, iterators, etc. Telerik Academy Plus JavaScript.Next.
Throwing and Catching Exceptions Tran Anh Tuan Edit from Telerik Software Academy
Loops, Conditional Statements, Functions Tran Anh Tuan Edit from Telerik Academy
Telerik Software Academy ASP.NET Web Forms.
Private/Public fields, Module, Revealing Module Learning & Development Team Telerik Software Academy.
Building Data-Driven ASP.NET Web Forms Apps Telerik Software Academy ASP.NET Web Forms.
Course Introduction Svetlin Nakov Telerik Software Academy academy.telerik.com Manager Technical Training
Telerik Software Academy End-to-end JavaScript Applications.
Planning and Tracking Software Quality Yordan Dimitrov Telerik Corporation Team Leader, Team Pulse, Team Leader, Team Pulse, Telerik Corporation,
What you need to know Ivaylo Kenov Telerik Corporation Telerik Academy Student.
Data binding concepts, Bindings in WinJS George Georgiev Telerik Software Academy academy.telerik.com Technical Trainer itgeorge.net.
Pavel Kolev Telerik Software Academy Senior.Net Developer and Trainer
Objects, Properties, Primitive and Reference Types Learning & Development Team Telerik Software Academy.
When and How to Refactor? Refactoring Patterns Alexander Vakrilov Telerik Corporation Senior Developer and Team Leader.
Free Training and Job for Software Engineers Svetlin Nakov, PhD Manager Technical Training Telerik Corp. Telerik Software Academy.
Free Training and Job for Software Engineers Svetlin Nakov, PhD Manager Technical Training Telerik Corp. Telerik Software Academy.
Access to known folders, using pickers, writing to and reading from files, caching files for future access George Georgiev Telerik Software Academy academy.telerik.com.
Doing the Canvas the "easy way"! Learning & Development Telerik Software Academy.
.NET Cloud Development Made Easy George Georgiev Telerik Software Academy academy.telerik.com Technical Trainer 1.
Creating and Running Your First C# Program Svetlin Nakov Telerik Software Academy academy.telerik.com Manager Technical Training
Course Overview Doncho Minkov Telerik Software Academy Technical Trainer
Data Types, Primitive Types in C++, Variables – Declaration, Initialization, Scope Telerik Software Academy academy.telerik.com Learning and Development.
The past, the present, the future Learning & Development Team Telerik Software Academy.
Connecting, Queries, Best Practices Tran Anh Tuan Edit from Telerik Software Academy
Processing Sequences of Elements Telerik Software Academy C# Fundamentals – Part 2.
Telerik JavaScript Framework Telerik Software Academy Hybrid Mobile Applications.
Building Rock-Solid Software Nikolay Kostov Telerik Software Academy academy.telerik.com Senior Software Developer and Technical Trainer
Telerik Software Academy Databases.
Things start to get serious Telerik Software Academy JavaScript OOP.
Learning & Development Mobile apps for iPhone & iPad.
Processing Matrices and Multidimensional Tables Telerik Software Academy C# Fundamentals – Part 2.
Nikolay Kostov Telerik Software Academy academy.telerik.com Team Lead, Senior Developer and Trainer
Functions and Function Expressions Closures, Function Scope, Nested Functions Telerik Software Academy
Implementing Control Logic in C# Svetlin Nakov Telerik Software Academy academy.telerik.com Manager Technical trainer
Mocking tools for easier unit testing Telerik Software Academy High Quality Code.
What why and how? Telerik School Academy Unity 2D Game Development.
Windows Security Model Borislav Varadinov Telerik Software Academy academy.telerik.com System Administrator
Presentation transcript:

Unleash the Power of JavaScript Tooling Telerik Software Academy End-to-end JavaScript Applications

 Project tools  Package Management: NPM & Bower  Scaffolding: Yeoman  Task Automation: Grunt

No matter the Editor

 NPM & Bower  Install Node.js packages or client libraries  Grunt  Tasks runner  Create different tasks for build/development/test cases  Yeoman  Scaffolding of applications  One-line-of-code to create a project template with views/routes/modules/etc…

Bower & NPM

 Node.js Package Management (NPM)  Package manager for Node.js modules  $ npm init in CMD (Win) or Terminal (MAC/Linux)  Initializes an empty Node.js project with package.json file $ npm init //enter package details name: "NPM demos" version: description: "Demos for the NPM package management" entry point: main.js test command: test git repository: keywords: npm, package management author: license: BSD-2-Clause

 Installing modules  $ npm install package-name [--save-dev]  Installs a package to the Node.js project  --save-dev suffix adds dependency in package.json $ npm install express --save-dev $ npm install jade --save-dev $ npm install  Before running the project  $ npm install  Installs all missing packages from package.json

Live Demo

 Bower is a package management tool for installing client-side JavaScript libraries  Like jQuery, KendoUI, AngularJS, etc…  It is a Node.js package and should be installed first $ npm install –g bower  $ bower init in CMD (Win) or Terminal (Mac/Linux) $ bower init  Asks for pretty much the same details as $ npm init  Creates bower.json file to manage libraries

 Installing libraries  Searching for libraries $ bower install kendo-ui $ bower search kendo

Live Demo

Tasks Runner

 Grunt is a Node.js task runner  It can runs different tasks, based on configuration  Tasks can be:  Concat and minify JavaScript/CSS files  Compile SASS/LESS/Stylus  Run jshint, csshint  Run Unit Tests  Deploy to Git, Cloud, etc…  And many many more

jshintstyluscsshintconnectwatch  Why use a task runner?  Task runners gives us automation, even for different profiles: DEVELOPMENTjshintstyluscsshintmochaTESTjshintstyluscsshintconcatuglifycopyuseminBUILD

 To configure grunt, create a Gruntfile.js file in the root directory of your application  It is plain-old Node.js  Grunt is configured programmatically  Create an module that exports a single function with one parameter – the grunt object module.exports = function (grunt) { //configure grunt //configure grunt};

 All the configuration is done inside the module  First execute the grunt.initConfig() method and pass it the configuration module.exports = function (grunt) { grunt.initConfig({ grunt.initConfig({ }); });};

 To use a plugin in grunt:  Install the plugin  Load the plugin $ npm install grunt-contrib-jshint --save-dev //inside the grunt module grunt.loadNpmTasks('grunt-contrib-jshint');  Configure the plugin //inside the grunt.initConfig() grunt.initConfig({ jshint: { jshint: { app: ['Gruntfile.js', 'path/to/scripts/**/*.js'] app: ['Gruntfile.js', 'path/to/scripts/**/*.js'] }});

Live Demo

 jshint ( grunt-contrib-jshint )  Runs jshint for specified files  csslint(grunt-contrib-csshint)  Runs csslint for specified files  stylus ( grunt-contrib-stylus )  Compiles STYL files into CSS files  uglify ( grunt-contrib-uglify )  Minifies configured JavaScript files  concat ( grunt-contrib-concat )  Concats configured JavaScript files

Live Demo

 connect ( grunt-contrib-connect )  Stars a Web server on a given port and host  watch ( grunt-contrib-watch )  Watches for changes to configured files  Can run other tasks on file changed

Live Demo

Application Scaffolding

 Yeoman is a Node.js package for application scaffolding  Uses bower & NPM to install the js package  Has lots of generators for many types of applications:  MEAN, AngularJS, Kendo-UI, WebApp, WordPress, Backbone, Express, etc…  Each generators install both needed Node.js packages and client-side JavaScript libraries  Generated Gruntfile.js for build/test/serve

 Install Yeoman: $ npm install –g yo  Install Yeoman generator: $ npm install –g generator-express  Scaffold Express application: $ cd path/to/app/directory $ yo express  Generates:

Live Demo

форум програмиране, форум уеб дизайн курсове и уроци по програмиране, уеб дизайн – безплатно програмиране за деца – безплатни курсове и уроци безплатен SEO курс - оптимизация за търсачки уроци по уеб дизайн, HTML, CSS, JavaScript, Photoshop уроци по програмиране и уеб дизайн за ученици ASP.NET MVC курс – HTML, SQL, C#,.NET, ASP.NET MVC безплатен курс "Разработка на софтуер в cloud среда" BG Coder - онлайн състезателна система - online judge курсове и уроци по програмиране, книги – безплатно от Наков безплатен курс "Качествен програмен код" алго академия – състезателно програмиране, състезания ASP.NET курс - уеб програмиране, бази данни, C#,.NET, ASP.NET курсове и уроци по програмиране – Телерик академия курс мобилни приложения с iPhone, Android, WP7, PhoneGap free C# book, безплатна книга C#, книга Java, книга C# Николай Костов - блог за програмиране

1. Create a project with a Gruntfile.js and three folders – DEV folder, APP folder and DIST folder  Write some CoffeeScript, Jade and Stylus in APP  Register the following grunt tasks:  Serve:  Compiles the CoffeeScript to JS and puts them into DEV/scripts  Runs jshint on the compiled JS files  Compiles the Jade to HTML and puts them into DEV  Compiles the Stylus to CSS and puts them into DEV/styles  Copies every image from the APP/images to DEV/images  Connect a server on port 9578 and show the contents of DEV  Watch for changes to the CoffeeScript, Stylus and Jade files, and if changed – reload the page into the browser

1. *cont. Create a project with a Gruntfile.js and three folders – DEV folder, APP folder and DIST folder  Write some CoffeeScript, Jade and Stylus in APP  Register the following grunt tasks:  Build:  Compiles CoffeeScript, Stylus and Jade  Runs jshint and csslint  Concats all CSS files into one file and minify it into DIST/styles  Concats all JS files into one file and uglify it into DIST/scripts  Uglifies the HTML files into DIST  Copies all images into DIST/images