"…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 ‘Langages’ Category

[Grenoble] Soirée Spéciale avec Bruce Eckel : Scala as a first programming language » le mercredi 12 octobre 2011

Posted by patrick sur octobre 7, 2011

Source:: http://www.jugevents.org/jugevents/event/41752

Est-il besoin de présenter Bruce Eckel ?
Sans doute avez vous déjà vus son nom sur les bestsellers: Thinking in Java ou Thinking in C++.

Nous profitons de sa présence à la conférence internationale ICALEPCS à l’ESRF pour l’inviter au Java User Group.

Bruce Eckel : Scala as a first programming language

Bruce Eckel : Scala as a first programming language

Autres liens

Comptes rendus:

Posted in 2011, Années, Architecture logicielle, C_sharp, design pattern, DotNet, Grenoble, java, Langages | Tagué: , , | Leave a Comment »

Doxylink is a Sphinx extension to link to external Doxygen API documentation

Posted by patrick sur septembre 19, 2010


Doxylink is a Sphinx extension to link to external Doxygen API documentation.

It works much like the extlinks extension but it does some more processing to link C++ symbols against their Doxygen HTML documentation.

When generating your Doxygen documentation, you need to instruct it to create a ‘tag’ file. This is an XML file which contains the mapping between symbols and HTML files

Doxylink is a Sphinx extension to link to external Doxygen API documentation.

Posted in 2010, Années, C++, Documentation, Doc_sphinx, Génie logiciel, Langages, reStructuredText, Sphinx | Tagué: , , , | Leave a Comment »

PythonC 2.6 for Java : Py4J 0.4 is out

Posted by patrick sur septembre 19, 2010

Py4j (http://py4j.sourceforge.net/index.html)

Py4J enables Python programs running in a Python interpreter to dynamically access Java objects in a Java Virtual Machine. Methods are called as if the Java objects resided in the Python interpreter and Java collections can be accessed through standard Python collection methods. Py4J also enables Java programs to call back Python objects. Py4J is distributed under the BSD license.


See also

http://www.jython.org/index.html (« Python for the Java Platform »)

Py4J enables Python programs running in a Python interpreter to dynamically access Java objects in a Java Virtual Machine. Methods are called as if the Java objects resided in the Python interpreter and Java collections can be accessed through standard Python collection methods. Py4J also enables Java programs to call back Python objects. Py4J is distributed under the BSD license.

Posted in 2010, Années, Documentation, java, jython, Langages, python, Sphinx | Tagué: , , | Leave a Comment »

Java : « Will Open-Sourcing Java Remove Competetive Corporate-Think? » de Bruce Eckel

Posted by patrick sur décembre 19, 2008

  • http://www.artima.com/weblogs/viewpost.jsp?thread=244996 (« Will Open-Sourcing Java Remove Competetive Corporate-Think? The problem with public corporations is that, no matter what they say, « maximize quarterly profits » is the real mantra…Java was created in a company run by a hyper-competitive CEO and the whole culture around it has been competitive. Many decisions were made without the consumer (programmers) in mind, but with Sun’s apparent best interests in mind…Early on, the « write once, run everywhere » chant started and that justified everything. If you want to talk to something OS-specific, you can use JNI, right? What a nightmare. And the joke became « write once, test everywhere »…Sun, as is its habit, never learns from its mistakes. Sometime in the last couple of years, rumor has it that Adobe apparently extended the possibility of working with Sun so that Flex would integrate seamlessly with Java. This would seem like a best-of-all-worlds situation, to pal up with the folks who have been specializing in UI programming. Instead, that seems to be around the time that JavaFX was started (which even poached Flex’s « Fx »). The classic « not invented here » response is the standard reply of corporate competitive-think…Open-sourcing Java is not going to make it an open-source project. The culture that has built up around Java for over ten years is not going to change just by moving to a new license…A truly open-source programming language does not have shareholders to serve. It can only serve its actual customers, the programmers who are consuming the language. For example, Python has always been about « what do you want to do today? » If you want to create a cross-platform app, no problem. And if you want to talk directly to the OS, that’s been made as easy as possible. This makes sense because Python is an « enabling » language — it’s about helping you do what you need to do, rather than telling you what you can and can’t do (these comments also apply to Ruby and other enabling languages, but I only occasionally tinker with Ruby so I can’t speak authoritatively about it).Python, after thrashing around with many different approaches, also solved the « interfacing to native code » problem. In Python 2.5, ctypes were added. Now you only have to say « there’s the DLL, connect to it as efficiently as possible » and it does it. And amazingly, the DLLs are the only things that are different on different platforms; your Python code can be the same. That’s the right solution to the problem. (When Jython 2.5 comes out, I’ve heard it will have ctypes working so that may be the reasonable alternative to JNI)…Java won’t die. But the adoption of new Java versions and features is going to continue to slow. People have been bitten too many times. Java lost its status of being a leader awhile ago, and it’s now a legacy language — it’s just taking awhile for everyone to realize it…Full disclosure: My consulting contract (mostly speaking, some free-form writing) with Adobe expired around last May (and yes, Adobe is a full-on corporation with all of the problems that implies — but according to rumor it was Adobe that suggested the liaison with Sun); I decided on my own that Flex is a good solution for UIs, both before and after that contract. Also, James Ward and I just published our coauthored book (written under our own steam, not part of the Adobe contract) First Steps in Flex. I’m working on an open-source book on Python 3. And before you say I’ve gone totally anti-Java, I also organize The Java Posse Roundup with The Java Posse (so think « tough love »).« )


  • http://wiki.debian.org/Java
  • http://en.wikipedia.org/wiki/IcedTea (‘IcedTea is a software development and integration project launched by Red Hat in June 2007.[1] The goal is to make the OpenJDK software which Sun Microsystems released as free software in 2007 usable without requiring any other software that is not free software. For Red Hat, this would make it possible to add OpenJDK to the Fedora Linux distribution, as well as other distributions. This goal has been met, and a version of IcedTea based on OpenJDK was packaged with Fedora 8 in November 2007. April 2008 saw the first release[2] of a new variant, IcedTea6 which is based on Sun’s build drops of OpenJDK6, a fork of the OpenJDK with the goal of being compatible with the existing JDK6. This was released in Ubuntu and Fedora in May 2008. The IcedTea package in these distributions has been renamed to OpenJDK using the OpenJDK trademark notice‘)
  • http://packages.debian.org/sid/java-package (‘This program currently works with the following Java(TM) 2 Runtime Environments and Development Kits:
     * Sun Microsystems(TM) 1.4, 5 and 6 Standard Edition
     * IBM(TM) 1.3, 1.4, 5 and 6 Standard Edition
     * Blackdown Java-Linux 1.3 and 1.4 Standard Edition')

Posted in 2008, java, jython, python | Tagué: , , , , | Leave a Comment »

Nouvelle version majeure de GCC : GCC 4.3.0

Posted by patrick sur mars 11, 2008

GCC est utilisé pour le développement de la plupart des logiciels libres. Le noyau Linux dépend notamment étroitement des fonctionnalités de GCC.

GCC 4.3.0 has been released. GCC 4.3.0 is a major release, containing substantial new functionality not available in GCC 4.2.x or previous GCC releases. See: http://gcc.gnu.org/gcc-4.3/changes.html for more information about changes in GCC 4.3.0.

There is one important caveat. It was discovered after the final release
has been made that some OS kernels on i?86 and x86_64 architectures
violate the processor specific ABI with regards to the DF flag, if a process
is interrupted with a signal while doing overlapping memmove or running some other code with DF flag set, the signal handler might be started with DF flag set on entry to the signal handler. GCC 4.3.0 no longer emits cld instructions unnecessarily, so GCC 4.3.0 compiled async signal handlers or functions the signal handlers call that rely on DF flag being cleared might misbehave. This will be hopefully fixed in the kernels soon and future GCC releases might provide an optional workaround for this bug.

Fixes for some systems:
Linux http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=e40cd10ccff3d9fbffd57b93780bee4b7b9bff51
FreeBSD http://www.freebsd.org/cgi/query-pr.cgi?pr=121422
Hurd http://sources.redhat.com/ml/libc-alpha/2008-03/msg00020.html

http://gcc.gnu.org/gcc-4.3/changes.html (« GCC requires the GMP and MPFR libraries for building all the various front-end languages it supports. See the prerequisites page for version requirementsThe GCC middle-end has been integrated with the MPFR library. This allows GCC to evaluate and replace at compile-time calls to built-in math functions having constant arguments with their mathematically equivalent results. In making use of MPFR, GCC can generate correct results regardless of the math library implementation or floating point precision of the host platform. This also allows GCC to generate identical results regardless of whether one compiles in native or cross-compile configurations to a particular target….C++: Experimental support for the upcoming ISO C++ standard, C++0x. -Wc++0x-compat has been added and is now enabled by default for -Wall. It produces warnings for constructs whose meaning differs between ISO C++ 1998 and C++0x… An experimental parallel mode has been added. This is a parallel implementation of many C++ Standard library algorithms, like std::accumulate, std::for_each, std::transform, or std::sort, to give but four examples…Java: gcj now uses the Eclipse Java compiler for its Java parsing needs. This enables the use of all 1.5 language features, and fixes most existing front end bugs…Other significant improvements

  • The compiler’s --help command-line option has been extended so that it now takes an optional set of arguments. These arguments restrict the information displayed to specific classes of command-line options, and possibly only a subset of those options. It is also now possible to replace the descriptive text associated with each displayed option with an indication of its current value, or for binary options, whether it has been enabled or disabled.

    Here are some examples. The following will display all the options controlling warning messages:


    Whereas this will display all the undocumented, target specific options:


    This sequence of commands will display the binary optimizations that are enabled by -O3:

          gcc -c -Q -O3 --help=optimizers > /tmp/O3-opts
          gcc -c -Q -O2 --help=optimizers > /tmp/O2-opts
          diff /tmp/O2-opts /tmp/O3-opts | grep enabled

« )

http://en.wikipedia.org/wiki/GNU_Compiler_Collection (« GCC was started by Richard Stallman in 1985. He extended an existing compiler to compile C. The compiler originally compiled Pastel, an extended, nonportable dialect of Pascal, and was written in Pastel. It was rewritten in C by Len Tower and Stallman,[4] and released in 1987[5] as the compiler for the GNU Project, in order to have a compiler available that was free software. Its development was supervised by the Free Software Foundation.« )

Posted in C++, Développement logiciel, GCC, java, programmation | Tagué: | Leave a Comment »

C++ et la métaprogrammation avec les templates, le nouveau standard C++0x pour C++

Posted by patrick sur mars 3, 2008

Source: un article publié dans le magazine Programmez! de Frédéric Mazué sur “Blitz++ et la méta-programmation C++ ».

« …quand C++ s’est vu doté des templates, des programmeurs astucieux les ont détournés de leur usage premier. La méta-programmation C++ était née, et un gain significatif de performance avec elle…ce n’est pas une bonne idée que de vouloir faire de la méta-programmation à tout prix. Par contre c’est une bonne idée d’utiliser des librairies telles que Boost et Blitz++ dont la méta-programmtion est une pierre angulaire« .

A voir:

  • http://fr.wikipedia.org/wiki/M%C3%A9taprogrammation (« La métaprogrammation avec des patrons est une technique de programmation dans laquelle les patrons sont utilisés de sorte que le compilateur, lors de la compilation du code, exécute un programme. Ces programmes peuvent générer des constantes ou des structures de données. Cette technique est utilisée principalement dans le langage de programmation C++…La métaprogrammation avec des patrons a des utilisations pratiques malgré son apparence maladroite. Elle peut être utilisée pour créer des classes vecteur à n dimensions quand n est connu à la compilation. L’avantage par rapport à un vecteur à n dimensions traditionnel est que les boucles peuvent être déroulées, ce qui produit un code très optimisé. »)
  • http://en.wikipedia.org/wiki/C%2B%2B0x (« C++0x is the planned new standard for the C++ programming language. It is intended to replace the existing C++ standard, ISO/IEC 14882, which was published in 1998 and updated in 2003. These predecessors are informally known as C++98 and C++03. The new standard will include several additions to the core language and will extend the C++ standard library, incorporating most of the C++ Technical Report 1 libraries — most likely with the exception of the library of mathematical special functions. Since the standard is not yet finalized, this article may not reflect the most recent state of C++0x. Up-to-date state of the next C++ standard is published on the ISO C++ committee website. The most recent report, N2432, was published in October 2007. »)
  • http://www.oonumerics.org/blitz/ (« Blitz++ is a C++ class library for scientific computing which provides performance on par with Fortran 77/90. It uses template techniques to achieve high performance. The current versions provide dense arrays and vectors, random number generators, and small vectors and matrices. Blitz++ is distributed freely under an open source license, and contributions to the library are welcomed. « )
  • http://www.boost.org/ (« Boost provides free peer-reviewed portable C++ source libraries. We emphasize libraries that work well with the C++ Standard Library. Boost libraries are intended to be widely useful, and usable across a broad spectrum of applications. The Boost license encourages both commercial and non-commercial use.C++ Standards Committee’s Library Technical Report ( TR1) as a step toward becoming part of a future C++ Standard. More Boost libraries are proposed for the upcoming TR2 We aim to establish « existing practice » and provide reference implementations so that Boost libraries are suitable for eventual standardization. Ten Boost libraries are already included in the . »)
  • http://en.wikipedia.org/wiki/Boost_C%2B%2B_Libraries (« …The libraries are aimed at a wide range of C++ users and application domains. They range from general-purpose libraries like SmartPtr, to OS Abstractions like FileSystem, to libraries primarily aimed at other library developers and advanced C++ users, like MPL. In order to ensure efficiency and flexibility, Boost makes extensive use of templates. Boost has been a source of extensive work and research into generic programming and metaprogramming in C++…« )
  • http://en.wikipedia.org/wiki/GNU_Compiler_Collection (« …The GNU Compiler Collection (usually shortened to GCC) is a set of compilers produced for various programming languages by the GNU Project. GCC is a key component of the GNU toolchain. As well as being the official compiler of the GNU system, GCC has been adopted as the standard compiler by most other modern Unix-like computer operating systems, including Linux, the BSD family and Mac OS X. GCC has been ported to a wide variety of computer architectures, and is widely deployed as a tool in commercial, proprietary and closed source software development environments. GCC is also used in popular embedded platforms like Symbian[1], Playstation and Sega Dreamcast. Originally named the GNU C Compiler, because it only handled the C programming language, GCC 1.0 was released in 1987, and the compiler was extended to compile C++ in December of that year.[2] Front ends were later developed for Fortran, Pascal, Objective C, Java, and Ada, among others...GCC 4.2.1 will be the last release of GCC covered by version 2 of the GNU General Public License. All future releases will be released under GPL version 3. » « )

Posted in C++, métaprogrammation | Tagué: | 1 Comment »

Django on the Java Virtual Machine : django on jython 2.5

Posted by patrick sur février 4, 2008

Source: http://www.infoq.com/news/2008/01/django_on_jython

Alors que jython semblait un peu marqué le pas depuis quelques années, on apprend que le développement de la version 2.5 est prévue pour cette année.


The Jython developers are working hard on producing Jython 2.5 which aims to align Jython with CPython 2.5 and provide a much cleaner and consistent code base.

A side goal of Jython 2.5 is to try to get some CPython frameworks working, especially the web frameworks, for example:

  • Django
  • Pylons
  • TurboGears
  • Twisted

InfoQ recently had the opportunity to interview Jim Baker, a python evangelist and contributor to Django on Jython (DoJ), to find out what is expected and when.

What is the expected release date for Django on Jython?

This year. It’s predicated on the next release of Jython. See #2 for that planning. Django in contrast just works, with only minor changes, thanks to a lot of work that many other people did in identifying (minor) Jython incompatibilities. Now most of the problems we have identified actually occur only in testing, where Django makes certain assumptions about Python should run that don’t apply to Jython. An example of such an assumption that the hash algorithm is the same for dictionary implementations; because we use Java’s (ConcurrentHashMap), this is not the case. However, that’s an artifact of the testing process, Django doesn’t really care about that. Still, we plan to certify this by passing all the tests (fixed as necessary).

What version of Jython is going to be required?

Jython 2.5 – equivalent to CPython 2.5 (or what is conventionally called Python!) is what we are targeting in the Jython project. This is actually moving very fast. We have a 2.5 compiler that’s available for experimental usage, but it’s getting more and more robust as we have additional people testing it. This « newcompiler » was initiated by a Google Summer of Code project that I mentored. (Bruce Eckel mentioned this in a blog post. We in fact hit that mid-September date!) At the Python Conference« A New Compiler for Jython » at PyCon. in mid-March, we will be setting the specific target based on where we are. Tobias and I will also be presenting our paper  « A New Compiler for Jython » at PyCon.

Is Django trying to be what Rails is for Ruby and Grails is becoming for Groovy?

Django offers comparable functionality to those web app frameworks, with ostensibly a more robust platform. So Django is written to be multithreaded, unlike RoR, which means we don’t have to go through a lot of tricks to make it work on the Java platform, such as using multiple classloaders. We currently have database support for PostgreSQL, with some work done also on MySQL. I helped write the Oracle backend for Django. We’re also planning to support Java DB (Derby).

Jim also expressed the usefulness of having a preconfigured stack available, to ease the experimentation of using Django on Jython (DoJ),

I’d like to see the following preconfigured stack available for Django on Jython (DoJ): Derby + Tomcat. This should be something that a developer can just access via a plugin from Eclipse or Netbeans or IDE of their choice, which means they can configure Derby and Tomcat directly from the IDE. It also provides an obvious migration path to other containers and databases. Perhaps more importantly, such a setup allows for easy DoJ experimentation, whether that’s for someone building a Django app, or also using tuple spaces, rules engines, PDF tools, or other parts of the heavy-lifting infrastructure available on the Java platform. This is where I think DoJ provides true compelling value.

For additional information try the following links:

———————————–8<—————————————- A voir:





http://www.jython.org/Project/index.html (« Jython is an implementation of the high-level, dynamic, object-oriented language Python written in 100% Pure Java, and seamlessly integrated with the Java platform. It thus allows you to run Python on any Java platform. »)


Posted in java, python, Web Frameworks | Tagué: , , | Leave a Comment »

Mono : C#, IKVM, Java, Ironpython, Boo, OLPC, Silverlight/Moonlight, etc…

Posted by patrick sur janvier 11, 2008

Mono est encore bien méconnu aussi voici quelques liens intéressants pour en savoir plus:

http://en.wikipedia.org/wiki/Mono_(software) (« Mono is a project led by Novell (formerly by Ximian) to create an Ecma standard compliant .NETC# compiler and a Common Language Runtime. Mono can be run on Linux, BSD, UNIX, Mac OS X, Solaris and Windows operating systems…Mono’s current version is 1.2.6 (as of Dec 12, 2007). This version provides the core API of the .NET Framework as well as partial support for C# 2.0 and Visual Basic.NET and some C# 3.0 support« )

http://www.mono-project.com/Main_Page (« Le site du projet Mono. Mono provides the necessary software to develop and run .NET client and server applications on Linux, Solaris, Mac OS X, Windows, and Unix. Sponsored by Novell (http://www.novell.com), the Mono open source project has an active and enthusiastic contributing community and is positioned to become the leading choice for development of Linux applicationsFeatures

http://www.mono-project.com/Moma (« The Mono Migration Analyzer (MoMA) tool helps you identify issues you may have when porting your .Net application to Mono. It helps pinpoint platform specific calls (P/Invoke) and areas that are not yet supported by the Mono project. While MoMA can help show potential issues, there are many complex factors that cannot be covered by a simple tool. MoMA may fail to point out areas that will cause problems, and may point out areas which will not actually be an issue. »)

http://www.mono-project.com/Languages (« Multiple languages can be used with the Mono platform. The Mono project provides some compilers (C#, Basic, JScript) and there are both open source and commercial compilers that can be used with Mono…Mono-compatible compilers

  • C#: The main C# compiler of the Mono Project is mcs. We also have gmcs, which includes previews of several new C# features, including generics and nullable types. In the future, ‘gmcs’ will become the default compiler.
  • Java: Java applications can run in Mono, see the Java page for more details.
  • Boo: The Boo (http://boo.codehaus.org/Home) language is a scripting language similar to Python designed for the .NET Framework. For details on the particular language features see the Boo Language Features (http://boo.codehaus.org/Language+Features) page.
  • Python There are two possible choices here: PythonNet and IronPython.
    • PythonNet: Brian Lloyd (mailto:brian@No.Spam.zope.com) wrote a bridge to link the Python runtime with the .NET runtime. More information on the PS.NET project can be found here (http://pythonnet.sourceforge.net/). This uses the real Python engine and provides a bridge between the Python world and the .NET world to interoperate.
    • IronPython: is Jim Hugunin’s compiler for Python, it is a complete implementation of Python from scratch that compiles Python code into native CIL. More information is available on the IronPython site
  • GCC: In 2006, the Gcc4cil project was publicly announced. For now it supports the C language but it could be extended to support more gcc front ends..
  • Ruby Ruby.Net (http://www.plas.fit.qut.edu.au/rubynet/) from Queensland University. The compiler can be used to statically compile a Ruby source file into a verifiable .NET v2.0 assembly or it can be used to directly execute a Ruby source file (compile, load and execute). IronRuby (http://www.wilcob.com/Wilco/IronRuby.aspx) from Wilco Bauwer, includes an interactive Ruby Console and works with Mono.
  • …etc »)

http://www.mono-project.com/Java (« Mono is able to run Java code side-by-side with .NET as well as having Java and .NET object interoperate with each other. This is done with IKVM (http://www.ikvm.net) the Java VM implementation that runs on top of .NET and Mono. IKVM was developed by Jeroen Frijters for the .NET Framework. Zoltan Varga ported it to Mono and fixed the Mono runtime to support the features required by IKVM. The class library runtime for IKVM is the GNU Classpath which is rapidly advancing but not entirely complete. IKVM is fully supported by Mono and its part of the standard Mono package distribution. As it stands today, it is able to run popular applications like Eclipse and DerbyThere are two possible ways of using IKVM: one is to use it as a Just-in-Time compiler which translates the Java bytecodes into .NET Intermediate Language as it goes. But this means that at runtime you are compiling things twice: the Java-to-CIL JIT and the CIL-to-Native JITExposing .NET Libraries to Java Now, Gtk# is a .NET assembly (this is the ECMA lingo for « library »), and Java does not know anything about this. It is necessary first to generate some stubs for these classes to let the Java compiler knows about the types defined in the C# world. This is done using the netexp.exe program from IKVM, like this:

$ mono netexp.exe /mono/lib/mscorlib.dll
$mono netexp.exe /mono/lib/mono/gtk-sharp/gtk-sharp.dll
$ mono netexp.exe  /mono/lib/mono/gtk-sharp/glib-sharp.dll
$ mono netexp.exe /mono/lib/mono/gtk-sharp/atk-sharp.dll

The above commands basically « imports » all of the types and their definitions into something suitable for Java to consume, the result is:

$ ls *.jar
atk-sharp.jar  glib-sharp.jar  gtk-sharp.jar  mscorlib.jar

The netexp.exe program will import all of the types into the « cli » namespace. So if you had a class called « Gtk.Window », it will be exposed to Java as « cli.Gtk.Window »…How Complete is Mono/IKVM ? Mono and IKVM depend on the GNU Classpath, so it is as complete as open source Java, but you get the added advantage of accessing any Mono/.NET libraries as well. Today Mono/IKVM can run large applications like Eclipse, Jython and JBoss. Screenshot of Eclipse running on Mono . »)

http://tirania.org/blog/texts/gtkjava.html (« So today I figured it would be an interesting excercise to write a small Gtk# application with Java. To do this, I used IKVM the Java VM implementation that runs on top of .NET and Mono. There are two possible ways of using IKVM: one is to use it as a Just-in-Time compiler which translates the Java bytecodes into .NET Intermediate Language as it goes. But this means that at runtime you are compiling things twice: the Java-to-CIL JIT and the CIL-to-Native JIT. Gtk# is really a bad name. Because Gtk# is not limited to C#, any programming language in the .NET framework can use it today and because it covers more than only the Gtk API, it covers various other components of the GNOME Development Platform.« )


  • Novell (http://www.novell.com): Novell uses Mono for both client and server applications:
  • Otee (http://www.otee.dk): Their Unity 3D game modeling tool uses Mono so customers can build cross-platform video games. Their engineers have also spoken about their Mono use on the Mono mailing list. Read the Otee success story here.
  • Medsphere (http://medsphere.com): The Medsphere OpenVista software allows physicians to access complete patient health information at the point of care, and it runs on both Windows and Linux, thanks to Mono. Medsphere customers now have the flexibility to choose the OS that is right for them, without worrying about application availability.
  • Quantifi Solutions: (http://quantifisolutions.com) Specialists in complex financial instruments, Quantifi Solutions use Mono to mix C# and C++ code in their finance modeling software. Their financial models are refined constantly, so they need code that is easy to manage and easy to maintain, while still running fast enough to keep up with the markets. One of the Quantifi engineers discusses their implementation here in the mailing list archives
  • Versora : Windows-to-Linux migration specialists Versora used Mono and C# to produce a cross-platform tool that helps companies move system and application setttings and user data. Read their success story here.
  • Mainsoft uses Mono for their Grasshopper product which allows ASP.NET applications to be deployed on J2EE servers.
  • Gaia (http://ajaxwidgets.com) a company that offers Ajax-based ASP.NET controls under a dual-licensing scheme: GPL or proprietary. Learn more from them here .
  • Wikipedia (http://wikipedia.org): WikiPedia uses Mono for its search facilities. The indexing and the actual searching is done by Mono-based applications.

http://tirania.org/blog/archive/2008/Jan-04.html (« Les motivation de Miguel De Icaza pour développer mono et silverlight:…I have been using Linux as my main desktop operating system since 1992 and endured every missing feature, every broken driver, every broken X setup and every missing application since I started. I did so because it was free software, and I had decided that I wanted to run my entire system with free software. I felt that dog fooding Linux and improving Linux on a day-to-day basis would help improve this OS as opposed to improving a proprietary OS…From my perspective, it is crucial for Linux to have good support for Silverlight because I do not want Linux on the desktop to become a second class citizen ever again. Robert, you are asking those of us that use FOSS operating systems to « take one for the team » by not endorsing Silverlight, but yet, you are not willing to live among us. If you are going to preach, preach by exampleThe core of the debate is whether Microsoft will succeed in establishing Silverlight as a RIA platform or not. You believe that without Moonlight they would not have a chance of success, and I believe that they would have regardless of us. In fact, I believe strongly that it is part of Microsoft becoming more open and adapting itself to the multitude of shifts in this industry (open sourcing IronPython, IronRuby, the DLR, the JS library for ASP.NET, the MS-PL, the MS-RL, opening up their code, and so on)….Now, regardless of the strategic discussion about endorsing Silverlight, there are technicalities about Silverlight that make it a fascinating platform. I personally want to write cross platform web applications using C#, Boo, Python and Ruby. And that matters to me, and matters to others. And I have loved Silverlight since it embedded the CLR runtime. Nothing new there, you can read the gory details of my fascination from back then…What prevents anyone from taking the Moonlight source code, embracing it, extending it, innovate with it, prototype with it, and enter the same cycle that Linux, or web browsers have entered? Or someone turning it into a standard? Nothing. The only thing preventing it is lack of imagination. « )

http://wiki.laptop.org/go/Mono (« Sugar activities are usually written in Python using the Python Activity API. This page documents how it is possible to use Mono to write a Sugar activity. With Mono, you can use any underlying language like C# or Boo. »)

http://tquerci.blogspot.com/2008/01/mono-on-olpc-one-laptop-per-child.html (« After a lot of time I’m finally releasing the first version of Sugar assembly to « sugarize » a Mono application. This assembly is needed to integrate a Mono application with the Sugar environment so it can run on an OLPC device. This version allows creating applications that use GTK# forms created programmatically or by a Glade resource fileI have ported two applications to the OLPC device: GBrainy and MonkeysMemory. The first application is an interesting application to « improve » your brain, while the second one is a simple « Memory » game that I wrote to play with my children.« )




  • Gtk# (« This toolkit is a .NET binding for the Gtk+ toolkit. It is in active development, and there are various applications in the Mono world that use it (Monodoc, Monocov, Mono’s Debugger and various smaller applications, a more complete list is available on the Gtk# Wiki. Platforms: Unix, Windows, GPE, MacOS X (using the X server)« ).

Web Frameworks


  • NPlot (http://netcontrols.org/nplot/wiki/) is a free charting library for .NET and supports various kinds of graphic modes. It boasts an elegant and flexible API. NPlot includes controls for Windows.Forms, ASP.NET and a class for creating Bitmaps. A GTK# control is also available.
  • ZedGraph (http://zedgraph.org) ZedGraph is a set of classes, written in C#, for creating 2D line and bar graphs of arbitrary datasets. The classes provide a high degree of flexibility — almost every aspect of the graph can be user-modified. At the same time, usage of the classes is kept simple by providing default values for all of the graph attributes. The classes include code for choosing appropriate scale ranges and step sizes based on the range of data values being plotted.


  • Mono.Addins is a generic framework for creating extensible applications, and for creating libraries which extend those applications. This framework is derived from the add-in engine used by MonoDevelop, although it has been completely rewritten and improved in many ways to make it more generic and easier to use. The MonoDevelop add-in engine was an improvement over the SharpDevelop engine, which took many ideas from the Eclipse add-in engine. Mono.Addins has been designed to be useful for a wide range of applications: from simple applications with small extensibility needs, to complex applications (such as MonoDevelop itself) which need support for large add-in structures.

http://www.mono-project.com/Moonlight («  Silverlight 1.1 (http://silverlight.net) is a new development technology for the Web created by Microsoft based on the CLR that augments it with a 2D retained graphics system and media playback engine and ships a subset of the standard .NET libraries. Currently the Moonlight project supports both Silverlight 1.0 (canvas + browser-based scripting) as well as 1.1 applications (canvas + ECMA CLI powered execution engine). Building an open source implementation on top of Mono is an obvious choice as Mono has most of the technologies required to implement it but is missing a few components. In this page we will track the work required and the design decisions involved in creating an open source version of itCurrently Moonlight is not packaged as it is still under heavy development. In the future we will provide package repositories for all major distributions through the OpenSUSE Build Service (http://build.opensuse.org) as well as a Mozilla extension that will make the installation experience similar to the one that Windows and MacOS users have today. « )

Posted in 2008, Distribution de logiciel, java, logiciel libre, openSUSE build service, packaging, python, Web Frameworks | Tagué: , , , | 1 Comment »

Programmation : python versus C#3

Posted by patrick sur janvier 7, 2008

Quelques exemples de code Python versus C#3:

http://brad.livejournal.com/2354680.html (« Cet article permet de comparer l’écriture d’un programme simple entre différents langages: Tcl, Ruby 1.8, Ruby 1.9, C#3, Perl. On apprend aussi que chez Google Python est un langage bien employé: « Google has a shitload of code and infrastructure. Google also has a shitload of engineers that altogether know a shitload of languages. If every engineer were allowed to write in his/her favorite pet language of the week, the necessary explosion of substandard bindings for each library * each language would be unmaintainable. Given that Perl/Python/Ruby are all effectively the same, it makes sense to standardize on one. Python has the right mix of learnability, readability, industry/community support, etc. I don’t object to having to write in Python… it makes a ton of sense

C# Code

using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;public class AnagramNames {
 public static void Main(string[] args) {

 	var names = from name in File.ReadAllLines("dist.male.first") select name.Split(' ')[0];
 	var pairs = from pair in (
 		from name in names group name by SortCharsInString(name)
 	) where pair.Count() > 1 select pair;

foreach (var pair in pairs) {
 		Console.WriteLine(String.Join(",", pair.ToArray()));

 public static string SortCharsInString(string s) {
 	char[] arr = s.ToArray();
 	return new string(arr);

Python Code

by_anagram = {}
for name in [l.split()[0] for l in open("dist.male.first")]:
        by_anagram.setdefault("".join(sorted(name)), []).append(name)
print "\n".join([" ".join(n) for n in by_anagram.itervalues() if len(n) > 1])

http://www.25hoursaday.com/weblog/2008/01/02/DoesC30BeatDynamicLanguagesAtTheirOwnGame.aspx(« Un article comparant C#3 et Python: Does C# 3.0 Beat Dynamic Languages at their Own Game? For the past few years I’ve heard a lot of hype about dynamic programming languages like Python and Ruby. The word on the street has been that their dynamic nature makes developers more productive that those of us shackled to statically typed languages like C# and Java. A couple of weeks ago I decided to take the plunge and start learning Python after spending the past few years doing the majority of my software development in C#. I learned that it was indeed true that you could get things the same stuff done in far less lines of Python than you could in C#. Since it is a general truism in the software industry that the number of bugs per thousand lines of code is constant irrespective of programming language, the more you can get done in fewer lines of code, the less defects you will have in your software. Shortly after I started using Python regularly as part of the prototyping process for developing new features for RSS Bandit, I started trying out C# 3.0. I quickly learned that a lot of the features I’d considered as language bloat a couple of months ago actually made a lot of sense if you’re familiar with the advantages of dynamic and functional programming approaches to the tasks of software development

After getting up to speed with Python and then comparing it to C# 2.0, it was clear that the dynamic features of Python made my life as a programmer a lot easier. However something interesting happened along the way. Microsoft shipped C# 3.0 around the same time I started delving into Python. As I started investigating C# 3.0, I discovered that almost all the features I’d fallen in love with in Python which made my life as a developer easier had been integrated into C#. In addition, there was also a feature which is considered to be a killer feature of the Ruby programming language which also made it into C# 3.0

The capability of a programming language to treat functions as first class objects that can be the input(s) or the output(s) of a function call is a key feature of many of today’s popular « dynamic » programming languages. Additionally, creating a short hand syntax where anonymous blocks of code can be treated as function objects is now commonly known as « lambda expressions ». Although C# has had functions as first class objects since version 1.0 with delegates and introduced anonymous delegates in C# 2.0, it is in C# 3.0 where the short hand syntax of lambda expressions has found its way into the language. Below are source code excerpts showing the difference between the the lambda expression functionality in C# and IronPython

C# Code

//decide what filter function to use depending on mode

Func<RssItem, bool> filterFunc = null;

if(mode == MemeMode.PopularInPastWeek)

   filterFunc = x => (DateTime.Now - x.Date < one_week) ;


   filterFunc = x => x.Read == false;

IronPython Code

#decide what filter function to use depending on mode
filterFunc = mode and (lambda x : (DateTime.Now x.date) < one_week) or (lambda x : x.read == 0)

Although the functionality is the same, it takes a few more lines of code to express the same idea in C# 3.0 than in Python. The main reason for this is due to the strong and static typing requirements in C#. Ideally developers should be able to write code like

Func<RssItem, bool> filterFunc = (mode == MemeMode.PopularInPastWeek ? x => (DateTime.Now - x.Date < one_week) : x => x.read == false);

However this doesn’t work because the compiler cannot determine whether each of the lambda expressions that can be returned by the conditional expression are of the same type. Despite the limitations due to the static and strong typing requirements of C#, the lambda expression feature in C# 3.0 is extremely powerful.

You don’t have to take my word for it. Read Joel Spolsky’s Can Your Programming Language Do This? and Peter Norvig’s Design Patterns in Dynamic Programming. Peter Norvig’s presentation makes a persuasive argument that a number of the Gang of Four’s Design Patterns either require a lot less code or are simply unneeded in a dynamic programming language that supports higher order functions. For example, he argues that the Strategy pattern does not need separate classes for each algorithm in a dynamic language and that closures eliminate the need for Iterator classes. Read the entire presentation, it is interesting and quite illuminating.

Python vs. C# 3.0: List Comprehensions vs. Language Integrated Query

A common programming task is to iterate over a list of objects and either filter or transform the objects in the list thus creating a new list. Python has list comprehensions as a way of simplifying this common programming task. Below is an excerpt from An Introduction to Python by Guido van Rossum on list expressions

List comprehensions provide a concise way to create lists without resorting to use of map(), filter() and/or lambda. The resulting list definition tends often to be clearer than lists built using those constructs. Each list comprehension consists of an expression followed by a for clause, then zero or more for or if clauses. The result will be a list resulting from evaluating the expression in the context of the for and if clauses which follow it.

Below is a code sample showing how list comprehensions can be used to first transform a list of objects (i.e. XML nodes) to another (i.e. RSS items) and then how the resulting list can be further filtered to those from a particular date.

IronPython Code

# for each item in feed
# convert each <item> to an RssItem object then apply filter to pick candidate items
items = [ MakeRssItem(node) for node in doc.SelectNodes(« //item »)]
filteredItems = [item for item in items if filterFunc(item)]

My friend Erik Meijer once observed that certain recurring programming patterns become more obvious as a programming language evolves, these patterns first become encapsulated by APIs and eventually become part of the programming language’s syntax. This is what happened in the case of the Python’s map() and filter() functions which eventually gave way to list comprehensions.

C# 3.0 does something similar but goes a step further. In C# 3.0, the language designers made the observation that performing SQL-like projection and selection is really the common operation and not just filtering/mapping of lists. This lead to Language Integrated Query (LINQ). Below is the same filtering operation on a list of XML nodes performed using C# 3.0

C# 3.0 Code

//for each item in feed

// convert each <item> to an RssItem object then apply filter to pick candidate items

var items = from rssitem in

              (from itemnode in doc.Descendants("item") select MakeRssItem(itemnode))

            where filterFunc(rssitem)

            select rssitem;

These are two fundamentally different approaches to tackling the same problem. Where LINQ really shines is when it is combined with custom data sources that have their own query languages such as with LINQ to SQL and LINQ to XML which map the query operations to SQL and XPath queries respectively.

Python vs. C# 3.0: Tuples and Dynamic Typing vs. Anonymous Types and Type Inferencing

As I’ve said before, tuples are my favorite Python feature. I’ve found tuples useful in situations where I have to temporarily associate two or three objects and don’t want to go through the hassle of creating a new class just to represent the temporary association between these types. I’d heard that a new feature in C# 3.0 called anonymous types which seemed like it would be just what I need to fix this pet peeve once and for all. The description of the feature is as follows


C# has added features that make it close to being on par with the expressiveness of functional and dynamic programming languages. The only thing missing is dynamic typing (not duck typing), which I’ve come to realize is has a lot more going for it than lots of folks in the strongly and statically typed world would care to admit. At first, I had expected that after getting up to speed with C# 3.0, I’d lose interest in Python but that is clearly not the case.

I love the REPL, I love the flexibility that comes from having natural support tuples in the language and I love the more compact syntax. I guess I’ll be doing a lot more coding in Python in 2008. « )

Posted in 2008, C_sharp, python | Tagué: | Leave a Comment »

Compte rendu de la conférence Ruby/Ruby On Rails du mercredi 19 décembre 2007 à Grenoble

Posted by patrick sur janvier 7, 2008

Bonjour et bonne année 2008 (1) mais aussi 5768, 1428, 1386, 4405, etc. 🙂

C’est avec plaisir que j’ai assisté à la conférence sur Ruby et Ruby On Rails. Etant un fan du langage Python, j’apprécie à sa juste valeur le langage Ruby et son framework Web bien connu Ruby On Rails. Cela fait plaisir de voir que je ne suis pas le seul à apprécier ce genre d’environnement (avec Python il y a Django, Grok, Pylons) et qu’il est bien regrettable que les entreprises ne pensent qu’à l’artillerie lourde JEE même pour des applications petites ou moyennes.

La conférence s’est déroulée en 2 parties. D’abord une présentation de Ruby et ensuite une présentation de Ruby On Rails.

Ici, le support de la conférence: http://www.guilde.asso.fr/rencontres/20071219/Ruby_Rails_Introduction_PoR_2007_longue_v2.pdf
Ce que j’ai appris:

– le modèle objet de Ruby est fortement inspiré de Smalltalk

– Ruby applique le principe POLS ( principle of least surprise)

– les blocs sont employés partout dans Ruby

– il n’y a pas d’héritage multiple mais on peut utiliser des mixins (étend les compétences d’une classe en lui rajoutant une série de méthodes)

– les conventions de nommage sont importantes

– il y a un haut niveau de métaprogrammation

– Ruby est bien adapté pour implémenter des langages spécifiques (DSL)

– pour les grosses applications il faut utiliser n instances de mongrel derrière un serveur Apache faisant office de répartisseur de charge. (« One popular configuration is to run Apache 2.2 as a load balancer using mod_proxy_balancer in conjunction with several Mongrel instances, with each Mongrel instance running on a separate port. This is something that can be configured very easily using the mongrel_cluster management utility. Apache can divide the incoming requests among the available Mongrel processes, and, with careful configuration can even serve static content itself without having to delegate to Mongrel. »)

– Sun s’intéresse fortement à Ruby ce qui explique que de plus en plus de développeurs Java s’intéressent à Ruby. La version 6 de Netbeans intègre Ruby et Ruby On Rails (« Since version 6.0, Netbeans allow IDE development with Ruby and JRuby, as well as Rails for these two implementations of Ruby…It is also possible to create directly Ruby projects or Ruby on Rails projects, using the reference Ruby implementation, or using JRuby (the Java implementation of Ruby) . »)
Sites à voir:

http://www.rubyfrance.org/ (« Site de l’association francophone des utilisateurs du langage de programmation Ruby« )

http://www.railsfrance.org/ (« Rails est un framework, basé sur le langage Ruby, permettant le développement rapide d’applications web utilisants le modèle MVC (Modèle-Vue-Contrôleur). »)

Laurent Julliardhttp://paris.onrails.info/conferenciers (« Laurent Julliard est un fervent utilisateur du langage Ruby depuis 2000. Traducteur de l’ouvrage « Agile Web development with Rails » pour Eyrolles, il a en outre participé a plusieurs projets Ruby dont l’environnement de développement FreeRIDE. Il s’est investi de longue date dans le mouvement Open Source en créant le premier groupe d’utilisateur Linux français en Janvier 1995 (La GUILDE). Après avoir occupé des postes de leader techniques et d’architecte logiciel dans les laboratoires de R&D de Hewlett-Packard et de Xerox en France et aux Etats-Unis, il est aujourd’hui Directeur Associé de Nuxos Group. »)

http://www.journaldunet.com/developpeur/outils/interview/07/1210-paris-on-rails.shtml (« Quels sont les points forts du framework Ruby on Rails ? Après 10 ans de développement d’applications Web avec des logiques métier fortes, on s’est retrouvé avec une véritable cacophonie au niveau des frameworks, les composants partant un peu dans tous les sens. Face à cette problématique, Rails propose un cadre reposant sur le modèle MVC, Modèle Vue Contrôleur. L’idée était d’appliquer ce modèle de développement qui a fait ses preuves à l’univers de la programmation Web... Ecrit en Ruby, Rails a donc proposé de couvrir ces trois couches. D’où sa qualification de full-stack application framework. C’est d’ailleurs pour cette raison que David Heinemeier Hansson, le créateur du framework, a indiqué qu’il n’avait rien inventé de nouveau. Ruby on Rails agrège des bonnes pratiques en les intégrant à un outil de façon cohérente…

…Sun sponsorise la conférence Paris on Rails cette année. Comment cet acteur se situe-t-il vis-à-vis du projet ? Le buzz généré par Rails a entraîné l’apparition de clones, notamment PHP (CakePHP, Symphony) et Python (Django, TurboGears, Pylons). Des développeurs ont également travaillé au portage de Ruby sur la machine virtuelle Java. Il s’agit de Charles Oliver Nutter et Thomas Enebo. C’est le projet JRuby. Conscient des potentialités de Rails et des limites de ses propres outils de développement, Sun a décidé de les embaucher. C’est très intéressant, dans la mesure où avec JRuby il devient possible de reprendre des classes Java dans une application Ruby via Rails. Plusieurs grandes entreprises s’intéressent déjà à cette initiative, notamment des banques du Luxembourg. Sun a déjà étendu NetBeans en y ajoutant des greffons pour Ruby on Rails. On note une initiative équivalente chez Microsoft qui a pour but de porter Ruby sur l’infrastructure .Net et la CLR (IronRuby, voir Ironpython). Même démarche du côté d’Apple qui supporte Ruby on Rails dans le système Leopard lorsqu’on installe son kit de développement

…Quel est aujourd’hui le public de Paris on Rails ? Parmi les inscrits, on compte à la fois des start-up qui privilégient des environnements de développement rapide, mais également des grandes entreprises qui s’intéressent de plus en plus à Rails, notamment au travers de cellules de veille et de projets de prototypage. Beaucoup de sites Web reposent sur Rails. C’est le cas du site de vidéos Eyeka, des sites du Figaro Madame et de la partie shopping du Nouvel Obs. Au niveau des grandes entreprises, la banque RBC Dexia a récemment adopté Ruby on Rails. Cette société a réalisé le déploiement d’une vingtaine d’applications depuis le mois de septembre dernier. Un rythme de livraison jamais atteint au sein de cette banque. Il est clair que l’arrivée de JRuby (voir Jython) est très intéressant pour les structures d’une certaine taille. Il permet en effet d’adopter Rails tout en étant capable de reprendre l’existant Java, et de s’y intégrer. Le changement peut ainsi s’effectuer en douceur…Qu’en est-il des développeurs Rails en France ? Ils sont toujours très peu nombreux comparé aux pays voisins où la communauté est plus importante. De ce fait, le coût des profils de développeur Rails est très élevé chez nous. C’est clairement un facteur bloquant l’extension de Rails en France. Nous organisons Paris on Rails notamment dans l’objectif de sensibiliser les développeurs à la technologie Rails et à ses potentialités. Historiquement, les développeurs Web français se sont beaucoup focalisés sur PHP pour les applications Web. Nous voulons les pousser à sortir des sentiers battus« )

http://en.wikipedia.org/wiki/Ruby_%28programming_language%29 (« The language was created by Yukihiro « Matz » Matsumoto, who started working on Ruby on February 24, 1993, and released it to the public in 1995. « Ruby » was named as a gemstone because of a joke within Matsumoto’s circle of friends alluding to Perl’s name. As of March 2007, the latest stable version is 1.8.6. Ruby 1.9 (with some major changes) is also in development. Poor performance of the current Ruby implementation in comparison to other more entrenched programming languages has led to the development of several virtual machines for Ruby. These include JRuby, a port of Ruby to the Java platform, IronRuby, an implementation for the .NET Framework produced by Microsoft, and Rubinius, an interpreter modeled after self-hosting Smalltalk virtual machines. The main developers have thrown their weight behind the virtual machine provided by the YARV project, which was merged into the Ruby source tree on 31 December 2006, and will be released as Ruby 2.0. »)

Dernières nouvelles:

http://www.rubyfrance.org/articles/2007/12/25/sortie-de-ruby-1-9-0/ (« Ruby 1.9.0 est disponible ! Joyeux Noël ! Ruby 1.9.0 est la première version publique de Ruby comportant une machine virtuelle, ainsi que le nouveau moteur d’expression rationnelles Oniguruma, la gestion de m17n (multilingualization, notamment une meilleure gestion d’Unicode), les fibres, une présence accrue des énumérateurs (enumerator), des nouvelles constructions syntaxiques (->() {} etc.) RubyGems 1.0.1 (sorti la semaine dernière) et Rake 0.8.0 sont désormais intégrés à Ruby, FasterCSV remplace CSV. Matz n’a pas voulu nommer cette version 1.9.1 comme initialement prévue, car certains tests ne passaient pas, cette version n’était pas assez stable à son goût. En passant, notons que Perl, langage qui a influencé le design de Ruby, fête ses 20 ans, avec la mise à disposition de Perl 5.10″)

http://www.programmez.com/actualites.php?id_actu=2608 (« Depuis le 6 décembre 2007, la version 2.0 du désormais célèbre Ruby on Rails, est disponible en version finale ! Attendue depuis plusieurs mois, cette version consolide les fonctions et les acquis des versions 1.x. Un important travail a été réalisé sur les ressources, notamment dans tout ce qui est RESTful. Dans le multivue, Rails 2 sépare le format du template du moteur de rendu. Ainsi, on peut donner à son application une interface iPhone… Des améliorations concernent aussi le support de HTML, la sécurité (par exemple : gérer une attaque XSS), la gestion des exceptions mise à niveau, l’apparition d’un nouveau stockage des sessions par un mécanisme de cookies (la session n’est plus gérée dans une base). Un gros travail a été réalisé sur Active Record pour l’alléger et l’optimiser, ainsi la désérialisation XML est supportée. Rails 2 réintroduit le debugger (installable via un simple gem, le format d’installation de Rails). Pour toute migration, il faut d’abord installer la version 1.2.6 avant de passer à la 2.0. Quant à la sortie de la 2.0 de Ruby, rien n’est encore fixé. Une première version devrait apparaître vers la mi-2008. »)

http://linuxfr.org/2007/12/11/23448.html (« Ruby on Rails, le célèbre framework basé sur le langage Ruby, permettant le développement rapide d’applications web selon le modèle MVC (Modèle, Vue, Contrôleur) sort en version 2.0. Le développement qui a duré une année a permis l’ajout de nombreuses fonctionnalités, la résolution de beaucoup de bugs, une orientation tournée vers le REST, et pas mal d’allégements au niveau du core (externalisation de fonctionnalités en greffons)…

Ressources et webservices Rails a tranché dans le débat REST – SOAP au profit du REST. Le module ActionWebservice a été sorti du core et placé en greffon pour ceux qui veulent continuer à utiliser du SOAP. ActiveResource est le nouveau module qui est similaire à ActiveRecord mais avec une approche ressource. Au passage, l’url des ressources a été modifié, l’utilisation du point virgule ( ; ) pour séparer l’action de la ressource a été remplacé par un slash ( / ), à cause de navigateurs et bibliothèques HTTP qui ne le supportaient pas en tant que séparateur de requêtes...Multi-vues Rails 2.0 sépare le format du template (html, xml, atom, rss, …) du moteur de rendu. Le template show.rhtml devient donc show.html.erb (ERB étant le moteur de rendu par défaut).
D’autres moteurs de rendus existent aussi, builder utilisé pour générer du atom+xml, et HAML principalement utilisé aujourd’hui pour générer des templates adapté à l’iPhone.
..Session basée sur les cookies
Les sessions ne sont plus stockées par défaut sur le système de fichiers du serveur web mais au niveau du client sous une forme qui ne peut pas être forgée. En revanche, le contenu sera visible, donc ce mécanisme de stockage de sessions n’est pas adapté si vous avez besoin d’y stocker une information que ne doit pas voir l’utilisateur.
« )

(1) http://fr.wikipedia.org/wiki/2008 (« L’année 2008 du calendrier grégorien correspondra aux années suivantes :

Posted in 2007, active record, machines virtuelles, ORM, REST, ruby, Web Frameworks | Tagué: , , , , | Leave a Comment »