32
Sencha @ Xero Wednesday, November 2, 2011

Community Code: Xero

  • Upload
    sencha

  • View
    1.374

  • Download
    1

Embed Size (px)

DESCRIPTION

Craig Walker is Chief Technology Officer and co-founder of small business accounting software provider Xero. Xero has over 50,000 customers in over 100 countries and Craig has recently relocated to San Francisco to start the US based office.Craig currently leads Xero’s software development technology strategy. He has a morbid obsession with JavaScript and not having to use any other language for development (much to the amusement of his colleagues).Craig and Xero have been keen evangelists of Sencha products having utilized Sencha JavaScript libraries across Xero’s entire product line. Craig’s most recent fun project was building Xero Touch, a Sencha Touch-based mobile version of Xero released for the web and into the Apple App Store (and soon to be launched for Android).

Citation preview

Page 1: Community Code: Xero

Sencha @ Xero

Wednesday, November 2, 2011

Page 2: Community Code: Xero

@storminwalker

Wednesday, November 2, 2011

Page 3: Community Code: Xero

Who is Xero?•Started in 2006, IPO in June 2007•Over 150 staff in 7 locations•Over 50,000 customers in 100 countries

•A global business run from New Zealand

Wednesday, November 2, 2011

Page 4: Community Code: Xero

Beautiful accounting software

Wednesday, November 2, 2011

Page 5: Community Code: Xero

Xero Business

Wednesday, November 2, 2011

Page 6: Community Code: Xero

Mul$-­‐tenanted  data  model

The Xero Framework

Object  rela$onal  model

Mul$-­‐dimensional  general  ledger

Business  event  (transac$on)  engine

ASP.NET

XSLT

HTML,  JavaScript

•Pure end-to-end SaaS development framework designed from the ground up to be the platform for Xero

ASP.NET 4.0/XSLT/ExtJS

C#/WCF

LLBLGen Pro

SQL Server 2008

Wednesday, November 2, 2011

Page 7: Community Code: Xero

XSLT & ASP.NET• MVC-like pattern using ASP.NET as a platform and XSLT as the view engine

• Allows our designers to incorporate their designs into the application without needing to be programmers

• It’s all about painting screens

Wednesday, November 2, 2011

Page 8: Community Code: Xero

So where’s the ExtJS?

Wednesday, November 2, 2011

Page 9: Community Code: Xero

Quick ExtJS architecture revision…

Wednesday, November 2, 2011

Page 10: Community Code: Xero

Server

The single page app…

ExtJS

JSON

Wednesday, November 2, 2011

Page 11: Community Code: Xero

Progressive Enhancement

Wednesday, November 2, 2011

Page 12: Community Code: Xero

Wednesday, November 2, 2011

Page 13: Community Code: Xero

HTML ExtJS

ASP.NET

HTTPHandler

JSON

HTML

HTTPModule (authentication)

Wednesday, November 2, 2011

Page 14: Community Code: Xero

Why ExtJS?

Wednesday, November 2, 2011

Page 15: Community Code: Xero

The Invoice Grid

Wednesday, November 2, 2011

Page 16: Community Code: Xero

What we liked•The grid!•Pretty out-of-the-box•Ability to theme using pure CSS•Impressive component library•Object-oriented•Event subsystem•Performance

Wednesday, November 2, 2011

Page 17: Community Code: Xero

What we didn’t•Wicked learning curve•Generated HTML was pretty ugly (heavy DOM)

•Theming was harder than expected•Lack of a distribution builder•Maintainability – very easy to write very bad code

•Performance

Wednesday, November 2, 2011

Page 18: Community Code: Xero

Why not a single page app?•Hybrid approach has performance benefits

•Minimizes that learning curve•Server side rendering for heavy pages (such as reporting)

•Worked better across our large team•Unconstrained by the layout engine

Wednesday, November 2, 2011

Page 19: Community Code: Xero

Code!

Wednesday, November 2, 2011

Page 20: Community Code: Xero

Code management•Namespaces following a folder structure

•Coding for reusability: extend, componentize, encapsulate

•Code broken into as small files as possible (both JS and CSS)

Wednesday, November 2, 2011

Page 21: Community Code: Xero

Performance

•Sonic (concatenate, minify, compress)

•Preloading

Wednesday, November 2, 2011

Page 22: Community Code: Xero

Theming

Wednesday, November 2, 2011

Page 23: Community Code: Xero

Take ext-css & override the shit

out of it

Wednesday, November 2, 2011

Page 24: Community Code: Xero

Xero Touch

Wednesday, November 2, 2011

Page 25: Community Code: Xero

JSON

Sencha Touch

ASP.NET MVCHTTPModule (authentication)

Wednesday, November 2, 2011

Page 26: Community Code: Xero

Why Sencha Touch?•Cross-platform•Looks native, feels native•Faster, cheaper, easier to build with•CSS3 awesomeness using SASS & Compass

•Ability to go native

Wednesday, November 2, 2011

Page 27: Community Code: Xero

Focus on performance

•Destroy often – keep the DOM light

•Raw HTML to the rescue

•ALWAYS test on a real device!

Wednesday, November 2, 2011

Page 28: Community Code: Xero

going native

Wednesday, November 2, 2011

Page 29: Community Code: Xero

•Native Xero Touch for iOS & Android (coming soon)

•18,000 app installs•All Sencha Touch source disconnected from PhoneGap project

•Access to native APIs: camera &

Wednesday, November 2, 2011

Page 30: Community Code: Xero

The move to ExtJS 4.0 & Sencha Touch

2?

Wednesday, November 2, 2011

Page 31: Community Code: Xero

Any questions?

www.xero.com

Wednesday, November 2, 2011

Page 32: Community Code: Xero

We’re hiring!

Wednesday, November 2, 2011