Getting Started Basic Example

  1. #1

    Getting Started Basic Example

    Hi to all,

    I am new to ExtJS, but familiar with ASP.NET development and Web Services.

    I am refering to this example on the home page:
    
    <h3>Getting Started Basic Example</h3>
    
    
    The following code sample demonstrates a simple AjaxMethod returning a string to the client.</p>
    
    
    Example</p>[AjaxMethod]
        public string SayHello(string text)
        {
            return "Hello " + text;
        }
    
    
    
    Once the "SayHello" Method has been tagged with the [AjaxMethod] Attribute, the Method is now available to be called directly from JavaScript. The following sample demonstrates calling "SayHello" by clicking a hyperlink.</p>
    
    
    Example</p><a href="#" &#111;nclick="Coolite.AjaxMethods.SayHello('World')">Click Me</a>
    I am a bit confused here.


    I need to know:

    1. where exactly I will define the Web Service ? i mean, should create a new web service just like any other web service, or I have to follow certain steps to create such web service within the cotext of this framework (coolite/ExtJS) ?

    2. How to define the path to the web service from the calling client (ASP.Net Page).


    Appreciate your help.

    Tarek.

  2. #2

    RE: Getting Started Basic Example

    I'm not using AjaxMethods but as far as I know they are defined in code-behind file for aspx page.
    Method must have [AjaxMethod] attribute to call it from handler.
    There is no webservice needed.
  3. #3

    RE: Getting Started Basic Example

    Thanks Raku.

    Yes, I think it is clear to me how it worke now. I have looked again over the source code of the other examples, and it really great. I understand now exactly how it works.

    It seems very easy and brilliant also ... can't really be easier. Much much easier than the concept of a web service.

    When comparing AjaxMethods with a web services, the latter will look very complicated.

    Just to clarify the following:

    1. Do I need to install .NET Framework 3.5 to start developing and using ExtJS for ASP.NET ?

    2. Do I have to install VS 2008 to build application using ExtJS for ASP.NET ? I currently have VS 2005.

    3. The AjaxMethods developed for Coolite ExtJS Controls, can they be used from other client applications say like Adobe LiveCycle Forms ? Cause Adobe LC Forms support Web Services which has WSDL File.

    4. Can such AjaxMethods be reused by any other client application which has JavaScript support like say "Lotus Notes" ? Or they are only designed to work with Coolite ExtJS Applications ?

    Tarek.
  4. #4

    RE: Getting Started Basic Example

    tarekahf (11/8/2009)
    Just to clarify the following:

    1. Do I need to install .NET Framework 3.5 to start developing and using ExtJS for ASP.NET ?

    2. Do I have to install VS 2008 to build application using ExtJS for ASP.NET ? I currently have VS 2005.

    3. The AjaxMethods developed for Coolite ExtJS Controls, can they be used from other client applications say like Adobe LiveCycle Forms ? Cause Adobe LC Forms support Web Services which has WSDL File.

    4. Can such AjaxMethods be reused by any other client application which has JavaScript support like say "Lotus Notes" ? Or they are only designed to work with Coolite ExtJS Applications ?

    Tarek.
    Hi tarekhaf, here are your answers:

    1. The previous versions of Coolite toolkit worked on .NET 2.0. The latest 0.8 requires 3.5

    2. Well, for the latest version, yes. Because VS 2005 does not support 3.5 development. Again, you can use VS 2005 with .NET 2.0 for earlier (0.6 &amp; earlier, may be even 0.7, dont recall exactly) versions.

    3. No, AjaxMethods &amp; other Coolite services are based on ASP.NET features, like HttpModules &amp; HttpHandlers. In my knowing, you can't use them from other client applications becuase of the way ASP.NET is architected. Maybe, Coolite team can correct me if I am wrong..

    4. Again because AjaxMethods have have been designed for ASP.NET, you would have trouble integrating them with other client applications. You can off-course trigger an AjaxMethod from JavaScript code, but it calls back to the same ASP.NET page/User control which is currently being viewed by the user.

    Maybe, you should be aware that Coolite is based on ExtJs (www.extjs.com). AjaxMethods &amp; other Coolite features have been built on top of various ExtJs features, which is a pure client side library, that can be integrated on almost any client side application. You have samples also available on the official site for integration into various other frameworks. Maybe, you should also check out that.

Similar Threads

  1. Basic MVC Plumbing
    By Patrick_G in forum 2.x Help
    Replies: 3
    Last Post: May 25, 2012, 7:15 PM
  2. Please modify getting started document
    By Mr.Techno in forum 1.x Help
    Replies: 1
    Last Post: Jun 23, 2011, 9:53 AM
  3. Getting Started Tutorials?
    By CtrlShiftF11 in forum 1.x Help
    Replies: 3
    Last Post: Nov 25, 2010, 6:38 PM
  4. Coolite Examples 0.8.2 (Getting Started)
    By zgers in forum 1.x Help
    Replies: 0
    Last Post: Aug 29, 2010, 7:41 AM
  5. Replies: 0
    Last Post: Aug 16, 2009, 10:46 AM

Posting Permissions