Friday, June 19, 2009

Orange bug: “Quadrant” & Expression Blend

Orange bug is not a bug :) I’ve tested icon customization in “Quadrant” and my icon has bug shape! How assign “Oslo” model with icon? It’s very simple.

First, you create XAML GeometryPath. For this purpose you can use Microsoft Expression Blend.

r4_blend 

Next, you define Viewer Hint with “M”. Compile it and deploy to “Quadrant” repository (details:  Help –> Quadrant Repository Connection).

r4_icon

Finally, you restart “Quadrant” and you see the icon with the type you set in Viewer Hint.

I have defined “Quadrant” extensions for Form instances in my last example: User interface modeling with simple DSL.  You can download  it here.

Wednesday, June 17, 2009

"MGrammar" XAML Samples & Ultra Flexible Event Pattern Mesh Sample – my versions compatible with May CTP

There’re many samples which work with the newest “Oslo” May CTP on the Oslo Developer Center, but not all.  I’ve successfully tried to make my versions of two samples ("MGrammar" XAML Samples, Ultra Flexible Event Pattern Mesh Sample) compatible with new SDK . 

Running MWindow application in the first example was the most difficult thing.

You should change version of Xaml assembly from 1.0.0.0 to 3.0.0.0 otherwise you get exception at runtime.

File/assembly Class Method Line Code
MWindow.cs MWindow CreateLabelMap 92

var clrTypeResolverType = Type.GetType("System.Xaml.ClrTypeResolver, Xaml, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35");

MWindow.cs MWindow CreateLabelMap 96

var nsRecordType = Type.GetType("System.Xaml.ClrTypeResolver+XamlNamespaceRecord, Xaml, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35");

Old MGraph API still works,  but MGraphXamlReader produced bad nodes, so  bad XAML and bad tree of objects were generated. I debugged application and compared results with the program running with previous Oslo SDK on second computer. I detected code with different behavior:

File/assembly Class Method Line Code
ContentEntry.cs  ContentEntry

button1_Click

72 xamlReader.ReadToEnd()  
MGraphXamlReader.cs  MGraphXamlReader GetReader 434 GetNodes(this.root, true)
MGraphXamlReader.cs MGraphXamlReader GetNodes 343 if (this.graphBuilder.IsEntity(node))
GraphBuilder.cs MWindowGraph
Builder
IsEntity 299 EntityStencil.IsEntityBase(this, value)
System.Dataflow.dll EntityStencil IsEntityBase    

Method IsEntityBase in class EntityStencil has different implementation and returns now false for MWindow application nodes:

  • “Oslo” January SDK :  System.Dataflow.dll (1.0.0.0)  ->  EntityStencil.IsEntityBase –> true
  •   “Oslo” May SDK :  System.Dataflow.dll (3.0.0.0)  ->  EntityStencil.IsEntityBase –> false

When I created own IsEntityBase  method with old implementation and called it instead of  EntityStencil.IsEntityBase, MXamlReader produced good nodes as with previous SDK.

You can download my versions of samples compatible with new SDK below.

"MGrammar" XAML Samples

Ultra Flexible Event Pattern Mesh Sample

Monday, June 15, 2009

User interface modeling with “Oslo” – my two samples with new CTP

This post will be about my two “Oslo” samples which I refreshed yesterday.

Sample One:  User interface modeling with simple DSL

I’ve defined model and DSL. Sample usage below.

r4_parse

I’ve written simple Silverlight runtime, too. It reads “Oslo” repository and generates user interface.

 r4_runtime

With “Quadrant” you can view and visually edit model instances.

r4_instance2

Sample Two:  User interface modeling with Visual Basic DSL

I’ve created more advanced GUI DSL with Visual Basic syntax and references. Language has custom compiler which creates .mx image.   I’ve used some patterns included in Spork sample.

r4_berlin_parse

You can download my “Oslo” samples here:

Wednesday, May 27, 2009

“Oslo” May 2009 CTP

New CTP of the Oslo SDK is available and lots of changes are included. I’ll write about them.

Some of changes:

  • “M” language syntax
  • MGrammar and M are partially merged (.mgx image and mg.exe have been replaced by unified .mx image and m.exe tool)
  • new object model for MGraph and other API changes
  • IntelliPad with lots of improvements, f.e DSL Mode built-in
  • “Quadrant” (first public version!, new features, user interface without ribbons)
  • command-line tools:  new options and new tools
  • Repository: the CLR and UML domains, some features now as elements of model

There are new MSDN documentation, samples  and videos, too.

“Quadrant”

quadrant_query_vb

More information about changes:

I’m very interested in “Oslo”, so I’m planning to write more posts about new CTP in the near future. 

Tuesday, March 10, 2009

Silverlight 3.0 for Great Business Apps - video

Look at Silverlight 3.0 for Great Business Apps video on Channel 9. Brad Abrams shares with us some of the details he will be covering in his upcoming MIX09 session on Silverlight 3.0.

You can see some new features of Silverlight 3 which illustrate how easy it will be to write business applications. Some screenshots of the video below.

Silverlight Navigation Application - new project type

Silverlight Navigation Application - new project type

Silverlight Navigation Application - menu

Silverlight Navigation Application - menu

Silverlight Navigation Application - integration with browser

Silverlight Navigation Application - integration with browser

Silverlight Navigation Application - uri for XAML page

Silverlight Navigation Application - uri for XAML page 

New user experience for error messages

New user experience for error messages

New user experience for error messages - view with details

New user experience for error messages - view with details

DataGrid, DataForm and DataPager

DataGrid, DataForm and DataPager

DataGrid with grouping

DataGrid with grouping

Main validation info

Main validation info 

Validation info for field

Validation info for field

Monday, March 9, 2009

Silverlight 3 - Mix09 sessions

This post will be about Mix09 conference and new features of Silverlight 3.

mix_09

Mix09 is next week. There will be sessions about Silverlight 3. Here are some of them: 

  • MIX09-C21F  User Experience Design Patterns for Business Applications with Microsoft Silverlight 3
  • MIX09-T14F  What's New in Microsoft Silverlight 3
  • MIX09-T17F Deep Dive into Microsoft Silverlight Graphics
  • MIX09-T19F  Creating Media Content for Microsoft Silverlight Using Microsoft Expression Encoder
  • MIX09-T40F  Building Amazing Business Centric Applications with Microsoft Silverlight 3
  • MIX09-T42F  Consuming Web Services in Microsoft Silverlight 3
  • MIX09-T69M  Microsoft Silverlight Is Ready for Business

I have read descriptions of the sessions and I have noticed some features of Silverlight 3:  pixel shaders, perspective 3D, animation enhancements, bitmap APIs, improvements to the media stack (f.e H.264 ), updates to the style model, data binding improvements, improved resource handling, improvements to the web services stack, Binary XML, debug services with improved Faults support, Add Service Reference for Duplex functionality, rich data display, data input, DataGrid, DataForm, advanced data validation, application navigation.

It seems that Silverlight 3 will be a great platform for business applications.

Monday, March 2, 2009

"Oslo" SDK January 2009 CTP (Refresh)

"Oslo" SDK January 2009 CTP has been refreshed. You can download updated version.

This refresh changes three DLLs to resolve crashing problems with three-pane modes in Intellipad. Affected binaries:  Microsoft.M.Grammar.IntellipadPlugin.dll, Microsoft.M.IntellipadPlugin.dll, Microsoft.Sql.IntellipadPlugin.dll.