Welcome to MSDN Blogs Sign in | Join | Help

Visual Studio 2010 & .NET 4.0 Training Kit available for download

image

So, it’s been released an updated version of the Visual Studio 2010 & .NET 4.0 Training Kit, compatible with the new VS.2010 BETA2. Here is the URL:

http://www.microsoft.com/downloads/details.aspx?FamilyID=752CB725-969B-4732-A383-ED5740F02E93&displaylang=en

Posted by cesardl | 0 Comments

My new Architecture Journal Article!!: “Model-Driven-SOA with ‘OSLO’”

The Architecture Journal September 2009

Cool!. I just got published my article regarding Model-Driven-SOA with ‘OSLO’, in ‘The Architecture Journal’. :-)

You can see it here:

http://msdn.microsoft.com/en-us/architecture/aa699436.aspx

Or you can download the whole Magazine from this URL:

http://cid-c537c2af47f728a0.skydrive.live.com/self.aspx/Public/My%20Articles/AJ21%5E_EN.pdf

Take into account that OSLO is a beta and it is starting its first steps, so I’m basically talking about the future, in this article. How it could be regarding SOA and MDD using “OSLO”.

Posted by cesardl | 0 Comments
Filed under: , , ,

Architect Forum XXIV – RIA Architecture, ‘Silverlight 3.0’ & ‘.NET RIA Services’

clip_image001

Architect Forum XXIV – RIA Architecture, ‘Silverlight 3.0’ & ‘.NET RIA Services’

Here I post some info & Presentations about the Architect Forum we delivered last week in Madrid (Sept. 23rd).

All presentations are in Spanish:

http://cid-c537c2af47f728a0.skydrive.live.com/browse.aspx/Msft%20Dpe%20Spain%20Architects%20Events/2009%20-%20Arch.Forum%20XXIV%20-%20RIA%20Silverlight%203.0%20%5E0%20.NET%20RIA%20Services

We had around 100 attendees in our room (Within the huge SIMO 2009 Expo).

Here is the agenda we delivered:

Agenda

Keynote: El futuro de las nuevas aplicaciones de negocio con tecnología Microsoft

Simon Guest
Microsoft Corp.

---

Arquitectura RIA y novedades en tecnologías Microsoft para RIA

Cesar de la Torre
Microsoft

---

Patrones RIA con Silverlight 3.0 (Patrones M-V-VM e introducción a Composite Apps y PRISM)

Miguel Angel Ramos
Microsoft 

---

Construcción de Capas de componentes de Negocio en  Arquitecturas RIA con Microsoft RIA Services

Cesar de la Torre
Microsoft

Posted by cesardl | 0 Comments

Using VSTS 2010 Beta1 Team Explorer and TFS in CODEPLEX

I'm actually setting up an environment around that (VSTS 2010 Beta1 Team Explorer and TFS in CODEPLEX), and there is a problem when trying to connect your VSTS.2010 client to the TFS in CODEPLEX. But there's a workaround you can follow here:

(Thanks Aaron)

http://blogs.msdn.com/ablock/archive/2009/05/20/for-tfs-2010-beta-1-resolving-tf31001-the-servicepointmanager-does-not-support-proxies-with-the-https-scheme.aspx

or here, (Thanks Kirill)

http://blogs.msdn.com/kirillosenkov/archive/2009/06/22/visual-studio-2010-beta1-tfs-https-tf31001-the-servicepointmanager-does-not-support-proxies-with-the-https-scheme.aspx

Posted by cesardl | 0 Comments
Filed under: ,

How To Install Windows 7 From a bootable USB Drive

image 

I just wanna have this "How to" in my blog, even for myself. :-)

What you need:

  • USB Flash Drive (4GB+)
  • Windows 7 DVD
  • A computer running Vista / Windows 7

Step 1 - Formatting the Drive
Using the command prompt, we'll use the diskpart utility. [BTW: This will erase all data on your USB drive]

  1. Plug in your USB Flash Drive
  2. Open a command prompt as administrator (Right click on Start > All Programs > Accessories > Command Prompt and select “Run as administrator” (Or type cmd in Start menu search box and hit Ctrl+ Shift+ Enter).
  3. Find the drive number of your USB Drive by typing the following into the Command Prompt window:
    diskpart
    list disk

    The number of your USB drive will listed. You’ll need this for the next step.  In my following example, I assume that the USB flash drive is disk 1.
  4. Format the drive by typing the following. (Replace the number “1” with the specific number of your disk):
    select disk 1
    clean
    create partition primary
    select partition 1
    active
    format fs=NTFS  (The Format process will take a few minutes)
    assign
    exit
    Now you should have a formatted USB flash drive ready to be made bootable.

Step 2: Make the Drive Bootable 
Next we’ll use the bootsect utility that comes on the Windows 7 disk to make the flash drive bootable. Type the followinf in the same command window that you were using in Step 1:

  1. Insert your Windows 7 DVD into your drive.
  2. Change directory to the DVD’s boot directory where bootsect is situated:
    d:
    cd d:\boot
  3. Use bootsect to set the USB as a bootable NTFS drive prepared for a Vista/7 image. I’m assuming that your USB flash drive has been labeled disk F:\ by the computer:
    bootsect /nt60 f:
  4. Close the command prompt window

Step 3: Copy the installation DVD files to the USB drive
Using Windows explorer or any other tool to copy all of the files on your DVD on to the formatted flash drive.

Step 4: Set your BIOS to boot from USB
Don't forget to check that your computer has USB boot enabled in the BIOS config.

We're done!, just plug in your USB and install Windows 7! :-)

Posted by cesardl | 0 Comments

Workshop “Oslo” introduction: The Future about Model Driven Development (June 30th 2009)


 
imageimage

One more event!. Yesterday we delivered a nice workshop regarding Model Driven Development and “OSLO”.

I talked most about MDD/MDE (Model Driven Development/Engineering), Model Drive SOA, how can be the future regarding MDD implemented with “OSLO”. Key points, risks, and long term goals and then how could everything be mapped to “OSLO”.

Miguel Llopis (Developer in “OSLO” Product Group, in Microsoft corp.) explained “Oslo” design goals and then quite a few demos regarding M language, Quadrant and Repository. 

Here I post the agenda and the presentations (URL to my SkyDrive):

http://cid-c537c2af47f728a0.skydrive.live.com/browse.aspx/Msft%20Dpe%20Spain%20Architects%20Events/2009%20-%20MDD%20and%20OSLO

AGENDA

9:00 - 9:30

Registro

 

9:30-10:45

Model Driven Development, MDD/MDE y la propuesta de futuro de Microsoft: "Oslo"

César de la Torre - Microsoft - España

10:45-11:15

Cafe

 

11:15-14:00

"Oslo" en detalle, Lenguaje M, Quadrant, Repositorio

Miguel Llopis - Microsoft Corp.

Agenda & presentations are in Spanish. ;-)

Posted by cesardl | 0 Comments

WCF Load Test tool

It’s been just released a few days ago to Codeplex: WCF Load Test. It looks pretty nice! :-)

Project Description

This tool takes a WCF trace file and a WCF client proxy, or a WCF interface contract, and generates a unit test that replays the same sequence of calls found in the trace file. The code generated is easily modifiable so that data variation can be introduced for the purpose of doing performance testing.
The tool generates code for both Visual Studio 2005 and Visual Studio 2008. It also installs a wizard into both editions of Visual Studio for creating the trace and processing it from inside Visual Studio. If both editions are present the tool is installed into both editions. The source code is a Visual Studio 2005 project.

Latest Release June 2009

A new beta was released in June 2009 adding support for ASMX web services. Download it from here.

Features

The tool has the following main features:

* Replay of captured scenario in a unit test that can be included in a load test.

* Support for the DataContractSerializer.

* Support for message contracts.

* ASMX support (beta)

* Support for proxies generated using svcutil.

* Support for clients that create proxies at run time from contract interfaces.

* Supports calls to multiple services in a single scenario.

* Supports multiple calls to the same service operation.

* Filtering by SOAP action of which messages in the trace to replay.

* Readable and modifiable code is generated.

* Automatic association of trace message with proxy method (requires all operations to have a unique SOAP action).

* Support for client and server side traces.

* A command line tool for processing traces and generating code.

* Visual Studio 2005/2008 integration (Team Developer, Team Test, Team Suite and for 2008 also Professional)) that can be used instead of the command line tool.

Posted by cesardl | 0 Comments
Filed under:

Architect Forum XXIII – VSTS.2010 & Tools for Architects (Madrid & Barcelona)

Architects Forum XXIII - Visual Studio Team System 2010 & Tools for Software Architects

Here I post some info & Presentations about the Forums we just delivered in Madrid (May 28th) & Barcelona (June 16th):

http://cid-c537c2af47f728a0.skydrive.live.com/browse.aspx/Msft%20Dpe%20Spain%20Architects%20Events/2009%20-%20Arch.Forum%20-%20VSTS.2010

 

We had around 130 attendees in Madrid and around 90 attendees in Barcelona.

 

And some pictures:

clip_image001

 

clip_image001[6]

 

clip_image001[8]

 

This was the agenda:

AGENDA (Spanish)

Hora

Descripción

Ponente

9:30-9:45

Presentación del evento y agenda

Cesar de la Torre

Microsoft

9:50-10:40

Keynote: Novedades en el ciclo de vida de desarrollo con VSTS 2010

Aurelio Porras
Jose Murillo

Microsoft

10:40 – 11:10

Coffee

11:10 - 12:15

Herramientas para Arquitectos en VSTS.2010

Diseño ‘Top-Down’ de nuevas apps y análisis ‘Bottom up’ de apps existentes

César de la Torre

Microsoft

12:20 – 13:00

Architecture Explorer ‘a fondo’

Todas las posibilidades de esta nueva herramienta.

Bruno Capuano

Avanade

13:05 – 13:45

Integración Continua con TFS 2010.

Luis Fraile
MVP VSTS

13:50 - 14:30

Cerrando el ciclo de pruebas (Camano)

Jose Aracil
TestHouse

14:30 – 15:30

Comida

15:30 – 16:15

Test Driven Development no es pruebas antes sino diseño (Desarrollo TDD, Pruebas unitarias, etc.)

Daniel Mazzini
Renacimiento

16:20 – 17:05

Novedades en metodologías y seguimiento de proyectos (Metodologías, Plantillas, etc.)

Rodrigo Corral
Plain-Concepts

17:10 – 17:30

Conclusiones y Cierre del evento

César de la Torre

Microsoft

Posted by cesardl | 1 Comments

RIA Services (Alexandria) roadmap

Dinesh Kulkarni has written a nice post about RIA Services (Alexandria) roadmap:

http://silverlight.net/forums/p/101160/230835.aspx#230835

So, RIA Services milestones are:

- July 2009 CTP
 
- PDC 2009 Beta (November) 

- First part of 2010: RTW (Like .NET 4.0)

Another key point is that we might provide support for .NET 3.5 SP1 in the server (where you run RIA Services), not just .NET 4.0. I think it is a good point for many customers who are not so agile to rapidly change to .NET 4.0. I just want to highlight that I say 'we might'. This is just a possibility, it is not a final commitment. :-)

 

Our event: ‘Biztalk Server 2009 news, ESB 2.0 Guidance & WCF LOB SDK Event’ content

WLW-BizTalk2009HandsonDays_14265-clip_image001_thumb.jpg

Today, we just run a Workshop regarding Biztalk Server 2009 news, ESB 2.0 Guidance & WCF LOB SDK.

I post the presentations here, so any attendee can get it.

You can grab it from the following SKYDRIVE:

http://cid-c537c2af47f728a0.skydrive.live.com/browse.aspx/Msft%20Dpe%20Spain%20Architects%20Events/2009%20-%20Biztalk%202009%20-%20ESB%202.0%20-%20WCF%20LOB%20SDK

BTW, this content is in Spanish, as the event was delivered in Spanish.

:-)

We have released a public Visual Studio 2010 Beta1 !!

clip_image002

Cool!, So we have just released a public Visual Studio 2010 Beta1  and, of course, VSTS 2010 and Team Foundation Server (Beta1), as well.

MSDN subscribers can actually download it today from MSDN site, but you can also install it from this public URL:

http://www.microsoft.com/downloads/details.aspx?FamilyID=85520793-68fc-4361-a8b6-dc2cff49c8d2&displaylang=en

 

Posted by cesardl | 0 Comments
Filed under: ,

"Non Windows users" in AzMan (Authorization Manager)

image

AzMan background

AzMan (Authorization Manager) is the best Microsoft technology to implement role & permissions based security for your applications.

It exists as part of Windows Server (and Windows "workstation"), since versions Windows Server 2003 and Windows XP. If you want to take a look of its management tool, just run it: "Start azman.msc" (from cmd or search).

In Windows Server 2003 old days, your app users had to be Windows users, which in fact, is the most common way. Even today, with current AzMan version, you normally will use Windows users for your apps. But, sometimes, you need non-Windows users for external apps, or for any reason you want. So, in the first AzMan version, you “could use” custom users, but in a very limited way, based on your custom app-users DB tables or any repository, but then you could not use the AzMan administration MMC snap-in to manage those users within roles, etc., you had to use just the APIs for AzMan administration, then...

In Windows Server 2008 and Windows Vista AzMan version, SQL Server support for Stores and AD LDS, was added (formerly we could store our metadata just on Active Directory, ADAM, or XML files).

For instance, this is the definition string when using SQL Server as your AzMan store:

mssql://Driver={SQL Server};Server={CESARDLSQLSERVER};/AzManDb/AzStore

Here you can see AzMan console, where you can administer your App’s permissions (operations), roles and assignments:

image

Ok, so far, I’ve told you just a bit of AzMan’s background, but nothing about "Non Windows Users" in AzMan, so there we go!

"Non Windows Users" in AzMan

Since Windows Server 2008 and Windows Vista, and now also in Windows Server 2008 R2 and Windows 7, we have AzMan MMC Snap-in support for our custom app users (DB tables, AD LDS, any LDAP directory, etc.), using a "Custom Object Picker"!!. :-)

You can check it out here, it was updated in MSDN on March 9, 2009:

http://technet.microsoft.com/en-us/library/cc770724(WS.10).aspx

Also, within AzMan help, you can read the following:

"

With Authorization Manager, you can include users or groups from any source that can be defined or referenced by the Authorization Manager application programming interface (API). In order to include users and groups from external sources, you must write or acquire a custom object picker. A custom object picker is a software component that can be installed on your system to allow an Authorization Manager administrator to access data stored in an external application.

For more information, see Authorization Manager Model (http://go.microsoft.com/fwlink/?linkid=64027).

The permissions required to perform this task will vary for each custom object picker.

Choose users or groups with a custom object picker
  1. Install the custom object picker according to the instructions provided with the non-Microsoft software.

  2. The custom object picker will be added to the Assign users and groups from menu choices under the Role Assignments node and to the drop-down list in the Members and Exclusions tab of the properties sheet for basic application groups. Choose the entry installed by the custom object picker installation process.

  3. Select users from the external source, according to the instructions provided with the custom object picker.

 

"

So, logically, it is not a ver straight forward capability, as you could have any DB schema (or any kind of repository) for your users, therefore, you must develop your "Custom Object Picker" in order to be able to select/assing your users.

I beleive there is a sample "Custom Object Picker" within Windows SDK. At the moment, the newest SDK is the Windows SDK for Windows 7 and .NET Framework 3.5 SP1 - RC (Published on 5/4/2009):

ISO: http://www.microsoft.com/downloads/details.aspx?FamilyID=6db1f17f-5f1e-4e54-a331-c32285cdde0c

Web setup: http://www.microsoft.com/downloads/details.aspx?FamilyID=f75f2ca8-c1e4-4801-9281-2f5f28f12dbd

I still have to research more on this capability ("Custom Object Picker"), I'll try to extend this post when I'll do it. :-)

RESOURCES (Some useful links about AzMan):

http://blogs.msdn.com/donovanf/archive/2007/03/08/windows-authorization-manager-azman-the-best-kept-secret.aspx

http://blogs.msdn.com/donovanf/archive/2007/04/05/azman-in-windows-vista-you-bet-and-longhorn-too.aspx

http://sourceforge.net/projects/netsqlazman/

http://forums.asp.net/t/1124227.aspx (Last post, from David Crawford, is quite interesting)

Posted by cesardl | 4 Comments
Filed under: ,

How to install a Loopback Adapter in Windows 7

It turns out that adding a Loopback adapter in Windows 7 is a little bit tricky, because we have no "Add Hardware" menu icon within Control Panel, anymore. Everything is supposed to be detected by Windows 7. (At least in current Windows 7 RC1).

But if we're talking about a "Loopback Netwrok Adapter", it really cannot be detected, as it is a virtual device..

In any case, if you want to run the Wizard where you can manually add hardware, you need to start it from the COMMAND PROMPT:

1.- Run cmd, but do it like: "Run as Administrator"

2.- From the command prompt, write down "hdwwiz.exe" and execute it. Then, the "Add Hardware Wizard" will be launched.

3.- Select: Install hardware manually --> Network Adapters --> Microsoft --> Microsoft Loopback Adapter.

You can read more info about it (step by step) in the following URL:

http://www.windowsreference.com/windows-7/how-to-install-a-loopback-adapter-in-windows-7/

 

 

Posted by cesardl | 1 Comments
Filed under:

Using “MUrl” – A textual Oslo DSL for RESTful Clients

image “MUrl” is a textual DSL and runtime for interacting with REST/HTTP services.

It is actually just a great Oslo-DSL sample, as you can download it (all its source code) from MSDN.com:

http://download.microsoft.com/download/4/0/B/40B632EC-F201-43EE-8E29-C398A9DA8468/MUrlSample.msi

As long as I know, “MUrl” has been mainly developed by Douglas Purdy. I saw his session at MIX09, which was fabulous; so now, I want to explain what “MUrl” is and how to use it. This post is, in fact, explaining most of the content that Doug told in MIX09.

So, Just like we already have within Oslo and “M” Language, the following DSLs, at different levels:

- MGraph

- MSchema (for SQL)

- MGrammar (to create custom DSLs)

We will have many more Oslo DSLs, (many of them, initially as examples), like:

- MUrl (DSL for consuming Services, this is the one I’m going to write about)

- MService (DSL for building Services, based on WCF-REST, not released, yet)

- MWeb (DSL for building Webs, based on ASP.NET, not released, yet)

- MEntity (DSL for building Entity Framework graphs, etc., not released, yet)

- Your great “MCustomSmartDSL”… ;-)

Ok, so "MUrl" is an "M" based domain specific language (DSL) that provides a very compact and intuitive mechanism to communicate with RESTful services. You can use it from INTELLIPAD (for testing) or you can even use its run time from a .NET program (I’ll show both in this post).

Using “MUrl” from INTELLIPAD.

Steps:

1.- First of all, install download from the URL I wrote up above, and install it. Or course, you need to have Oslo SDK already installed, as pre-requisite.

2.- Start INTELLIPAD and select “MURL Mode” like I show below:

clip_image002

3.- Then we can just start writing and executing HTTP requests!. Type:

http://live.com

Select that text line, and press Ctrl+Enter to execute that request. You’ll see the results in a pane on the right:

clip_image004

We can check that the HTTP status is OK, so we get the info. All right, It works!.

4.- Even better, now we’re going to consume RESTFul Web Services, like the TWITTER service.

I login into TWITTER, just to show what messages I have:

clip_image006

Right, so last message is the one that says: “Yes! OSLO and MUrl rocks!!”.

We can query info from TWITTER, like executing the following GET request:

GET http://twitter.com/statuses/public_timeline.xml

We get the HTTP results. Nice, nothing new, similar than before, but now we’re quering a REST Web Service:

clip_image008

5.- In this step we’re going to submit a message to TWITTER service using MUrl. Now, type the following text into INTELLIPAD:

POST http://twitter.com/statuses/update.xml

with [<status>Este lo voy a borrar desde MUrl....</status>]

as text/xml

If you just execute that POST, you’ll get a 401 Http error, because in order to submit content to TWITTER, you must be authenticated, and we’re not, yet:

clip_image010

We’re going to use WINDOWS CREDENTIALS MANAGER to create custom credentials for TWITTER. We’ll use it later on from MUrl.

Enter into Control Panel\User Accounts and Family Safety\Credential Manager:

clip_image012

As you can see, I have created a ‘Generic Credential’ called “Twitter”. You can do the same clicking on the “Add a generic credential” link.

It is simple; it is composed by a Credential-Name, User Name and a Password:

clip_image014

Remember the credential’s name, as that name we’re going to use it from MUrl, ok?. (In my case, I just called it “Twitter”).

Then, add the following text to the original MUrl text request we wrote:

“authenticate using [Twitter]”

clip_image016

And now…, It works!! :-). You can check it down below at my TWITTER web page:

clip_image018

BTW, I had to change MUrl internal code in order to run it using Authentication.

If you get the "Expectation Failed" error message, you have to fix it, as well. Take a look to this post:

See: http://www.biztalkgurus.com/blogs/biztalksyn/archive/2009/04/05/issue-with-the-first-release-of-murl-sample-and-twitter.aspx

So, there you have it!, you can use MUrl directly from INTELLIPAD.

 

Using “MUrl” from a .NET app.

Steps:

1.- Now we’re going to develop a .NET program which consumes MUrl DSL RUNTIME. It is a nice way to shrink .NET code…

In this case, I have a WPF app which is kind of a TWITTER message editor/submitter:

clip_image020

Take into account that I added two references to:

- MUrlLib

- System.DataFlow

Then, I wrote the following .NET code to be executed when the button ‘Upload Message to Twitter’ is pressed:

.NET CODE:

var runtime = new Microsoft.Languages.MUrl.MUrlRuntime();

string twitterCommand = @"POST http://twitter.com/statuses/update.xml with [<status>"

+ txtTwitterMessage.Text + "</status>] "

+ "as text/xml "

+ "authenticate using [Twitter]";

var statements = runtime.Parse(twitterCommand);

var result = runtime.Execute(statements.ElementAt(0));

MessageBox.Show(result.AsXml().ToString());

You can see that we’re constructing the same kind of simple MUrl text but within our .NET code… And, it just works in the same way!.

Looking into MUrl DSL M-Grammar program.

Cool!. So up to now, we’ve been just using this cool textual Oslo DSL. But because of it is just a sample, we can take a look at how it is implemented.

1.- Start INTELLIPAD and open the file “murl.mg” which you can find as part of the downloaded MUrl stuff. You’ll see something like this:

clip_image022

I want to highlight that now we’re running on MGrammar Mode, just like the custom DSL sample I wrote in this blog-post:

Creating a simple Textual DSL with Oslo, “M” Language, MGrammar and Intellipad

http://blogs.msdn.com/cesardelatorre/archive/2009/04/20/creating-a-simple-textual-dsl-with-oslo-m-language-mgrammar-and-intellipad.aspx

But in this case, it is a bit more complicated, of course.

2.- Change to MGrammar-Mode--> Tree Preview

clip_image024

It will ask you for an INPUT FILE, so…, just provide the MUrl Text we were writing!! (I called “MUrl Demo Sentences.murl”).

Then, you can see how MUrl M-Grammar program is translating MUrl text to HTTP requests data (which will be used be MUrl runtime):

clip_image026

We can even change the MUrl syntax from within the “murl.mg” file, so for instance, we can now say that in order to do a GET, you can type DAME (in Spanish) or OBTAIN, as well. And it will work just the same! ;-)

clip_image028

Well, you can research on it (murl.mg) a bit more, It is quite interesting…

So, here we go!, “MUrl”!, a great Oslo DSL Sample!

Thanks Doug for this nice development!

Posted by cesardl | 1 Comments
Filed under: , ,

Creating a simple Textual DSL with Oslo, “M” Language, MGrammar and Intellipad

image

I wrote a post about Oslo and “M” Language and how you can use it to model data. But in that case, we were not using our own custom Textual DSL, we were using just “M” Language. You can see that post here:

Starting using OSLO, “M” Language, Oslo Repository and Intellipad

http://blogs.msdn.com/cesardelatorre/archive/2009/04/20/starting-using-oslo-m-language-oslo-repository-and-intellipad.aspx

What I’m going to create now, is a Custom Textual DSL sample (DSL == Domain Specific Language), based on Oslo. It is going to be very, very simple. I just want to show the essence of “M” Language and MGrammar and how we can use Intellipad for that.

Intellipad is a text editor that comes with OSLO SDK, but as you can suppose (because of its name) it is kind of “intelligent”, I mean, it is Oslo Textual DSL oriented. ;-)

I’m using OSLO SDK January CTP (Kind of a OSLO’s Pre-Beta). You can download it from this URL:

Microsoft "Oslo" SDK - January 2009 CTP (Refresh)

http://www.microsoft.com/downloads/details.aspx?FamilyID=f2f4544c-626c-44a3-8866-b2a9fe078956&displaylang=en

Basically, Intellipad gives you support for creating custom DSLs using the MGrammar language.

1.- Starting Intellipad with MGrammar support

Launch Intellipad with sample plug-ins loaded (from the start menu, Oslo SDK,  Icon called “Intellipad (Samples Enabled)”)or pass it a startup configuration file that includes the samples directory (startup config files are specified using the /c option). An example would be: ipad.exe /c: ipad-vs-samples.xaml

In the future, the MGrammar Language support will not require loading with samples. This is just because of this beta.

So now, change Intellipad mode to “M-Grammar”, like the following:

clip_image002

2.- Input file and our model’s text data

So, instead of starting writing M-Grammar like crazy (you should know its syntax, first), we’re going to start writing our model’s data, I mean, the simplified and even natural text I would like to provide as the origin.

Because of that, create an empty file (like a .TXT file) called “My DSL Input Data.input”, for instance. Put it in any folder you like.

Therefore, we need the pane to start writing in that ‘input file’. You get that pane/window when selecting “MGrammar Mode” menu and then select “Tree Preview”, like in the following screen:

clip_image004

Then, you’ll get a dialog asking for you input file, like this one:

clip_image006

Then, go and select that empty ‘My DSL Input Data’ file.

You’ll see Intellipad in the following form:

clip_image008

Cool!, so let’s start writing something we’d like to be consumed by our TEXTUAL DSL. For instance, the following text:

"Office 2007" by "Microsoft" is "nice"

"Windows 7" by "Microsoft" is "great"

"Visual Studio 2010" by "Microsoft" is "great"

Very simple, so, regarding that text, there are several products, company-names and adjectives, and, in this case, just the terms “by” and “is” are actually my language terms. You’ll see it like this:

clip_image010

So far, very simple. Now, I’m going to write my DSL program based on M-Grammar. You can copy & paste it on the MGrammar Mode pane:

module DemosOslo

{

language MyCatalogLanguage

{

syntax Main = a:Product+ => SoftwareCatalog { valuesof(a) };

syntax Product = productName:Name "by" company:Name "is" rating:Name

=> {ProductName = productName, CompanyName = company, Rating = rating};

token Name = '"' n:(any - '"')+ '"' => n;

interleave IgnoreMe = " " | "\n" | "\r";

}

}

Then, you can see how MGrammar transforms the input text to the final form:

clip_image012

This is the generated data, in case you cannot read it on the copied screen:

SoftwareCatalog{
  {
    ProductName{
      "Office 2007"
    },
    CompanyName{
      "Microsoft"
    },
    Rating{
      "nice"
    }
  },
  {
    ProductName{
      "Windows 7"
    },
    CompanyName{
      "Microsoft"
    },
    Rating{
      "great"
    }
  }
}

Likewise, “M” Language works internally in a similar way, but it uses the M-Grammar program called M.mg (you can find it in the SDK, check it), instead the simple one we’re using here (I called it SoftwareCatalogMGrammar.mg).

Another great example is the new “MUrl” textual DSL, which is a M-based textual DSL and RunTime to build RESTFul Services clients (just the client) in a very simple way. I might write another post about MUrl, because it rocks! :-)

There’s gonna be another textual DSL to actually build RESTFul services. It is called “MService”, but it is not still released. Douglas Purdy showed it a few weeks ago in MIX09, in Las Vegas. It really looks quite nice, as well.

Just want to highlight that Oslo, “M” Language and Quadrant are tools to create any kind of DSL Tools. Oslo is a “Modeling platform for ALL”. We’re not just talking about data or web-services, we’ll be talking about modeling ANYTHING!. :-)

Posted by cesardl | 3 Comments
Filed under:
More Posts Next page »
 
Page view tracker