| By Andrew Zuercher | Article Rating: |
|
| March 3, 2008 04:00 AM EST | Reads: |
3,657 |
If you are venturing to implement a Rich Internet Application (RIA) with Appcelerator, then there are features about the framework that I’m really geared up about that help you implement your solution effectively. When used together these items enable the agile creation of solutions in a shorter time that integrate nicely with services in an existing architecture and provide a richer user experience for clients.In this article I will cover 7 key tips.
Tip #1: Achieving Re-use
There are a bunch of ways to do this, personally I leverage app:content files judiciously. You can provide args in the definition of your content files so that you can use the same content file over again. Some things to keep in mind:
- reference the args as #{argname} in your element ids, any variables, and make sure that functions you call take this into account (possibly make them stateless)
- the order in which the content file is loaded to make sure that listeners are properly setup to respond to messages
here is an example app:content reference
1 | <app:content lazy="false" |
here is the content.html file
1 | <div id="#{prefix}header" ... |
I know that this may be abstract, but the point is that you can use the arg “prefix” to reuse the file and provide alternative behavior based on it.
Tip #2: Mocking Services
You can mock out server side services extremely easily with the framework. This is extremely useful whether your goal is:
- Visual Use Cases: implementing a prototype that results in 100% useable application code
- Working offline: no need to run a web server at all, you can directly run off of a simple file
Once you have this in place, you have a well defined contract in place which makes knocking out the service implementation a snap.
Tip #3: No restart
If you are just working on your application (no service work), you can directly make changes to your application without requiring rebuilding and redeploying your application. In java I typically work directly in my tomcat deploy directory and have an ant task to pull the web files into my workspace. With our next version of the framework coming out, this will be even easier with our support for Jetty coming and the Ruby based command line tool. In the meantime, the following is useful in your java project:
1 | ant pullweb |
Make sure that you have your deploy.dir setup in your $HOME/.ant.properties for example:
1 | deploy.dir=/Applications/apache-tomcat-6.0.14/webapps |
With our Ruby implementation for example, this is even easier (running webbrick directly in your workspace).
Tip #4: Great Support for Model Objects
I’ve touched a bit on this in a previous post on JSON serialization with Appcelerator java services. To summarize the framework enables
- Hibernate persistence: ModelObjects can easily be used with our Hibernate integration
- JSON serialization: Serializing and deserialing complex objects is a snap
Tip #5: Slick support for forms
In case you haven’t looked, you dont need to include a form tag anywhere in the application: simply add a fieldset attribute to your input elements and put something like this
1 | <input name="age" |
This will create a message of type r:create.person.request with the payload being all your input elements with fieldset of “save_person” ex:
1 | {'name':'jim','age':'35'} |
To me, this is very eloquent solution to leveraging form input elements with a messaging architecture.
Tip #6: Easy to use UI widgets
I love some of the widgets that are at your fingertips. Some of the ones that i use the most
- app:panel: slick styling
- app:datatable: great way to show rows of data
- app:chart: fantastic visual effects to bring life to data
All these widgets have a very terse usage that is very intuitive. For example, using this set, I was able to knock out a realtime dashboard application in 3 evenings.
Tip #7: Service Platform Options
Pitching the right framework is something that varies from project to project. For example, possibly your client wants to leverage an existing java infrastructure and is sold on its robustness for scaling enterprise applications, while on the other side possibly you want to take advantage of using a Rails controller and ORM/Active Record implementation for rapid development. On the same level you also have the option for implementing services to customers that deliver in a .Net solution architecture. Many other platforms also exist (python, PHP) enabling the opportunity to plug into those services as well.
The app:get non-visual widget also makes pre-existing services accessible as well and since Messaging is at the heart of the implementation, plugging into an ESB or pure MOM framework is perfectly setup as well.
Although there are more items that have not been covered here, these are the ones that appeal personally to me and have noticed a huge gain in doing much more with less effort.
Published March 3, 2008 Reads 3,657
Copyright © 2008 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
- The Business Value of RIAs: An Informal, Virtual Round Table
- JSON Serialization with Appcelerator Java Services
- "It's Time for UIs To Become Service-Oriented," Says Appcelerator's Jeff Haynie
- How Appcelerator is Building the Largest Open-Source Community Dedicated to RIAs
- Open Source Visionary Larry Augustin Joins Appcelerator Board
- The Benefits and Business Value of Open Source
- Think Fast: Accelerate AJAX Development with Appcelerator
More Stories By Andrew Zuercher
Andrew Zuercher is an Enterprise Architect at Appcelerator, advocating the implementation of RIA with agile methodologies.
![]() |
Simon Petersen 03/03/08 04:02:30 AM EST | |||
> Although there are more items that have not been Useful roundup thanks! |
||||
- Cloud Computing on Gartner's Top 10 List and SYS-CON Events' 2010 Calendar
- Confessions of a Ulitzer Addict
- IBM Hardware Chief, Intel VC Exec Arrested in Insider Trading Scam
- My Thoughts on Ulitzer
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- Ulitzer.com Named Exclusive "New Media" Sponsor of Cloud Computing Conference & Expo
- Moving Your RIA Apps into the Cloud: Seven Challenges
- Adobe’s Aiming ColdFusion at Multiple Clouds
- Windows 7 – Microsoft’s First Step to the Cloud
- Ulitzer Provides a Powerful Social Journalism Platform
- Jill Tummler Singer, Deputy CIO of CIA, Keynotes at GovIT Expo
- Open Source Mobile Cloud Sync and Push Email
- Practical Approaches for Optimizing Website Performance
- The Difference Between Web Hosting and Cloud Computing
- Cloud Computing on Gartner's Top 10 List and SYS-CON Events' 2010 Calendar
- Ajax in RichFaces 3.3, JSF 2 and RichFaces 4
- Confessions of a Ulitzer Addict
- IBM Hardware Chief, Intel VC Exec Arrested in Insider Trading Scam
- My Thoughts on Ulitzer
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- US Post Office Hops a Ride on NetSuite’s Cloud
- Ulitzer.com Named Exclusive "New Media" Sponsor of Cloud Computing Conference & Expo
- WPF Controls by DevExpress
- Moving Your RIA Apps into the Cloud: Seven Challenges
- Building a Drag-and-Drop Shopping Cart with AJAX
- What Is AJAX?
- Google Maps! AJAX-Style Web Development Using ASP.NET
- Flashback to January 2006: Exclusive SYS-CON.TV Interviews on "OpenAjax Alliance" Announcement
- AJAXWorld Conference & Expo to Take Place October 2-4, 2006, at the Santa Clara Convention Center, California
- AJAX Sponsor Webcasts Are Now Available at AJAXWorld Website
- How and Why AJAX, Not Java, Became the Favored Technology for Rich Internet Applications
- "Real-World AJAX" One-Day Seminar Arrives in Silicon Valley
- AJAXWorld University Announces AJAX Developer Bootcamp
- AJAX Support In JadeLiquid WebRenderer v3.1
- Where Are RIA Technologies Headed in 2008?
- Struts Validations Framework Using AJAX





































