Building Rich Applications with Appcelerator Matt Raible Colorado Software Summit 2008 http://www.linkedin.com/in/mraible Matt Raible Building Rich Applications with Appcelerator Slide 1
Introductions Your experience with web applications? Have you heard of SOFEA or SOUI? Experience with RIA Frameworks? What do you want to get from this session? Matt Raible Building Rich Applications with Appcelerator Slide 2
Matt Matt Raible Building Rich Applications with Appcelerator Slide 3
Raible Matt Raible Building Rich Applications with Appcelerator Slide 4
Matt Raible Building Rich Applications with Appcelerator Slide 5
Matt Raible Building Rich Applications with Appcelerator Slide 6
http://flickr.com/photos/leecullivan/122271605/ Matt Raible Building Rich Applications with Appcelerator Slide 7
http://flickr.com/photos/crowleymr/2530170585/ Matt Raible Building Rich Applications with Appcelerator Slide 8
http://www.flickr.com/photos/mraible/2644737051/ Matt Raible Building Rich Applications with Appcelerator Slide 9
http://www.travelblog.org/photos/1597321.html Matt Raible Building Rich Applications with Appcelerator Slide 10
http://flickr.com/photos/mraible/2644738967 Matt Raible Building Rich Applications with Appcelerator Slide 11
Matt Raible Building Rich Applications with Appcelerator Slide 12
Matt Raible Building Rich Applications with Appcelerator Slide 13
Matt Raible Building Rich Applications with Appcelerator Slide 14
http://www.neatorama.com/2006/07/07/kids-and-an-open-can-of-paint-what-could-go-wrong/ Matt Raible Building Rich Applications with Appcelerator Slide 15
My Education! Matt Raible Building Rich Applications with Appcelerator Slide 16
My Career http://flickr.com/photos/castor_lycan/304065526/ Matt Raible Building Rich Applications with Appcelerator Slide 17
The Problem Matt Raible Building Rich Applications with Appcelerator Slide 18
How do you choose? Matt Raible Building Rich Applications with Appcelerator Slide 19
Eliminate, Don t Include It s not about including choices, it s about eliminating them. Matt Raible Building Rich Applications with Appcelerator Slide 20
Matt Raible Building Rich Applications with Appcelerator Slide 21
Session Agenda SOFEA and SOUI Appcelerator Overview Creating a Project Application Demo Comparison with Flex and GWT Conclusion and Q & A Matt Raible Building Rich Applications with Appcelerator Slide 22
SOFEA and SOUI SOFEA first introduced in Life above the Service Tier on 10/12/2007. http://www.theserverside.com/news/ thread.tss?thread_id=47213 SOUI introduced by Nolan Wright and Jeff Haynie in early November 2007. http://www.infoq.com/news/2007/11/souideath-of-mvc2 Matt Raible Building Rich Applications with Appcelerator Slide 23
SOFEA and SOUI (Continued) SOFEA Authors have since formed the Thin Server Architecture Working Group. http://www.thinserverarchitecture.com Nolan and Jeff developed Appcelerator. http://www.appcelerator.org Matt Raible Building Rich Applications with Appcelerator Slide 24
SOFEA Principles Decouple the three orthogonal Presentation Tier processes of Application Download, Presentation Flow and Data Interchange. This is the foundational principle of SOFEA. Explore various Application Download options to exploit usefully contrary trade-offs around client footprint, startup time, offline capability and a number of security-related parameters. Presentation Flow must be driven by a client-side component and never by a server-side component. Data Interchange between the Presentation Tier and the Service Tier must not become the weakest link in the endto-end application chainof data integrity. Model-View-Controller (MVC) is a good pattern to use to build the Presentation Tier. Matt Raible Building Rich Applications with Appcelerator Slide 25
Matt Raible Building Rich Applications with Appcelerator Slide 26
Recommended Frameworks DHTML/AJAX frameworks for Modern Browsers Largely handcoded with third party JavaScript libraries Google Web Toolkit TIBCO General Interface Builder XML Dialects for Advanced Browsers XForms and XHTML 2.0 Mozilla XUL Microsoft SilverLight/XAML Java frameworks Java WebStart (with/without Spring Rich Client) JavaFX Adobe Flash-based frameworks Adobe Flex OpenLaszlo Matt Raible Building Rich Applications with Appcelerator Slide 27
Appcelerator Matt Raible Building Rich Applications with Appcelerator Slide 28
SOA in the Browser Matt Raible Building Rich Applications with Appcelerator Slide 29
Web Expression Language Widget Syntax Web Expression Language Syntax http://try.appcelerator.org Matt Raible Building Rich Applications with Appcelerator Slide 30
Widgets http://doc.appcelerator.org/reference/widget_reference/index.html Matt Raible Building Rich Applications with Appcelerator Slide 31
Service Platform public class LoginService { @Service(request = "login.request", response = "login.response") protected void login(message request, Message response) throws Exception { // get request data String username = request.getdata().getstring("username"); String password = request.getdata().getstring("password"); Also has Service Integration Points for PHP, Ruby,.NET, Python and Perl. Matt Raible Building Rich Applications with Appcelerator Slide 32
Other Examples apptunes - widget that wraps Flex Cover Flow widget Snappshot - photo editing application Radio Javan - Persian music online SkyBlox - builds neighborhoods More at http://www.appcelerator.org/demos Matt Raible Building Rich Applications with Appcelerator Slide 33
Creating a Project Download and install from http://appcelerator.org/download app create:project directory project_name java app run:project Go to http://localhost:4000 To create a war, run ant Matt Raible Building Rich Applications with Appcelerator Slide 34
Directory Structure Matt Raible Building Rich Applications with Appcelerator Slide 35
Application Demo Matt Raible Building Rich Applications with Appcelerator Slide 36
Get the Source https://svn.appcelerator.org/appcelerator_sdk/trunk/ https://svn.appcelerator.org/appcelerator_ide/trunk/ https://svn.appcelerator.org/appcelerator_doc/trunk/ https://svn.appcelerator.org/appcelerator_examples/trunk/ Matt Raible Building Rich Applications with Appcelerator Slide 37
Comparing RIA Frameworks Matt Raible Building Rich Applications with Appcelerator Slide 38
Adobe Flex http://www.adobe.com/products/flex Flex SDK under Mozilla Public License Active Community Yahoo Group: http://tech.groups.yahoo.com/group/flexcoders User Groups: http://flex.org/usergroups_list 360 Flex Recommended Books Flexible Rails by Peter Armstrong Flex 3 in Action by Tariq Ahmed Flex on Java by Allmon and Anderson Matt Raible Building Rich Applications with Appcelerator Slide 39
Google Web Toolkit http://code.google.com/webtoolkit Apache 2.0 License Active Community http://groups.google.com/group/google-web-toolkit Pearson s Google Web Toolkit Conference and Google I/O Recommended Books GWT in Action by Hanson and Tacy GWT in Practice by Cooper and Collins Google Web Toolkit Solutions by Geary and Gordon Matt Raible Building Rich Applications with Appcelerator Slide 40
Appcelerator http://appcelerator.org Apache 2.0 License Active Community http://www.appcelerator.org/groups No Conference No Books Matt Raible Building Rich Applications with Appcelerator Slide 41
Adobe Flex Pros Produces Flash UI Funded by Adobe Has many successful client stories Supports REST easily Cons Not Search Engine Friendly Doesn t render HTML content well Doesn t print well by default No Zero Turnaround w/o IDE Matt Raible Building Rich Applications with Appcelerator Slide 42
GWT Pros Write Java Produces JavaScript Vibrant Community Zero Turnaround in Hosted Mode Cons Only good for Java Developers Doesn t support REST very well Operates within the confines of the browser s JavaScript sandbox Matt Raible Building Rich Applications with Appcelerator Slide 43
Appcelerator Pros Easy to Author Good Documentation Java, Ruby, PHP,.NET or Python Cons Not Widely Used Creating an application requires registration Not a Full-Stack Framework Matt Raible Building Rich Applications with Appcelerator Slide 44
Flex vs. JavaScript http://anthonyfranco.wordpress.com/ 2007/06/22/flex-and-ajax-friends-or-foes Use the Best Tool for the Job Open Web: Ajax Video and Rich Media: Flex HTML Rendering: Ajax Vector Graphics and Bitmap Manipulation: Flex Accessibility: Flex Matt Raible Building Rich Applications with Appcelerator Slide 45
Flex vs. Ajax Performance http://www.jamesward.com/census Matt Raible Building Rich Applications with Appcelerator Slide 46
Jobs 90 GWT Flex Ajax Flash 60 30 0 Monster.com - 100 miles of Denver, Colorado Matt Raible Building Rich Applications with Appcelerator Slide 47
Skills from My Network 500 GWT Flex Ajax Flash 375 250 125 0 Located in or near 80210 Matt Raible Building Rich Applications with Appcelerator Slide 48
Conclusion Appcelerator is easy if you like HTML and CSS, but don t like JavaScript. Appcelerator is not a full-stack framework. Flex/Flash is not as restricted by the browser sandbox. Flex supports REST better. SOFEA UIs are fun to develop, but not for every application. Don t Believe The Hype! Prototype and draw your own conclusions. Matt Raible Building Rich Applications with Appcelerator Slide 49
My Thoughts Flex or Ext JS when you have a REST backend REST backends are easy with Rails, Grails and Struts 2 GWT if you re a Swing or backend developer Appcelerator if you want to be language neutral or don t like authoring JavaScript Matt Raible Building Rich Applications with Appcelerator Slide 50
Questions? matt@raibledesigns.com http://raibledesigns.com http://twitter.com/mraible Download Presentation http://raibledesigns.com/rd/page/publications Matt Raible Building Rich Applications with Appcelerator Slide 51