Inside Wijmo 5, a Large-scale JavaScript Product

24
Inside Wijmo 5 A Large-scale JavaScript Product

Transcript of Inside Wijmo 5, a Large-scale JavaScript Product

Page 1: Inside Wijmo 5, a Large-scale JavaScript Product

Inside Wijmo 5A Large-scale JavaScript Product

Page 2: Inside Wijmo 5, a Large-scale JavaScript Product

Chris BannonProduct Manager, Wijmo

Page 3: Inside Wijmo 5, a Large-scale JavaScript Product

What is Wijmo 5? JavaScript UI Controls Zero dependencies Specialize in data grids and charts Includes the famous FlexGrid control Focus on performance Small core controls and extensible Offer additional features as optional extensions

Page 4: Inside Wijmo 5, a Large-scale JavaScript Product

Wijmo Stats Distributed Team

US, Brazil, Canada, Russia, China, India, Myanmar, Japan

Over 100,000 lines of code (just in Wijmo 5, millions company-wide) Over 25 years of experience (first control written in VB) Our FlexGrid control can data-bind 1,000,000 records in under 1 second

Page 5: Inside Wijmo 5, a Large-scale JavaScript Product

What Makes Wijmo 5 Special? True Controls (Control Classes like in .NET) Not Widgets

Control//Initializevar myFlexGrid = new wijmo.grid.FlexGrid('#myFlexGrid');//Show Row HeadersmyFlexGrid.headersVisibility = wijmo.grid.HeadersVisibility.All;

Widget//Initialize$('#mywijgrid').wijgrid();//Show Row Headers$('#mywijgrid').wijgrid('option', 'showRowHeader', true);

Page 6: Inside Wijmo 5, a Large-scale JavaScript Product

Wijmo 5: ArchitectureCore

wijmo.js/css

FlexGridwijmo.grid.js

FlexChartwijmo.chart.js

Gaugewijmo.gauge.j

sInput

wijmo.input.jsMore to come...

Interopwijmo.angular

.js

EventCollectionView

ControlGlobalizeStyles

Directives<wj-flex-grid><wj-flex-grid-column>…

FlexGrid Filterwijmo.grid.filter.js

FlexGrid GroupPanel

wijmo.grid.groupanel.js

FlexGrid DetailRow

wijmo.grid.detail.js

Extensions

FlexChart Analytics

wijmo.chart.analytics.jsFlexChart

Annotationwijmo.chart.annotati

on.jsFlexChart Interaction

wijmo.chart.interaction.js

Page 7: Inside Wijmo 5, a Large-scale JavaScript Product

Wijmo Demo

Page 8: Inside Wijmo 5, a Large-scale JavaScript Product

Our Tools Visual Studio TypeScript AngularJS Bootstrap Browser Dev Tools BrowserStack

Page 9: Inside Wijmo 5, a Large-scale JavaScript Product

Visual Studio Project Setup Visual Studio Project for Control Library Folders for Namespaces TypeScript files for Classes Builds like a standard VS PRoject

Page 10: Inside Wijmo 5, a Large-scale JavaScript Product

Sample Setup Each Sample has a VS Solution and

Project Solution contains

Sample Project Wijmo 5 Project

Wijmo 5 source is compiled when sample is run

Wijmo 5 source can be debugged when running samples

Page 11: Inside Wijmo 5, a Large-scale JavaScript Product

Debugging Source Code in Visual Studio

Page 12: Inside Wijmo 5, a Large-scale JavaScript Product

Builds TFS used for Source Control Nightly Builds Use MSBuild tasks

Compile TypeScript Add headers/license/copyright to files Run Unit Tests Build passes/fails based on Unit Tests

Page 13: Inside Wijmo 5, a Large-scale JavaScript Product

TypeScript Language from Microsoft Created by Anders Hejlsberg, the creator of C# Object-oriented with Classes etc. Compiles to JavaScript (ES5 or ES6) Offers C#-like syntax and features

Inheritance Type safety, design-time error checking Based on ECMAScript standards (ES 6)

Adopted by Google in Angular 2

Page 14: Inside Wijmo 5, a Large-scale JavaScript Product

Wijmo Uses TypeScript Our Source Code is all written in TypeScript Our developers can apply their C# experience and skill to JS We can structure our control library like we would in C#

Base Control Class UI Controls that inherit Base Control Class

We get C# features when developing IntelliSense (autocomplete) in Visual Studio Error warnings while programming (no need to wait until runtime to see errors)

Our controls are extensible We can extend our controls easily to add features as extension Classes (like

FlexGridFilter)

Page 15: Inside Wijmo 5, a Large-scale JavaScript Product

TypeScript Demo

Page 16: Inside Wijmo 5, a Large-scale JavaScript Product

AngularJS MVVM Framework Similar to .NET/XAML in JavaScript Two-way binding Components

Page 17: Inside Wijmo 5, a Large-scale JavaScript Product

Wijmo Supports AngularJS We create AngularJS directives for each of our JavaScript Controls Our directives support two-way bindings for properties that benefit from it We offer templates to make declaring controls even richer (like Cell

Templates in FlexGrid) Many of our samples are created with AngularJS It is really nice to declare Controls using markup

Page 18: Inside Wijmo 5, a Large-scale JavaScript Product

AngularJS Demo

Page 19: Inside Wijmo 5, a Large-scale JavaScript Product

Bootstrap Mobile-first UI framework Building blocks for UI

Forms (Input, Buttons, etc.) Navigation Layout (Responsive) Icons

Easy way to jump-start UI for an application

Page 20: Inside Wijmo 5, a Large-scale JavaScript Product

Wijmo Likes Bootstrap Our default theme matches Bootstrap We use Bootstrap in our Samples

Layout Navigation Simple UI (buttons, tabs, etc.)

Using Bootstrap for simple stuff allows us to focus on the complicated UI controls like Grids/Charts

Page 21: Inside Wijmo 5, a Large-scale JavaScript Product

Browser Dev Tools Spend a lot of our time in Dev Tools Inspecting Elements Stepping through code Profiling for performance

Memory profiling (for leaks) FPS monitoring (preventing jank)

Emulating devices

Page 22: Inside Wijmo 5, a Large-scale JavaScript Product

Browser Stack Web-based Cross-device testing Test any browser, on any device, running

any OS Ideal to quickly confirm issues/fixes in

environments you don’t have setup Can also easily connect to localhost (with

perf cost) Covers most needs for testing Not ideal for debugging Not ideal for testing performance issues

since it is an emulation across web

Page 23: Inside Wijmo 5, a Large-scale JavaScript Product

Browser Testing Demo