Results 1 to 5 of 5

Thread: "goodTalk" chat application, done in ExtJS. Criticism needed!

  1. #1
    Sencha User
    Join Date
    Aug 2010

    Post "goodTalk" chat application, done in ExtJS. Criticism needed!

    Hello everyone, after more than a month of simultaneously coding and learning extJS i have finally come to an appreciable milestone in my project. I have to address thanks to the ExtJS community and developers, for creating this framework.
    Special thanks to Condor and Animal for their patience in answering the questions put up by me, even when my questions were plain dumb. Also special thanks to those who have helped me indirectly, most notably the person who created the CSS styles at,,

    I have no professional experience in programming since i am a college student, so any and every advice and criticism, both constructive and destructive is appreciated, especially from seasoned programmers.
    Both Javascript and PHP code are present, and i will post here the pictures with the explained SQL.
    I will also post questions of my own regarding the project

    1) I use the same MySQL table both for registration, and operations in real-time done on the account. Should i use two tables instead?
    2) The project is intended to be a real-time chat based on ajax, polling each 0.5 seconds for new messages, and each 4 seconds for buddy status (online/offline), but that's inherently very taxing to the server. Should i change it to a pseudo real-time chat, updating new messages each 10 seconds? Would that be catchy?
    3) Doesn't the name 'goodTalk' raise copyright issues? Most notably with google's gTalk ?
    4) What visible (or covert) security holes are in the project. (I implemented prepared statements wherever needed, but then again, i'm a noob)
    5) Is that paypal donation button functional? (no, i'm not suggesting anything)
    6) Please suggest some cool free hosting/domain sites, if you know any.
    7) There still are bugs most probably, you might encounter them as soon as you try anything out, so...yeah.
    8) Anything else on your mind, like the code inconsistencies you might find.

    Thanks ! - project - images, place in 'images' folder.
    EDIT: The SQL file contains an error, it creates the 'goodtalk' database, but then creates table for 'chat' database. Rename the 'chat' references to 'goodtalk', or the other way.

    Database images:

    Database overview, database table 'accounts', and database table 'messages'.
    Last edited by TotoTitus; 14 Sep 2010 at 9:55 AM. Reason: Forgot to attach project.

  2. #2
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    The Netherlands


    I haven't tested your application (I don't have a PHP server), but I do have some remarks about your javascript:
    1. You should really consider using an Ext.Viewport to contain all components instead of rendering them to divs.
    2. Why are you using displayfields for static text? Boxcomponents have far less overhead, e.g. {xtype: 'box', autoEl: {cn: 'Talk:'}}.
    3. flex:0 is meaningless.
    4. this.items.get() == this.getComponent() (for readability?)
    5. If you are already using custom components, then I would create separate methods for handlers and listeners instead of inlining them.
    6. Javascript programmers usually follow the Java code conventions (only constants are all uppercase).

    Regarding polling:
    A chat application could really benefit from a Comet type connection, e.g. long polling.

  3. #3
    Sencha User
    Join Date
    Jan 2008


    Pooling is a really bad idea for building a chat. Why don't you try to use web sockets?

    Take a look over this
    and try to use some asynchronus language for the server ( like nodejs or ruby eventmachine )

  4. #4
    Sencha User
    Join Date
    Aug 2010


    Thank you for your replies.
    @Condor: I will not be using a viewport since the UI hasn't gotten that complex yet
    I have thought of Comet before even starting this project. The reason why i did not implement it is that i did not have sufficient knowledge of it.
    I've read that you can implement it with ajax long polling, or hidden iframe thing, but Apache is terrible at handling multiple open connections, and since i'm using Apache, i reverted to simple ajax polling. I've seen places on the Internet (like the ones you linked, chriss) offering push functionality, but they always revolve around the idea of implementing a server for this. I use XAMPP Apache, with came installed in a very comfortable manner (Install -> Next -> Next -> Next -> Finish).
    I have no idea how to configure a new server from scratch, how to link PHP, MySQL and stuff like that to it, so that's why i did not opt (yet) for Comet. If any of you could give me advice here, it would be much appreciated.


  5. #5
    Sencha Premium Member steffenk's Avatar
    Join Date
    Jul 2007
    Haan, Germany


    Own server is so easy ...

    Condor - is there anything you know showing how to do such "Comet" technique with ExtJs?
    vg Steffen
    Release Manager of TYPO3 4.5

Similar Threads

  1. Replies: 2
    Last Post: 5 Oct 2010, 7:18 PM
  2. Replies: 3
    Last Post: 28 Oct 2009, 6:38 AM
  3. Replies: 30
    Last Post: 20 Apr 2009, 10:03 AM
  4. replace the "south" with the "new Ext.StatusBar" in "layout:'border'"
    By ealpha in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 18 May 2008, 8:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts