Sign in
[Profoundly Esoteric Image]
GarethJ's WebLog - Code generation and abstraction
Translate This Page
Translate this page
Powered by
Microsoft® Translator
Options
Blog Home
Email Blog Author
Share this
RSS for posts
RSS for comments
Search
Tags
Built with DSL Tools
Code Generation
Code samples
Community
DSL Tools
Enterprise Development
Fun
Metablog
Modeling
Pages
Razor
Sounding off
SP1
T4
Tech thrills
The real world
UML
Visual Studio
Visual Studio 11 Beta
Visual Studio 2012
VSX
Archive
Archives
June 2012
(1)
April 2012
(1)
November 2011
(1)
September 2011
(1)
June 2011
(1)
May 2011
(1)
April 2011
(1)
March 2011
(2)
January 2011
(6)
December 2010
(2)
August 2010
(1)
June 2010
(1)
April 2010
(2)
March 2010
(1)
October 2009
(1)
September 2009
(6)
May 2009
(3)
February 2009
(4)
January 2009
(2)
November 2008
(6)
October 2008
(5)
September 2008
(3)
July 2008
(2)
May 2008
(4)
April 2008
(4)
March 2008
(2)
February 2008
(9)
January 2008
(9)
December 2007
(6)
November 2007
(1)
October 2007
(3)
September 2007
(5)
August 2007
(3)
July 2007
(3)
June 2007
(5)
May 2007
(6)
April 2007
(1)
March 2007
(2)
February 2007
(5)
January 2007
(3)
December 2006
(2)
November 2006
(2)
October 2006
(3)
September 2006
(3)
August 2006
(2)
July 2006
(2)
June 2006
(5)
May 2006
(1)
April 2006
(3)
March 2006
(1)
February 2006
(3)
January 2006
(3)
December 2005
(10)
November 2005
(5)
October 2005
(3)
September 2005
(8)
August 2005
(2)
July 2005
(4)
June 2005
(5)
May 2005
(6)
April 2005
(2)
March 2005
(4)
February 2005
(4)
January 2005
(5)
December 2004
(9)
November 2004
(4)
October 2004
(13)
August 2004
(4)
July 2004
(2)
Coopetition
MSDN Blogs
>
[Profoundly Esoteric Image]
>
Coopetition
Coopetition
GarethJones
24 May 2005 9:24 AM
Comments
1
Both my colleague
Alan Cameron Wills
and
Steven Kelly
from our esteemed competitor
MetaCase
have announced a joint workshop at the
XP2005
conference in the UK.
It's pretty nice to be able to work together to discuss and promote the parts of our respective visions that we share.
Still, just to show that the competition part is as healthy as the cooperation, Steven has a
post comparing a fragment
of code I posted with how you'd do the same thing in MetaEdit. The code shows how to access link instances in a model using our respective templating languages. OK, so I'm biting ;-). What Steven doesn't mention is that he's comparing their product with an unfinished technical preview (to be fair, that's all he has to compare with right now).
Right now, the domain-specific API onto models that we generate is fairly strong in the area of classes, but weak in the area of relationships. You can access everything you need using our generic API, but today you don't get a nice, friendly, strongly-typed API for accessing your relationship instances.
Imagine for a moment that we did have such an API today.
The code we have for accessing class instances looks like this:
foreach ( ConceptB b in this.ConceptA.Bs)
{
}
It's not too big a stretch to imagine a nested loop:
foreach ( BReferencesB relationship in b.GetReferringBsLinks() )
{
}
Suddenly, the sample has much the same complexity as Steven's example.
In a later CTP, we'll have APIs more like this for link instance management.
The key here is to create the right domain-specific API, which is why we're not finalizing it in our early CTPs.
When you look at working with domain-specific APIs, then you have a good platform for making a decision on whether there is enough power in custom operators and the like to justify the extra learning needed to use a domain-specific language for the control-flow in templated artefact generation.
This Power vs Learning tradeoff will be one that will become familiar to all working with Domain Specific Languages when deciding whether they are a good fit as a solution for any given problem space.
1 Comments
Modeling
,
Code samples
,
DSL Tools
Blog - Comment List MSDN TechNet
Comments
Loading...