Marc van Neerven


Marc van Neerven

Four new features that will make Smartlets even more powerful

Smartlets are modular, flexible building blocks. They make it possible to write fully self-contained, modular applications, have built-in Ajax support while being very suitable for scriptless environments, are localizable, and, last but not least, have a tremendous ease of deployment.

Still, there was room for improvement on a number of levels.

When developing Smartlets, you will have to decide what to parametrize (using Smartlet Properties). You will want to have consumers of the Smartlet set a number of parameters that will determine what the Smartlet will look like and/or behave. When the list of properties grows larger however, there inevitably comes a point where you will have to decide where to go from there.

In iXperion 1.3, there are a few new things you can do at this point:

Use the subclassing model

Smartlets now support a model for subclassing code blocks. Suppose you have a Smartlet that displays an event calendar. Now, you can have a translation format each event, but let the consumer of the Smartlet subclass that translation by adding a local translation in the scope of the consuming page.

Use Parameter Sets

Sometimes, a number of parameters work together as a group. Setting just one parameter just makes no sense without changing others. In iXperion 1.3 you will be able to create, store and use so-called Smartlet parameter sets. 

Expose and consume Events

Many Smartlets can be considered as widgets. Some of them will be standalone apps that have their own input and output, but other Smartlets are in fact controls. Controls expose events that can be consumed externally. In iXperion 1.3, Smartlets can expose and consume events.

Using the event model will allow you to further modularize your Smartlets, making re-use much easier. It will result in smaller, compact and specialized Smartlets that work together.

Make your Smartlets Skinnable

As you know, Smartlets come with their own CSS, stored in the ClientData subfolder. A link to this CSS is automatically included in consuming pages. In iXperion 1.3, the convention will be that a Smartlet should be published with separate CSS items for functional and for graphical rules. Also, a skin property is added that will always be rendered as a CSS class in the Smartlet HTML output. This skin can be set using the boxskin parameter, or by setting the smlConfig_DefaultSkin global buffer.

Just make a copy of the skin CSS and edit it for each new skin:

Skin.css:

Smartsite SXML CopyCode image Copy Code
{smartlet.nameselector()} {
   color: white;
   background-color: red;
}

CoolBlue-Skin.css:

Smartsite SXML CopyCode image Copy Code
{smartlet.nameselector()}.coolblue {
   color: #000;
   background-color: #5ef
}

Posted by Marc van Neerven on Monday, August 09, 2010 11:41:54 AM
Michel Rutten - Wednesday, August 18, 2010 5:10 PM

Very nice!

Up until now, SCF does not support state interchange between separate but related smartlets, e.g. a list smartlet and an associated filter smartlet. The new event mechanism promises to deliver an elegant solution. And skinning is just plain cool.

Keep up the good work,

Michel

Edited by Michel Rutten on 8/18/2010 5:11:02 PM
spelling
You are not allowed to post here.
All Blogs
Johan Blok
Features, projects, ambitions
Ad van der Kolk
About van alles en nog wat
Vincent Baaij
Showing it, Making sites with it, Adapting it, Refining it, Telling about it, Selling it, Investigating it, Teaching it and Expanding it.
Johan den Ouden
Smartsite storyteller
Demian Buijs
The art of Smartsite iXperion
Marc Derksen
What is happening at Smartsite R&D.
Marc van Neerven
Marc's shared thoughts...
Twan Meijerink
About new projects, quality assurance and me ;-)
Douwe de Wilde
About security, maybe more...
Mike Perquin
About WCF, Outscaling, database maintenance (SQL server), etc.
René Pronk
while (true);
Erwin Rijss
About building sites and more...
Recent Blog Comments
Ruben Verschueren
30 January 2012, 15:31
I get an 'operation has timed out' error (even for the examples). however if I browse to the uri's...
Marc van Neerven
12 August 2011, 16:50
Added a new (Web-guidelines compliant) download.
Marc van Neerven
12 August 2011, 14:33
Just added an update (3.0) which produces compliant XHTML and has been adapted for strict Web Guidelines...
Johan den Ouden
10 August 2011, 10:38
Uiteraard is bovenstaande code ook in een virtual assembly te gieten zodat een dll niet meer noodzakelijk...
Marc van Neerven
02 August 2011, 14:56
Small update: data retrieved by the Twitter search query has to be encoded for presentation: Replace...

Profile
Latest additions
Workbench beta has expired
Hank Brandwijk, 11 January 2012, 16:53
Smartsite iXperion 1.4 build 4 has been released! locked
Twan Meijerink, 02 December 2011, 11:04
The second life of XForms
Marc van Neerven, 04 November 2011, 18:34
How to hide a property in a custom module? locked
Peter van der Waal, 17 October 2011, 09:31
Content, content, content...Waar halen we het vandaan?!
Ad van der Kolk, 07 October 2011, 17:48
Microsoft Certified Partner Logo