Posts

Showing posts with the label asp

A Good Mix 29: Small PIL for IronPython, iDalogue, Book Sales, Umbraco and PDC

More IronPython and DLR related projects, articles and news from around the web. Small PIL for IronPython  One of the disadvantages of developing with IronPython, particularly for using existing libraries and codebases, is that C extensions don't work. One possibility is to use Ironclad , a C extension compatibility layer by Resolver Systems. Another one is to find or create a compatible API using .NET libraries. An important C extension in the Python world, virtually ubiquitous where images are used and manipulated, is the Python Imaging Library . All sorts of other projects (Django and Reportlab for example) use PIL, causing problems for using them from IronPython. A Japanese blogger has * started * to solve this problem by creating an IronPython project called "small pil" implementing part of the PIL API for IronPython. Changes to Dialogue Script in December 2009  i-Dialogue is a "Customer Experience Management" application by Cubic Compass. It is relev...

Articles by Ibrahim: IronPython Console, ASP.NET, Visual Studio and readmee.com

Ibrahim is the Turkish blogger whose posts and articles on IronPython that we've featured before . He has published several more articles in English on working with IronPython and one article in Turkish. IronPython Console  In this article we take a deep look at IronPython Interactive Console. We will see some basics of Python and IronPython to become acquainted with the IronPython environment. IronPython interactive interpreter console is the easiest way to start using IronPython.  We can easily explore whole IronPython world which is include ironpython modules, .Net libraries and Python Built-in’s. For IronPython starters it’s great way to exploring .Net Libraries. We can use IronPython Interactive Interpreter for start to developing WinForms, COM objects, WPF, XNA, Embeding C#, Silverlight… projects. Asp.NET with IronPython Integration One of the IronPython development area is Asp.NET. In this article we will see Visual Studio 2008 Asp.Net integration. First check ou...

A Simple IronPython ActionFilter for ASP.NET MVC

ASP.NET MVC is the all new web framework for .NET inspired by frameworks like Rails and Django. There are a few examples of IronPython and IronRuby integration with ASP.NET MVC but the dynamic languages support is incomplete. Harry Pierson has blogged about at least one of the problems . Despite this there are various places where IronPython can be integrated with ASP.NET MVC, as demonstrated by a new article (with example code for download) on Code Voyeur: A Simple IronPython ActionFilter for ASP.NET MVC There are times when an action filter has transient logic that will change frequently. Logging, authorization or request sanitizing rules are examples of filters that may require extensive configuration to achieve needed flexibility. Rather than create several filters that make excessive use of appSettings, it is possible to use the Dynamic Language Runtime and script files to achieve the same result. This article will demonstrate how to create a filter that uses a simple co...

A Good Mix 20: Startup time, inline C#, Global.asax in ASP.NET, an interactive shell in the web, Gtk# and more

Image
Another collection of blog entries and projects related to IronPython and the Dynamic Language Runtime. IronRuby 0.9 starts 6 times faster than IronPython 2.6B1, why is that? Does anyone know? IronPython 2.0 is significantly slower to start than CPython, which is an issue for those writing command line tools and full applications in IronPython. IronPython 2.6 improves the situation, but as the lament in this short blog entry expresses it is still slow even when compared to IronRuby: IronRuby 0.9 starts 6 times faster than IronPython 2.6B1 Why is that? Don’t they use the same DLR engine? If IronPython started the same way, probably I would not use ‘CPython plus .Net exposed through MSFT Com’ technique. It is just unfair. On the usual support channel ( Twitter ) Dino Viehland explained that the IronPython interpreter does a bunch of work at startup time that IronRuby doesn't. On startup the interpreter imports the site module site just like CPython (and IronPython uses site.py from ...

Mono builds of IronPython (and IronRuby)

Ivan Porto Carrero , when he's not writing IronRuby in Action , has been working on ASP.NET MVC integration with dynamic languages. His main focus has been IronRuby, but a lot of the core work (the DLR hosting API integration) applies equally to IronPython. Jeff Hardy has recently taken up the mantle of working on the IronPython integration. Anyway, that is all by the way of an aside. In the process of doing this Ivan has been building IronPython and IronRuby for Mono. He posted this email to the IronPython mailing list: I've added the ironpython mono package to the ironruby mono CI server. It is slightly different from the windows package it doesn't have the licenses included nor does it have the 64bit builds and the pyc.py file. The tutorial is also not in the github repository so I couldn't include that either. you can download the packages here: ironruby.colliertech.org/ The continuous integration server is maintained by CJ Adams-Collier, and it also has a pretti...

Two New Releases: DLR 0.9.1 and IronPython 2.6 Beta ASP.NET Integration

To go with the four releases of IronPython and IronRuby are two more new releases: Dynamic Language Runtime 0.9.1 0.91 Release Notes A new source release of the DLR. This includes the Sympl sample language and can be built with Visual Studio 2008: This release has several design cleanups and final calls for the bits we’re shipping in CLR 4.0. This release is also consistent with Visual Studio’s Beta1 release in that these sources (with namespace tweaks) were used for parts of CLR 4.0. Documents have all been updated, and there is a new walkthrough document for an example language implementation on the DLR. The language, Sympl, has a C# and an IronPython implementation in the source tree, along with some example code written in Sympl. There are many one-off examples for Expression Trees node types that are in the DLR source tree now. ASP.NET Dynamic Languages Support Release Notes This is an updated release for using IronPython with ASP.NET and is compatible with the recent IronPython...

A Good Mix 3: Releases, Tweeting and DIE

Another selection of recent posts on IronPython related subjects. All the posts in this mix are by Harry Pierson and Davy Mitchell ! First, DevHawk (Harry Pierson) has some comments on recent IronPython releases. AgDLR 0.5 This is the Dynamic Languages SDK for Silverlight that recently had a refresh for Silverlight 3. In this post Harry discusses XapHttpHandler , an ASP.NET handler for IIS that can dynamically build dynamic applications using Chiron. He particularly likes this feature as he wrote it! XapHttpHandler does the same exact on-demand XAP packaging for dynamic language Silverlight applications that Chiron does, but it’s implemented as an IHttpHandler so it plugs into the standard ASP.NET pipeline. All you have to do is put the Chiron.exe in your web application’s bin directory and add XapHttpHandler to your web.config IronPython 2.6 Alpha 1 Something else that got releases recently was the first alpha of IronPython 2.6. This version of IronPython will target Python 2.6, ...

A Simple IronPython ControllerFactory for ASP.NET MVC

The .NET answer to the wonderful world of web frameworks like Django and Rails is ASP.NET MVC (which reached RC1 in the last couple of days). There are various ways that dynamic languages can be used with ASP.NET MVC, and the integration is improving. This entry on Code Voyeur demonstrates how to configure controllers with IronPython, using a PyControllerFactory : A Simple IronPython ControllerFactory for ASP.NET MVC The default behavior for ASP.NET MVC is to wire up a controller instance to the controller value found in a request's RouteData. This mapping is desirable for its simplicity, but limited in its ability to provide an extensible configuration model. Managing properties on controllers would likely require either a custom configuration section or extensive use of AppSettings. An alternative approach would be to use an IoC container, such as Spring.NET. This approach simply manages controller instances as standard Spring container objects. An MVC contrib project already pr...

WSGI on .NET and in the Cloud

Jeff Hardy has been working on getting Django to run on IronPython, or at least that is part of what he has been working on. This includes his project NWSGI : NWSGI is a .NET implementation of the Python WSGI specification using IronPython. It is implemented as an ASP.NET HttpHandler. The main goal is to provide an easy path for running Python web applications/frameworks (such as Django, Trac, etc.) on IIS7. He recently released a new version of NWSGI: NWSGI 0.6 Released This release has some possibly breaking changes and a whole host of new features. There is also an installer available along with the zip archive. New features in this release: The major new feature is IIS7 management integration, including a UI editor. It makes configuring NWSGI a breeze from the command line ( appcmd ) or from the UI. The IIS7 integration is only available through the installer. There is one minor feature addition: wsgi.file_wrapper is now supported for faster file transfers. It uses HttpResponse....

IronPython 2 and the Fifth Assembly

IronPython 2 uses Dynamic Language Runtime expression trees, which have been merged with LINQ expression trees. These have extension methods and IronPython itself also uses extension methods. These need the .NET 3.5 compiler, but if you provide an ' ExtensionAttribute ' type then the compiled assemblies still work with .NET 2 (extension methods are effectively a compiler trick). Unfortunately the ' ExtensionAttribute ' type supplied with IronPython 2 clashes with the version in .NET 3.5 if your project also references the System.Core assembly. The latest release candidate of IronPython solves this problem by providing a fifth assembly. Harry Pierson (DevHawk) gives us the details: The Fifth Assembly The important details are: In IronPython 2.0 Beta 5, there were four DLLs that implement IronPython: IronPython.dll IronPython.Modules.dll Microsoft.Scripting.dll Microsoft.Scripting.Core.dll In our RC1 release, we’ve added “The Fifth Assembly”: Microsoft.Scripting.Extensio...

IronPython and ASP.NET Integration Updated

The IronPython ASP.NET integration has been updated! The new home for " ASP.NET Dynamic Languages Support " is the ASP.NET Codeplex page: ASP.NET on Codeplex Jimmy Schementi (responsible for the Dynamic Languages and Silverlight integration but who has also worked on this project along with David Ebbo and Phil Haack) is excited and invites you to join the party: ASP.NET Dynamic Language Support Refreshed The new refresh includes support for using IronPython with 'normal' ASP.NET (webforms - but now updated to IronPython 2) and with the new ASP.NET MVC framework. For the MVC framework, IronPython is currently only integrated into the Views and not yet Controllers or Models. There are samples plus documentation available and Jimmy's blog entry walks through creating an IronPython webforms site with Visual Studio. Phil Haack, who is now PM for the ASP.NET Dynamic Language Support along with ASP.NET MVC, has also blogged about the new release: Refreshing ASP.NET Dyn...

IronPython on ASP.NET

A Zope programmer is attending an introduction to ASP.NET course. He does what any self-respecting Python programmer would do - and gets IronPython running with it. This blog entry creates a simple page using an 'aspx' view page, with the code behind in Python: python+zope++:: IronPython on ASP.NET

ADO.NET with IronPython for ASP.NET

The ARtyProg has posted an example of working with databases (specifically using ADO.NET) with IronPython and ASP.NET. The blog entry is little more than a big code example, but if you're looking for an example of ADO.NET or are getting started with ASP.NET for IronPython it should be useful: IronPython - ADO.NET It's good to see some blog entries of people using IronPython with ASP.NET (Christian has written a great chapter about it in IronPython in Action of course). Personally I feel ambivalent about ASP.NET. Its 'page-by-page' model seems to be fine for simple forms, but not a very good way of creating applications. ASP.NET MVC looks worlds better (Rails and Django even more so of course). On the other hand ASP.NET is massively used (possibly the most widely used web development framework), and people aren't going to switch over to ASP.NET MVC in any great proportion for probably years to come. If they're going to use ASP.NET then they might as well at lea...

ASP.NET: Dynamically Creating Objects and Binding them to a Form

A new post from the IronPython Resource blog on using IronPython with ASP.NET. This blog entry focusses on the easy creation of forms with data binding. The technique used is based on an article for C# that uses reflection. Of course with the introspection capabilities of Python, there is no need for the reflection. ASP.NET: Dynamically Creating Objects and Binding them to a Form The example project is available for download and is easy to extend.

ASP.NET: Beginning IronPython - Creating an Update Form (Part 4)

Part 4 of the IronPython on ASP.NET tutorial is out. This one works with the databases and Python classes from the previous tutorials, and creates a form along with the machinery to receive form submissions from the user. As always the code is available to download: Beginning IronPython - Creating an Update Form (Part 4) " In the next tutorial, we'll look at some dynamic features of Python to reduce code and decrease the time it takes to create a form. You can download both the IronPython and C# source codes below. "

Beginning IronPython - Creating a class (Part 3)

ASP.NET IronPython Resource continues the IronPython and ASP.NET tutorial with an introduction to creating Python classes and using them from within ASP.NET. Beginning IronPython - Creating a class (Part 3) " In this tutorial we will be creating a sql table based class for a simple form. It will demonstrate how to create a class and reference it from a form. " " That's it for this tutorial. The next tutorial will go into something practical - creating and updating live data on a form. The code files can be downloaded below. Remember to change the connection string to point to an AdventureWorks database. "

ASP.NET IronPython Resource

ASP.NET is Microsoft's web programming framework. It is widely used and contends with PHP for the title of most used web framework. IronPython can be used with ASP.NET through IronPython ASP.NET Futures . A new blog has started, called ASP.NET IronPython Resource, which has started a tutorial series on using IronPython with ASP.NET. There are currently two entries. The first gets you started creating new sites with either Visual Studio 2005 or 2008. It creates a "Hello World" application using the visual designer for the webform, and shows the IronPython code behind. The second entry is a tutorial that shows connecting to a database with databinding to a gridview. The example project is available for download. Creating a basic ASP.NET form (Part 1) Connecting to a database and using the gridview (Part 2)

ASP.NET and Dynamic Languages

ASP.NET has been overshadowed recently, both by Silverlight and the ongoing development of the ASP.NET MVC framework which is heavily influenced by Rails and Django. The IronPython support in ASP.NET was released in July last year, but not much has apparently happened since then. Jimmy Schementi blogs about hope for the future of dynamic languages in ASP.NET: ASP.NET and Dynamic Languages

RadControls for ASP.NET Ajax and IronPython

The DotNetSlackers have confirmed that the Telerik RadControls for ASP.NET AJAX do work with IronPython, and they provide some screenshots and example code: RadControls for ASP.NET Ajax and IronPython

Dynamic Client Script for ASP.NET and Silverlight 2b1

Dmitryr has updated his 'Dynamic Client Script' support for ASP.NET to work with Silverlight 2.0 Beta 1. This takes the code from 'Chiron' (the dynamic application development tool) and packages 'xap' files (dynamic Silverlight applications) dynamically from your IronPython / IronRuby / Managed JScript sources. It uses a custom ASP.NET tag: Dynamic Client Script for ASP.NET and Silverlight 2