"…mais ce serait peut-être l'une des plus grandes opportunités manquées de notre époque si le logiciel libre ne libérait rien d'autre que du code…"

Archive for the ‘IDE-GUI’ Category

Sortie de python 2.6.5, python 3.1.2, pypy 1.2

Posted by patrick sur mars 21, 2010

Quelques liens en vrac sur les sorties de python 2.6.5 , python 3.1.2 et pypy 1.2

  • http://morepypy.blogspot.com/2010/03/introducing-pypy-12-release.html (« We are pleased to announce PyPy’s 1.2 release. This version 1.2 is a major milestone and it is the first release to ship a Just-in-Time compiler that is known to be faster than CPython (and unladen swallow) on some real-world applications (or the best benchmarks we could get for them). The main theme for the 1.2 release is speed. »)
    • http://pypy.org/features.html (‘PyPy 1.2 implements Python 2.5. It supports all of the core language, passing the Python test suite (with minor modifications that were already accepted in the main python in newer versions). It supports most of the commonly used Python standard library modules. For known differences with CPython, see our compatibility page. PyPy 1.2 runs essentially only on Intel x86 (IA-32). On 64-bit platforms you have to use the 32-bit compatibility mode, for now — or contact us to help’)
    • Speed: thanks to its Just-in-Time compiler, Python programs often run faster on PyPy. (What is a JIT compiler?)
    • Memory usage: large, memory-hungry Python programs might end up taking less space than they do in CPython.
    • Sandboxing: PyPy provides the ability to run untrusted code in a fully secure way.
    • Stackless: PyPy can be configured to run in stackless mode, providing micro-threads for massive concurrency.
    • As well as other features. »)

Posted in 2010, PyPy, python, Tkinter | Leave a Comment »

DaboDev: un framework python pour développer des applications 3-tiers portables sur GNU/Linux, Windows ou OSX

Posted by patrick sur février 8, 2009

« Dabo is the easy to use, cross-platform, 3-tier, open source desktop database development framework. »

http://dabodev.com/ (‘ Desktop applications. That’s what Dabo does. It’s not YAWF (yet another web framework). There are plenty of excellent web frameworks out there, so if that’s what you are looking for, Dabo isn’t for you. But there are almost no desktop application frameworks out there, and if you want to create applications that run on Windows, OS X or Linux, Dabo is for you!

Dabo is a 3-tier, cross-platform application development framework, written in Python atop the wxPython GUI toolkit. And while Dabo is designed to create database-centric apps, that is not a requirement. Lots of people are using Dabo for the GUI tools to create apps that have no need to connect to a database at all.’)


  • http://dabodev.com/download ( »Download and decompress the file. It will create a folder named ‘dabo‘, which will contain 4 main things: the dabo module itself (in a subdirectory also named ‘dabo’), along with folders containing the visual tools (‘ide’), the DaboDemo program (‘demo’), and the code for running Dabo apps across the web (‘daboserver’). First, we need to install the module. To do this, change to the main directory created when you decompressed the downloaded file, and issue:
    python setup.py install

    Of course, if your Python installation is in a protected location, you will need to run the above command as a user with admin rights.

    If you have trouble with setuptools, or you don’t want to install the Python Egg for any reason, you can instead extract Dabo anywhere you like, and then put a dabo.pth file in your Python site-packages directory pointing to the directory that contains the Dabo Readme file. This method has the advantage that you can keep the Dabo module in an unprivileged location, where you can keep it updated using the Web Update feature.

    After installing the module, you should then copy the ‘ide‘ and ‘demo‘ directories to whatever location you prefer, as these are applications written in Dabo, and do not need to be installed. If you plan on creating Dabo web applications, you need to create a Pylons app named ‘daboserver’ and replace its ‘daboserver’ subdirectory with the ‘daboserver’ directory you downloaded‘)

Posted in 2009, Acces aux données, bases de données, Dabo, IDE-GUI, Python Web Frameworks | Tagué: , | Leave a Comment »

Connexion entre composants Java et DotNet: Ikvm, boo, java, .NET, ironpython

Posted by patrick sur décembre 15, 2007

Source: http://ironpython-urls.blogspot.com/2007/11/boo-java-net-and-ironpython.html


Thursday, November 15, 2007

Boo, Java, .NET and IronPython

A blogger called Tomo wondered about which .NET language to choose Boo (a mighty fine language) or IronPython. He came down in favour of Boo, and an interesting discussion ensued in the comments:

The very next thing he tried was taking the Java class library for SWT (the user interface library) and compiled them into a .NET dll with IKVM. He then used them from Boo and IronPython, which worked!

This is an interesting coincidence, as a few days ago Rodrigo announced on the Boo blog about boojay – a compiler that emits Java bytecode from Boo:


Source: http://blogs.codehaus.org/people/bamboo/archives/001623_introducing_boojay.html
(« A boo application using the SWT java GUI library. Thanks to IKVM that’s not only possible but very simple as well. So what’s the news? Well, Friday morning I was chatting with Klaus and he said to me « if you get boo to emit java bytecodes I’ll do all my stuff in boo ». How’s that for a challenge? 🙂 Thanks again to IKVM, ObjectWeb ASM and the extensible boo pipeline architecture boojay was born after a weekend of relaxed hacking « )

http://boo-extensions.googlecode.com/svn/trunk/boojay/ (« boojay is an attempt at getting the boo compiler to emit java bytecode. Architecture
Thanks to the amazing IKVM project it is possible to use the great ObjectWeb ASM library from boo running on mono/ms.net to emit native java bytecodes that can be executed by any compliant java virtual machine
« )

http://koans.tomo-online.com/2007/11/15/langage-frenzy/ (« Although I should be doing something else, Boo, IronPython and .NET kept occupying my mind. So I made a small coding experiment. First, I downloaded IKVM. Then – SWT. I compiled SWT jar to a dll. No problems here. Then I wrote a SWT hello world in IronPython. To be honest – I took a Java one from SWT website and rewrote line by line. I was surprised that my hello world ran without a glich! Next, I copied a HelloWorldSWT.py into HelloWorldSWT.boo and changed the import statement. Compiled (”By golly! No problems? No warnings?”) and run. And no problems again?? It started to look suspicious… Java run on .NET, calls from Java to native library, two different languages… and everything without a single warning? So I decided to take it to foreign territory… Ubuntu! I fired up a VMWare image with Ubuntu 6.10 (the linux vm I have handy), downloaded Linux SWT, compiled it to dll, copied HelloWorldSWT.exe from Windows along with some ikvm dlls and… no problems again! I’m really, really surprised how smooth the experiment was. Thumbs up! « )

http://en.wikipedia.org/wiki/IKVM (« IKVM.NET is an implementation of Java for Mono and the Microsoft .NET Framework. IKVM is free software, distributed under a permissive free software licence. IKVM includes the following components: for

  • A Java Virtual Machine implemented in .NET
  • A .NET implementation of the Java class libraries
  • Tools that enable Java and .NET interoperability

With IKVM you can run compiled Java code (bytecode) directly on Microsoft .NET or Mono. The bytecode is converted on the fly to CIL and executed. Jeroen Frijters is the main contributor to IKVM.NET. He is Technical Director of Sumatra Software, based in The Netherlands. As of June 2007, the machine supports Java 1.6 with the exception of AWT and Swing. IKVM uses OpenJDK as its class library. »)

http://www.ikvm.net/ (« ..The following projects are related to IKVM.NET in some way:

http://www.eclipse.org/swt/ (« SWT is an open source widget toolkit for Java designed to provide efficient, portable access to the user-interface facilities of the operating systems on which it is implemented.« )

http://www.gnu.org/software/classpath/classpath.html (« GNU Classpath, Essential Libraries for Java, is a GNU project to create free core class libraries for use with virtual machines and compilers for the java programming language. Classpath is still a work in progress. The first public release will be version 1.0. There have been no public releases; however, pre-release source code is available via GNU’s anonymous CVS server , and snapshots of the Classpath tree have been released and are available from ftp://ftp.gnu.org/gnu/classpath/« )

http://en.wikipedia.org/wiki/GNU_Classpath (« GNU Classpath is a project aiming to create a free software implementation of the standard class libraryJava programming language. Despite the massive size of the library to be created, the majority of the task is already done, including Swing, CORBA, and other major parts. The Classpath developers have implemented almost all of the classes from J2SE 1.4 and 5.0. Classpath can thus be used to run popular Java-based software such as Azureus and Eclipse. It is a part of the Free Software Foundation‘s GNU project and was launched so that computer users could use Java programs without giving up the freedoms which the free software movement works to secure. GNU Classpath was originally developed in parallel with libgcj due to license incompatibilities, but later merged...Since version 0.95, Java 1.5 additions like generics have been fully integrated into the main branch. The branch allows GCJ to use Eclipse compiler, ecj, to compile Java 1.5 source code to bytecode, which is then changed into native code by GCJ itself« )

http://en.wikipedia.org/wiki/Boo_programming_language (« Boo is an object oriented, statically typed programming language developed starting in 2003, which seeks to make use of the Common Language Infrastructure support for Unicode, internationalization and web style applications, while using a Python-inspired syntax and a special focus on language and compiler extensibility. Some features of note include type inference, generators, multimethods, optional duck typing, macros, true closures, currying, and first class functions. Boo is open sourcelicensed under an MIT/BSD style license.Boo can be used with Microsoft .NET or Mono. »)

(« Grasshopper 2.0 enables you to produce .NET Web and server applications that run on Linux & other Java-enabled platforms using ASP.NET 2.0 controls, role-based security, and C# generics. Check out our developer blogs, interop forums, code samples, and how-to articles to learn how« )

– http://blog.mainsoft.com/blog/net-java-interop-8-links-to-get-you-started/(« 

Posted in 2007, ASP.NET, Développement logiciel, DotNet, FSF, IDE-GUI, Ironpython, J2EE, java, JEE, python | Tagué: , , , | Leave a Comment »

Les nouveautés dans ASP.NET Extensions: ASP.NET MVC et ASP.NET AJAX

Posted by patrick sur décembre 15, 2007

Comme le précise ce billet http://dosimple.ch/articles/MVC-ASP.NET/ écrit le 2 mai 2006 et celui-ci écrit le 13 mars 2007, le framework ASP.NET n’incite pas particulièrement à la séparation stricte de type Modèle, Vue, Contrôleur. On a vu que Monorail, projet open source, implémente le modèle MVC. Microsoft emboite le pas avec un grand retard en introduisant ASP.NET MVC: voir le billet suivant: http://weblogs.asp.net/scottgu/archive/2007/10/14/asp-net-mvc-framework.aspx (« One of the things that many people have asked for over the years with ASP.NET is built-in support for developing web applications using a model-view-controller (MVC) based architecture. Last weekend at the Alt.NET conference in Austin I gave the first public demonstration of a new ASP.NET MVC framework that my team has been working on. You can watch a video of my presentation about it on Scott Hanselman’s blog here.

What is a Model View Controller (MVC) Framework?

MVC is a framework methodology that divides an application’s implementation into three component roles: models, views, and controllers.

  • « Models » in a MVC based application are the components of the application that are responsible for maintaining state. Often this state is persisted inside a database (for example: we might have a Product class that is used to represent order data from the Products table inside SQL).

  • « Views » in a MVC based application are the components responsible for displaying the application’s user interface. Typically this UI is created off of the model data (for example: we might create an Product « Edit » view that surfaces textboxes, dropdowns and checkboxes based on the current state of a Product object).

  • « Controllers » in a MVC based application are the components responsible for handling end user interaction, manipulating the model, and ultimately choosing a view to render to display UI. In a MVC application the view is only about displaying information – it is the controller that handles and responds to user input and interaction.

One of the benefits of using a MVC methodology is that it helps enforce a clean separation of concerns between the models, views and controllers within an application. Maintaining a clean separation of concerns makes the testing of applications much easier, since the contract between different application components are more clearly defined and articulated.

The MVC pattern can also help enable red/green test driven development (TDD) – where you implement automated unit tests, which define and verify the requirements of new code, first before you actually write the code itself.

A few quick details about the ASP.NET MVC Framework

I’ll be doing some in-depth tutorial posts about the new ASP.NET MVC framework in a few weeks once the bits are available for download (in the meantime the best way to learn more is to watch the video of my Alt.net presentation).

A few quick details to share in the meantime about the ASP.NET MVC framework:

  • It enables clean separation of concerns, testability, and TDD by default. All core contracts within the MVC framework are interface based and easily mockable (it includes interface based IHttpRequest/IHttpResponse intrinsics). You can unit test the application without having to run the Controllers within an ASP.NET process (making unit testing fast). You can use any unit testing framework you want to-do this testing (including NUnit, MBUnit, MS Test, etc).

  • It is highly extensible and pluggable. Everything in the MVC framework is designed so that it can be easily replaced/customized (for example: you can optionally plug-in your own view engine, routing policy, parameter serialization, etc). It also supports using existing dependency injection and IOC container models (Windsor, Spring.Net, NHibernate, etc).

  • It includes a very powerful URL mapping component that enables you to build applications with clean URLs. URLs do not need to have extensions within them, and are designed to easily support SEO and REST-friendly naming patterns. For example, I could easily map the /products/edit/4 URL to the « Edit » action of the ProductsController class in my project above, or map the /Blogs/scottgu/10-10-2007/SomeTopic/ URL to a « DisplayPost » action of a BlogEngineController class.

  • The MVC framework supports using the existing ASP.NET .ASPX, .ASCX, and .Master markup files as « view templates » (meaning you can easily use existing ASP.NET features like nested master pages, <%= %> snippets, declarative server controls, templates, data-binding, localization, etc). It does not, however, use the existing post-back model for interactions back to the server. Instead, you’ll route all end-user interactions to a Controller class instead – which helps ensure clean separation of concerns and testability (it also means no viewstate or page lifecycle with MVC based views).

  • The ASP.NET MVC framework fully supports existing ASP.NET features like forms/windows authentication, URL authorization, membership/roles, output and data caching, session/profile state management, health monitoring, configuration system, the provider architecture, etc. »)

A voir:

  • https://pvergain.wordpress.com/2007/03/13/critique-de-larchitecture-aspnet/ (« Le problème avec ASP. Net est qu’il n’y a qu’un objet qui traite les demandes http, c’est l’objet PAGE. C’est lui qui a le contrôle de tout, et donc il mélange le code dit de «contrôle», et le code qui pilote la «visualisation» des éléments en html. Et bien souvent, on mélange aussi le code qui pilote le «Modèle» c’est à dire l’obtention des données directement depuis la base de données avec Ado.Net (c’est ce qu’on obtient lorsqu’on fait du WYSIWYG dans Visual Studio en choisissant les Sql Data Source et les glissant-déposant sur l’ihm). Cet anti-modèle (ou anti–pattern) a été souvent pointé du doigt par les architectes et développeurs, car en plus de faire produire du code spaghetti (bien que orienté objet), il rend impossible les tests systématisés (automatisés).« )
  • http://dosimple.ch/articles/MVC-ASP.NET/ (« Dans le framework ASP.NET la vue est un fichier HTML agrémenté de balises ASP. Le contrôleur et le modèle sont en général mélangés dans un objet qui dérive de la classe System.Web.UI.Page. »)
  • http://www.castleproject.org/monorail/index.html (« MonoRail is a MVC Web Framework inspired by Action Pack. MonoRail differs from the standard WebForms way of development as it enforces separation of concerns; controllers just handle application flow, models represent the data, and the view is just concerned about presentation logic. Consequently, you write less code and end up with a more maintainable application. Although the project name is MonoRail, we do not have any affiliation with the Mono project. MonoRail runs on Microsoft .Net 1.1, 2.0 and Mono.« )
  • http://en.wikipedia.org/wiki/ASP.NET_MVC_Framework (« ASP.NET MVC Framework is a Model-view-controller framework which Microsoft is adding to ASP.NET. It allows an application to be built as a composition of three roles: Model, View and Controller. A Model represents the state of a particular aspect in the application. Frequently, a model maps to a database table, with the entries in the table representing the state of the table. A Controller handles interactions and updates the model to reflect a change in state of the application. A View ASP.NET MVC Framework couples the models, views and controllers using interface-based contracts, thereby allowing each component to be easily tested independently. The view engine in the MVC framework uses regular .aspx pages to design the layout of the UI pages onto which the data is composed; however any interactions are routed to the controllers rather than using the postback mechanism. Views can be mapped to REST-friendly URLs. ASP.NET MVC Framework has been launched as a Community Technology Preview on December 10, 2007 extracts necessary information from a model and renders a UI to display that.. »)
  • http://www.hanselman.com/blog/ScottGuMVCPresentationAndScottHaScreencastFromALTNETConference.aspx ( » I attended the ALT.NET Conference last weekend in Austin, TX. I personally find the name « Alt » as in « Alternative » too polarizing and prefer terms like « Pragmatic.NET » or « Agile.NET. » At the conference I suggested, partially in jest, that we call it « NIH.NET » as in « Not Invented Here.NET. » 😉 Ultimately this is a group that believes in:
    • Continuous Learning
    • Being Open to Open Source Solutions
    • Challenging the Status Quo
    • Good Software Practices
    • DRY (Don’t Repeat Yourself)
    • Common Sense when possible.

    ScottGu gave an hour long presentation on the upcoming MVC Framework and I took some guerilla video. ScottGu’s presentation is here in Silverlight and it’s about 60 minutes long. Considering it’s so long, the video squished nicely. This was the first time the MVC Framework was shown publicly. Note that this was a Prototype, not the Production code and both ScottGu and I make that point a number of times to drive home that it’s early. Some of the code was written on a plane, just to give you an idea. After The Gu did his piece on the MVC Framework, I showed some prototype hacking that I’d done over the previous few days along with some work Phil Haack did. My presentation is here as Silverlight and it’s about 30 minutes long. I showed the Model View Controller with Controllers in IronPython and an IronPython view using a WebFormViewEngine. Then I talked about the possibilities of alternate ViewEngines and showed Phil Haack’s prototype RubyViewEngine. »)

  • http://weblogs.asp.net/scottgu/archive/2007/11/13/asp-net-mvc-framework-part-1.aspx ( » ASP.NET MVC Framework (Part 1) I’m going to use a simple e-commerce store application to help illustrate how the ASP.NET MVC Framework works. For today’s post I’ll be implementing a product listing/browsing scenario in it. Specifically, we are going to build a store-front that enables end-users to browse a list of product categories when they visit the /Products/Categories URL on the site>>Since it adds a testing project, does this require Team System? No – the good news is that Test Projects with VS 2008 are now supported with the VS 2008 Professional edition – and no longer require team system. You will also be able to use the VS Express and Standard edition products as well, and then use NUnit, MBUnit or some other testing framework with them (we’ll ship project templates for these as well…>> 2. Is it also possible to have this URL mapped: /Products/Beverages/3 instead of /Products/Beverages?page=3 or does it _need_ the parameter name? Yes – this is totally supported. Just set a route rule for /Products/Beverages with the format /Products/<Category>/<Page> – they’ll then get passed in as arguments to the action method:public List(string category, int? page) {}>>Also, some ideas and general remarks: 1. I’d love to see more helper methods for use in the views, I like how Ruby on Rails has many shortcuts for creating forms and formfields etc. Yes – we’ll have a rich library of helper methods for the views. They’ll include helpers to create all the standard forms, formfields and more.

>>2. Migrations! Not a part of MVC but from my experience with Ruby on Rails I would love to see support for this somewhere, anywhere! It would fit perfectly with the more agile way of developing that is possible with ASP.NET MVC. Rob Conery is building .NET Migrations support as part of the SubSonic project, and recently joined Microsoft. You’ll be able to use this with ASP.NET MVC

>>I’m also very keen to get my hands on the CTP. Scott, you mention, using Inversion of Control containers with the MVC framework. I’d be very interested in seeing a blog post on this subject. Also, will there be a sample application (with tests and IoC) available alonside the CTP? We have a IControllerFactory extensiblity point that owns creating Controller instances. You can use this with a IOC container to customize any Controller instance prior to it being called by the MVC framework. We’ll be posting samples of how to use this with ObjectBuilder and Windsor with the first CTP I believe

>> Very cool! One thing I’d like to see guidance on is developing MVC apps with multiple UIs. You say here that it’s best to put your models and controllers in the web app, but say we want a Winforms, WPF, Silverlight, and Web UI all doing similar things. Or a Mobile Web UI and Desktop Web UI… Would these still each need their own Models and Controllers, or does it make sense to have one library that they all share? If so, how is that supported? I’m still new to MVC, so if I’m missing something conceptually here, tell me! That is a good question, and one we’ll need to provide more guidance on in the future. In general it is often hard to share the same controller across both client and web UI, since the way you do data access and the stateful/stateless boundaries end up being very different. It is possible – but some guidance here would ceretainly be useful. My team should hopefully be coming out with this in the future

>>I really appreciate this material. Do you support the MVC pattern over the MVP pattern? Or are there just better scenarios for using each? The above approach I showed uses a MVC based pattern – where the Controller and the View tend to be more separate and more loosly coupled. In a MVP pattern you typically drive the UI via interfaces. This works well with a controls model, and makes a lot of sense with both WinForms and WebForms where you are using a postback model. Both MVC and MVP are perfectly fine approaches to use. We are coming out with the MVC approach for ASP.NET partly because we’ve seen more demand for it recently for web scenarios…

>> When can we expect a similar chapter with SubSonic as the DAL and scaffolding provider? (see http://oakleafblog.blogspot.com/2007/11subsonic-will-be-toolset-for-microsofts.html I’ll be covering scaffolding in a future blog post. LINQ to SQL scaffolding is built-in with ASP.NET MVC and doesn’t require SubSonic. SubSonic will also obviously be adding new ASP.NET MVC features as well.

>> My applications in .NET works with « 3 layers » pattern (business logic and data access in your own dll). How can i use this wonderfull MVC with my Models (data access) and Controllers (B.Logic)?? Because if i’m not reuse this, i’ve repeat code in every layer; then this MVC is not DRY (don’t repeat yourself) and the community don’t accept. There is no need to put your business and data logic in the same assembly as your controllers. You can split them up across multiple class library projects if you prefer

>> Does this mean that with MVC, we no longer use LinqDatasource in the View section? While the LinqDataSource control will technically work in MVC Views, if you are using a MVC model you wouldn’t want to place it there. Instead you want to perform all of your data and application logic in the Controller layer – and then pass the needed data to the view.

>> Perhaps I missed it somehow, but can you explain on which version of asp.net will this ctp run? The MVC framework builds on top of .NET 3.5

>> Scott, this is amazing timing! The URL mapping features inherit in an MVC application are PERFECT for the upgrade to ASP.NET 3.5 I’m making to my spelldamage.com site. Hosting question, will hosts simply need to support the ASP.NET 3.5 framework to allow us to run ASP.NET MVC applications? Your hoster will need to support .NET 3.5 for the MVC support.

>> Is’nt the MVC framework, in fact the Controller, implementation of the Front Controller pattern? Yes – the ASP.NET MVC framework uses a front-controller pattern. »)

  • http://weblogs.asp.net/scottgu/archive/2007/12/03/asp-net-mvc-framework-part-2-url-routing.aspx (« Last month I blogged the first in a series of posts I’m going to write that cover the new ASP.NET MVC Framework we are working on. The first post in this series built a simple e-commerce product listing/browsing scenario. It covered the high-level concepts behind MVC, and demonstrated how to create a new ASP.NET MVC project from scratch to implement and test this e-commerce product listing functionality. In today’s blog post I’m going to drill deeper into the routing architecture of the ASP.NET MVC Framework, and discuss some of the cool ways you can use it for more advanced scenarios in your application… What does the ASP.NET MVC URL Routing System do? The ASP.NET MVC framework includes a flexible URL routing system that enables you to define URL mapping rules within your applications. The routing system has two main purposes:
    • Map incoming URLs to the application and route them so that the right Controller and Action method executes to process them
    • Construct outgoing URLs that can be used to call back to Controllers/Actions (for example: form posts, <a href= » »> links, and AJAX calls)

Having the ability to use URL mapping rules to handle both incoming and outgoing URL scenarios adds a lot of flexibility to application code. It means that if we want to later change the URL structure of our application (for example: rename /Products to /Catalog), we could do so by modifying one set of mapping rules at the application level – and not require changing any code within our Controllers or View templates.

>> BTW, can you explain in short about the Active Record Type support in our MVC.

.NET 3.5 has LINQ to SQL built-in – which is a great ORM. LINQ to Entities will also be built-into .NET 3.5 in the future (it also ships with the MVC setup). The MVC framework doesn’t require LINQ to SQL or LINQ to Entities as the data model – it also works with NHibernate, LLBLGen, SubSonic, DataSets, DataReaders, and/or any other data model with .NET. We will, though, provide out of the box scaffolding support for LINQ to SQL and LINQ to Entities that delivers nice integration with the MVC support.

>> Question : What is this MockHttpContext in the UnitTest class? I mean, i can guess what it is .. but is it new in .NET 3.5 or the MVC framework? The MockHttpContext is an example mock object. It isn’t currently built-in with the MVC framework (with the first preview you’d need to create this yourself). I’m hoping that before the MVC framework ships, though, that there are a built-in set of mock objects and test helpers that you can use out of the box (without having to mock them yourself). Note that all core contracts and types with the MVC framework are mockable (non-sealed and interfaces). So you can also use any existing Mock framework to test it (RhinoMocks, TypeMock, etc).

>> 1) Is it possible to use routes with a file extension if I don’t want to enable wildcard script mappings? For example, /Products/List/Beverages.rails or /Products/Detail/34.rails ? Yes – this is fully supported. We recommend changing your route rule to /[controller].mvc/[action]/[id]. When you install the ASP.NET MVC Framework we automatically register this .mvc extension – although you are free to use any other one you want.

>> Hypothetically, do you think it would be possible to customise the route creation process so that route data could be gathered from attributes on actions? We don’t currently support this built-in, but hypothetically you could load all the controllers at app-startup and use reflection on them to calculate the route rules. This would enable the scenario you are after.

>> Is it possible to use IronRuby as the coding language to target the MVC framework?? Yes – we’ll support both IronRuby and IronPython with the ASP.NET MVC Framework.

>> I am liking this more and more. I can see how the routing configuration code in global.asax.cs could become quite large. In my application, I can see dozens, maybe hundreds of unique routing rules. Is there any way this configuration can be put in a file somewhere? That file would be read on Application start. Seems like that would make deployment of routing changes easier, too. We don’t currently have a pre-built file format for reading in mapping rules. But it should be relatively easy to build (you could even use LINQ to XML to read in and construct the rules).

>> Just out of curiosity where in the HttpApplication cycle are the routing rules evaluated and are they exposed in any way to the rest of the HttpApplication cycle? My current security system grants permissions at what would become the controller-action level so if the route determination is made early enough I’d really like to drive my authorization off of it.
The routing rules are resolved after the OnPostMapRequestRequestHandler event. This means that it will happen *after* your authorization rules evaluate. The good news is that this means you should be able to re-use your existing security system as-is.

>> Will there be any way to use an XML document to create the routing rules outside of the Global.asax code? Yep – this scenario will be supported.

>> I noticed that in Django, you have to repeat yourself kind of often when you have a deep nested hierarchy of pages. Your search & search-results pages seem to be continuing that trend. I’m sure I could come up with some hierarchical data structure which can be serialized into Route objects, but is the ASP.NET team planning anything along those lines that would come stock?

With our first preview the Route type is not extensible (you can’t subclass it) – which means you sometimes need to register multiple routes for a series of things. For the next preview we are looking at enabling Route to be sub-classed – in which case you could easily encapsulate multiple URL mappings into a single registration.

>> Have you thought about being able to define a regular expression for url matching and using backreferences or named captures as the tokenized url? I think this would allow for much more flexibility while keeping the list of routing rules down to a minimum.

Yes – this is something we are looking at. The challange with regular expressions is that only a subset of people really understand them (and importantly – understand how to optimize them). But I agree that having this as an option would be super flexible.

>> I must say that i am still worried about having to leave all the knowledge that we ave until now with webforms and start a new technology and still think that we would need some kind of a bridge to close the gap between today solution of webforms and tomorrow solution of MVC. Although the way you structure application flow will be different, I think you’ll be pleasantly surprised by the amount of knowledge overlap that exists. Authentication, Authorization, Caching, Configuration, Compilation, Session State, Profile Management, Health Monitoring, Administration, Deployment, and many, many other things are exactly the same. MVC views are also .aspx pages (that use .ascx user controls and .master files). So the concept re-use is quite heavy there as well. »)

  • http://weblogs.asp.net/scottgu/archive/2007/12/06/asp-net-mvc-framework-part-3-passing-viewdata-from-controllers-to-views.aspx (« The last few weeks I have been working on a series of blog posts that cover the new ASP.NET MVC Framework we are working on. The ASP.NET MVC Framework is an optional approach you can use to structure your ASP.NET web applications to have a clear separation of concerns, and make it easier to unit test your code and support a TDD workflow. The first post in this series built a simple e-commerce product listing/browsing site. It covered the high-level concepts behind MVC, and demonstrated how to create a new ASP.NET MVC project from scratch to implement and test this e-commerce product listing functionality. The second post in this series drilled deep into the URL routing architecture of the ASP.NET MVC framework, and discussed both how it worked as well as how you can handle more advanced URL routing scenarios with it. In today’s blog post I’m going to discuss how Controllers interact with Views, and specifically cover ways you can pass data from a Controller to a View in order to render a response back to a client. In Part 1 of this series, we created an e-commerce site that implemented basic product listing/browsing support. We implemented this site using the ASP.NET MVC Framework, which led us to naturally structure the code into distinct controller, model and view components. When a browser sends a HTTP request to our web site, the ASP.NET MVC Framework will use its URL routing engine to map the incoming request to an action method on a controller class to process it. Controllers in a MVC based application are responsible for processing incoming requests, handling user input and interactions, and executing application logic based on them (retrieving and updating model data stored in a database, etc). When it comes time to render an HTML response back to the client, controllers typically work with « view » components – which are implemented as separate classes/templates from the controllers, and are intended to be focused entirely on encapsulating presentation logic. Views should not contain any application logic or database retrieval code, instead all application/data logic should only be handled by the controller class. The motivation behind this partitioning is to help enforce a clear separation of your application/data logic from your UI generation code. This makes it easier to unit test your application/data logic in isolation from your UI rendering logic.Views should only render their output using the view-specific data passed to it by the Controller class. In the ASP.NET MVC Framework we call this view-specific data « ViewData ». The rest of this blog post is going to cover some of the different approaches you can use to pass this « ViewData » from the Controller to the View to render.

>> One question Scott: Let say i’m jumpng on MS MVC bandwagon, do i have to abandon asp.net Page Life cycle godddies, should i set up my mind to different approach. When you use the ASP.NET MVC approach you’ll want to have all post in your site go to your Controller. This helps ensure that the application can be easily tested and preserves the separation of concerns. This is different from using ASP.NET server controls which postback to themselves (which is very powerful too – but means that it can sometimes be slightly harder to test). What doesn’t change is that all of other ASP.NET pieces (forms authentication, role management, session state, caching, profiles, configuration, compilation, httprequest/response, health monitoring, etc, etc) works with both web forms based pages and MVC based pages. MVC UI are also built with .aspx, .master, and .ascx files – so there is a high level of skill re-use there as well.

>> Some asp.net controls require <form runat=server>. If we use a asp:dropdownlist for example, we have to place in the asp:form. And this means viewstate comes back! Is there any way to get rid of hidden form fields? Or you suggest that we do must use classic HTML controls ? I’ll cover this more in my next blog in this series. We have helpers that can automate generating things like dropdownlists, etc. Think of them as controls for MVC. These don’t use viewstate and give you a little more control over the output of your HTML.

>> It would be nice if you can just compare a bit our MVC with ROR. Within ROR, we can create tables, Columns and Rows with Ruby, without using a single line of SQL, and all its done through ActiveRecord. In short all CRUD advantages.

>> SubSonic is almost in this line. Can you explain more in this line or how SubSonic can be used to take ActiveRecord Type advantages.

RoR is made up of several components.

« Action Controller » is the name of the MVC framework that Rails uses. That is the closest analogy to the ASP.NET MVC Framework – and at a high-level the ASP.NET MVC framework uses many of the same core concepts (URLs map to controller actions). The ASP.NET MVC Framework has a few additional features (like the ability to map incoming parameters directly to action method parameters). It is also more explicit about calling RenderView within the request.

« Active View » is the name of the View engine that Rails uses. This is analagous to the .aspx/.master/.ascx infrastructure ASP.NET has. Our view engine is IMO a little richer, and supports several additional features (declarative controls/components, templating, multiple regions for nested master pages, WYSIWYG designer, strongly typed ViewData access, pluggable storage provider, declarative localization, etc).

« Active Record » is the name of the ORM (object relational mapper) that RoR uses. This is analagous to an ORM in the .NET world – whether it is LINQ to SQL, LINQ to Entities, LLBLGen, SubSonic, NHibernate, ActiveRecord (the .NET version), etc. All of these ORMs have ways to map rows and columns in a database to objects that a developer then manipulates and works against (and can save changes back). The LINQ to SQL ORM is built-in to .NET 3.5 today, and LINQ to Entities will be built-in with .NET 3.5 SP1.

I think from your follow-up question above you are referring specifically to the « migrations » feature in RoR – which allows you to define table schemas using code, and version the schemas forward/backward. There isn’t a built-in version of this in the core .NET Framework today – although the SubSonic project has recently released a version that allows you to-do this using .NET. You can find out more about it here: www.subsonicproject.com.

>> Superb, …but I still longing for the IOC integration (Spring.NET, Windsor, StructureMap)…maybe in the next post ? I am planning on posting about IOC and dependency injection in the future (the ASP.NET MVC framework fully supports it and can be used with Spring.NET, Windsor, StructureMap, etc). I have a few other more basic MVC tutorials I need to get out of the way first – but testing and dependency injection are on the list for the future.

>> Nice series, eagerly waiting to see AJAX approach in the new ASP.NET MVC Framework, so when shall we expext that.
We will have ASP.NET AJAX support with the ASP.NET MVC Framework. I’ll talk more about this in a future tutorial series post.

>> This is coming together nicely. I was just hoping you might explain why there are 3 different ways to pass the ViewData? Does each method offer something that the others don’t? If not, surely it would be best to choose one method and force all developers to follow the same practice? Conceptually there are two ways to pass viewdata – either as a dictionary, or as a strongly typed object. In general I recommend using the strongly typed dictionary approach – since this gives you better compilation checking, intellisense, and refactoring support. There are, however, some times when having a more latebound dictionary approach ends up being flexible for more dynamic scenarios« )

  • http://blog.wekeroad.com/2007/10/26/microsoft-subsonic-and-me/ (« Rather than try and come up with some lame metaphors and trite pop-culture references, I’ve decided to use some advice from English 101 Professor:

    “Whatever the hell you’re trying to say, just say it”

    So I will: I’m going to work for Microsoft. I just signed the offer letter. I’ll be working with the ASP.NET guys on the new MVC platform as well as some other groovy things like Silverlight. I get to work “across the hall” from one of my very good friends – Phil Haack. I think it’s worth pointing out that SubSonic hasn’t been “bought”. Some might smell a conspiracy here, but I’ll leave that to the X-Files and Cap’n Crunch crowd to drum up all the evil reasons why the mothership has “beamed me up”. SubSonic will remain under the same MPL 1.1 license it always has, and will remain as completely Open Source as it always has – nothing will change at all. I’m just getting paid, essentially, to work on it 🙂...This is crucial to me. I decided to be direct with him and make sure we both understood these important points:

    “I want to be sure I have complete creative control over SubSonic, and that you don’t censor my blog… is that cool?”

    Shawn’s response is why I took the job:

    “Well Duh…” (he added some more things that were a bit more eloquent than “duh” – but I don’t think I was listening).

    I can make jokes about the UAC on my blog? And make up fictional Matrix converstations with ScottGu? Sign me up! I start on November 12th, right after DevConnections in Vegas (come on by if you’re out that way at the DNN Open Force« )

  • http://www.subsonicproject.com/ (« A Super High-fidelity Batman Utility Belt. SubSonic works up your DAL for you, throws in some much-needed utility functions, and generally speeds along your dev cycle. Why SubSonic ? Because you need to spend more time with your friends, family, dog, bird, cat… whatever. You work too much. Coding doesn’t need to be complicated and time-consuming. »)
  • http://en.wikipedia.org/wiki/Test-driven_development (« Test-Driven Development (TDD) is a software development technique consisting of short iterations where new test cases covering the desired improvement or new functionality are written first, then the production code necessary to pass the tests is implemented, and finally the software is refactored to accommodate changes. The availability of tests before actual development ensures rapid feedback after any change. Practitioners emphasize that test-driven development is a method of designing software, not merely a method of testing. Test-Driven Development began to receive publicity in the early twenty-first century as an aspect of Extreme Programming, but more recently is creating more general interest in its own right. Along with other techniques, the concept can also be applied to the improvement and removal of software defects from legacy code that was not developed in this way . »)
  • ss
  • http://weblogs.asp.net/scottgu/archive/2007/12/09/asp-net-mvc-framework-part-4-handling-form-edit-and-post-scenarios.aspx
  • (« ASP.NET MVC Framework (Part 4): Handling Form Edit and Post Scenarios   The last few weeks I have been working on a series of blog posts that cover the new ASP.NET MVC Framework we are working on.  The ASP.NET MVC Framework is an optional approach you can use to structure your ASP.NET web applications to have a clear separation of concerns, and make it easier to unit test your code and support a TDD workflow. The first post in this series built a simple e-commerce product listing/browsing site.  It covered the high-level concepts behind MVC, and demonstrated how to create a new ASP.NET MVC project from scratch to implement and test this e-commerce product listing functionality.  The second post drilled deep into the URL routing architecture of the ASP.NET MVC framework, and discussed both how it worked as well asthird post discussed how Controllers interact with Views, and specifically covered ways you can pass view data from a Controller to a View in order to render a response back to a client.  In today’s blog post I’m going to discuss approaches you can use to handle form input and post scenarios using the MVC framework, as well as talk about some of the HTML Helper extension methods you can use with it to make data editing scenarios easierClick here to download the source code for the completed application we are going to build below to explain these concepts… Our Data Model. We are going to use the SQL Server Northwind Sample Database to store our data.  We’ll then use the LINQ to SQL object relational mapper (ORM) built-into .NET 3.5 to model the Product, Category, and Supplier objects that represent rows in our database tables. We’ll begin by right-clicking on our /Models sub-folder in our ASP.NET MVC project, and select « Add New Item » -> « LINQ to SQL Classes » to bring up the LINQ to SQL ORM designer and model our data objects…To learn more about LINQ and LINQ to SQL, please check out my LINQ to SQL series here The HtmlHelper object (as well as the AjaxHelper object – which we’ll talk about in a later tutorial) have been specifically designed to be easily extended using « Extension Methods » – which is a new language feature of VB and C# in the VS 2008 release.  What this means is that anyone can create their own custom helper methods for these how you can handle more advanced URL routing scenarios with it.  The objects and share them for you to use. We’ll have dozens of built-in HTML and AJAX helper methods in future previews of the ASP.NET MVC Framework.  In the first preview release only the « ActionLink » method is built-into System.Web.Extensions (the assembly where the core ASP.NET MVC framework is currently implemented).  We do, though, also have a separate « MVCToolkit » download that you can add to your project to obtain dozens more helper methods that you can use with the first preview release.
  • >> This is nice. But do you handle subcomponents? subviews? Is view reuse possible inside other view? This is very important for even for modest sized applications? How would you handle posts correcly inside of subviews 😉 ?The first public MVC preview doesn’t have the concept of SubControllers yet (where you can attach them for regions of a larger view).  That is something we have planned for to tackle soon though.

    >> However, liviu raises good questions about Sub-Controllers, Composite Views and AJAX scenarios. How Will the MVC framework address the complex wiring of different parts of a page to different controllers for async updates?? My brain hurts thinking about it, yet I have implement these portal pages all the time cos our customers demand it. The first ASP.NET MVC Preview allows you to call RenderView (for example: RenderView(« Edit »)) and have it apply to either a .aspx viewpage or a .ascx viewusercontrol.  This ends up being really useful for scenarios where you are doing AJAX callbacks and want to refresh a portion of a page.  These callbacks could either be to the same Controller that rendered the origional page, or to another Controller in the project. We don’t have all the AJAX helper methods yet for this – but you could roll them yourself today.  We’ll obviously be releasing an update that does include them in the future.

  • >> Can you provide an example of how we might use a server side control to generate the drop down list or a textbox (a la WebForms) along with the pro’s and con’s of each approach? Personally, I do not like the old ASP <%= … %> syntax; but if there is a good reason to use it then I am willing to change that opinion. The main reason I showed the <% %> syntax in this post was that we don’t have the server-side MVC control equivalents available yet for this dropdown and text scenario.  That is on our roadmap to-do though – at which point you don’t need to necessarily use the <% %> syntax. In general what we’ve found is that some developers hate the <% %> syntax, while others prefer it (and feel that controls get in the way).  We want to make both sets of developers happy, and will have options for both. 🙂
  • >> Great work on the MVC model, it is a clean and intuitive model that appears to scale well. My only recommendation is that your actions (verbs) appear after the ids (nouns), e.g. [Controller]/[Id]/[Action]/  That would keep the architecture noun focused, opposed to verb focused. With this approach you can easily build an administrative interface on a public read-only site by adding verbs such as /edit/ or /delete/ at the end of your URL. A simple security rule can be added to the Controller that says ignore all Verbs after a noun, such as category or product, if user is not part of an administrative group. Thanks for the suggestion Josh.  You can do this today by creating your own custom route registration.  In the next preview I believe Route will be extensible so that you could also create a single resource route that supports these semantics.>> I was wondering if we could get an idea of the official « roadmap » for asp.net mvc?  Specifically, I’d like to know what features the team plans to release on what dates … ultimately, when this thing will RTM.  As I’ll be evaluating mvc and monorail for an upcoming app, this kind of information would really be helpful in determining which direction to go. We don’t have a formally published roadmap just yet – we will hopefully publish one early next year though.« )
  • http://en.wikipedia.org/wiki/ASP.NET_AJAX (« ASP.NET AJAX, formerly code-named Atlas, is a set of extensions to ASP.NET developed by Microsoft for implementing Ajax functionality. Including both client-side and server-side components, ASP.NET AJAX allows the developer to create web applications in ASP.NET 2.0 (and to a limited extent in other environments) which can update data on the web page without a complete reload of the page. The key technology which enables this functionality is the XMLHttpRequest object, along with Javascript and DHTML. ASP.NET AJAX was released as a standalone extension to ASP.NET in January 2007 after a lengthy period of beta-testing. It was subsequently included with version 3.5 of the .NET Framework, which was released alongside Visual Studio 2008 in November 2007.« )

Posted in 2007, Acces aux données, active record, AJAX, Architecture logicielle, ASP.NET, Développement logiciel, design pattern, DotNet, IDE-GUI, Ironpython, javascript, open source, ORM, RIA, ruby, tests, Web Frameworks | Tagué: , , , , , , , | Leave a Comment »

Rich Internet Application : JavaFX,Adobe/Flex,Silverlight,Moonlight…

Posted by patrick sur novembre 4, 2007

Comme d’habitude un point d’entrée pour savoir ce qu’est une application RIA est l’article de Wikipedia:

RIAs typically:

Le numéro 102 de Programmez! consacre une bonne partie de ses articles à Rich Internet Application.

Comme c’est un monde en pleine effervescence on ne fera qu’énumérer les techniques en cours de développement (voir Articles p.32, p.36). Les principales solutions techniques pour faire des « clients riches »:

  • les frameworks Javascript (« Dojo, jQuery, Prototype/Script.aculo.us, Yahoo UI »)
  • JavaServer Faces (JSF): p.32 H. Darmet « ..avec une extension AJAX (comme a4jsf ou ICEFaces) est la solution reine de type « Ajax Hybride » dans le monde Java. Avantages: productivité (avec Seam), ubiquité, sécurité et robustesse…Prise en compte de l’existant que s’il est JSF »
  • Google Web Toolkit (GWT): « …solution de type Ajax total qui favorise les aspects performance, ubiquité, robustesse et sécurité grâce à un ingénieux système de développement en Java… »
  • ASP.NET AJAX (« …proche de JSF avec une extension AJAX. Solution remarquablement outillée par Visual Studio. La prise en compte d’un existant ASP.NET est très aisée.« )
  • Flex(Adobe) : …est la solution de type « applet like » la plus populaire (on estime aux alentours de 97% le nombre de machines équipées du Flash Player), ce qui rend par conséquent les applications Flex relativement multi plates-formes et facilement déployables). Elle en a tous les avantages qui sont les mêmes que celles d’une architecture « Ajax total ». Voir http://planete-accessibilite.com/#article_pa_2
  • Silverlight / Moonlight (« …la solution « applet like » du monde .NET…Elle reprend le principe de construction déclarative de l’IHM popularisé par Flex. L’ubiquité est encore assez limitée. L’outillage avec Visual Studio reste le point fort. »)
  • JavaFX (« ..est la solution « applet-like » du monde Java. Les avantages et limites sont ceux rencontrés par Silverlight, avec moins de crédibilité et de maturité…page 45. « …JavaFX est un produit finalement mal connu: il est présenté comme une solution RIA, mais c’est en fait une nouvelle solution pour construire des applications Swing qu’elles soient RIA ou non. L’intérêt de JavaFX est donc à la fois ailleurs et plus large…toute équipe qui développe une application graphique basée sur swing devrait s’intéresser à JavaFX… »)
  • OpenLaszlo est une plateforme de développement d’applications riches, en open source. Ses applications sont développées via une solution qui produit, à partir du même code source, une application en DHTML (HTML, DOM, CSS et Javascript) ou Flash.
  • XUL/XULRunner (« XUL, pour XML-based User interface Language, est un langage de description d’interfaces graphiques basé sur XML créé dans le cadre du projet Mozilla. XUL se prononce zoul en anglais (pour rimer avec cool, mais aussi en hommage au demi-dieu Zoul dans le film S.O.S. Fantômes). Couplé avec le XULRunner, environnement d’exécution multiplateforme, il forme un couple permettant de créer des Rich Desktop Application« )

Autres sources:

Posted in AJAX, DotNet, IDE-GUI, java, RIA, Web applications | Tagué: , , , , , , , , , , , , , , , , , , | 1 Comment »

GUILDE: Conférences EyeOS le 15/11/2007 et Ruby le 19/12/2007

Posted by patrick sur novembre 2, 2007

La GUILDE a le plaisir de vous annoncer que les deux prochaines conférences Guilde sont planifiées :

  • EyeOS, le bureau web, par Hans B Pufal, jeudi 15 novembre
  • Ruby et Ruby on Rails, par Laurent Julliard, mercredi 19 décembre

Annonce détaillée pour EyeOS: Conférence EyeOS Jeudi 15 novembre de 19:30 à 21:45, par Hans B Pufal, développeur EyeOS, à l’ENSIMAG, campus de Saint Martin d’Hères, Amphi E.

EyeOS est un environnement de bureau libre (sous licence GNU/GPL) basé sur une interface Web. Il permet à l’utilisateur d’accéder à son bureau, ses fichiers et ses applications eyeOS à partir de tout navigateur, sur n’importe quel ordinateur, en n’ayant besoin que d’un système de base et d’une connexion internet. EyeOS est écrit en PHP, un langage de script libre. On peut ainsi l’installer sur la plupart des systèmes d’exploitation existants en tant que serveur. Il est également possible d’utiliser un serveur eyeOS existant en se créant simplement un compte. De plus en plus d’applications sont disponibles pour eyeOS, des applications de bureautique (traitement de texte, tableur, etc.) aux jeux, en passant par des applications internet (messagerie instantanée, mail, etc.). Il est donc possible de réaliser toutes les tâches courantes à partir d’un simple navigateur.

Communication: N’hésitez pas à relayer l’annonce ou à mettre un lien vers cette page: http://www.guilde.asso.fr/rencontres/20071115.

Vous pouvez également imprimer et diffuser les affiches (PDF) : couleur ou noir et blanc.

Posted in Guilde, IDE-GUI, php, ruby, Web applications | Tagué: , , , | Leave a Comment »

Quelques liens en vrac: plone, grok, sharpdevelop, dabo, geniusql

Posted by patrick sur août 21, 2007

Quelques liens en vrac

– sortie de plone 3.0 (http://plone.org, « The culmination of over a year of hard work by the Plone Team, Plone 3.0 is available for download for all platforms today. This release is the most user-friendly, powerful and highly anticipated release of Plone ever, and has an amazing amount of new functionality. Some highligts:

  • Full versioning support, history and reverting to older revisions
  • Improved performance
  • Inline (Ajax) editing
  • Link and reference integrity checking
  • Automatic locking and unlocking
  • Improved handling of permissions and sharing
  • Upgraded visual (WYSIWYG) content editor
  • Full-text indexing of Word and PDF documents
  • Wiki support and multiple new mark-up formats
  • Rules engine for content
  • Strengthened security« )

Dans le même genre de produits basés sur Zope voir

Grok (http://grok.zope.org/, « Grok is a web application framework for Python developers. It is aimed at both beginners and very experienced web developers. Grok has an emphasis on agile development. Grok is easy and powerful. You will likely have heard about many different web frameworks for Python as well as other languages. Why should you consider Grok?

  • Grok offers a lot of building blocks for your web application.
  • Grok is informed by a lot of hard-earned wisdom.

Grok accomplishes this by being based on Zope 3, an advanced object-oriented web framework. While Grok is based on Zope 3, and benefits a lot from it, you do not need to know Zope at all in order to get productive with Grok« )

SharpDevelop(« Vous voulez coder en .net mais sans utiliser l’IDE de Microsoft ? SharpDevelop est celui qu’il vous faut. SharpDevelop (SD) est un IDE basé sur la plateforme .NET (2) qui offre un environnement de développement de qualité et libre comparable à VisualStudio. D’autres possibilités de développement sont intégrées et sont envisageables (mono intégré ; conversion auto en c#… You need to have at least the .NET 2.0 runtime installed on your machine. The SDK is optional but recommended. .NET Framework 2.0 Runtime download (x86), .NET Framework 2.0 SDK download (x86). Supported operating systems: Windows XP SP2 and later (eg Windows Server 2003 and Windows Vista)« )

dabo (« http://dabodev.com/, Desktop applications: That’s what Dabo does. It’s not YAWF (yet another web framework). There are plenty of excellent web frameworks out there, so if that’s what you are looking for, Dabo isn’t for you. But there are almost no desktop application frameworks out there, and if you want to create applications that run on Windows, OS X or Linux, Dabo is for you!

Dabo is a 3-tier, cross-platform application development framework, written in Python wxPython GUI toolkit. And while Dabo is designed to create database-centric apps, that is not a requirement. Lots of people are using Dabo for the GUI tools to create apps that have no need to connect to a database at all..Dabo’s authors, Ed Leafe and Paul McNett, have strong backgrounds in database application development using the awesome and underrated Microsoft Visual FoxPro development environment.« )

http://projects.amor.org/geniusql (« Geniusql is a public domain, low-level Object-Relational Mapper for Python applications. If you’re familiar with Martin Fowler’s work, you can think of Geniusql as providing a Data Source layer. It primarily uses a generic Table Data Gateway architecture (as opposed to the more tightly-coupled Active Record architecture recently popularized by Ruby On Rails and Django).

If you want a more powerful solution, we recommend skipping Active Record and going straight to a Data Mapper like Dejavu. Dejavu uses Geniusql behind the scenes for RDBMS back ends, but allows you to mix and match them with RAM, filesystem, and other stores.« )

http://www.aminus.org/blogs/index.php/fumanchu/2007/08/18/storm_sqlalchemy_and_geniusql (« As Mike Bayer mentioned, I recently did some cross-ORM comparisons. The charts below all show « number of requests » on the X axis and « number of seconds to complete those requests » on the Y axis…I used trunk versions of Geniusql (1.0) and SQLAlchemy (0.4, without using the orm subpackage), and the latest stable distro of Storm (0.10). All test runs were done on my Win2k laptop, which has a 2GHz CPU and 512MB of RAM. PostgreSQL 8.0.0rc1 was the DB engine, and psycopg2 was the driver.« )

Posted in CMS, Dabo, ORM, python | Leave a Comment »

En vrac: quelques liens sur CSS

Posted by patrick sur mai 29, 2007

Encore un excellent article (« Des CSS de qualité) de David Larlet sur la critique du non moins excellent livre « CSS 2 Pratique du web design » de Raphaël Goetter.

J’ai les 2 versions du livre, la dernière étant une mise à jour par rapport à IE7 (apparemment non assez détaillée pour David qui est développeur Web)

Voici les extraits qui m’ont intéressé:

  • – les sites de layouts pullulent, LayoutGala est pas trop mal pour ça, tout dépend de vos besoins.
  • Styleguide et template : le duo gagnant : je n’arrive plus à trouver le lien original sur la définition d’un styleguide en CSS mais concrètement ça ressemble à ça, il s’agit de rassembler sur une même page tout les éléments utilisés et d’afficher leur style. C’est bien différent du template qui est généralement représentatif du layout du site et qui ne contient pas forcément tous les éléments stylés ;
  • Utilisez les propriétés générales : utilisez font, padding, margin et non font-family, margin-left, padding-bottom par exemple, c’est assez bien documenté ailleurs ;
  • Utilisez la cascade : c’est ce que l’on oublie bien souvent lorsque l’on a la tête dans le guidon mais il est souvent possible avec du recul d’optimiser la structure et donc sa mise en forme en les simplifiant, en enlevant les class ou les div inutiles. Vous pouvez aussi appliquer des propriétés générales à des éléments d’un niveau supérieur pour éviter les répétitions ;
  • Compressez tout ça : le navigateur ne voit pas la différence mais l’utilisateur oui en téléchargeant plus rapidement la feuille de style alors pourquoi s’en priver ? Il existe de nombreux outils qui sont heureusement comparés sur cette page. J’utilise généralement CleanCSS car CSS Compressor m’enlève bien souvent trop de styles (n’oubliez pas de tester à nouveau vos pages après la compression !) et puis CleanCSS dit ce qu’il fait donc vous pouvez corriger les problèmes à la source ce qui est tout de même plus pratique.

Conclusion de David:

Bon même en limitant les liens ça en fait pas mal… en voici encore quelques uns qu’il ne faut pas louper :

En attendant peut-être un jour un véritable framework CSS digne de ce nom

Posted in css, IDE-GUI, Web Frameworks | Leave a Comment »

Silverlight and the DLR

Posted by patrick sur mai 4, 2007

Quelques extraits intéressants tirés de Ted Leung (http://www.sauria.com/blog/2007/05/01/silverlight-and-the-dlr/) sur Silverlight (WPF/E)



Silverlight and the DLR

Microsoft has announced that it is embedding a version of the CLR into their Silverlight RIA technology. The CLR enabled version of Silverlight will run inside Firefox (both on Windows and OS X) and inside Safari. This is a good step at cross platform support, but the omission of Linux, while not surprising, reduces the reach of Silverlight versus Flash or regular AJAX.

The most interesting part of the whole business is the Dynamic Language Runtime, which is the project that Jim Huginin has been working on since he arrived at Microsoft. The DLR currently supports JavaScript, a dynamic version of Visual Basic, IronPython, and IronRuby. John Lam’s work at Microsoft also appears to be paying off. eWeek had three good articles on DLR technology, and all three articles include conversations with Jim and John. It’s nice / interesting to see that two people could have a large impact on Microsoft. The DLR is being made available under a BSD style license. While I have to give props to Microsoft for choosing an unrestrictive license, I’d point out that a license is not a governance system, and while the DLR might technically be open source, the “Core CLR” definitely is not, and neither is the XAML portion of the Silverlight runtime — no surprise there. I wonder if we will be seeing a port of the DLR on top of Mono. I also wonder if IronRuby can run Rails, although that seems like a weird thing to want to do inside of Silverlight.

Another part which I find interesting is the inclusion of Linq as part of the Core CLR. I like Linq, and if Microsoft is going to try to define a new platform for inside the browser, I’m happy that they’re including Linq as part of the core.


The inclusion of facilities like Linq will boost the semantic level of the platform running in the browser. Granted, it only does that for Silverlight, but I hope that this puts some pressure on the other players to provide more leverage in the platform. If we are going to be building much richer applications inside the browser, we are going to need all the help that we can get.

So what?
In the end, though, I probably won’t be doing much with Silverlight, for the same reasons that I’ve written about before. The technology has definitely gotten stronger, but the other issues haven’t really changed much: there are no tools for the Mac or Linux, and as far as influencing the technology, you’re just standing outside the Big House, pressing your nose up against the window.


Une autre réaction de Miguel de Icaza (http://tirania.org/blog/archive/2007/May-03-1.html)


Silverlight and WPF

Today Microsoft announced two Silverlight editions: one that went into beta (Silverlight 1.0) and is a relatively simple technology.

Silverlight 1.0 uses a retained graphics system (a canvas) that exposes the internal structure to the browser DOM. It has no scripting capabilities built into it, all the scripting support is actually done by the Javascript interpreter in the browser and all changes are done by talking to a Javascript object exposed by the hosted Silverlight surface.

The scene definition is done using the XAML markup using a subset of the WPF primitives available in the full-blown WPF. Then the big announcement came: The second edition was Silverlight 1.1, and this one is a different beast altogether. 1.1 extends the model by embedding a complete Common Language Runtime

There are a handful of changes to the runtime. Here are some notes on what I found out about it today. It might not be complete nor accurate:

  • A new security system: Unlike the CAS there is no stalk walking but instead there are trusted and untrusted assemblies. This is part of a new sandboxing model.
  • Trusted assemblies have a way of flagging entry points as being untrusted. which requires that the caller be a trusted assembly.This means that calling things like FileStream File.Open (string filename) from an untrusted assembly is not permitted.

    Instead developers would call something like FileStream File.OpenDialog(...) (which is hosted in a trusted assembly) and this would in turn call File.Open(string) and this would return a FileStream that the user selected with a dialog box.

  • The API has been trimmed down: some classes were removed that did not make much sense for the core.
  • A Minimalist WPF implementation: this is now available as a new assembly. This implementation at this point does not seem to have support for high-level controls like Buttons or Sliders, those have to be authored in a per-application basis.There is talk about which pieces belong in the minimal WPF and which pieces do not.

    In my opinion, keeping the controls out was a good idea as the controls in the real WPF are a bit too big.

  • Dynamic Language Runtime: the dynamic language runtime is an integral part of the Silverlight distribution.

Dynamic Language Runtime


The Dynamic Language Runtime was announced today. Jim Hugunin’s blog has the details and rumor is that in the next couple of days/weeks he will be posting on his blogs the technical details behind the design of the DLR.

Binaries of the DLR were released today as part of Silverlight 1.1, and the source code was included with IronPython 2.0 (also released today).

The release for the DLR is done under the terms of the Microsoft Permissive License (MsPL) which is by all means an open source license. This means that we can use and distribute the DLR as part of Mono without having to build it from scratch. A brilliant move by Microsoft.

During the keynote they announced support for four dynamic languages built on top of the DLR: Python, JavaScript (ECMAScript 3.0), Visual Basic and Ruby.

The rumor on the halls is that IronPython and Ruby will be released under the MsPL license, while ECMAscript and Visual Basic will continue to be proprietary. From Jim’s announcement:

For the short term, our focus is on using a small number of languages to drive the first wave of DLR development where we can work closely and face-to-face with the developers in order to iron out the worst kinks in the DLR design. After this initial phase, we want to reach out to the broader language community. If you’re building a language on top of .NET and are interested in supporting dynamic language features then we want your feedback on the DLR. However, I’d discourage you from trying to implement on top of the DLR today. I don’t want you to get frustrated trying to work with these really early bits and then not be interested in working with us when we’re better prepared to engage with the language community. We plan to kick off a broader engagement with language implementers at the upcoming lang.net conference in three months – at the end of July. This will be the best place to really engage with the DLR and let us know what we got wrong.

Mono and Silverlight

For a long time a common question to the Mono team was when we were planning on implementing WPF.

Most people want to hear a date like « tomorrow », « next month », « in a year ». But the answer is more complex than just thinking « we can do this in N months ».

We as a team have to evaluate the cost of implementing a technology and contrast it with the impact that such technology would have. With our finite development resources (in the Mono community and the companies contributing to it) we have to pick our battles.

And implementing WPF was never really high up on the priority list for a couple of reasons:

  • WPF requires a very big investment before things will start working.
  • Users of WPF is limited to those starting new applications and are willing to start those applications using WPF.
  • Only a minority of existing users (Windows.Forms) were willing to rewrite their software to move it to WPF. The rest basically will continue developing Windows.Forms and using the technologies they have been using for the time being.

So it is fair to say that we currently do not have plans to look at WPF.

But a Mono-based Silverlight is an entirely different story. Unlike WPF that requires people to rewrite their software to take advantage of it, Silverlight is aimed at the Web and it will become a nice complement, a way of spicing up existing web applications without rewriting what already works.

It makes tons of sense for us to start looking at an implementation of Silverlight on Linux with Mono. There is already a XAML loader, it is the perfect excuse to use Antigrain for high-speed graphics and that only leaves the pesky media issue to be solved.

In fact, am kind of happy that Microsoft did not do the port themselves as implementing this sounds incredibly fun and interesting.


Sur le blog de Jim Hugunin (http://blogs.msdn.com/hugunin/archive/2007/04/30/a-dynamic-language-runtime-dlr.aspx)


Today, at MIX 07, we announced a new level of support for dynamic languages on .NET that we’re calling the DLR.

From the beginning, Microsoft’s .NET framework was designed to support a broad range of different programming languages on a Common Language Runtime (CLR).  The CLR provides shared services to these languages ranging from a world-class GC and JIT to a sandboxed security model to tools integration for debugging and profiling.  Sharing these features has two huge benefits for languages on the CLR.  First, it’s easier to implement a language because lots of difficult engineering work is already done for you.  Second, and more importantly, these languages can seamlessly work together and share libraries and frameworks so that each language can build on the work of the others.

The CLR has good support for dynamic languages today.  IronPython-1.0 demonstrates this.  The new Dynamic Language Runtime (DLR) adds a small set of key features to the CLR to make it dramatically better.  It adds to the platform a set of services designed explicitly for the needs of dynamic languages.  These include a shared dynamic type system, standard hosting model and support to make it easy to generate fast dynamic code.  With these additional features it becomes dramatically easier to build high-quality dynamic language implementations on .NET.  More importantly, these features enable all of the dynamic languages which use the DLR to freely share code with other dynamic languages as well as with the existing powerful static languages on the platform such as VB.NET and C#.

The DLR is about giving you the best experience for your language – true to the language, excellent tools, performance and seamless integration with a wealth of libraries and platforms. The essential benefits of the DLR are about sharing. It lets language implementers share standard features rather than rebuilding them from scratch. This lets them focus on the features that make a given language unique rather than on reinventing yet another GC system. It lets developers share code regardless of the language the code is implemented in and to use whatever language they prefer regardless of the language preferred by the environment they want to run in. Coupled with the Silverlight 1.1 platform announced today, it even lets languages share a sandboxed security model and browser integration.  This means that developers building browser-based applications can now use their preferred language even for client-side code.

We’re initially building four languages on top of the DLR – Python, JavaScript (EcmaScript 3.0), Visual Basic and Ruby. We shipped today both Python and JavaScript as part of the Silverlight 1.1alpha1 release today. John Lam and I will be demoing all four languages, including VB and Ruby, working together during our talk tomorrow at 11:45.

In addition to the Silverlight release, we’ve also made the full source code for both IronPython and all of the new DLR platform code available on codeplex under the BSD-style Microsoft Permissive License. All of that code can be downloaded today as part of the IronPython project at codeplex.com/ironpython. If you want to know more about the DLR, you should feel free to download the code.  However, you should understand that this is a very early release of these bits and we still have significant work left to do including refactoring, design changes, performance tuning – not to mention documentation


Sur Voidspace : http://www.voidspace.org.uk/python/weblog/index.xml


Silverlight: Python in the Browser

scanner Ok, so after a couple of days digesting it, the new Microsoft announcement is really big news. Everyone is talking about it, well, everyone except the Python community [1]. Smile

There are two important aspects, and Microsoft chose to announce them at the same time.

  1. IronPython 2.0 is built on top of a new layer called the ‘DLR’, the Dynamic Language Runtime. This abstracts a lot of the useful elements from IronPython 1.0 into a dynamic type system and hosting environment for dynamic languages. The DLR is Open Source, and on top of it Microsoft are developing four languages:

    • IronPython
    • IronRuby
    • A dynamic version of VB
    • Javascript

    The DLR is shipped with the IronPython 2.0 distribution. IronRuby is not yet available [2], but an alpha ought to be available this week. It doesn’t yet run Rails, but it will eventually. Through the DLR, dynamic languages should be able to share libraries and use each other’s objects…

  2. SilverLight 1.1 ships with a customized version of the CLR: the .NET ‘Common Language Runtime’. This only contains trusted assemblies, so applications running in it are sandboxed. The exciting part, is that the DLR runs on top of it! So you can now do rich client programming for web-apps, with full access to the browser DOM (plus the Silverlight capabilities) using IronPython or IronRuby. This is big news [3]. You also have the .NET libraries, including WPF/E which is the browser side equivalent of Microsoft’s new user interface library. Microsoft are touting the media-streaming capabilities of Silverlight and I have no idea what other goodies are lurking inside it for building applications, yet…

Silverlight is cross-platform and cross-browser, well partly anyway [4]. Smile

The bad news is that the DLR doesn’t yet compile and run on Mono. This should just be a case of fixing compiler bugs, and possibly implementing a few more classes and methods. Seo Sanghyeon has already made some progress on this, and based on past experience it won’t take him very long.

Additionally, there is no Silverlight client for Linux. However, Miguel de Icaza, the project lead for Mono, is very excited about implementing the Silverlight CLR; much more excited than he is about implementing WPF for the desktop which he thinks will see very slow developer uptake.

So what can you do with Silverlight? Well, up to now I’ve only got as far as running the demos. You’ll need Silverlight 1.1 Alpha installed and the Silverlight 1.1 SDK for the first set of demos.

If you want to try it with Firefox you’ll also need an HTTP server (I use CGIHTTPServerWithSSI which works fine, just drop it into the samples directory). I’ve had some of the demos working on Windows. Andrzej Krzywda tried it with Firefox on the Mac and Firefox kept crashing..


Personally I find the idea of being able to write rich client-side web applications with Python very exciting, but the responses from other developers I’ve talked to have been much more lukewarm. Comments include, ‘it sounds like Java applets from 1995’, ‘I don’t like Microsoft tools’, ‘it means installing another runtime’, ‘I like Javascript’ and so on… Other commenters cite the lack of development tools for the Mac and Linux. If Silverlight is just an alternative to Flash then I guess this is an issue, but I’ve never done any flash development. Personally, a Python IDE is the development platform I want – and there are plenty of those.


Posted in DotNet, IDE-GUI, Web applications, Web Frameworks | Leave a Comment »