DNN Blog

Apr 1

Posted by: Joe Brinkman
4/1/2009 2:02 PM  RssIcon

towerofbabel In 2006, Neal Ford wrote a blog post on the topic of Polyglot Programming which foresaw a future where applications will be increasingly built using multiple general purpose languages and domain specific languages.  Ted Neward has a recent article from MSDN Magazine which follows up on this theme with a discussion of Polyglot Programming in .Net.  Both Neal and Ted address some of the issues with Polyglot Programming, but I think there is one that they have missed.  Polyglot Programming can quickly lead to performance rot in application development.

In DNN Tips and Tricks #10, I presented an example of how you can use the DotNetNuke Report Module to display you data using the advanced capabilities of XSLT.  Greg Lahens pointed out an issue with my SQL code which is really highlights one of the downsides to Polyglot Programming.  As programmers, we often employ a variety of tools to solve a particular programming challenge.  Many of these tools are DSLs – XSLT, SQL, CSS, HTML are just a few of the many DSLs in common use throughout the web development world. 

The problem comes into play in that few developers have the luxury of being an expert in every DSL they use.  Most developers I know, are extremely proficient in their primary language – whether it is C#, VB, Java, Ruby or whatever.  Those same developers will often have a working knowledge of the secondary languages and DSLs used in their day to day programming.  Yet the number of DSLs is rapidly expanding.  We have DSLs for styling applications (a different one depending on whether it is Silverlight/WPF or Html), a DSL for transforming data, a DSL for querying data (possibly multiple DSLs for a single depending on how much you trust your ORM), a DSL for searching some text element, and even a DSL for merging our data with our presentation structure and styles, and several DSLs for exposing our data in a raw format to users.  After learning all those DSLs, I then have a handful of additional DSLs to learn to build my application, package it into an installation package, and possibly one more for building the Help files.  Ohh wait.  You are doing automated unit testing right?  You’ll need another couple of DSLs for that.  And let’s not forget the DSL that we use for configuring the application after it is deployed.

I don’t know about other programmers, but I am drowning in DSLs.  It is hard enough keeping up with my primary development language and the associated platform APIs, but these DSLs are going to be the death of me.  The end result is that I have a pretty decent handle on maybe 3 or 4 of these DSLs but rarely do I have the requisite knowledge to make the right choices in anything beyond that.  Yes I know SQL.  But as Greg Lahens pointed out in my last post, it leaves a lot to be desired in terms of performance.

Now some might argue that SQL should be handled by a DBA who specializes in SQL.  That is great.  I know have 14 DSLs instead of 15 to learn.  Oh wait.  Sorry, I have just been informed that we don’t have a budget for a dedicated DBA.  So I guess the requests for dedicated XSLT, CSS, and Regex developers probably are not going to be approved either.  In most of the development shops I have worked in, the developer has no choice but to learn many of these DSLs.  Most projects are not large enough to warrant the use of specialists, however almost every project demands great performance and minimal bugs.  One false move in your CSS, XSLT, Regex, JavaScript, SQL or any of the other DSLs in use and you will severely impact the performance of your application. 

What is worse is that the methods and tools used for testing performance in each DSL is often vastly different.  I have great tools to help me profile my VB/C#/Java code.  Not so much when it comes to CSS, JavaScript, XSLT or many of the other DSLs in use.  And even when good profiling tools exist, learning to use them often requires a significant time investment.

I don’t know the ultimate solution to this problem, but I do know that every day it is only getting worse.  The Computer Science community is cranking out languages and DSLs at a rapid pace.  On top of that we continue to evolve our development methodologies and architectures such that the average programmer is left wondering how they can possibly keep up.  Sure, the alpha geeks among us will be able to grok it all and crank out applications using the latest DSLs, but the average developer (who make up the vast majority of the programming resources building application today) is being marginalized more and more. I believe that DSLs have their place and certainly provide a lot of value, however we need to take a hard look at where we are going in this profession.  I believe we need to find solutions that meet programmers “where they live” and not “where we want them to be”, by this I mean we need to find solutions to our CS problems that recognize that not all programmers are computer scientists.  Not all programmers have the time or motivation to learn 15 different DSLs just to create an application.  Not all programmers want to learn a new programming methodology because the old methodology is no longer en vogue.  We need to simplify what we are doing so that it doesn’t take an army of specialists to build a decent application.

Tags:
Categories:
Location: Blogs Parent Separator Joe Brinkman

11 comment(s) so far...


Gravatar

Re: Polyglot Programming: Death by a thousand DSLs

Well written Joe! I completely agree.

By Jeremy White on   4/1/2009 4:29 PM
Gravatar

Re: Polyglot Programming: Death by a thousand DSLs

as a contracting end-to-end developer, i feel you!

By CurlyFro on   4/1/2009 4:29 PM
Gravatar

Re: Polyglot Programming: Death by a thousand DSLs

Thanks Joe! I love this post. I thought it was just me getting old and tired. Now I know I am not alone :) I'm just testing a mixed application with MVC, Dynamic data, Forms (DNN) Net Ria Service with LINQ to Entity with a Silverlight client and just try to get the jquery to work together with AJAX. Works smoth but I have some problems left :)

By Jan Olsmar on   4/1/2009 4:29 PM
Gravatar

Re: Polyglot Programming: Death by a thousand DSLs

Very true! DSL overload...

By Rodney Joyce on   4/1/2009 5:53 PM
Gravatar

Re: Polyglot Programming: Death by a thousand DSLs

Great thoughts. As you mentioned toward the end, it's not just DSL overload. It's architecture and infrastructure overload too. I've been working with SharePoint off and on for the last 8 years and sometimes I wonder, "Could you make SharePoint any more complex?" That's why I love DNN. It's amazingly extensible, but it lets me create solutions using tools that developers already know. No need to learn CAML or how to create ddf files or how to run stsadm commands from the command line.

By Don Worthley on   4/2/2009 1:36 PM
Gravatar

Re: Polyglot Programming: Death by a thousand DSLs

I think another problem is all the small finite branch offs. such as linq to sql, linq to entity, linq to It is all link smash the stuff into 1 large class library and let me just learn 1 DSL for it all. I can handle 2-4 primary DSLs. I can try to keep up as they add more and more to each one. However I can't keep jumping to a completely new one that is just like the old one but much better, but totally different. Once a month it seems. At the current rate by the time, my boss reads an article on a new DSL, buys me the book, and we get it shipped the DSL is already depreciated.

So I totally feel your pain, it was bad enough keeping up with asp.net and its service packs and upgrades, at least I had like 8 months to get use to the changes. Now between silverlight, MCV, WCF, ZZZ, XXXTSTXXX, and snore. (last few made up) I can't keep up.
I enjoy all the new technology and options I have, and hopefully at some point we will just a huge collision of the technologies into a single set of 2 or so "DSL sets"
Till then has anyone perfected osmosis? Maybe that is the next step we need Computer Scientiest to solve, a DSL that focuses on osmosis of other DSLs.

Get the government check books out. :)

By keeperofstars on   4/2/2009 1:36 PM
Gravatar

Re: Polyglot Programming: Death by a thousand DSLs

Great article Joe, you really should write a dedicated book on such topics. More more more!

By Alex Shirley on   4/2/2009 1:36 PM
Gravatar

Re: Polyglot Programming: Death by a thousand DSLs

Very good post and you could write a book on this topic.

By Shawn Mehaffie on   4/13/2009 1:15 PM
Gravatar

Re: Polyglot Programming: Death by a thousand DSLs

Yes a great article. I use DNN to reduce my need to be an expert in every DSL. For example .css and Javascript can be avoided by letting DNN handle it or buying a DNN module that let's you set some properties and you still get some nice "eye candy".

Silverlight is a DSL but as a "90% just like normal ASP.NET" (and of course it really IS ASP.NET) it is the best RIA choice for ASP.NET developers.

By Michael Washington on   4/13/2009 1:15 PM
Gravatar

Re: Polyglot Programming: Death by a thousand DSLs

Not to mention:

“M” modeling language
The "Oslo" Modeling Platform
Entity Framework version 2 (with poco may be)
jQuery
ASP.Net MVC
DotNetNuke 5 ;-)
c# 4.0
T4 (Text Template Transformation Toolkit) in Visual Studio
the list goes on...

Apologies in advance

Mike



By f3a on   4/13/2009 1:15 PM
Gravatar

Re: Polyglot Programming: Death by a thousand DSLs

Thanks Joe! I love this post.

By anime258 on   4/13/2009 1:16 PM
Attend A Webinar
Free Demo Site
Download DotNetNuke Professional Edition Trial
Have Someone Contact Me
Have Someone Contact Me

Like Us on Facebook Join our Network on LinkedIn Follow DNN Corporate on Twitter Follow DNN on Twitter

Advertisers

Sponsors

DotNetNuke Corporation

DotNetNuke Corp. is the steward of the DotNetNuke open source project, the most widely adopted Web Content Management Platform for building web sites and web applications on Microsoft. Organizations use DotNetNuke to quickly develop and deploy interactive and dynamic web sites, intranets, extranets and web applications. The DotNetNuke platform is available in a free Community and subscription-based Professional and Enterprise Editions with an Elite Support option. DotNetNuke Corp. also operates the DotNetNuke Store where users purchase third party apps for the platform.