Welcome! Chicago Ajax Developers Friday, June 12 2009

15
Welcome! Welcome! Chicago Ajax Developers Chicago Ajax Developers Friday, June 12 2009 Friday, June 12 2009

Transcript of Welcome! Chicago Ajax Developers Friday, June 12 2009

Page 1: Welcome! Chicago Ajax Developers Friday, June 12 2009

Welcome!Welcome!

Chicago Ajax DevelopersChicago Ajax Developers

Friday, June 12 2009Friday, June 12 2009

Page 2: Welcome! Chicago Ajax Developers Friday, June 12 2009

Who Am I?Who Am I?

Arthur KayArthur Kay Web Developer at GFX InternationalWeb Developer at GFX International

ASP.NET and AJAXASP.NET and AJAX

Page 3: Welcome! Chicago Ajax Developers Friday, June 12 2009

Who Am I?Who Am I?

10+ years of Web Development10+ years of Web Development .NET, Classic ASP, PHP, Python, .NET, Classic ASP, PHP, Python,

JavaScript, CSSJavaScript, CSS Analytics, SEO, Email MarketingAnalytics, SEO, Email Marketing

www.akawebdesign.comwww.akawebdesign.com blog.akawebdesign.comblog.akawebdesign.com

Page 4: Welcome! Chicago Ajax Developers Friday, June 12 2009

Chicago Ajax DevelopersChicago Ajax Developers

Monthly JavaScript MeetupMonthly JavaScript Meetup

www.ChicagoAjaxDevelopers.comwww.ChicagoAjaxDevelopers.com

Page 5: Welcome! Chicago Ajax Developers Friday, June 12 2009

Our First Meeting!Our First Meeting!

Page 6: Welcome! Chicago Ajax Developers Friday, June 12 2009

AgendaAgenda

An Introduction to ExtJSAn Introduction to ExtJS Unit Testing in ExtJSUnit Testing in ExtJS

Page 7: Welcome! Chicago Ajax Developers Friday, June 12 2009

ExtJSExtJS

Open Source JavaScript library for Open Source JavaScript library for building rich internet applications.building rich internet applications.

Object-oriented, customizable widgetsObject-oriented, customizable widgets www.extjs.comwww.extjs.com Huge community of developers, forumsHuge community of developers, forums Ext Conference 2009Ext Conference 2009 Lightweight Ext CoreLightweight Ext Core Ext GWT (Java)Ext GWT (Java)

Page 8: Welcome! Chicago Ajax Developers Friday, June 12 2009

ExtJS ExampleExtJS Example

Viewport and GridViewport and Grid UI for my Unit Testing exampleUI for my Unit Testing example

Page 9: Welcome! Chicago Ajax Developers Friday, June 12 2009

About Unit TestingAbout Unit Testing

Confidence that your application works Confidence that your application works when future changes are made.when future changes are made.

““Unit” – the smallest testable part of an Unit” – the smallest testable part of an application:application: FunctionFunction ClassClass

Commonly done in C#, Java and similar Commonly done in C#, Java and similar languages.languages.

Page 10: Welcome! Chicago Ajax Developers Friday, June 12 2009

Unit Testing in JavaScriptUnit Testing in JavaScript

It sucks. It sucks. Common problems:Common problems:

Limited to browserLimited to browser Global namespaceGlobal namespace Latency between client/serverLatency between client/server

If JS developers can accept these If JS developers can accept these limitations, Unit Testing is great!limitations, Unit Testing is great!

Page 11: Welcome! Chicago Ajax Developers Friday, June 12 2009

Unit Testing in JavaScriptUnit Testing in JavaScript

Other JS Libraries have Unit Test classesOther JS Libraries have Unit Test classes YUI > YUI TestYUI > YUI Test jQuery > QUnitjQuery > QUnit Prototype > TestCasePrototype > TestCase Script.aculo.us > UnitTestScript.aculo.us > UnitTest

ExtJS has nothing.ExtJS has nothing.

Page 12: Welcome! Chicago Ajax Developers Friday, June 12 2009

Unit Testing in ExtJSUnit Testing in ExtJS

Ext.ux.UnitTestExt.ux.UnitTest()() TestArray[] - arrayTestArray[] - array Store() - objectStore() - object Test() - objectTest() - object NewUnitTest() - functionNewUnitTest() - function

Page 13: Welcome! Chicago Ajax Developers Friday, June 12 2009

Ext.ux.UnitTest.Test()Ext.ux.UnitTest.Test()

generateGuid()generateGuid() wait()wait() assertEquals()assertEquals() assertNotEquals()assertNotEquals() assertUndefinedOrNullassertUndefinedOrNull()() assertNotUndefinedOrNullassertNotUndefinedOrNull()() assertContainsassertContains()() assertNotContainsassertNotContains()()

Page 14: Welcome! Chicago Ajax Developers Friday, June 12 2009

Let’s Build Some Tests!Let’s Build Some Tests!

Page 15: Welcome! Chicago Ajax Developers Friday, June 12 2009

ResourcesResources

aKaaKa Web Design – Web Design – ExtJSExtJS Unit Testing Unit Testing ExtJSExtJS - Unit Testing Thread - Unit Testing Thread