End-to-end ExtJS application (Part 1)

As a way to learn ExtJS, I decided to put together a sample web application whose construction details I will share with you in this and upcoming posts.

Requirements

My first step was to decide what kind of application to build. In the interest of learning ExtJS and at the same time building something simple and realistic, I established these as my main goals for the sample
  1. Use ExtJS as the presentation layer
  2. Use ExtJS’s AJAX requests as the way to “talk” to the server
  3. Be simple enough that it wouldn’t take a long time to build
  4. Be as close to a real-world application as possible without sacrificing items 1, 2 and 3

In terms of the type of application, I settled for a simple Knowledge Base System. I defined just a few usage scenarios that would keep it at a very basic level

  1. Browsing a collection of articles stored in a knowledge base repository
  2. Creation, edition or deletion of articles (any user can view, create, edit and delete any articles),
  3. View an article. The article’s visible attributes are
    • Title
    • Body
    • Tags, as a way to connect the article to specific topics
    • Author’s name
    • Date published

These requirements are a good foundation to build upon later. I will revisit them in the future in order to bring the sample closer to a real-life system.

Having a good idea about the functional requirements and client-side technology choices, the next step was to decide how things were going to be on the server side. To channel all communications with my web client I decided to use a .NET http handler. For the articles repository, a binary file would go very well with my simplicity and short-construction-time requirements. Any data access and business logic would be placed inside class libraries.

Putting these building blocks in a diagram yields something like this

 


User Interface

Time to move on and take a stab at the layout of the web page. How’s is a user to interact with our Knowledge Base? I decided to use this familiar layout

Articles Browser layout

 

Article Editor layout

 

The Articles Browser has a GridPanel that displays the list of articles in the knowledge base, an “article viewer” area where the properties of the selected article are shown, a TreePanel that displays the existing tags together with a count of articles that contain them, and an “article editor” window that allows for creating or editing articles.

Screenshots

   

What’s next

These are the changes I will be making in the future

  • Add pagination capabilities to the “articles list” GridPanel
  • Switch to a database-based model for storage of the articles
  • Move string to resources file so it’s easier to localize the application
  • Create user extensions for the main components

Downloads

Download the source code for this article from the Downloads page.

 

E-mail   Permalink    Comments(10)   Trackback

Tags:

Comments

By goallean  on Wednesday, March 12, 2008

thank you
I am learning it.

By sangramsinh  on Wednesday, April 09, 2008

its simply great........................

By gt  on Monday, April 14, 2008

good article

By Nitin Gautam  on Tuesday, November 11, 2008

Really a good tutorial Smile

By riot  on Saturday, May 02, 2009

usefull tutorial, big thx Smile

By mini storage  on Thursday, July 16, 2009

everybody! I find it is very useful for all. Great post, always fun reading your stuff.

By A.V>Bhaskar Reddy  on Friday, July 24, 2009

This is Bhaskar reddy from india.I am working in some softawre company.My compnay is using Extjs with java code.You have given some examples in extjs are very helpful to us.But,we are using java code with extjs.Can you please provide a code in java instead of C#.

By Nithin  on Wednesday, August 05, 2009

This is Nithin .Thanks for posting the articles.I am new to ExtJs.I am using ExtJs with Java.Can you please post me if you have any of those artticles....My compnay is using Extjs with java code.You have given some examples in extjs are very helpful to us.

By Nithin  on Wednesday, August 05, 2009

Bhaskar,

Can you please let me know if you have started working on it.Can you please post simple tutorial on this site using java and ExtJs that would also help others...

By Jorge  on Wednesday, August 05, 2009

Bhaskar, Nithin,

I'm glad the posts are helpful. I will try to write some examples using Java as soon as possible.

Are you using GWT or just Ext?

Comments are closed