Vue.js Developer friendly, Fast and Versatile

Similar documents
Ops for Developers Monitor your Java application with Prometheus

High Performance Single Page Application with Vue.js

Offline-first PWA con Firebase y Vue.js

תוכנית יומית לכנס התכנסות וארוחת בוקר

Getting Started with ReactJS

Vue.js Framework. Internet Engineering. Spring Pooya Parsa Professor: Bahador Bakhshi CE & IT Department, Amirkabir University of Technology

React(.js) the Domino Way High-Performance Client for Domino. Knut Herrmann

Webpack 2 The last bundler you would need in Vijay Dharap, Principal Architect, Infosys

SAMPLE CHAPTER. Edd Yerburgh MANNING

Advanced React JS + Redux Development

Stencil: The Time for Vanilla Web Components has Arrived

Frontend UI Training. Whats App :

Angular 4 Syllabus. Module 1: Introduction. Module 2: AngularJS to Angular 4. Module 3: Introduction to Typescript

ANGULAR 2.X,4.X + TYPESRCIPT by Sindhu

Angular 2 Programming

Full Stack boot camp

Beyond JavaScript Frameworks: Writing Reliable Web Apps With. Elm. Erik Wendel DevDays Vilnius 2018

FRONT END WEB. {< Course Details >}

Modern and Responsive Mobile-enabled Web Applications

AngularJS Fundamentals

Single Page Applications using AngularJS

Demystifying Angular 2. SPAs for the Web of Tomorrow

Web Development for Dinosaurs An Introduction to Modern Web Development

Before proceeding with this tutorial, readers should have a basic understanding of HTML, CSS, and JavaScript.

Your essential APEX companion. Marko apexbyg.blogspot.com

55249: Developing with the SharePoint Framework Duration: 05 days

Qiufeng Zhu Advanced User Interface Spring 2017

Advance Mobile& Web Application development using Angular and Native Script

"Charting the Course... Comprehensive Angular 5. Course Summary

Angular 4 Training Course Content

Advanced Angular & Angular 6 Preview. Bibhas Bhattacharya

Course Outline. ProTech Professional Technical Services, Inc. Comprehensive Angular 7 Course Summary. Description

"Charting the Course... MOC A: Developing with the SharePoint Framework. Course Summary

welcome to BOILERCAMP HOW TO WEB DEV

Cisco Spark Widgets Technical drill down

Deep Dive on How ArcGIS API for JavaScript Widgets Were Built

"Charting the Course... Comprehensive Angular. Course Summary

Templates and Databinding. SWE 432, Fall 2017 Design and Implementation of Software for the Web

Backbone.js in a Php Environment

Introduction to the SharePoint Framework Bob German Principal Architect - BlueMetal. An Insight company

Guides SDL Server Documentation Document current as of 04/06/ :35 PM.

International Research Journal of Engineering and Technology (IRJET) e-issn: Volume: 05 Issue: 06 June p-issn:

Lecture 8. ReactJS 1 / 24

Webpack. What is Webpack? APPENDIX A. n n n

Front End Nanodegree Syllabus

This course is designed for web developers that want to learn HTML5, CSS3, JavaScript and jquery.

"Charting the Course... Comprehensive Angular 6 Course Summary

TechWatch Report Javascript Libraries and Frameworks

MOdern Java(Script) Server Stack

IONIC. The Missing SDK For Hybrid Apps. Mike

Learn Gulp. Jonathan Birkholz. This book is for sale at This version was published on

Practical Course: Web Development Angular JS Part I Winter Semester 2016/17. Juliane Franze

EmberJS A Fitting Face for a D8 Backend. Taylor Solomon

Web Performance in

Angular 2 and TypeScript Web Application Development

Extending Blue Ocean Keith Zantow

UI Course HTML: (Html, CSS, JavaScript, JQuery, Bootstrap, AngularJS) Introduction. The World Wide Web (WWW) and history of HTML

THE PRAGMATIC INTRO TO REACT. Clayton Anderson thebhwgroup.com WEB AND MOBILE APP DEVELOPMENT AUSTIN, TX

Building Native Apps with ArcGIS API for JavaScript Using PhoneGap and jquery. Andy Gup, Lloyd Heberlie

React + React Native. Based on material by Danilo Filgueira

P a g e 1. Danish Technological Institute. Scripting and Web Languages Online Course k Scripting and Web Languages

PHP WITH ANGULAR CURRICULUM. What you will Be Able to Achieve During This Course

Front End. Presentation Layer. UI (User Interface) User <==> Data access layer

Building Your own Widget with ArcGIS API for JavaScript

Full Stack Web Developer

Down With JavaScript!

Lab 1 - Introduction to Angular

Think like an Elm developer

CSS JavaScript General Implementation Preloading Preloading in the Design Thinking Process Preloading in the Summary View Android UI Design Design

EPUB in the Browser. Ben Walters Principle Software Engineering Lead at Microsoft

Presented by. Dheepa Iyer Managing Consultant. Commissioned for. Reston SharePoint User Group. SharePoint Framework. May 2017

Guides SDL Server Documentation Document current as of 05/24/ :13 PM.

widgetjs Documentation

Welcome. Quick Introductions

The Scope of This Book... xxii A Quick Note About Browsers and Platforms... xxii The Appendices and Further Resources...xxiii

Full Stack Developer with Java

JSN EasySlider Configuration Manual

Data Visualization on the Web with D3

Joomla! extension JSN EasySlider User Manual

Quick Desktop Application Development Using Electron

Introduction to Sencha Ext JS

BUILDING HYBRID MOBILE APPS WITH ORACLE JET

JavaScript Frameworks

Building an OpenLayers 3 map viewer with React

WebStorm, intelligent IDE for JavaScript development

The course also includes an overview of some of the most popular frameworks that you will most likely encounter in your real work environments.

Node.js. Node.js Overview. CS144: Web Applications

& Free.

20486: Developing ASP.NET MVC 4 Web Applications

Sample Copy. Not For Distribution.

Tools. SWE 432, Fall Design and Implementation of Software for the Web

MARKET RESPONSIVE PRESTASHOP THEME USER GUIDE

Angular 2: What s new? Jonas Bandi, IvoryCode GmbH

COMPARISON OF FRONT-END FRAMEWORKS FOR WEB APPLICATIONS DEVELOPMENT 4

Course Details. Skills Gained. Who Can Benefit. Prerequisites. View Online URL:

Building with React Native. Simon Ayzman Mobile Apps Bloomberg

Chapter 1 - Development Setup of Angular

Front End Summit - Sep 27th

JavaScript: the Big Picture

I Got My Mojo Workin'

Transcription:

.consulting.solutions.partnership Vue.js Developer friendly, Fast and Versatile Alexander Schwartz, Principal IT Consultant Javaland 2018 Brühl (DE) March 2018

Vue.js developer friendly, fast and versatile 1 2 3 4 5 Expectations Tools, Ecosystem, Options Basics Getting Started Projects Components and Structure Performance From different Angles Lessons Learned Looking back msg March 2018 Vue.js developer friendly, fast and versatile Alexander Schwartz 2

Sponsor and Employer msg 18 offices in Germany independent and owned by founders Founded 1980 25 Countries More than 6.000 Employees 812 Million Turnover 2016 msg March 2018 Vue.js developer friendly, fast and versatile Alexander Schwartz 3

About me Principal IT Consultant @ msg Travel & Logistics 570 Geocaches 2 kids >15 years Java 1 wife 7 years PL/SQL 3,5 years online banking 7 years consumer finance @ahus1de msg March 2018 Vue.js developer friendly, fast and versatile Alexander Schwartz 4

Vue.js developer friendly, fast and versatile 1 2 3 4 5 Expectations Tools, Ecosystem, Options Basics Getting Started Projects Components and Structure Performance From different Angles Lessons Learned Looking back msg March 2018 Vue.js developer friendly, fast and versatile Alexander Schwartz 5

Expectations Tools, Ecosystem, Options Why boring is good for your health JavaScript Fatigue Fatigue: Too many JavaScript Frameworks JavaScript needed to deliver expected User Experience Life of the application is longer than the hype cycle of the framework or framework version What we looked for and found with Vue.js: Easy to learn Framework even for JavaScript newbies Productivity in day-to-day work No rough corners and edges that lead to problems in the project Stable APIs msg March 2018 Vue.js developer friendly, fast and versatile Alexander Schwartz 6

Dukecon Web Conference planner for JavaLand Conference For the frontend: Vue.js app built upon PWA template Full offline capabilities Single-Sign-On Search and filter talks Build your own agenda and sync it on multiply devices Localized Automated Tests For the frontend: ~ 4500 LoC (including HTML, CSS, JavaScript) OpenSource on Github: https://github.com/dukecon/dukecon_pwa msg March 2018 Vue.js developer friendly, fast and versatile Alexander Schwartz 7

Expectations Tools, Ecosystem, Options Getting started Online-Documentation Book (Leanpub) Awesome Vue.js Liste 1. https://github.com/vuejs/awesome-vue 2. https://vuejs.org/v2/guide/ 3. https://leanpub.com/vuejs2 msg March 2018 Vue.js developer friendly, fast and versatile Alexander Schwartz 8

Expectations Tools, Ecosystem, Options The Tools vue-cli: Starter-Project with a complete build chain webpack vs. browserify simple vs. full feature (hot-reload, linting, testing, progressive web app) Plugins: For IDEs use Vue.js plugins by JetBrains for IntelliJ/PHPStorm or Vetur plugin for VS Code For Chrome: Vue.js devtools 1. https://github.com/vuejs/vue-cli 2. https://plugins.jetbrains.com/plugin/9442-vue-js 3. https://github.com/vuejs/vue-devtools msg March 2018 Vue.js developer friendly, fast and versatile Alexander Schwartz 9

Expectations Tools, Ecosystem, Options Core Functionality and Extensions Core Functionalities (abbreviated): View-, Input-, Event-Binding, Conditionals, Loops Templates, Components, Mixins Transitions, Lifecycle Hooks, Computed Additional Packages (still part of the official Vue.js project): Routing Streaming Server Side Rendering with Client Side Hydration TypeScript as alternative to JavaScript JSX-templates as alternative to HTML-Templates Flux/React style applications with vuex 1. https://ssr.vuejs.org/en/ 2. https://vuejs.org/v2/guide/typescript.html 3. https://github.com/vuejs/babel-plugin-transform-vue-jsx 4. https://vuex.vuejs.org/en/ msg March 2018 Vue.js developer friendly, fast and versatile Alexander Schwartz 10

Vue.js developer friendly, fast and versatile 1 2 3 4 5 Expectations Tools, Ecosystem, Options Basics Getting Started Projects Components and Structure Performance From different Angles Lessons Learned Looking back msg March 2018 Vue.js developer friendly, fast and versatile Alexander Schwartz 11

Basics Getting Started Initialization of Vue.js 1. Define DOM-Area 2. Load Vue.js 3. Initialize Vue.js <div id="app"> {{ message }} </div> <script src="js/vue.js"></script> <script> var app = new Vue({ el: '#app', data: { message: 'Hello Vue.js!' } }) </script> msg March 2018 Vue.js developer friendly, fast and versatile Alexander Schwartz 12

Basics Getting Started Minimal Example View-, Input- and Event-Bindung Conditionals <div id="app"> <p>{{ message }}</p> <p v-if="message === ''"> Please enter a Message!</p> <p> <input v-model="message"> </p> <button v-on:click="reversemessage"> Reverse Message </button> </div> var app = new Vue({ el: '#app', data: { message: 'Hello Vue.js!' }, methods: { reversemessage: function () { this.message = this.message.split('').reverse().join('') } } }) msg March 2018 Vue.js developer friendly, fast and versatile Alexander Schwartz 13

Vue.js developer friendly, fast and versatile 1 2 3 4 5 Expectations Tools, Ecosystem, Options Basics Getting Started Projects Components and Structure Performance From different Angles Lessons Learned Looking back msg March 2018 Vue.js developer friendly, fast and versatile Alexander Schwartz 14

Projects Components and Structure Standard Project Structure Create structure: npm install g vue-cli vue init... Run for development including hot reload: npm install npm run dev msg March 2018 Vue.js developer friendly, fast and versatile Alexander Schwartz 15

Projects Components and Structure Single File Components For every component HTML, JavaScript and CSS in one single file. This gives you good overview of all resources of a page. The IDE provides syntax highlighting for all three parts. Navigation between parts via your IDE. <template> <div class="hello"> <!--... -> </div> </template> <script> export default { /*... */ } </script> <style scoped> h1, h2 { font-weight: normal; } </style> msg March 2018 Vue.js developer friendly, fast and versatile Alexander Schwartz 16

Projects Components and Structure Router switches between components Different routes lead to different components. When the URL changes, the displayed component changes as well. <template> <div id="app"> <router-view></router-view> </div> </template> Vue.use(Router) export default new Router({ routes: [ { path: '/', name: 'Hello', component: Hello }, { path: '/counter', name: 'Counter', component: Counter } ] }) msg March 2018 Vue.js developer friendly, fast and versatile Alexander Schwartz 17

Projects Components and Structure Transitions between states and views Transitions for the data displayed (states) or for the HTML shown (views). <template> <div id="app"> <transition name="slide-fade" mode="out-in"> <router-view></router-view> </transition> </div> </template> 1. Sarah Drasner @ Software Engineering Daily https://softwareengineeringdaily.com/2017/12/01/animating-vuejs-with-sarah-drasner/ 2. Vue Guide on Transitions: https://vuejs.org/v2/guide/transitions.html <style>.slide-fade-enter-active { transition: all.3s ease; } /*... */ </style> msg March 2018 Vue.js developer friendly, fast and versatile Alexander Schwartz 18

Projects Components and Structure Parent-Child relations for components <template> <clickbutton v-bind:label="'click here'" v-on:clickedbutton="processevent"> </child> </template> <script> import ClickButton from '@/components/clickbutton' export default { name: 'parent', components: { clickbutton': ClickButton } /*... */ } </script> The parent component passes props to the child. Parent can listen for custom events of the child. <script> export default { name: 'clickbutton', props: { label: String }, methods: { clickedbutton: function () { this.$emit('clickedbutton') } } /*... */ } </script> msg March 2018 Vue.js developer friendly, fast and versatile Alexander Schwartz 19

Projects Components and Structure Slots to override default sub-templates of the child The parent passes slots that can override pre-defined parts of the HTML displayed by the child. The child defines props that can be used in the slots to display data. <!-- parent --> <definition term="term two" description="description 2"> <template slot="slot_term" scope="props"> T: {{ props.term }} </template> </definition> <!-- child with defaults --> <template> <span> <dt> <slot name="slot_term" :term="term"> {{term}} </slot> </dt> <dd> <slot name="slot_description" :description="description"> {{description}} </slot> </dd> </span> </template> msg March 2018 Vue.js developer friendly, fast and versatile Alexander Schwartz 20

Vue.js developer friendly, fast and versatile 1 2 3 4 5 Expectations Tools, Ecosystem, Options Basics Getting Started Projects Components and Structure Performance From different Angles Lessons Learned Looking back msg March 2018 Vue.js developer friendly, fast and versatile Alexander Schwartz 21

Performance From different Angles Performance during Development Learnability Online resources, few simple concepts Comprehend code fellow developers wrote simple project structure and single-file components Fast round-trip developing hot-reload in development mode components and state visible with Vue.js Developer Tools in Chrome msg March 2018 Vue.js developer friendly, fast and versatile Alexander Schwartz 22

Performance From different Angles Performance in Production Stumbling blocks New properties of the model needs to be placed with Vue.set to enable change tracking. Load-Times and Rendering Small size: Vue.js has 20k min+gzip (no other dependencies, templates are pre-compiled during build) No optimization for rendering necessary, event for big tables Great performance benchmarks 1. http://www.stefankrause.net/js-frameworks-benchmark6/webdriver-ts-results/table.html msg March 2018 Vue.js developer friendly, fast and versatile Alexander Schwartz 23

Vue.js developer friendly, fast and versatile 1 2 3 4 5 Expectations Tools, Ecosystem, Options Basics Getting Started Projects Components and Structure Performance From different Angles Lessons Learned Looking back msg March 2018 Vue.js developer friendly, fast and versatile Alexander Schwartz 25

Lessons Learned Looking back Expectations met Newbies got started quickly. Complex GUI delivered with great runtime performance and a maintainable structure. Components help structuring the application. We developed own shared components for navigation and tables. Update from Vue.js 1.x to Vue.js 2.x: Minimal Vue.js changes, aided by upgrade and guide migration helper script provided by Vue.js (some changes could already be implemented while using 1.x) Benefits: faster rendering, better warning messages and error handling especially when developing Medium effort for Webpack upgrade including scripts msg March 2018 Vue.js developer friendly, fast and versatile Alexander Schwartz 26

Upcoming Trainings for Vue.js Einstieg in Vue.js (German) enterjs Conference, Darmstadt, 19 June 2018 More Material: https://www.ahus1.de/post/vuejs-tainings-and-talks msg March 2018 Vue.js developer friendly, fast and versatile Alexander Schwartz 27

Links Vue.js https://vuejs.org/ Vue-router https://router.vuejs.org/en/ Vuex https://vuex.vuejs.org/en/ The Majesty of Vue.js 2 https://leanpub.com/vuejs2 Awesome Vue.js https://github.com/vuejs/awesome-vue Vue Dev Tools for Google Chrome https://github.com/vuejs/vue-devtools Sarah Drasner @ Software Engineering Daily https://softwareengineeringdaily.com/2017/12 /01/animating-vuejs-with-sarah-drasner/ Dukecon PWA https://github.com/dukecon/dukecon_pwa Vue.js Trainings and Talks https://www.ahus1.de/post/vuejs-tainingsand-talks @ahus1de msg March 2018 Vue.js developer friendly, fast and versatile Alexander Schwartz 28

Alexander Schwartz Principal IT Consultant +49 171 5625767 alexander.schwartz@msg.group msg systems ag (Headquarters) Robert-Buerkle-Str. 1, 85737 Ismaning Germany www.msg.group @ahus1de.consulting.solutions.partnership