[Ironpython-users] Q: Protecting my source in an ASP.NET IronPython application possible?
Bernd Viehmann
bernd.viehmann at googlemail.com
Wed Jul 20 18:38:04 CEST 2011
Hi Jeff and Jimmy,
taking the business-logic in a separate module is my usual style of
working, but I didn't see that the pyc-script-hint will work for me.
So for me there is no need of compiled-code-behind-files.
Thanks much & kind regards
Bernd
Am 20.07.2011 17:29, schrieb Jimmy Schementi:
> On Jul 20, 2011, at 11:26 AM, Jeff Hardy<jdhardy at gmail.com> wrote:
>
>> On Wed, Jul 20, 2011 at 7:14 AM, Jimmy Schementi<jschementi at gmail.com> wrote:
>>> By the way, you're correct that Microsoft.Scripting.AspNet doesn't support loading code-behind from DLLs produced from clr.CompileModules. If anyone really wants this, patches are welcome: https://github.com/IronLanguages/main/tree/master/Hosts/MerlinWeb
>>
>> But it does support importing modules compiled with pyc, right?
>>
>> In that case, Bernd, put all of your business logic in a separate set
>> of Python files (not code-behind) and compile those with pyc. Then,
>> from your code-behind files you can clr.AddReference() and import your
>> compiled code. This won't protect the code behind files, but the
>> code-behind should be very small files that just call into your
>> compiled code and thus don't really need to be obfuscated.
>>
>> This also has the advantage of decoupling your business logic from the
>> web pages, making it easier to maintain and test.
>>
>> - Jeff
>
> Yes, you can make the code-behind a pass through to a compiled module.
More information about the Ironpython-users
mailing list