| By Thomas Zang | Article Rating: |
|
| January 5, 2009 09:30 AM EST | Reads: |
3,134 |
But there is still some barrier in .NET language interoperability, because each .NET language uses CTS to support its own unique set of language features. There is no guarantee that the calling code written in one language can be fully accessed by the caller language. For example, if one language provides support for unsigned integers, you can design a field with type UInt16; but from a .NET language that has no concept of unsigned integers, that field won't be useful.
To ensure that the component developed in one .NET language can be fully accessible to any other .NET languages, the .NET Framework provides a Common Language Specification (CLS) that describes a set of features commonly needed by any .NET language. In other words, it defines the minimum language requirements that must be supported by any .NET language.
Therefore, to make PowerScript a .NET language, we must ensure that it is CLS-compliant.
In CLS terminology, there are three different roles: framework, consumer, and extender.
- A CLS-compliant .NET library is called a framework. The framework will have a guarantee of interoperability across different .NET languages; therefore, it will have a wider customer base than libraries that are not CLS-compliant.
- A language that enables users to use the CLS Framework is called a CLS consumer, but the consumer can't extend the CLS Framework.
- A language that lets users use and extend CLS Framework is called a CLS extender, which is a superset of a CLS consumer (everything that applies to a CLS consumer also applies to CLS extenders).
The detail information can be referred to as the Common Language Infrastructure (CLI) Partition I.
In PB12, the PB .NET assembly/Web Service will be targeted as the CLS Framework. PB's classic IDE will be targeted as the CLS consumer. The new WPF workshop IDE will be targeted as the CLS-compliant extender that lets users consume and extend the .NET CLS Framework and produce PB's own CLS Framework (PB .NET assembly/Web Service) for consumption by other .NET languages.
Figure 1 shows the relationship among CTS, CLS, and various .NET languages. As you can see, all .NET languages fully support CLS features and partially support their own set of CTS features. They have some common features, but they all have their own unique features as well.
In terms of the language interoperability in PB12 PowerScript will be CLS-compliant, which means that PowerScript will be able to consume and extend any CLS-compliant resources produced by other .NET languages and produce PB .NET assemblies/Web Services as CLS-compliant component.
The non-CLS-compliant .NET resources will be considered to be consumed or extended case-by-case. For example if the resource only involves unsigned integer types that are not CLS-compliant types, PB will be able to support it.
On the other hand, since PowerScript has its own unique set of language features, many of them are not CLS-compliant, therefore, the overall functionality of PowerScript will go beyond CLS rules, and PB .NET target applications (Windows Forms, Web Forms, or WPF) don't have to be CLS-compliant, users can use any language feature to develop their .NET applications.
As we all know, System.Object type is the root type of all .NET types. In PB12, the type system of PowerScript will be enhanced. All PB primitive types will be equivalent to their corresponding .NET primitive types, and the functionality of the .NET Sytem.Enum type and the .NET System.Array type will be merged with that of the PB enum type and PB array type, respectively. The PB PowerObject type will also inherit from .NET System.Object type. Finally System. Object type will be the root type of all PB types as well.
In .NET, an interface defines a contract. A class that implements an interface must adhere to its contract. In PB12, users will be able to define their own interfaces, which can include methods, properties, events, and indexers. The new syntax is as follows:
global type ISub1 interface [from IBase1, IBase2]
//Functions
function string MyFunction(integer i)
subroutine MySub(string s)
//Properties
integer Myproperty1 [get, set]
integer Myproperty2 [set]
string Myproperty3[get]
//Events
event type integer MyEvent ( )
//Indexers
string this[integer i, integer j] [get, set]
end type
The PB object types Custom Class, Standard Class, Custom Visual, Standard Visual, Window, and Menu will be able to implement both user-defined PB interfaces and imported .NET interfaces.
Currently in PB, an unbounded array must be single-dimensional, which means the array-bound information of a multi-dimensional array must be specified at compile time. This limitation prevents users from declaring a multi-dimensional array without specifying the array-bound information and assigning another array to it at runtime, which is a pretty common scenario in .NET programming. For example, a Web Service may return a multi-dimensional array, whose size is unknown at compile time.
In PB12, a single-dimensional array will be enhanced so it can be dynamically created. For example, int arr[] which is an unbounded single-dimensional integer array.
At runtime, users can create a single-dimensional array as follow:
arr = create int[2 to 5]
which creates a single -dimensional integer array, with indexes of the one dimension being 2 to 5.
Published January 5, 2009 Reads 3,134
Copyright © 2009 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Thomas Zang
Thomas Zang is a staff software engineer at Sybase. He works in the Singapore kernel team of the PB department and is in charge of the PowerScript language enhancement project in PB12.0.
- Kindle 2 vs Nook
- Cloud Computing on Gartner's Top 10 List and SYS-CON Events' 2010 Calendar
- Confessions of a Ulitzer Addict
- IBM Hardware Chief, Intel VC Exec Arrested in Insider Trading Scam
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- Ulitzer.com Named Exclusive "New Media" Sponsor of Cloud Computing Conference & Expo
- Moving Your RIA Apps into the Cloud: Seven Challenges
- Adobe’s Aiming ColdFusion at Multiple Clouds
- Windows 7 – Microsoft’s First Step to the Cloud
- Ulitzer Provides a Powerful Social Journalism Platform
- Jill Tummler Singer, Deputy CIO of CIA, Keynotes at GovIT Expo
- Open Source Mobile Cloud Sync and Push Email
- Kindle 2 vs Nook
- The Difference Between Web Hosting and Cloud Computing
- Cloud Computing on Gartner's Top 10 List and SYS-CON Events' 2010 Calendar
- Ajax in RichFaces 3.3, JSF 2 and RichFaces 4
- Confessions of a Ulitzer Addict
- IBM Hardware Chief, Intel VC Exec Arrested in Insider Trading Scam
- My Thoughts on Ulitzer
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- Ulitzer.com Named Exclusive "New Media" Sponsor of Cloud Computing Conference & Expo
- US Post Office Hops a Ride on NetSuite’s Cloud
- Moving Your RIA Apps into the Cloud: Seven Challenges
- Adobe’s Aiming ColdFusion at Multiple Clouds
- Building a Drag-and-Drop Shopping Cart with AJAX
- What Is AJAX?
- Google Maps! AJAX-Style Web Development Using ASP.NET
- Flashback to January 2006: Exclusive SYS-CON.TV Interviews on "OpenAjax Alliance" Announcement
- AJAXWorld Conference & Expo to Take Place October 2-4, 2006, at the Santa Clara Convention Center, California
- AJAX Sponsor Webcasts Are Now Available at AJAXWorld Website
- How and Why AJAX, Not Java, Became the Favored Technology for Rich Internet Applications
- "Real-World AJAX" One-Day Seminar Arrives in Silicon Valley
- AJAXWorld University Announces AJAX Developer Bootcamp
- AJAX Support In JadeLiquid WebRenderer v3.1
- Where Are RIA Technologies Headed in 2008?
- Struts Validations Framework Using AJAX




































