Hybrid View

  1. #1
    Sencha User
    Join Date
    Jan 2008
    Location
    Toronto, Canada
    Posts
    480
    Vote Rating
    4
    elishnevsky is on a distinguished road

      1  

    Default Ext.Direct for ASP.NET MVC

    Ext.Direct for ASP.NET MVC


    Ext.Direct for ASP.NET MVC
    Here is my implementation of Ext.Direct server-side stack for ASP.NET MVC 3 and 4.

    Nov 12, 2012: The project has moves to GitHub.

    Key features

    * Easy setup
    * Support for different types of parameters - simple types, complex types and arrays
    * Form post values can be bound to multiple simple type parameters, a single complex type parameter (object) or a mix of both on the server
    * Support for method aliases
    * Exceptions with full stack trace and additional user-defined data for easy debugging
    * Support for custom server-side events
    * Support for named arguments (Ext JS 4.x)

    The full source code is available here:

    Ext.Direct for ASP.NET MVC on GitHub

    Clone it or download the repository as zip file. You need to open the solutions in Visual Studio 2012 and allow NuGet to download missing packages before attempting to build it, as described in Compiling the source section in the README file.

    Please read the README !!!

    Any questions, comments, suggestions are welcome.

  2. #2
    Sencha User
    Join Date
    Apr 2008
    Location
    West Linton, Scotland
    Posts
    244
    Vote Rating
    0
    andycramb is on a distinguished road

      0  

    Default


    Very nice examples
    I was thinking of converting my existing ExtJs MVc app to using Direct but I have not had time to look at using it
    This is great to get me jump started

    Questions
    Does the DirectProvider class generate the DirectApi.js file and write it back to the response stream?
    When does it do this? I noticed its cached if I add a new contoller will it automatically generate a new DirectApi.js file?

    Does the router pick up all requests marked DirectRouter and then inspect the JSON and map the action to the controller and the method to the action?

  3. #3
    Sencha User
    Join Date
    Jan 2008
    Location
    Toronto, Canada
    Posts
    480
    Vote Rating
    4
    elishnevsky is on a distinguished road

      0  

    Default


    Removed the comment. Its content was no longer valid in the latest version.
    Last edited by elishnevsky; 23 Jan 2010 at 9:29 PM. Reason: Content removed

  4. #4
    Sencha User
    Join Date
    Mar 2007
    Posts
    14
    Vote Rating
    0
    Razhick is on a distinguished road

      0  

    Default


    Very nice examples and thank you for sharing.

    Just one comment; testing using FireFox 3.0.11 everything works but using IE 7, the tree and the grid panel do not show - Error: Object expected, Char: 13, Line 7506.

    Thanks a lot!

  5. #5
    Sencha User
    Join Date
    Jan 2008
    Location
    Toronto, Canada
    Posts
    480
    Vote Rating
    4
    elishnevsky is on a distinguished road

      1  

    Default


    Quote Originally Posted by Razhick View Post
    Very nice examples and thank you for sharing.

    Just one comment; testing using FireFox 3.0.11 everything works but using IE 7, the tree and the grid panel do not show - Error: Object expected, Char: 13, Line 7506.

    Thanks a lot!
    That's because I don't care about IE But I fixed it anyways. Extra comma thing again, doh!

    Just uploaded Ext.Direct.Mvc-0.2.zip. It requires you to make a small change in the configuration. Please change from this:
    HTML Code:
    <section name="ext.direct" type="Ext.Direct.Mvc.DirectSectionHandler, Ext.Direct.Mvc"/>
    To this:
    HTML Code:
    <section name="ext.direct" type="Ext.Direct.Mvc.Configuration.DirectSection, Ext.Direct.Mvc"/>
    Also added extra exception handling and moved all configuration related stuff to Ext.Direct.Mvc.Configuration namespace.

    First post updated.

  6. #6
    Sencha User
    Join Date
    Jan 2008
    Location
    Toronto, Canada
    Posts
    480
    Vote Rating
    4
    elishnevsky is on a distinguished road

      0  

    Default


    Uploaded version 0.3. Controller actions marked with DirectIgnoreAttribute (e.g. [DirectIgnore]) can now be executed as regular actions via the default route. Head post updated.

  7. #7
    Ext JS Premium Member veenvliet.morion's Avatar
    Join Date
    Oct 2009
    Location
    Netherlands
    Posts
    24
    Vote Rating
    0
    veenvliet.morion is on a distinguished road

      0  

    Default


    ouch, totally missed that one.
    Thanks!

  8. #8
    Sencha User
    Join Date
    Jan 2008
    Location
    Toronto, Canada
    Posts
    480
    Vote Rating
    4
    elishnevsky is on a distinguished road

      0  

    Default


    Ext.Direct.Mvc v0.8.1 is released.

    The download link is in the first post of this thread.

    Changes:
    Code:
    * Remove: Interception of every exception introduced in v0.8.0 (was a bad idea).
    * Added: DirectHandleErrorAttribute class which can be used to mark a whole
      controller or an individual action with a [DirectHandleError] attribute to
      intercept all exceptions and return a direct response of type "exception"
      that contains the information about the exception.
    * Added: DirectException class for throwing custom exceptions that will always
      return to the client as a direct response of type "exception".
    * Added: Suport for ActionNameAttribute. If an action is marked with this
      attribute, then the specified name will be used when generating API and for
      routing direct requests. Make sure that you use the name specified in this
      attribute when calling the method from your JS code.
    * Added: New overloaded methods in DirectController. Check out DirectForm().
    * Renamed: exceptionData to errorData.
    * Fixed: Serialization of DirectResponse in file upload mode.
    * Misc: Other minor fixes and code optimizations.
    I have also removed the Ext JS source from the test application and instead linked the scripts from cachefly.net. The package is now much smaller.

    Thanks to the .NET expert and my colleague aritchie for pointing out the issues with catching all exceptions.

  9. #9
    Sencha User
    Join Date
    Jan 2008
    Location
    Toronto, Canada
    Posts
    480
    Vote Rating
    4
    elishnevsky is on a distinguished road

      0  

    Default


    Uploaded Ext.Direct.Mvc v0.8.2.

    See the first post of this thread for the download link.

    Changes:
    Code:
    * Fixed: Binding DateTime, Enum, Guid and nullable types.
    * Misc: Lots of unnecessary code was removed.

  10. #10
    Ext User
    Join Date
    Mar 2009
    Posts
    3
    Vote Rating
    0
    sergeime is on a distinguished road

      0  

    Default


    It seems with latest I have problems with passing GUID strings into server-side code. Earlier with version 7 I was able to invoke controller methods that had Guid parameters - now it is broken.
    Same problem with DateTime, from JS I pass Javascript's Date type variable, on server I'm getting string representation, but your code in DirectMethodInvoker.GetParameterValues doesn't correctly handle this. It compares String to Nullable<DateTime> that i obviously wrong.

    I think better would be to allow reflection do the job. Just handle JSON object deserialization, do not check types yourself.

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi