Results 1 to 2 of 2

Thread: 2-tier or N-tier on client side?

  1. #1
    Ext User
    Join Date
    Mar 2007
    Vote Rating

    Default 2-tier or N-tier on client side?

    Usually we choose a 3-tier or N-tier structure for database driven website developement. With AJAX, do we need a 2-tier or N-tier on client side?

    For example, I usually use data model (DM) in js for grid, view, content panel. The js code for DM is usually mixed with other UI interface in one class. How can I effectively have a seperate class, for example datamodel class, which is exclusive for data access? In this way the DM code can be reused in many pages.

    I am a newbie in ajax application developement. All of the time I need your guys help!

    Thank you!

  2. #2
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    New York, NY
    Vote Rating


    Extending the appropriate data model class always an option. Then you can add additional helper functions as well. For example:

    FeedDataModel = function(){
         var schema = 
          ... // put your data model init and config stuff here
          // you can optionally pass paging init info to this 
          // objects constructor and call initPaging with it
    YAHOO.extendX(FeedDataModel, YAHOO.ext.grid.XMLDataModel, {
        loadFeed : function(feedUrl){
            this.load('feed-proxy.php', {feed: feedUrl});
    then anywhere you need a new data model for feeds:

    var dm = new FeedDataModel();

Similar Threads

  1. Client-side grid filtering (Newbie)
    By protech in forum Ext 1.x: Help & Discussion
    Replies: 6
    Last Post: 25 Apr 2007, 8:36 AM
  2. Exploring Client-Side Cross Browser XML Data-Binding
    By genius551v in forum Ext 1.x: Help & Discussion
    Replies: 10
    Last Post: 5 Jan 2007, 8:41 AM
  3. Server-side vs. Client-side...
    By zquirm in forum Community Discussion
    Replies: 2
    Last Post: 22 Dec 2006, 8:15 PM
  4. Yui, Client-Side SQL Query and AjaxPro for .NET
    By Choleriker in forum Community Discussion
    Replies: 9
    Last Post: 12 Dec 2006, 7:27 AM
  5. client vs server and xslt vs dom
    By Herm in forum Ext 1.x: Help & Discussion
    Replies: 4
    Last Post: 1 Dec 2006, 12:00 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