on the Curl Web Content Markup Language

on the Curl Web Content Markup and Programming Language from www.curl.com and www.curlap.com
Showing posts with label mixins. Show all posts
Showing posts with label mixins. Show all posts

Friday, July 29, 2011

TDD with the Curl web content language

 
I had started a series introducing Test-driven development over at the former Curl developer blogs. I may revive those posts at lcurlr.tiddlyspace.com.

One thing that may not find a place in those posts is avoiding tight-coupling of tests to class hierarchy.  Curl is a multi-inheritance language with Traits or mixins (abstract classes with some generic methods implemented.)   In the later stages of development, refactoring in the source code should have minimal impact on tests.  That goal will only be achieved if user-defined subclasses are not needlessly referenced in tests.  Behavior, not deep hierarchies, is to be our guide in development – but even such a shallow user-defined hierarchy should be loosely-coupled to our test cases.

The standard way to avoid this in single inheritance languages is to use factory methods in the tests: Curl comes with native factory constructor types. But in Curl there will also be other options particular to multiple-inheritance, parameterized classes and mixins. And with Curl macros, even more inventiveness is possible.

Tests need to wrap complexity - not expose complexity - as much as any other code that we write. Tests must both cast an wide net and yet be loosely-coupled, stable, readable, documented and maintainable.

Professional Curl installations also come with code coverage tools, whose use as can be seen in the new GUI testing framework in the Curl External Library at sourceforge.net . Coverage tools were introduced in the "classic" Curl desktop IDE and are now part of the Curl Eclipse plugin or CDE.

Thursday, July 21, 2011

Curl open-source Sonntag GUI framework

 
Over at communities.curl.com I have a post on the Curl open-source Sonntag framework at sourceforge.net .

Why the name?  Well, it tag's components with the optional name property ... and sonner seems to ring a bell ... [ to get off a bus is an event.]  O-kay, we'll stop that punning for now ...

What is needed is a much more elaborated demo than that currently available.  I will try to find time to work on one. Two small things need doing for the existing demo: move it up to Curl 7.0 from 6.0 and show that Sonntag ties-in seemlessly to Curl automated testing for GUI Visual components.

From where I stand, this little framework is important for what it demonstrates about the strengths of Curl in keeping the complexity of Events for GUI widgets under wraps.

Sonntag achieves that through live-code doc's, Curl macros, mixin's, multiple inheritance and parameterized classes and effective packaging.