Sun, Microsoft Seek to Embrace Dynamic Scripting
Microsoft and Sun, in two separate initiatives, are reaching out to the dynamic scripting language communities, including popular Open Source options PHP, Perl, Python and Ruby to improve the native support for such technologies in .NET and Java. IDN talks with the men behind both initiatives, and finds out how such support could speed prototyping, web services development and integration for .NET and Java.
Microsoft and Sun, in two separate initiatives, are reaching out to the dynamic scripting language communities, including popular Open Source options PHP, Perl, Python and Ruby, to improve the native support for these dev technologies in .NET, Visual Studio and Java.
To understand just how both the .NET and Java communities think that this deeper support for dynamic languages could improve prototyping, web services development and integration for enterprise developers, let's take a look at summary positions for each.
Microsoft --"Supporting a diverse set of languages is a core focus for the Common Language Runtime (CLR) team," Peter Drayton, a program manager in Microsoft's CLR team, told IDN. "We're interested in understanding from the language implementer community what we need to provide to better support dynamic languages" in the CLR, as well as in Rotor (also known as the Shared Source Common Language Infrastructure [SSCLI]) and associated CLI specs. Improving overall support in the associated dev tools, including the next version of Visual Studio.NET (Whidbey), is also a key focus. The outreach to Open Source developers can seen as an extension of Microsoft's longstanding Project 7, which, starting in 1999, worked with a variety of commercial and academic groups responsible for developing languages to ensure that .NET would support multiple languages at runtime.
Sun -- For its part, Sun is working with Zend Technologies Ltd., co-creators of PHP, to propose a new Java Specification Request (JSR 223) to the Java Community Process (JCP). JSR 223, entitled "Scripting Pages in Java Web Applications", aims to allow PHP to interact directly with EJBs over a new kind of middleware connection, Brad Young, Zend's director of product marketing, told IDN. To be precise, JSR 223 looks to provide exact specs for writing portable Java classes that can be invoked from a page written in any scripting language. While PHP would serve as the "reference scripting language implementation," Zend officials said, its purpose is to support Java, Open Source scripting languages, and even non-Java scripting languages, such as Microsoft's Active Server Pages.
Inside Microsoft's Outreach
To get the ball rolling with the community of Open Source language devs, Microsoft held its first public BoF on the topic during last month's O'Reilly OSCON (Open Source Conference) in Portland, Oregon.
"We're looking for ideas from the Open Source language developers on what we should be doing in the runtime to make it better for Open Source dynamic languages," Brad Merrill, program manager for the .NET Developer Platform team, told the BoF gathering. "We do have core support, but we're looking for where you think there are gaps," he told the audience.
A short list of key interest areas that would facilitate Open Source languages' support of .NET enterprise applications is already on Microsoft's radar. These include:
- Looking for gaps that may arise from the fact that Open Source dynamic scripting languages use no compiler, but are interpretive.
- Exploring techniques for ways the CLR/SSCLI can help verify that Open Source languages are "safe" and "trusted" from within the .NET Framework.
- Improving methods invocations for dynamic languages running in the .NET Framework.
Microsoft is especially interested in hearing Open Source input to help determine whether it's worthwhile for .NET to offer "verifiable" program units to Open Source developers, and when or where such support should be available.
Merrill described the situation to IDN by comparing traditional commercial (called "strongly typed") dev languages to Open Source ("loosely typed") languages.
"Strongly typed languages like C#, VB.NET can be compiled into what we call 'verifiable' program units," Merrill told IDN. "The simple example is that a variable A can only be an int or a string, and not both. While loosely typed Open Source languages, such as Perl, Python, Ruby, can also be compiled to be verifiable, there are differences.
"Those [Open Source] languages allow developers to use variables without restricting their types. By that I mean that variable A could be either an int or a string. To implement this loosely typed approach without compromising program safety requires additional overhead. You can implement 'unsafely' (and retain higher performance), but the downside is that your programs will not be able to run in secure environments -- and those are where full program safety is required."
This latest outreach to support Open Source languages shouldn't imply that .NET's CLR or SSCLI don't support them now, Merrill told IDN. To date, Merrill said, "We have worked with many developers who have successfully targeted the CLR with their languages; both commercial and research implementations, so [core] functionality is all there today. But, we are also looking for experience-based feedback to help guide us as we finalize product decisions for the next version [of Visual Studio .NET (Whidbey) and the .NET Framework]. The more languages and tools available, the better the new platform, so we are trying to encourage positive growth."
Inside the Sun/Zend JSR Approach to Support Script
"The interaction [for working out JSR 223] started with us talking with Sun," Young explained. "We came to them and said, 'We have this idea for a middleware product that can connect PHP into J2EE [app server] platforms.'"
The spec request aims to help the professional, Young told IDN."Weblogs or simple hobbyists are not the focus of this JSR. A lot of enterprise developers we talk to are doing content management, web portals, etc. for their customer base and their employees, and say they could benefit from this.
"Without a formal specification for a middleware connection, companies are coming up with their own ways for bridging the gap," Young said. "One way is having some type of batch process that runs every once in a while in the background. Another way is to connect from PHP to Java via XML web services."
To avoid these costly delays, Young said, Zend recommends that where possible,customers use XML APIs to link PHP to Java.
The basis of JSR 223's middleware solution for blending scripting with Java is a new "handle-based object model." This proposed revision to Java objects has ignited some opposition to the plan.
Proponents claim the new object model would ease the ability to move objects around; provide better performance; improve memory usage; and allow for more scalable/extensible object-oriented features. Further, a new object model may be an actual requirement for new versions of PHP (5 and beyond) to work with Java effectively.
Deficiencies in Java's current object model could limit PHP's usage with Java, claims Zend's CTO and cofounder Zeev Suraski (also a co-designer of PHP). In a prepared statement, Suraski said,
For PHP to continue its growth, especially among enterprise users, it's critical that object-oriented capabilities be first-class. This is the reason we developed the Zend Engine 2 as the core of the upcoming PHP 5. And for enterprises that have Java-based business objects, we want to make utilization completely transparent and scalable. Doing this in a standard way [via JSR 223], with Sun and the JCP process, will enable PHP to be used in more places, for more mission-critical purposes.
O'Reilly: Open Source Seek Commercial Ties
with IDEs, Frameworks
Notably, the idea of better and deeper ties between commercial and Open Source software also surfaced during Tim O'Reilly's OSCON keynote. "Dynamic languages [such as Perl, Python and PHP] form the glue for bringing software components and information together to build Internet interfaces," O'Reilly said.
As maturing Internet and web services technologies enable new options for P2P, ad hoc computing, cell phones and on-demand computing, Open Source devs have key opportunities if they can allow customers to customize their applications with components and scripting options that work with their existing commercial software."
[For more on Tim O'Reilly's comments, go to O'Reilly's OSCON 2003 coverage or Phil Windley's enterprise computing weblog.]
For more on the debate, go to a JSR 223 forum at PushToTest. Another thread for the JSR 223 debate resides at Lambda the Ultiimate, the weblog for programming languages.
For more information, or to participate in Microsoft's fact-finding efforts, language devs can go to .NET Compiler developers website at GotDotNet; or they can join a DotNetLanguageDevelopers mailing list.