[IronPython] IronPython in a web application
Szymon Kobalczyk
s.kobalczyk at softwaremind.pl
Tue Nov 28 20:54:23 CET 2006
Hi,
In our system IP is used for many things including text templates in
similar fashion to what you describe. My implementation is basically
turning the whole template into Python function and then compiles it
using PythonEngine.CreateMethodUnscoped so it can be reused with
different arguments.
Actually I will be refactoring and adding new functionality to my
templates engine this week so I would try to send you some bits shortly
after. In the meantime you might want to take a look at Cheetah
(http://cheetahtemplate.org/). It was raported on this list that it
works with IP.
Regards,
Szymon Kobalczyk
Ian Warwick napisał(a):
> Hi,
>
> New guy here.
>
> I am developing a web application that uses the Front Controller
> pattern, the idea was that it would provide rich functionality for
> mapping UI Elements to business objects.
>
> It came to the point where it would be nice to have content parts that
> I could write up in a text file, just a few html snippets for
> customizing certain areas.
>
> I then decided to add IronPython support within these snippets, it
> works really well and very fast but I wanted to confirm it by talking
> to other developers using IronPython.
>
> In a nutshell I have a class that encapsulates PythonEngine and
> executes code written in the snippet file outputing the result back
> into the snippet file, I use the <% %> and <%= %> style markup for
> code blocks.
>
> The only concern I have is that I create a PythonEngine for every http
> request.
>
> The PythonEngine instantiates really quickly.
>
> I would appreciate any advice on this.
>
> best regards
>
> Ian (Fluxtah)
>
>
>
> ------------------------------------------------------------------------
> Be one of the first to try Windows Live Mail.
> <http://ideas.live.com/programpage.aspx?versionId=5d21c51a-b161-4314-9b0e-4911fb2b2e6d>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> users mailing list
> users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20061128/c24463e7/attachment.html>
More information about the Ironpython-users
mailing list