Implementation Spotlight: Zipwhip and Ext JS
May 27, 2009 by Abraham Elias
With close to 100 billion text messages sent every month in the U.S., text messaging has clearly become a communication medium many of us have come to rely on. Zipwhip, a text messaging utility for the web with a polished Ext-based user interface, aims to take texting to a new level. The team at Zipwhip were eager to share their enthusiasm and approach to building with Ext.
Tell us a little bit about Zipwhip and your goals for the application.
Zipwhip is a utility for text messaging from the web. Text messaging is the fastest growing communication medium, but is still locked inside the mobile phone. We aim to help bring text messaging everywhere.
To pull off our ambitious goals, we’re using just about every web 2.0 trick in the book—comet to send carrier delivery receipts back to the browser in real-time, Ajax for server communications, download-on-demand Javascript packages (with preloading), Flash for audio notifications, and many others.
Why did you choose Ext JS?
One of the design decisions we made early on was that we wanted a rich desktop-like experience inside the web browser. We investigated the other major players in the field, but ultimately decided that ExtJS was the best. One of the things that made ExtJS especially appealing was the “Window” object that can contain “Panel” objects. Our core requirement was a windowed interface and having Ext.Window cross-browser out of the box was a major win.
Ext allowed us to focus on putting together the Ext building blocks that were engineered to be cross browser rather than reinvent the wheel. We had a limited budget and limited time and Ext provided 90% of the functionality we had in mind. We used a combination of Ext layouts and CSS to achieve many of the window structures used in the site. Theming the Ext widgets and integrating them with custom css layouts was a breeze.
Lastly, the XType architecture allowed us to create Javascript packages and download them on demand. This allows us to create an application that was not bounded by download size. A browser would have a difficult time rendering our site if not for lazy loading. What used to be a difficult custom built proposition (lazy loading) became an afterthought with Ext JS.
The Zipwhip application is extremely feature-rich. How did you manage the UI code complexity?
One of the small footnotes in Ext JS is the “plugin.” We’ve made that concept into a corner-stone of our application. Each carrier requires different functionality, features, and different business rules. With progressive enhancement we can swap in plugins that provide different implementations of various features, and ensure we only download the plugins that are needed.
Another thing that simplified my life greatly was David Davis’ (xantus) implementation of PubSub. This allowed us to decouple areas of the code, which made for a simple core framework. We implemented PubSub very late in the development process and are still working to fully take advantage of this wonderful design pattern.
Finally, keeping the code divided into standard namespaces was invaluable. We segmented common “Operating System” level widgets into Zw.controls and put all of our Ext.data.Records into Zw.data. Namespacing the code kept things manageable.
Oh yeah, and one class per file. Nobody likes a 10,000 line file.
What other techniques did you use to achieve such a gorgeous UI?
Most of what you see in the Zipwhip application is standard Ext JS with some fancy css overrides. We were surprised how easy it was to add some custom graphics to the existing Ext JS markup.
Ext.layout
One of the most awesome things about Ext JS are the Layouts! Because of the amazing flexibility we could mix css and Ext layouts to give us the desired effect with minimal code. The FormLayout (with anchoring) can manage the position of the fields, whereas CSS could manage the complexity of the Phone Preview Area.
Also Ext JS layouts improve performance and page weight. Specifically the layouts each decide when to render the content they are responsible for. This means that the Threading tab is only rendered the first time the user views the tab.
Ext.menu.Menu and Ext.DataView
Ext.menu.Menu (and the Adapter) became one of the handiest components in the ExtJS library. All of our Right-click menus were implemented with the Ext.menu.Menu. We host panels inside the menu and use a combination of CSS trickery plus Ext layouts to get the resulting effect.
Possibly the part we used the most out of Ext was the Ext.DataView. In the Contacts window (and Corkboard), we utilize an Ext.DataView and customized it to allow rendering of Ext.Components. The DataView abstracts away the difficulty of managing a list of Widgets linked to a Ext.data.Store.
Ext.SplitButton
The ContactCard (Zw.controls.ContactCard) extends the Ext.SplitButton. I know our ContactCard doesn’t look anything like a split button, but it truly was the best approach. Thanks to the way that Ext designed their components, we were able to easily modify the Template that is used to generate the button. Also thanks to the xtype, delay rendering, and plugin model the API was extremely simple.
items: { xtype: 'Zw.controls.ContactCard', closable: true, plugins: [ "Zw.controls.ContactCardEditNamePlugin", //enable it to be editable new Zw.controls.ContactCardDropdownPlugin(), { // allow right clicks on the card xtype: 'Zw.controls.ContactCardPopupPlugin' //pop it up if its too small }], listeners: { scope: this, 'close': this.onContactCardClose, 'rename': this.onContactCardRename } }
What features could we add to Ext to make building a rich application like Zipwhip easier in the future?
We had the situation where we needed to create an Ext.DataView that displays Widgets. Currently you can only use an Ext.DataView with an Ext.Template. A solution that allows for controls to be created and inserted according to an Ext.data.Store would be valuable.
Additionally, “best practices” for preventing and dealing with memory leaks would make building an RIA easier. Memory leaks with templates, dataviews, and elements can cripple the development process if not planned for.
Do you have any advice for developers using Ext for the first time?
The best way to learn is to do. The rich examples provided give you a great starting point that can quite easily end up in your final product. One of the key value propositions of using Ext JS is the rich documentation – use it often.
Also put together various folder structures to gain experience for what feels right. A folder structure can make a huge difference on the quality of your product. Pick something that you can grow into and is not overly structured. I divide my OS, Controls, and Features and have found it rewarding, while not too restrictive.
Final thoughts?
Ext JS is more than an abstraction layer on top of Javascript (like other libraries). Ext JS is a set of design patterns and object models that naturally fit into application development. We continually reach inside the Ext JS treasure box when developing new functionality and find that most of the hard engineering has already been done. All that is left is to socket together a few pieces and tweak some CSS.
There is a growing amount of choice in the world of Javascript frameworks. We evaluated them all and decided Ext JS was the best. This was a hard choice for us initially, but now that we’ve launched our application to the public and it’s getting used every day, we’re really glad we selected Ext JS. The application has turned out to be everything we imagined and we like working with the Ext JS framework more and more.


Posted on May 27th, 2009 at 9:15 am
This is the best usage of Ext js I have ever seen. There are amazingly inspiring parts which every developer should see.
Bravo!!…
Posted on May 27th, 2009 at 9:34 am
Outstanding implementation! I will have to give them a look!
Posted on May 27th, 2009 at 9:38 am
Ok, after looking at the site, it is even better than your description! I signed up for the beta, and look forward to using this tool for a business setting! You guys rock!
Posted on May 27th, 2009 at 10:55 am
Holy moley! This is the most incredible use of Ext. I think I just saw the future of the web. Who are these Zipwhip guys?!? Too bad I’m not on Sprint. Their website at http://www.zipwhip.com seems to Ext as well.
Posted on May 27th, 2009 at 11:37 am
Nice
Posted on May 27th, 2009 at 11:56 am
Amazing application! Very well done!
Posted on May 27th, 2009 at 12:49 pm
As a sprint customer it took a little time to get passed the single sign-on, but once I was in, the application is jaw dropping. Very nice work guys. Zipwhip is the Meebo of text messaging. well done!
Posted on May 27th, 2009 at 12:52 pm
Absolutely stunning!
Posted on May 27th, 2009 at 1:40 pm
[...] can see the article at: http://extjs.com/blog/2009/05/27/implementation-spotlight-zipwhip-and-ext-js/ Share and [...]
Posted on May 27th, 2009 at 3:11 pm
I’m glad I could help. They have done a great job on the ZipWhip app. Congrats!
Posted on May 28th, 2009 at 12:06 am
That is a super site – really great job.
Posted on May 28th, 2009 at 3:21 am
It’s awesome work. UI is cool.
Posted on May 28th, 2009 at 9:34 am
Wow, Michael. This is an amazing capability and I can’t wait to use it.
Posted on May 28th, 2009 at 1:18 pm
Truly awe-inspiring customization! Your account of the rationale behind choosing Ext nicely serves to reinforce why Ext JS is such a great choice in comparison to other frameworks.
Posted on May 28th, 2009 at 4:57 pm
Superb example of Ext usage!
What’s your ExtJs forum name?
Posted on May 28th, 2009 at 9:00 pm
I don’t have words to describe this implementation of Ext JS.. just amazing…!!!
Posted on May 29th, 2009 at 2:53 am
잘만들었넹 잘만들었넹
Posted on May 29th, 2009 at 7:11 pm
@Animal: SmyersM
Posted on May 30th, 2009 at 9:13 pm
UI is realy cool.
Posted on May 30th, 2009 at 11:22 pm
GOOD!
Posted on May 31st, 2009 at 11:52 am
This is awesome…I think I am gonna develop some app based on this..
Posted on May 31st, 2009 at 12:44 pm
[...] folks at ZipWhip have put together a really impressive UI in ExtJS. Check out the link for more [...]
Posted on June 1st, 2009 at 12:15 pm
这正是好东西,谢谢了
Posted on June 2nd, 2009 at 4:00 pm
This is simply awesome. Can jquery and prototype people point at any such site?
Posted on June 3rd, 2009 at 10:02 am
With all possibilities, they have stolen the msn messenger icons to build their own icons (add only a cap on guys) to trap msn users … Microsoft will contact them soon to ask some fees …
Posted on June 3rd, 2009 at 10:43 am
[...] корпоративные приложения и админки – почитайте этот великолепный пост о том, какие вещи можно создать на базе этого [...]
Posted on June 4th, 2009 at 10:39 pm
Great job, the app looks great. Looks like you guys were really able to design the entire app based on ext’s patterns and create a very flexible design. I wish we didn’t have so much legacy code to deal with and could do the same to our app.
This app helps prove the point that there is no comparison between ext and prototype, jquery, or the other major js libs when it comes to building desktop-like apps on the browser.
Posted on June 8th, 2009 at 3:02 am
how to login it?
Posted on June 12th, 2009 at 2:00 am
[...] Implementation Spotlight: Zipwhip and Ext JS [...]
Posted on June 18th, 2009 at 9:30 am
Guys, this is a master piece of programming and design brought together. I’m blown away!!
Posted on June 23rd, 2009 at 9:19 am
Ext应用的前景不错,让我们感受到浏览器程序的强大
Posted on June 27th, 2009 at 5:40 am
kabin üretiminde üretici firma.
Posted on July 3rd, 2009 at 11:51 pm
Супер, но сегодня дочитать не успею, добавил в избранное.
Posted on July 9th, 2009 at 10:12 am
sikiş ve videolar
Posted on July 18th, 2009 at 9:27 am
I am grateful to you for this great content.
Posted on July 20th, 2009 at 7:36 pm
Если это не секрет, где вы живете? Уж очень на украинца похожи
Posted on September 1st, 2009 at 3:40 am
well done
Posted on September 24th, 2009 at 6:29 am
a very flexible design. I wish we didn’t have so much legacy code to deal with and could do the same to our app.
This app helps prove the point that there is no comparison between adass
Posted on October 15th, 2009 at 5:52 am
n. I wish we didn’t have so much legacy code to deal with and could do
Posted on October 17th, 2009 at 8:56 am
I wish we didn’t have so much legacy code to deal with and could do the s
Posted on October 24th, 2009 at 3:37 pm
Very impressive implementation!
And a great inspiration for new ways to use this great framework
Posted on October 24th, 2009 at 4:56 pm
Great job, the app looks great. Looks like you guys were really able to design the entire app based on ext’s patterns and create a very flexible design. I wish we didn’t have so much legacy code to deal with and could do the same to our app.
This app helps prove the point that there is no comparison between ext and prototype, jquery, or the other major js libs when it comes to building desktop-like apps on the browser.
Posted on November 21st, 2009 at 7:33 pm
Awsome work. Congratulations.