How does CRM 2011 load and manage plugins in sandbox mode? - dynamics-crm-2011

I have 2 plugin assemblies which are sharing the proxy code generated by crmsvcutil. The proxy code file tends to be large(14+ MB) and it seems to bloat up the Plugin Dlls.
I am thinking that it might make sense to offset the proxy code into a separate assembly and deploy it to the GAC on the CRM server.This would reduce the bloat in the plugin assemblies and also reduce the memory footprint since only a single copy of the proxy code would be loaded into the process space.
The question is, how does CRM load individual plugin assemblies?
Are they all loaded into the same process space or are they loaded into separate app domains?
If they are loaded into separate app domains then it defeats the purpose of having a separate assembly containing the generated proxy code since it will be loaded separately into both app domains anyways.
Any thoughts appreciated

I can't answer your question directly, but if bloat is the problem, there is a number of extensions to the crmsvcutil out there that will allow you to filter the generated class file to only include the entities that you wish to play with. I've done so before (at a previous company and have since lost the source. Grrr!) with success, achieving a class file of a few kb rather than mb.
A quick google search took me to... http://fourbusyxrmarchitects.wordpress.com/2012/08/09/filtering-the-list-of-early-bound-classes-generated-by-the-code-generation-tool-crmsvcutil-for-crm-2011-2/

Related

JavaEE: Ensure WAR files may not be changed

I am currently working in a WEB Java project and I have the following requirement: I have to make sure our customers don't have access to the packaged files in order to change them. Actually, I'd like to do that with only a few of those classes but without using any obfuscators due to the size of my project and the resources it uses to accomplish some tasks (reflection, annotations, interceptors, etc).
Does anybody have any tips?
Thanks,
Luan

securing the source code in a node-webkit desktop application

first things first , i have seen nwsnapshot. and its not helping.
i am building an inventory management system as a desktop app using node-webkit . the project being built is using compoundjs (mvc javascript library). which have a definite folder structure (you know mvc) and multiple javascript files inside them.
the problem is nwsnapshot allows the app to have only a single snapshot file but the logic of application is spread over all the folders in different javascript files.
so how do i secure my source code before shipping it to client? Or any other work-around Or smarter way (yes, i know about obfuscating).
You can use nodewebkit command called nwsnapshot to compile the javascript code into binary which will be loaded into the app without specifying any js file
nwsnapshot --extra-code application.js application.bin
in your package.json add this:
snapshot: 'application.bin'
It really depends on what you mean by "secure".
You can obfuscate your javascript code fairly well (as well as potentially improve performance) by using the Google Closure Compiler.
I'm not aware of any off-the-shelf solutions to encrypt/decrypt your javascript, and honestly I would question the need for that.
Some people think they need to make it impossible to view their source code, because they're used to dealing with compiled languages where you only ship binaries to users. The fact is, reverse-engineering that binary code was never as difficult as some people think it is, so if there's any financial incentive, there is practically no difference between shipping source code and the traditional shipping of binaries.
Some languages have offered genuine encryption of deployed assets, such as Microsoft's SLPS. It seems to me that the market for this was so small that Microsoft gave it to a partner (just my view). The truth is that most customers are not interested in taking your source code; they're far more interested in your ability to service and support that code in an efficient manner, while they get on with their job.
You may consider to merge the JS files into one in the build process and compile it.

DotNetNuke - Everytime a third party DLL is modified in the BIN folder, it takes DNN 10 seconds to load the next page

I have a standard DotNetNuke installation that I am developing some modules for.
Every time I update one of my modules, it updates that module's DLL in the DotNetNuke installation's bin folder.
Despite the fact that I am not touching the main DotNetNuke DLL, it seems that IIS is either reprocessing every DLL in the folder, or doing some other majorly time consuming task because it is taking at least 10 seconds to load any page after I recompile the single module's DLL.
For comparison, if this module were running outside of DotNetNuke, it would load in under a second.
Is there some way to get around this delay?
Whenever you change a .dll in the bin folder ASP.Net will restart the application. Application startup does not necessarily mean anything gets recompiled, though some of the modules may get recompiled, but probably not until they are used. A bunch of the time goes into inspecting/loading all of the assemblies in the bin folder, and executing all the application startup code. Removing any unneeded modules will help reduce the start up time, as those assemblies will no longer need to be loaded.
Mitchell Sellers has a great document titled DotNetNuke Performance Configuration Best Practices download here several of the recommendations will help reduce startup time, and it is a generally a good reference on how to effectively deploy a DNN site.
Per comments, it sounds like the usual Asp.net site compile happening. Here are some good links covering the details.
msdn: ASP.NET Compilation Overview
msdn: ASP.NET Web Site Precompilation Overview
Rick Stahl has a good write up

Dojo load time extremely slow on iis

I am currently working on a project that is using Dojo as the js framework. Its a rather rich ui and as such is using (and thus loading) a lot of different .js files for the dojo plug-ins
When run on an apache server running on a mac, the files (all around 1k) are served very quickly (1 or 2 ms) and the page loads pretty fast (<5 seconds)
When run on IIS on Win 7, the files are served at an unbelievably slow rate (150ms - 1s), thus causing the page to take up to 3 minutes to load.
I have searched the internet to try to find a solution and have come up empty.
Anyone have any ideas?
Why not let Google serve the Dojo files for you?
The AJAX Libraries API is a content
distribution network and loading
architecture for the most popular,
open source JavaScript libraries. By
using the google.load() method, your
application has high speed, globally
available access to a growing list of
the most popular, open source
JavaScript libraries.
What you need to do is build an optimized version of your code. That way you will have far fewer hits to your server (but I guess they'll still be slow, until you discover the iis problem) Dojo runs out of the box as individual files which is great for development, but without running the build scripts to concatenate all these files together, the experience is poor. The CDN does build profiles for dojo base and certain profiles, like dijit.dijit. Doing a dojo.require on these profiles in addition to the individual requires would enable this after running a build. You would need to do create layers for your code as well. The build scripts can also concatenate css and inline template files, remove comments and whitespace, etc.
Have you actually tried measuring the load times on the intended target production server?
If you're just testing this on local development environments (or in development/test VM's) then I think you're comparing apples with oranges (pardon the pun :) ).

Loading Assemblies from the Network

This is related to the this question and the answer maybe the same but
I'll ask anyways.
I understand that we can start managed executables from the network from .NET
3.5 SP1 but what about assemblies loaded from inside the executable?
Does the same thing apply?
You have been able to load Assemblies from the network at leasst from .NET 2.0. I have used this on a previous project. The only thing to watch is the size of the assembly and the number and size of the dependancies that it is loading.
If you are using a seperate AppDomain, then you will need to take special consideration of the dependancies.
My understanding is yes, you're trying to load an untrusted module into your local app domain.

Resources