Feeds:
Posts
Comments

Der zweite Artikel unserer DSL-Serie bei der dotnetpro ist raus. Warum der Artikel Turmbau zu Babel heißt weiß ich nicht :-)

Bild 2

Abstract: Domänenspezifische Sprachen sind eines der vielen Mittel, um Software zu industrialisieren und vor allem zu automatisieren. Praxisnah zeigt dieser Artikel eine DSL für den Import von Mainframe-Exporten – zum Beispiel, um Daten von einem Mainframe zu importieren und dabei zu konvertieren. Eclipse Xtext leistet beim Erstellen einer passenden DSL hervorragende Dienste.

Autoren: Markus Völter und Lars Corneliussen

Model Driven Software Development

02.07.2009 18:00 in Krefeld

Bild 2
Lars Corneliussen (itemis A.G.)

Gastgeber:
GOB Software + Systeme
Europark Fichtenhain A4
47807 Krefeld

Domänenspezifische Sprachen

28.08.2009 12:15 in Wuppertal

checked-in

Lars Corneliussen | Level: 200
Steigende, tatsächliche Komplexität spiegelt sich häufig in einer großen, undurchdringlichen Codebasis wieder. Kein Wunder, dass der Ruf nach Abstraktion, nach Ausdrucksstärke lauter wird. Mit wenigen Worten mehr sagen; das ist das Ziel einer guten domänenspezifischen Sprache.

On the 5th and 6th of June German software architects and some ALT.NET buddies met at the Architecture.NET Open Space conference. It was the first event in a series and indeed a great time.

ArchitectureNET-468x120

Koe14

The event started at Friday at 9 o´clock. We had booked some rooms in the World Wide Business Center on the famous “Kö” in Düsseldorf, Germany. In total we were 22 participants.

My main take-away is that I got to know even more great people. I also have tons of new ideas and a somewhat better picture on what good software architecture is.

Find more reactions here: Architecture.NET Reactions, or have a look at the twitter stream.

I also made some pictures and videos I’d like to share:

 

Sessions I attended

  • Cloud Computing The conclusion was, that there is more fear than necessary. It’s a matter of good contracts. One thing to remember when putting software into the cloud is legal concerns. In Germany, for example, some company’s data is not allowed to be stored physically in other countries.
  • Asynchronous, Decoupling Messaging Human communication is totally asynchronous. Why not apply that to software architectures? What are the pitfalls? Are business processes really synchronous? In most cases they are not. But what are the trade-offs for synchronous processes in an async world? Great discussion!
  • Where to put status? Is there a live without session beans? Where does the session status belong? Database? Client? Middle tier? Distributed cache? Well, the answer is: it depends. But still a good discussion. I got some new ideas and even some product hints as Coherence, Terracotta and MSFT Codename "Velocity".
  • How dangerous is "cool"? What are the motivations behind introducing new technologies? Do we decide intuitively or rationally? Is there a benefit to it, or do we just want to try something new? Whom do we trust? Microsoft? The ALT.NET-Community? Gartner? Maybe the main problem in our industry is, that new technologies keep coming without leaving a chance to really learn how to apply them efficiently.
  • What is the next OOP? Discussion about possible future programming paradigms. Maybe it is component-oriented programming – just another static view on the world? Or could it be something flow-based as the actor-model? Are we just locked into Van Neumann architectures?
  • Plus many great discussions about architecture evolution, REST and much more.

Things I would have liked to talk about, but didn’t find time for are:

  • Deployment/Setup/Dependency-Management
  • Domain-specific languages for defining sw-architectures
  • Security aspects
  • How to make my customers trust in Open Source

One of my most-visited posts is the jQuery plugin “beautyOfCode” for the version 1.5 of Alex’ Syntax Highlighter. The main point of doing a wrapper was, that version 1.5 did require invalid html code.

In the new version of Syntax Highlighter this is fixed. But still, people ask for a new version of my code, too.

I finally released a new version with some more features:

  • Uses online hosting of styles, scripts and brushes. This means you only need to reference jQuery and beautyOfCode!
  • Supports the new features as smart-tab, html-script, themes, line-wrapping and much more
  • Still uses a code-tag inside a pre-tag as well as a more css-like configuration with classes instead of property syntaxes

Referencing  the plugin and configuring brushes


<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
<script type="text/javascript" src="Scripts/jquery.beautyOfCode.js"></script>

<script type="text/javascript">
    $.beautyOfCode.init({
      brushes: ['Xml', 'JScript', 'CSharp', 'Plain', 'Php']
    });
</script>

Detection, default behaviour

By default, beautyOfCode will beautify all elements matching ‘pre.code:has(code[class])”:


<pre class="code">
  <code class="javasript">
    alert("Hello, World!");
  </code>
</pre>

Explicit

If auto detection is not desired, the plugin has to be initialized differently:


<script type="text/javascript">
    $.beautyOfCode.init({
      brushes: ['Xml', 'JScript'],
      ready: function() {
        $('#mycode').beautify('javascript');
      }
    });
</script>

This would then only beautify following code:


<pre id="mycode">
  <code>
    alert("Hello, World!");
  </code>
</pre>

Initialization Options

These are the default options, which can be overridden by $.jQuery.beautyOfCode.init:


settings: {
    // should the syntax highlighter and brushes
    // be loaded dynamically
    autoLoad: true,

    // the base url to alex' hosted sources
    // http://alexgorbatchev.com/wiki/SyntaxHighlighter:Hosting
    baseUrl: 'http://alexgorbatchev.com/pub/sh/2.0.320/',

    // the baseurl for the hosted scripts
    scripts: 'scripts/',

    // the baseurl for the hosted styles
    styles: 'styles/',

    // themes from http://alexgorbatchev.com/wiki/SyntaxHighlighter:Themes
    theme: 'Default',

    // the brushes that should be loaded - case sensitive!
    // http://alexgorbatchev.com/wiki/SyntaxHighlighter:Brushes
    brushes: ['Xml', 'JScript', 'CSharp', 'Plain'],

    // overrides for configurations and defaults
    // http://alexgorbatchev.com/wiki/SyntaxHighlighter:Configuration
    config: {},
    defaults: {},

    // function to be called, when all scripts are loaded
    ready: function() {
        jQuery.beautyOfCode.beautifyAll();
    }
}

Example with current version, Django-theme and no gutter


<script type="text/javascript">
    $.beautyOfCode.init({
        theme: 'Django',
        baseUrl: 'http://alexgorbatchev.com/pub/sh/current/'
        defaults: { gutter: false },
        brushes: ['Xml', 'JScript']
    });
</script>

Options

Find a reference for all options on SyntaxHighlighter Configuration.

The options can either be specified as defaults in init, on the beautify-call or as css classes.

Specify options in code:


$('#myCode').beautify('javascript', {'wrap-lines':true, 'first-line:2'});

Specify options in html:

In this case the gutter would not be shown and the lines 3 and 6 (5 and 8 in Listing) would be highlighted.


<pre class="code">
  <code class="javasript boc-no-gutter boc-highlight[3,6]">
    alert("Hello, World!");

    function x() {
        if (true)
            x();
    }
  </code>
</pre>

Syntax for options in html:

  • The flags smart-tabs, ruler, gutter, toolbar, collapse, auto-links, wrap-lines and html-script mean true, then prefixed with boc-, and false, when prefixed with boc-no-.
  • class-name, first-line and tab-size are prefixed with boc- and followed by their values in square brackets. For example first-line[3] means, the gutter starts with a three.
  • highlight is also prefixed with a boc- and followed by a comma-separated list of line numbers in square brackets that are to be highlighted.

Sources

Find the plugin source code and a demo page on the bitbucked beautyOfCode project page. If you like the plugin, please also vote on the jQuey plugin site.

Feel free to submit issues and patches. The code is not very well tested, since I don’t use it in any production environment today.

The "Oslo” team has released the third CTP of Microsoft’s forthcoming modeling platform.

Some of the  changes are:

For more detailed information check out the team announcement and the release notes.

New Installer

oslo setup

Empty Quadrant Workspace

empty quadrant

Intellipad Splitting

intellipad-multisplit And yes, I’ll be blogging about my web-layout DSL :-)

kick it on DotNetKicks.com

Architecture.NET Open Space 2009

Am 5. und 6. Juni 2009 veranstaltet mein Arbeitgeber itemis zusammen mit Die Software-Architekten und SOPTIM einen Open Space mit dem Thema “Erprobte Konzepte für Unternehmensanwendungen in .NET”.

Die Zielgruppe sind erfahrene und angehende Softwarearchitekten.

Mehr Informationen und das Anmeldeformular gibts auf der Webseite zum Event: Architecture.NET @ mixxt

Die Idee zu diesem Event ist auf dem .NET Open Space 2008 in Leipzig entstanden.

Wir freuen uns Dein Erscheinen!

.

.

1996 – James Gosling invents Java. Java is a relatively verbose, garbage collected, class based, statically typed, single dispatch, object oriented language with single implementation inheritance and multiple interface inheritance. Sun loudly heralds Java’s novelty.

2001 – Anders Hejlsberg invents C#. C# is a relatively verbose, garbage collected, class based, statically typed, single dispatch, object oriented language with single implementation inheritance and multiple interface inheritance. Microsoft loudly heralds C#’s novelty.

.

.

From: One Div Zero: A Brief, Incomplete, and Mostly Wrong History of Programming Languages

This Error took me a bunch of time to find. Why? Well, I’m just not smart enough.

The code says everything:


[Test]
public void When_some_transaction_disposes_without_error_or_complete()
{
    // entering an ambient transaction
    new TransactionScope();

    // start a nested transaction
    var t2 = new TransactionScope();
    // no complete, no exception
    // cancels ambient transaction, too
    t2.Dispose();

    // creating a new scope fails
    Action createAScope = () => new TransactionScope();
    createAScope.ShouldThrow<TransactionAbortedException>()
            .Message.ShouldEqual("The transaction has aborted.");
}

In my case, t2 was opened somewhere else only when some conditions were given. To me, the exception seemed to occur randomly.

For sure, after finding the cause the message starts to make sense too. But in the beginning I couldn’t figure out what the error was about.

Hope this post helps someone who consults Google for “TransactionAbortedException” or “The transaction has aborted.”

I just got back from a good week in Seattle. My plan was to visit the DSL DevCon only, but it turned out that the cheapest option was to stay from Tue, 14th until Sun, 19th. I then had time to visit both Lang.NET and DSL DevCon as well as some friends in the area. Last time in Seattle (ALT.NET Conf) I was occupied with shopping only, but this time I also had a whole day for sightseeing. It was great!

Lang.NET (tweets, videos)

langnet Lang.NET was all about general-purpose languages. The talks were good and I met interesting people. This two tweets from Paul Vick (VB.NET compiler in person) and Amanda Laucher (F# MVP) pretty much sum up, what I felt most of the time:

vick paulvick: I hope someday to be as funny as Gilad or Erik Meijer.

 

panda-vick pandamonial: @paulvick Some day I hope to be as clever :)  

 

I left with a superficial (limited brain capacity) overview over F#, Tcl/tk (Eagle), CodeContracs, JVM internals, Axum and Links.

DSL DevCon (tweets, videos)

fill-your-head DSL DevCon (aka SellsCon) was initiated by Chris Sells. Both conferences were held in the Microsoft Research Building on their Campus in Redmond (close to Seattle).

I don’t yet know what to expect from the DSL hype. People have been doing DSLs for decades, as they did SOA. But who knows which story marketing starts telling about DSLs soon.

Still, I got my head filled up with lots of new useful information. Things I’ll have a closer look on will be Irony, F# and the Intentional Software. I’ll also follow up on all the good connections to super-interesting people. Was also nice to finally meet the Oslo guys Doug Purdy, Don Box, Chris Sells, Jeff Pinkston, Chris Anderson, Paul Vick and David Langworthy in person.

I’ll write follow-up posts about what I learned as soon as I have time for it.

What’s next?

I’m really tuned to see how our profession will evolve. I hope it will change dramatically. We need better processes, better integrated tools, closer communication of intentions and a significant productivity boost. I can’t believe that we will be able to create software so much faster. But, if our software wasn’t so closely tied to platforms and if it was written in a more flexible manner, so I hope, software could at least survive longer. Software is often dead born. That is, were our industry looses so much of it’s productivity.

Der erste Artikel der DSL-Trilogie bei dotnetpro ist raus :-)

Titel: Kurze Rede langer Sinn -Domänenspezifische Sprachen in der Softwareentwicklung

Abstract: Mit wenigen Worten viel sagen; das ist das Ziel einer guten domänenspezifischen Sprache. Sie sind in Kundenprojekten
jüngst in Mode gekommen, um fachlichen und technischen Anforderungen besser begegnen zu können.

Ausgabe: dotnetpro 05/2009 (15. April 2009)

Autoren: Lars Corneliussen und Markus Völter

Ja, wirklich:

Bild 10

Older Posts »