Tuesday, August 20, 2013

DSL and Xamarin , a practical couple

While the Xamarin.Android and Xamarin.iOS is the best choice so far, I am also investigating Domain Specific Languages (DSL)..
DSL is a kind of metalanguage, that you use to tell it what to do and the DSL will tell the native language (Java, Objective-C, C# (Xamarin.Android, Xamarin.iOS) how to do it.

Thus, DSL does not mean that Xamarin framework will be displaced. On contrary! If we will treat the Xamarin language solutions as a native languages, then we should be able to easily describe what we want and the appropriate code would be generated. For the business logic, we don't need a DSL, but for the logic that glues everything together (menus, page flow, business logic, data access logic), we need a DSL. It does not make sense to write the same presentation logic in Xamarin.iOS and Xamarin.Android again, and again ... the presentation logic should be generated by the DSL in a human readable form...
I see it this way: a DSL will generate code for MvvmCross framework which is built on top of Xamarin libraries.
Since I am a Mono guy, I would prefer to be using a DSL tailored for .Net languages ...
Right now looking into using F# as a tool for writing DSLs ...

Any ideas, suggestions?



1 comment:

  1. Maybe something like what Genexus and RadStudio does. I want to create something like that. Graphical model creation, and exporter to many platforms. Or something like this:
    http://en.wikipedia.org/wiki/Comparison_of_code_generation_tools

    ReplyDelete