[CLOSED] [#364] CDN Subjects/Comments/Questions.

Page 3 of 5 FirstFirst 12345 LastLast
  1. #21
    The latest ResourceManager.cs changes broke my ForceExtJsCDN features so I have to rewrite them.

    I have a feeling I should be using ResourceStrategy and overriding my own implementation. Can you give me insights on how?
    Last edited by michaeld; Oct 11, 2013 at 12:51 AM.
  2. #22
    Nevermind. I figured it out. It's a nice strategy.


    However, I have some comments on your implementation....

    The descriptor.Resource is pretty obfuscated by the time it reaches GetUrl which means that the programmer needs to deconstruct it after you already constructed it (expensive).

    The ideal would be that instead of obfuscating the resource name, instead have the parts as members of ResourceDescriptor so the user can construct it their-self.


    Also, I wasn't able to set ResourcesStrategyType="MyNamespace.RMStrategy" inside the ResourceManager of the as?x resource. I had to instead do it in the codebehind as
    ResourceManager1.ResourcesStrategyType = typeof( MyNamespace.ExtjsCDNAlwaysStrategy );
    Last edited by michaeld; Oct 11, 2013 at 2:18 AM.
  3. #23
    Final solution... This will allow programmers to use ExtJS CDN regardless of CDN settings for extnet.
    namespace MyNamespace {
        public class ExtjsCDNAlwaysStrategy : ResourcesStrategy {
            public const string ExtjsCDN = "//extjs.cachefly.net/ext/gpl/4.2.1/";// Extjs nonsecure & secure server
    
    
            public override string GetUrl( ResourceDescriptor descriptor ) {
                if( descriptor.Type == ResourceType.ExtJS && descriptor.Resource.StartsWith(ResourceManager.ASSEMBLYSLUG)) {
                       return descriptor.Manager.ResolveUrl( ExtjsCDN + descriptor.Resource.Substring( ResourceManager.ASSEMBLYSLUG.Length + 7 ).Replace( "-embedded", "" ).Replace( ".", "/" ).Replace( '_', '-' ).ReplaceLast( "/", "." ) );
                }
                return null;
            }
        }
    }

    I'd still prefer a breakout of more of the parts in ResourceDescriptor to have more control.
    Thank you. This version allows me to grab css and other resources from extjs whereas my old version only allowed js.

    You're welcome to add this ResourceStrategy to your library if you'd like to give this and other controls to customers. Of course you'll have to maintain the extjs version in the path.
    Last edited by michaeld; Oct 11, 2013 at 2:16 AM.
  4. #24
    Quote Originally Posted by michaeld View Post
    The descriptor.Resource is pretty obfuscated by the time it reaches GetUrl which means that the programmer needs to deconstruct it after you already constructed it (expensive).

    The ideal would be that instead of obfuscating the resource name, instead have the parts as members of ResourceDescriptor so the user can construct it their-self.
    Yes, it would be nice to have more control here. Thank you for the suggestion. We will try to do something.

    Quote Originally Posted by michaeld View Post
    Also, I wasn't able to set ResourcesStrategyType="MyNamespace.RMStrategy" inside the ResourceManager of the as?x resource. I had to instead do it in the codebehind as
    ResourceManager1.ResourcesStrategyType = typeof(  MyNamespace.ExtjsCDNAlwaysStrategy );
    We committed the fix. Now you can set up it via markup. However, please note that it expects the assembly-qualified name of the Type.

    I.e., if the assembly is not signed, this should work.
    ResourcesStrategyType="MyNamespace.RMStrategy, AssemblyName"
    If signed, then:
    "MyNamespace.ExtjsCDNAlwaysStrategy, AssemblyName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=..."
    Please also note that you can set up it on the Web.config level:
    <extnet resourcesStrategyType="MyNamespace.ExtjsCDNAlwaysStrategy, AssemblyName" />
    or in the Application global object.

    Quote Originally Posted by michaeld View Post
    You're welcome to add this ResourceStrategy to your library if you'd like to give this and other controls to customers. Of course you'll have to maintain the extjs version in the path.
    Thank you for the suggestion. At the moment we would prefer not to commit it leaving it under a developer's control.
  5. #25
    Quote Originally Posted by Daniil View Post
    Thank you for the suggestion. At the moment we would prefer not to commit it leaving it under a developer's control.
    Okay. Either way. They can find the option in this thread, as well, it's also an example of how to implement.

    But you do realize by adding it to ext.net library, it would not mean it would take it out of the developer's control. It would just give them the opportunity to use what's already there. But I understand you might not wish to have to support it also.
  6. #26
    Yes, it makes sense. Maybe, we will add it one day. Again, thank you for the suggestion!

    Do you mind we close the thread? Has everything been addressed here?
  7. #27

    Revisiting the status of each item.

    Quote Originally Posted by Daniil View Post
    Do you mind we close the thread? Has everything been addressed here?
    Reviewing...

    Quote Originally Posted by Daniil View Post
    Hi @michaeld,

    1. SSL CDN
    Yes, currently, CDN doesn't support SSL to request the resources with "https".
    So, you need to turn CDN off to avoid a security warning because of requesting the resources with insecure "http", is that correct?
    What's the status on this? I still presently manually set resource to load embedded if secure.

    Quote Originally Posted by Daniil View Post
    2. Getting ExtJS resources from CDN, but not Ext.NET
    Item addressed with ResourceStrategyType. Excellent job btw.

    Quote Originally Posted by Daniil View Post
    3. GZip
    Thank you for the report. Seems the main ExtJS script comes not gzipped from CDN. All the rest resources seems to be gzipped. We are investigating.
    Still outstanding. I don't know if you have any control over this ultimately, but it makes no sense for a cdn provider like speednet not to support gzip. That's like supporting the idea of performance but without providing maximum performance. If you review my comparison of the extjs timings, speednet is still still twice as long to load as extjs's cdn providers because of lack of gzip support. I can only assume the same translates for the extnet resources.

    Quote Originally Posted by Daniil View Post
    4. UX not minified
    Yes, we have no minified versions for UXs. We have some thoughts and plans on this, but no concrete time frames at the moment. But anyway, it won't provide much benefit since the UX resources are very small.
    Yes, you guys nailed this one.

    Quote Originally Posted by Daniil View Post
    5. CDNPath
    Thank you for the suggestion. We will consider.
    You indicated it was committed to SVN.
  8. #28
    Quote Originally Posted by michaeld View Post
    Still outstanding. I don't know if you have any control over this ultimately, but it makes no sense for a cdn provider like speednet not to support gzip. That's like supporting the idea of performance but without providing maximum performance. If you review my comparison of the extjs timings, speednet is still still twice as long to load as extjs's cdn providers because of lack of gzip support. I can only assume the same translates for the extnet resources.
    I'll be reviewing this functionality again. There was a maximum gzip size limit on objects at the CDN provider (I believe 1 meg). To work around this limit will take some investigation, although I do believe there is a solution.
    Geoffrey McGill
    Founder
  9. #29
    Thank you for the review.

    Quote Originally Posted by michaeld View Post
    Quote Originally Posted by Daniil View Post
    Hi @michaeld,

    1. SSL CDN
    Yes, currently, CDN doesn't support SSL to request the resources with "https".
    So, you need to turn CDN off to avoid a security warning because of requesting the resources with insecure "http", is that correct?
    What's the status on this? I still presently manually set resource to load embedded if secure.
    I am afraid it has been overlooked despite on the fact that it is in the thread's title:(

    We will look into it again.
  10. #30
    Thanks both of you. This one is may seem subtle, but bandwidth is the only control we have given how heavy server and client side run-times are.
Page 3 of 5 FirstFirst 12345 LastLast

Tags for this Thread

Posting Permissions