Victor Garcia Aprea :

Subscriptions

<September 2008>
SuMoTuWeThFrSa
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

Post Categories




Software Factories (RSS)

Adding Commands to a DSL from a 10,000ft view

The DSL Tools are a huge improvement towards getting a VS designer up and running in no time.

They make a good job of keeping you abstracted at a 10,000ft view from the inner workings of a Visual Studio designer.  You drag and drop shapes all around, defining your domain model and its graphical representation. You set properties here and there. And… you’re ready to go!

You now have thousands and thousands of automatically generated code implementing a VS designer which would have took you weeks to write if you went from scratch. That’s nice.

Now, let’s say you’re the kind of developer that likes to push the envelope and you come with the very wild idea of adding a menu command to the designer surface or a given shape of your DSL. Oh, yes, you’re wild.

At this point if you were an airplane you would have crashed. The nice 10,000ft altitude and the “I don’t have to worry about the dirty details” that you were used to while designing your domain model have changed for the feeling of hitting hard the ground.

You need to follow several steps procedure which includes things as dealing with a C++ preprocessor and knowing in lots of detail one of the most arcane format that Microsoft may have invented, the obscure world of Command Table definitions.

So, you’re already thinking of hiring a skilled senior C++ developer so you can add your menu command? Well, that’s not required if you’re willing to put the time to learn lots of non-interesting stuff about how to define a command, but if you have the time, you will eventually make it work (and that’s because you’re a wild developer, remember that).

With SFT we try to keep you at the 10,000ft for adding commands too. And in our latest public drop we’ve included an enhanced DSL Recipe Binder Wizard that will do the magic for you.

It allows you to choose between binding a command to a built-in shape (the designer surface, a link, etc) or one of your custom shapes (your foo shape), and specifying on which kind of selection you want your command to appear: single, multiple or any? Moreover, you want your command to appear only for those Foo shapes whose Bar whose property start with a ‘C’? Easy enough, click a checkbox specifying you want to customize the selection logic and you will get a partial class with an override method taking a Foo shape where you can write the single line of code required to check the Bar property.

This is how it looks like:

DslRecipeBinderWizard.png

Trust me, this is as easy as it gets.

posted Wednesday, June 06, 2007 11:39 PM by vga with 0 Comments

Deploying Guidance Packages and DSLs the easy way

Let’s do a 15 seconds recap on what currently GAX/GAT and DSL Tools offer regarding deployment.

GAT : uses Visual Studio Setup projects (can you feel the pain already?) to deploy your custom guidance packages. If you don’t need anything beyond the very simply basics this setup will work nice even if you modify your guidance package sources after you created the setup, something that sounds basic enough but it’s not true for DSL Setup projects. Now, do you want to customize any part of the Guidance Package setup process with some detail? Good luck!

DSL Tools : uses WiX-based setups (hurray!) but… they’re as “static” as something can get. If you play with your DSL Tools and you afterwards create the Setup project high chances are that you end up with a non-working setup that needs manual editing, that’s not nice at all (after all: can’t you just read my DSL project at Setup creation time and play clever outputting something that works?). Even if you manage to create a working Setup (meaning basically you didn’t touch a thing from the original created DSL Package project) it will break as soon as you need any customization. Yes, you can try to learn the setup domain model that is there and update it manually every time you make a change, but... who really wants to do this?

Sounds bad enough already? Let’s complicate things a bit more. Let’s say your solution includes more than one guidance package and more than one DSL Tools, the successfully Web Services Software Factory from p&p, in its latest incarnation v3 (under development), is an example of this, last time I checked it included a couple of guidance packages and a couple DSL designers. You want to deploy this beast? Be my guest, you will only need to ask your users to install 4 or 5 different MSIs...

We notice this and took action in SFT by introducing a new SFT Setup project feature which lets you choose from all the guidance packages and DSLs found in your solution and get a single WiX-based project that generates a single MSI that will install as many guidance packages and DSLs as you wish; this is how it looks like:

 SFTSetupProject-Wizard.png

 

All you need to do is a few mouse clicks, no manual editing required, auto-updating of the setup project, and no custom domain model to learn about.

Can this get even better? Let me know how: vga -AT- clariusconsulting -DOT- net.

Want to learn more about this feature? Check Adrian’s blog who developed it.

posted Wednesday, June 06, 2007 11:19 PM by vga with 1 Comments

Editing Text Template (T4) files: the Visual Studio/Notepad vs. SFT experience

If you have ever worked with GAX/GAT and/or the DSL Tools chances are that you had to look at existing templates and maybe customize them or create your own. Currently none of these two technologies offers you any remedies for the pain that is browsing and editing these templates with a “plain-text” experience.

So, let’s say you want to understand the serialization code in order to being able to introduce a few customizations of your own here and there. Try editing C:\Program Files\Visual Studio 2005 SDK\2006.09\VisualStudioIntegration\Tools\DSLTools\TextTemplates\Dsl\DomainClassSerializer.tt with Visual Studio (or notepad for that matter, as you’re not going to tell the difference in this case), it’s “only” 3751 lines of NO syntax coloring, NO code completion, NO quick navigation, NO nothing.

Let’s take another large file, Diagram.tt (living in the same folder as the file pointed out above). What changes in this case? It’s “only” 2469 lines in length, much shorter than the previous file, and we still get the NO nothing.

Ok, these are large files, not every text template file will be that large, granted. But can you still live with the “NO nothing” experience even for smaller files? I don’t think so, I know I can’t.

This is the reason why we have introduced a Text Template editor into SFT, for helping you today with your daily tasks in developing Software Factory projects.

Here is a single screenshot that should tease you enough to go download the bits:

T4editor-editingfile.png

You can also take a look at the Text Template Editor Quick Users Guide (lots of screenshots in there) and if you want to learn more about the technical side on how we implemented this feature you can check Jose’s blog who works on the SFT team.

posted Wednesday, June 06, 2007 9:57 PM by vga with 1928 Comments

Clarius SFT February 2007 CTP is available!!

Before you even mention this… yes… it’s March already…

I’m proud to announce that one week after the GAX February 2007 CTP release (aka v1.2) we are making available our Clarius Software Factories Toolkit February 2007 CTP that is compatible with the new GAX version. And yes… all this is happening in March!! :-)

The February 2007 CTP adds quite a bit of new very interesting stuff like:

-           Recipe Binder - bind your recipes to different parts of Visual Studio with a few clicks:

sftfeb07-001.jpg

-           Recipe Designer - visually model your recipes instead of having to deal with xml:

sftdeb07-002.jpg

-           Meta Factory - create useful and clean initial solution structures to work with:

 

 sftfeb07-003.jpg

 

-           Manifest Validation: catch manifest errors early enough while developing to save tons of time:

 

sftdeb07-004.jpg

   

You can download this CTP from here . Try it and please send us your feedback!

 

posted Wednesday, March 21, 2007 12:00 PM by vga with 0 Comments

SFT: the bridge between GAX, GAT, DSL and DSD

For the last couple of months the SFT Team at Clarius has been working hard to get the first Clarius Software Factories Toolkit CTP bits out of the door for the community to have an early peek.

We’re aiming at making the Clarius SFT a must have companion for the Microsoft Software Factories platform, helping you integrate and develop using tools like Visual Studio, GAX/GAT, Distributed Systems and DSL designers.

Some of the cool stuff that is included in the very early preview is: GAX Scripting and Eventing, DSL Integration, MetaFactory replacing GAT, WiX-based generated Setups, support for VB developers, etc.

If you’re into developing solution which combine the above mentioned technologies, believe me, you can’t miss it. Take a quick look at http://www.softwarefactoriestoolkit.net/ for more details.

Also, to celebrate our first public CTP we’re giving away one copy of MSDN Team Suite subscription between all people that tell us how they’re building software factories today (no matter which technology they’re using). This will run for the next 12 days only, so hurry up and check the website mentioned above.

posted Monday, December 18, 2006 10:00 AM by vga with 719 Comments