[OPEN] [#261] Ext.NET, Sencha Touch and Ext.Direct

Page 1 of 2 12 LastLast
  1. #1

    [OPEN] [#261] Ext.NET, Sencha Touch and Ext.Direct

    Hello
    I know that Ext.NET does not support Sencha touch controls ( and logically it cant),
    I just wonder if there is an easy way how to generate Ext.Direct methods.

    in details:
    I have the Sencha architet, I have the large Ext.Net application working and I want to connect those two. For that I required Direct resource link - which is basically entry point to the Ext.Direct service. There are couple of samples how to setup it but none of them uses Ext.NET. I think once it is there, there has to be a way how to use it, rather then including another libraries to the server project.

    Thanks for any direction
    Last edited by Daniil; May 31, 2013 at 3:02 PM. Reason: [OPEN] [#261]
  2. #2
    Hi @aisi_it_admin,

    May I clarify a bit?

    You have the two applications - a Sencha Touch one and an Ext.NET one. In both the applications you have server methods which you want to have get, again, from both the applications. Is that correct? What kind of server methods do you have? Are they code behind methods, ASHX handlers, Web Services, WCF services and/or something else?

    There are couple of samples how to setup it but none of them uses Ext.NET.
    Well, Ext.NET itself is a sample.

    Here is a client side part.
    <Ext.Net v1 sources root>\Ext.Net\Build\Ext.Net\extnet\core\direct\DirectEvent.js
    <Ext.Net v1 sources root>\Ext.Net\Build\Ext.Net\extnet\core\direct\DirectMethod.js
    A server side part is here:
    <Ext.Net v1 sources root>\Ext.Net\Core\<files contained "Direct">
    and some other files like HandlerMethods.cs.

    Hope this helps.
  3. #3
    Hello

    Thank you fro the reply
    It's not quite like that
    We have finished Ext.NEt application, most of methods are Directmethods on the page (that simply call some underlying layer)

    now we are starting with SenchaTouch application and I'm looking for easiest way how to create Ext.Direct entrypoint for it.
    SenchaTouch app suppose to connect to the same server.
    Sencha architect asks me for direct resource url and I have no idea what to provide to it.
  4. #4
    I am still not getting what exactly you need.

    Do you want to reuse existing DirectMethods of the Ext.NET application in the Sencha Touch application? I mean without copying those methods from the Ext.NET application to the Sencha Touch one.

    Quote Originally Posted by aisi_it_admin View Post
    SenchaTouch app suppose to connect to the same server.
    Well, yes, two applications can be on the same server, but cannot be on the same ports. Different ports means CORS. A common AJAX request can't do this.

    Quote Originally Posted by aisi_it_admin View Post
    Sencha architect asks me for direct resource url and I have no idea what to provide to it.
    I don't think it is such a simple problem that can be solved just by setting some URL:)
    Last edited by Daniil; May 29, 2013 at 1:23 PM.
  5. #5
    we are probably still not on the same way
    Maybe I can ask like this - is there a way how to setup Ext.NET on server, so sencha touch can connect to it?
    I'm not talking about UI stuff - just about ajax calls.

    Not sure why you are talking about two application on server, for me sencha touch is client application that does not know too much about server
    it anly - using Ext.NET direct tries to call the server ( Ext.NET app in my case).

    this is common scenario in Sencha Touch as far as I;m aware off:
    On server there is Ext.Direct with cclases like this:

    [DirectAction]
        public class Workspace
        {
    
            [DirectMethod]
            public ICollection<Repository> FindWorkspaces()
            { 
            }
    
            [DirectMethod]
            public void Another Method()
            { 
            }
    }
    SenchaTouch is then pointed to one handler ( directProxy.ashx), that generate js wrappers around it, so it could be called using Workspace.Method()

    So I'm looking for something like that - if it is preent - in Ext.NET
    If it is not there then ok ( or if you do not know what ext.direct is - means this http://www.sencha.com/products/extjs/extdirect .... but I'm moreless sure there is some very easy way how to connect Ext.net server with sencha touch app, and I just do not see it)
    Last edited by geoffrey.mcgill; May 30, 2013 at 5:23 AM.
  6. #6
    Hello!

    Unfortunately, there is no easy way except changing architecture of your application and create API level for your applications. Also, I don't think that it will take much time.
  7. #7
    Quote Originally Posted by aisi_it_admin View Post
    Not sure why you are talking about two application on server, for me sencha touch is client application that does not know too much about server
    Are you going to deploy that Sencha Touch application on the Web?
  8. #8
    Yes,
    Simply as part of the Ext.Net application ( as at the end - sencha touch app is just bunch of javascript + one landing (html) page)

    I found one Ext.Direct implementation already here : http://www.sencha.com/forum/showthre...DotNet-started

    I just wanted to avoid that - as some attribute names are same in Ext.Net and here, so naming problems might appear etc... it could be soled, for sure, I just thought there is some simple way how to connect SenchaTouch client to Ext.Net server
  9. #9
    Well, since you are placing Sencha Touch pages inside the Ext.NET application, maybe, you just need this:
    Quote Originally Posted by Daniil View Post
    Here is a client side part.
    <Ext.Net v1 sources root>\Ext.Net\Build\Ext.Net\extnet\core\direct\DirectEvent.js
    <Ext.Net v1 sources root>\Ext.Net\Build\Ext.Net\extnet\core\direct\DirectMethod.js
    Then request the things by
    Ext.DirectMethod.request(...);
    Here is an example of using the request method.
    https://examples2.ext.net/#/Events/D...ds/WebService/
  10. #10
    Yes, that's close to what i would like to
    is there a way I can use "strongly type" methods in javascript - Means instead of Ext.net.request method you sugested use the ServerviceName.MethodName(argument1,argument2)

    I was thinking of creating couple pages like
    ServicePage1.aspx, ServicePage2.aspx, each with some methods like
    [DirectMethod]
    poblic string Method1(){ ... }
    poblic string Method2(){ ... }
    otherwise with absolutelly no aspx content

    and then somehow linking them into the senchatouch base html page

    What I'm not sure is what is the minimum to include to get it work
    (for example I can have the base senchatouch page aspx page with all the direct methods - but that mean I client has to download whole extjs framework here which I do not want)
Page 1 of 2 12 LastLast

Similar Threads

  1. [CLOSED] Sencha Touch
    By Pablo_Azevedo in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Aug 03, 2016, 7:57 AM
  2. [CLOSED] Sencha Touch
    By x1000 in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Aug 03, 2016, 7:56 AM
  3. Sencha Touch
    By Yannis in forum 1.x Help
    Replies: 2
    Last Post: Aug 03, 2016, 7:56 AM
  4. [CLOSED] Sencha Touch
    By marco.morreale in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 15, 2013, 3:46 PM

Posting Permissions