Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: Is there any demo applications for ExtJS Plus ASP.NET WebAPi?

  1. #11
    Sencha Premium User
    Join Date
    Sep 2011
    Location
    Tamworth, NSW, Australia
    Posts
    1,271

    Default

    I chose Ext JS in 2011 (an early release of version 4 and Ext Designer) and found this Guide to Designing and Building RESTful Web Services with WCF 3.5 extremely helpful in developing the web service in c#.

    It was by no means a walk in the park but now that I'm starting my fifth year of using the two (my web services are still fundamentally the same), I'm pretty happy. I'm using Kerberos authentication in a Windows PC environment (IE/Chrome/Firefox), so users don't get prompted for a password (these are corporate apps which are not accessible to the outside world).

  2. #12

    Default

    ASP.NET Web API. ASP.NET Web API is a great way to make a RESTful application using the .NET framework. Ive downloaded and installed the Release Candidate version of ASP.NET MVC 4, which includes ASP.NET Web API, and Im using Visual Studio 2010.

  3. #13

    Default

    The struggle is Real!

    I'm just now researching the forums after exhausting the docs. Detailed documentation but utterly useless for examples on integrating ExtJS as a library into an existing ASP.net solution.

    So the problem I have is how the workspace and app concepts work within an IDE and application architecture that does not use sencha Cmd. The plugin has crashed on our development machines so I am forced to use the Cmd command line tool.

    Furthermore, I am able to create a workspace in a root folder, and generate a new app folders/files in my existing ASP.net project folder, but the ext folder is not accessible. See example folder structure below:

    workspace_root\
    ext\
    .sencha\
    MyASPNetProject\
    app\
    classic\
    modern\
    etc...
    app.json
    index.html
    etc....
    Controllers\
    Views\
    App_Start\
    etc....

    I run the project in Visual Studio to load index.html and get /ext/... 404 errors.

    So much fail I'm starting to regret buying 6 premium licenses.

    Also, yes, we've tried the VS Plugin but it's crashing the IDE. Ticket in progress. In the mean time we've been told to try the Cmd tool instead...

    Lastly, as you know, Asp.net has a publish function that allows the compilation and distribution of the ASP.net project to deploy into IIS. There is literally little to no information regarding how ExtJs integrates into this process. Did we buy the wrong product?

  4. #14

    Default

    I still haven't got a simple template together, but I have managed to get the two to work together.

    For various reasons we've decided that using Visual Studio and a single solution is not ideal.

    Our workflow is:

    * Separate WebAPI project and solution and even a separate Git repo for our C# back end.

    * Separate ExtJS front end project and workspace and all that in a separate Git repo.

    So for the "hello world" connection, the documentation could be better, but I think you will find it's not hard to invoke a REST api from ExtJS, and that it hardly matters what language your back end is in.

    I don't even know if beyond the demo scale I would ever want both pieces in one IDE. I think I could get it to work, with a bit of jiggery-pokery at the csproj level, but I don't think I want to.

    Feel free to email me privately if you want to compare notes and plans. My name with a dot in between first and last name, at the usual google mail thing.

    I have complaints about ExtJS but they have nothing to do with whether or not they provide an out of box template that is only usable at the hello world scale and not into real production. How about they start with versioning ExtJS and SenchaCMD so it's clear that SenchaCMD "6.1.2" works with Ext JS "6.1.2", instead of having the two numbers move independently. And how about having all build artifacts in a single folder instead of scattered all over the project.

    Warren Postma

  5. #15
    Sencha Premium User
    Join Date
    Sep 2011
    Location
    Tamworth, NSW, Australia
    Posts
    1,271

    Default

    I'm with Warren, keep the front-end and the web service in separate projects/solutions. Back in the days of Ext Designer I would generate the UI code into my Visual Studio solution and used its publish button to deploy them together, but pretty soon as Ext Designer evolved into Sencha Architect it became clear that the two should be kept separate from each other.

    I also like the idea of keeping Cmd/Ext versions in sync. I really don't have much Cmd visibility because Architect takes care of all that for me; I would hate to have to keep running something from the command-line myself.

    PS, once I build my front-end with Sencha Architect I "deploy" it using a FreeFileSync tool (very basic, probably not your cup of tea, but I didn't want to mix it with Visual Studio). It would be nice if Sencha Architect had some built-in publish/deploy abilities (with multiple configurations that allowed you to use separate/extra app.json files per config).

  6. #16

    Default

    That's my second gripe about this is there's little to no documentation on how to create a secure front-end client with OAuth2 that I've found. I saw a demo in the documentation that basically sets a flag in the code as authenticated which seems hoaky as hell. I assume I could open the Javascript console of the browser and give myself an authenticated state without having to login.

    I've heard of examples of using OAuth2 but have yet to find them in my Google searches or docs.

  7. #17
    Sencha Premium User
    Join Date
    Sep 2011
    Location
    Tamworth, NSW, Australia
    Posts
    1,271

    Default

    Quote Originally Posted by [email protected] View Post
    I assume I could open the Javascript console of the browser and give myself an authenticated state without having to login.
    That sounds dodgy, however I use Kerberos with Windows authentication so my web services will return an error if the user is not authorised. I get some initial data about the user at the beginning (such as "are they a manager", etc) and refer to that throughout Ext JS, but if the server suddenly detects that they are no longer a manager, the user will just errors until they decide to reload (and the client would then not show them managerial functionality anyway). You have to protect your web service at all costs and assume all clients are dodgy, IMHO.

  8. #18
    Sencha Premium Member
    Join Date
    Dec 2012
    Location
    Seattle, WA
    Posts
    423

    Default

    Quote Originally Posted by marc.fearby View Post
    That sounds dodgy, however I use Kerberos with Windows authentication so my web services will return an error if the user is not authorised. I get some initial data about the user at the beginning (such as "are they a manager", etc) and refer to that throughout Ext JS, but if the server suddenly detects that they are no longer a manager, the user will just errors until they decide to reload (and the client would then not show them managerial functionality anyway). You have to protect your web service at all costs and assume all clients are dodgy, IMHO.
    Exactly this. I do Active Directory authentication and I can query LDAP for all sorts of user info. Since it is so fast and very little overhead I do it on every single request. This way I don't have to care about authentication or any "logged in" status in the ExtJS. I also don't have to worry about sending user info in POST for storing in a DB. For example if I have some sort of "CreatedBy" field in a DB I can just use Page.User.Identity to plug in the AD user name when saving a model.

  9. #19
    Sencha Premium Member
    Join Date
    Apr 2011
    Posts
    108

    Default

    Hello, Warren. I hope that when reading this post, you and your family will be well.


    I am currently working with Asp.net Core 3 Web Api as a back end.


    I am licensed at Sencha to use Extjs.


    Unfortunately, I am also not finding any documentation that demonstrates how to relate and integrate an Extjs application with Asp.net. Not even the Sencha support staff can answer that question for me.


    Did you succeed in this task? And if so, could you be so kind as to show us how you did this integration?


    Thanks


    Hugo

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 3
    Last Post: 10 Sep 2015, 11:38 AM
  2. Sencha Touch and Azure WebAPI
    By donpham in forum Sencha Touch 2.x: Q&A
    Replies: 2
    Last Post: 18 Mar 2015, 1:30 PM
  3. How to do sub - applications in extjs 5?
    By vitorpfn in forum Ext 5: Q&A
    Replies: 1
    Last Post: 29 Oct 2014, 7:17 AM
  4. Having index.html served on Asp.net WebApi project
    By ChristianSA in forum Sencha Ext JS Q&A
    Replies: 2
    Last Post: 14 Jan 2014, 8:19 AM
  5. [CLOSED] Demo applications don't work on iPhone
    By tpolyak in forum Sencha Touch 2.x: Bugs
    Replies: 2
    Last Post: 24 Apr 2012, 5:26 AM

Tags for this Thread

Posting Permissions

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