[CLOSED] X.msg.alert: Server side vs Client side

  1. #1

    [CLOSED] X.msg.alert: Server side vs Client side

    Hi all,

    I'm wonder about the performance when using the Ext.net alert message, in server side and client side.

    Please find below the two methods that I use:

    Method1: Client Side Alert
    function SaveChanges() {
        var message;
        App.direct.UpdateDepartment({ success: function (result) {
            if (result) message = "message 1";
            else message = "message 2";
            Ext.net.Notification.show({
                iconCls: 'icon-accept',
                title: 'Title',
                html: message
            });
        }
        });
    }
    [DirectMethod]
            public bool UpdateDepartment()
            {
                bool result = false;
                try
                {
                    //some code here
                    result = true;
                }
                catch (Exception ex)
                {
                    // some code here
                }
                return result;
            }
    Method2: Serve Side Alert
            [DirectMethod]
            public void UpdateDepartment()
            {
                try
                {
                    //some code here
                    X.Msg.Alert("title", "message 1");
                }
                catch (Exception ex)
                {
                    // some code here
                    X.Msg.Alert("title", "message 2");
                }
            }
    Which one do you suggest to use?

    Thanks and Best Regards.
    Last edited by Daniil; Dec 28, 2012 at 10:33 AM. Reason: [CLOSED]
  2. #2
    Hello!

    There is no difference in performance between these two approaches. However, it's better to use second one because it looks more coherent.
  3. #3
    Hi @Baidaly,

    Thank you for the advise.
    Please feel free to mark this thread as closed.

    Best Regards.

Similar Threads

  1. Replies: 14
    Last Post: Nov 26, 2012, 7:33 PM
  2. Replies: 3
    Last Post: Dec 26, 2011, 1:32 PM
  3. Replies: 1
    Last Post: Dec 01, 2010, 5:14 PM
  4. Replies: 4
    Last Post: Mar 19, 2010, 11:35 AM
  5. Replies: 6
    Last Post: Sep 01, 2009, 1:06 PM

Posting Permissions