Welcome to SpellCoder Sign in | Join | Help
There is a new version of spellcoder currently running on spellcoder.org based on BlogEngine.net. This site is no longer updated because simply it's impossible to upgrade the Community Server based software and we got a lot of spam comments. So yeah, please upgrade your bookmark to spellcoder.org. Spellcoder.com will be discontinued in 10 months to give time to existing authors to migrate their content.
spellcoder.com will be moving to Oxite, so we can actually have a source code to the system to do any modification we need. Community Server just won't do it anymore since this is pretty much a casual community.

Download it here. I can’t wait to see what’s new here. I’ve been tearing my hair own trying to implement Schematron on M.

This time from a Microsoft Envagelist.

“Seeing that SOA has been one of the most visible and widely talked about technology initiatives of the past decade, the fact that it has been pronounced “dead” would seem to require an autopsy to determine the cause of death and discover any foul play that might have been involved in its untimely demise.”

(Denny Boynton)

 

IT Architecture starts looking like a global financial system that are still in the process of melting down. The derivative and investment guys didn’t know what they were doing. They made money, plenty of it, but only based on a scam like scheme where it only works when everybody buys into the bullshit; it works for a while and the high priests of finance look really good. Then things turns south and it is evident that these wizards got no clue on what’s going on.

 

“You only find out who is swimming naked when the tide goes out.” Warrent Buffet (The greatest investor in the world)

 

Well, it seems like SOA preached by the architectural astronaut has been swimming naked, then drowned and found dead. Sigh. Wrong turn. Go take a REST and pick up the way of the web.

http://www.codethinked.com/post/2008/02/Using-Extension-Methods-in-net-20.aspx

 

This is a common trick that unfortunately has tricked into open source libraries. Don’t do it. It’s bad because this trick will generate warnings in C# ASP.Net web application projects and will fail completely on Visual Basic Web Application Project and Website project.

 

I just filed this to yet another open source library author.

---------------------------------------------------------------------

1. Create a new ASP.Net Web Application Project on Visual Studio 2008 on C#
2. Add OpenRasta.dll and OpenRasta.DI.Windsor.dll
3.  It generates this warning

warning CS1685: The predefined type 'System.Runtime.CompilerServices.ExtensionAttribute' is defined in multiple assemblies in the global alias; using definition from 'c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll'

If it is an ASP.Net 3.5 Website Project using C#, it generates

(0,0): warning CS1685: The predefined type 'System.Runtime.CompilerServices.ExtensionAttribute' is defined in multiple assemblies in the global alias; using definition from 'c:\Windows\assembly\GAC_MSIL\System.Core\3.5.0.0__b77a5c561934e089\System.Core.dll'

If you add this into a ASP.Net 3.5 Website Project using Visual Basic, it completely fails

InternalXmlHelper.vb(9,0): error BC30560: 'ExtensionAttribute' is ambiguous in the namespace 'System.Runtime.CompilerServices'.
InternalXmlHelper.vb(24,0): error BC30560: 'ExtensionAttribute' is ambiguous in the namespace 'System.Runtime.CompilerServices'.
InternalXmlHelper.vb(39,0): error BC30560: 'ExtensionAttribute' is ambiguous in the namespace 'System.Runtime.CompilerServices'.

I know that this is a trick to enable extension method to run .Net 2.0 but I don't think it's worth it because it cause so much trouble with .Net 3.5 and beyond projects. Check out the trouble that IronPython team got into because of this http://devhawk.net/default,date,2008-10-21.aspx

------------------------------------------------------------------

“Once thought to be the savior of IT, SOA instead turned into a great failed experiment—at least for most organizations. SOA was supposed to reduce costs and increase agility on a massive scale. Except in rare situations, SOA has failed to deliver its promised benefits. After investing millions, IT systems are no better than before. In many organizations, things are worse: costs are higher, projects take longer, and systems are more fragile than ever. The people holding the purse strings have had enough. With the tight budgets of 2009, most organizations have cut funding for their SOA initiatives.” (Burton Group)

 

Good. Now developers can stop repeating “SOA, SOA” like they know anything about it. SOA is not a technology (and nor REST mind you); They are design concern and it takes more than just learning frameworks or libraries to be able to properly apply them. So if you have them in your resume without having really implemented them, it’s time to take that line item off.

 

Now let’s us move on to the next cool stuff. Chant with me, “cloud”, “cloud”, “cloud”, “computing”!

 

Sigh, we are a bunch of teenage girls.

Since we are getting MGraph out of Mg, why not use IronScheme as an output since it is basically an AST and already based on DLR and it can be quite simple to have it for general purpose DSL machine construction kit. The other way is through XAML construction.

 

Now this is just branding gone wild.

Q: What is Azure?

A: Well it’s a new cloud based Windows operating system, Windows Azure and a set of web services called Azure Services.

Q: So what are Azure Services?

A: They are Live Services, .Net Services, SQL Services, SharePoint Services and Dynamic CRM Services.

Q: Hmm..so why does Windows gets renamed to Windows Azure and Live Services don’t get renamed to Live Services Azure?

A: Because it will make Live Services name too long or…

Q: So I go to Live Framework website, I know that it’s part of Azure right?

A: Not really, there’s no mention of Azure on that site.

Q: So do I have to use Windows Azure to use Azure Services?

A: No, you can use Azure Services independently of Windows Azure.

Q: So .Net Services is not really part of Azure?

A: Are you asking Azure the services or Azure the windows?

Q: Azure the services

A: .Net Services is part of Azure the services but not Azure the Windows. But both Azure the Services and Azure the windows are part of the Azure Services Platform.

Q.: Azure Services Platform?

“So when I look at M's elements, I can only conclude that it too has the same aspects as the well known tooling and building blocks for parsers, grammars and the like available to everyone today: it's complex. With 'complex' I mean: you need proper knowledge about computer languages, parsers and grammars to understand what's going on and how to use the tools available properly. There's nothing wrong with that: if something is hard, well... that's life, deal with it by understanding the concepts which makes a hard problem manageable. Though to me it's impossible that all crucial aspects of writing computer languages are suddenly not important anymore with M's elements on the table. Sure, people will write DSLs with M's elements, but today you can do that too with ANTLR or Gold Parser, use a visual toolkit to design, test and debug the language, and you're likely up and running in a day or two. That doesn't mean a person who has no clue what LL(k) means, what an AST is, can create a language for a given domain with ANTLR, some knowledge about parsers, grammars etc. is required. And with M's elements, this isn't any different at all.” (Frans Bouma)

 

M makes it easy to define simple grammar and give your free parser and an AST built as a result. Then what?


That’s the whole crux of the challenge lies. M takes you 30% there in making hacking grammar easily but you still have to create the machine that will perform on that given AST (or what they call MGraph) and that takes a lot of code, etc.

The first success for M will be apparent on the percentage of people using M to build custom configuration directive (as this is the simple scenario for M) instead of putting all the configuration information in XML format. But that’s just a low hanging fruit. The higher goal is how to make it easier for developers to develop the machine behind that will perform the DSL.

For the past 5 years agile development mantra have been drilled into programmers heads and great, now the meme says “no, it’s not working” (read: Decline and Fall of Agile Development)

Do you know what this means?

  • A new round of books written why Agile wasn’t that good anyway.
  • A replacement for Agile Development is imminent. How about Kaizen for software development?
  • A new round of books about how Kaizen is different from Agile development methodology and why the authors used it and it works 10 times better than Agile (and it’s based on Toyota lean manufacturing system – which makes lots of good cars, with robots!).

 

And the cycle goes on and on. We are all fashionistas, changing fads and fashion every a couple of years.

 

Check out this excellent Windows Azure overview by Dare.

 

The infrastructure looks nice and it makes available a lot of stuff that needed to be configured by hand. But still, the biggest work in making RESTful oriented application in .NET (cloud or no cloud)  is still the mind numbing work required to properly provide support for REST APIs  via proper error messages etc. Right now the work for parsing XML messages will have to be done by hand (LINQ for XML helps) if you care about your document format (which you should); and the XSD only validation support in .NET is disappointing. This is where Mono comes the rescue with its RELAXNG support (including Compact Syntax)

element card {
  element name { text },
  element email { text }
}

instead of the mind numbing exercise of editing XSD or yet another XML based document validation markup.

There are still a big room of opportunity for less suck DocumentValidation/DataQuery technology on the XML front.  If you ever dealt with document heavy architecture like what I’ve been doing for the past 9 months, you’ll realize that document format design is just a small slice of the overall work required to develop a scalable application that play wells with the web.

I am excited about two things in Microsoft PDC 2008, no it’s not Windows Azure or Windows 7. The cloud infrastructure is nice but cloud is just an infrastructure architecture problem – and frankly I trust Amazon to get this right than Microsoft.  I am more interested in technologies that helps making software construction faster and more reliable, either in the way of libraries that bring useful capabilities or new languages that implement concepts that makes programming more fun and productive.

The Oslo programming ecosystem (MGrammar, MSchema and MGraph) and C# 4.0 Dynamic are the two newest development that really make a difference. C# 4.0 dynamic system reduce certain stupid patterns that we have to deal with as C# programmer in dealing with multiple domain problems (I will address this is another post). C# 4.0 dynamic however represents something that is familiar for people that are already dabbling in DLR based languages such as IronPython and IronRuby. M is something else altogether.

Oslo technology is defined as a tool, a language and a repository. In this post I’m talking about the language part of Oslo, because that’s the part that I think makes the biggest difference. Yes, the “quadrant” visual tool allow you to use pictures, etc – but really, if you want to get something done in programming, a paragraph of text is worth a thousand pictures.

Essentially M  enables people to create their own languages in the form of Domain Specific Languages (from simple to highly sophisticated one) in much straightforward manner. Yes, you can create your own DSL already right now in various  multitude of ways (just google for DSL toolkits – XText for example) in variety of different languages and platform. Ruby is well known as DSL friendly language and so is Boo; they make creating Internal DSL more pleasant due to certain characteristic in their language (such as no requiring bracket for method passing or the support for meta programming). For external DSL, you have to resort to the nitty gritty work of creating your own lexer and parsers using the excellent ANTLR and then execute the resulting AST to your runtime system.

M takes care of this lexer and parsers part in an elegant way by create a specific language dedicated for it which they call MGrammar. They also provide an editor called Intellipad  so you define your DSL in an interactive way. With M, you define your language in M Grammar, pass a DSL source file and it will return you an AST graph that you can do whatever you please with it. It’s three steps DSL. No more messing around with code generated lexers and parsers for most scenarios and that’s something to celebrate about.

Check this simple tutorial on how to define a DSL for todo  list in MGrammar.

Watch Don Box’s presentation about MSchema in PDC. This is a must watch presentation to get a  grasp on the concept of MSchema in building model.

Join MSDSLs if you are interested to learn more about M.

Microsoft is killing LINQ To SQL and apparently WF 4.0 will not be compatible with WF 1.0.

Here’s a rule of thumb of using Microsoft technologies.

Trust the language guys and run time guys,  be wary of everybody else especially the bloody data access team.

Man, Matt Warren must be pissed. This is his second or third ORM effort got cancelled for the past 7 years.

Download this video of Don Box and Chris Anderson running through M language (mp4)

They discussed the high level concepts behind M. This is a must watch to get a traction in understanding the M language.

So you have your OSLO SDK installed and your Intellipad running smoothing on your screen.  Well, let’s get busy.

Let’s remember a simple factoid: module is the basic organization structure in M language. The following code is the smallest unit of M language

module Commerce

{

 

}

In your Intellipad, press ctrl \ and type SetMode(“MMode”) to start your model mode.

Off course right now it does nothing. In M, you define a type by using the type keyword and in this example, we are going to create an enumerator type.

module Commerce

{

     type CustomerLevel {“Exclusive”, “Bargain Hunter”, “Frugal”};

}

That’s it for now;you have created your first M enumerator.

More Posts Next page »