Recent posts

WIF Configuration

Since there is not much documentation about Windows Identity Foundation and how to configure it, I decided to write a post about the meaning of the configuration sections of microsoft.IdentityModel.

Read more…


Published: 02-09-2010 by Koen Willemse | 0 Comments | 0 Links to this post
 

ALM Practices Part 10: Work Item Tracking

Using Team Foundation Server’s User Story, Task and Bug work item types as the central unit of work for all the activities done within a project.

Read more…


Published: 10-08-2010 by Dennis Doomen | 0 Comments | 0 Links to this post
 

ALM Practices Part 9: Ubiquitous Language

The Ubiquitous Language is a unified language consisting of verbs and nouns from the business domain of an enterprise system and should be used by all team members, stakeholders and other involved persons.

Read more…


Published: 03-08-2010 by Dennis Doomen | 0 Comments | 0 Links to this post
 

JQuery clone() not maintaining "checked" state

If never been much of a front-end developer, but as most developers I manage my tags pretty well;-) but javascript has always been hell. I always stayed away from it but with JQuery the ballpark has changed a lot! Traversing the DOM has never been simpler, adding elements and attributes, moving them around, Childs play.

Yesterday my college noticed that the functionality I build for selecting checkbox items in div-popup’s didn’t work in IE8. So I’ve been puzzling why this was happing, this morning I found the culprit, it was the usage of the JQuery Clone  method.

JQuery offers a function to copy a element with all its events but as I found out the hard way checked state isn’t maintained during the function execution under Internet Explorer 6/7/8.

Which basically SUCKS!

After a lot of searching, I found out that there is a long standing bug ticket in the JQuery bugtracker. The bug is still unresolved but there where some workaround posted in the comments.

The workaround I chose is to implement was to override the clone function from JQuery itself. Note this clone function wasn’t approved to put in the core of JQuery due to performance reasons.

Overriding is quit simple just put the following script function in a javascript tag in your page (or separate file) . And call the function, the overriding magic is just on line Number 8.

   1:  function overrideJqueryClone() 
   2:  {
   3:      (function () {
   4:          // Store a reference to the original remove method.
   5:          var originalRemoveMethod = jQuery.fn.clone;
   6:   
   7:          // Define overriding method.
   8:          jQuery.fn.clone = function (deep) {
   9:              deep = deep != undefined ? deep : true;
  10:              var $this;
  11:              if (jQuery.browser.msie) {
  12:                  $this = this.add(this.find("*"));
  13:                  // Need to remove events on the element and its descendants
  14:                  $this.each(function () {
  15:                      this._$events = {};
  16:                      for (var type in this.$events)
  17:                          this._$events[type] = jQuery.extend({}, this.$events[type]);
  18:                  }).unbind();
  19:              }
  20:              // Do the clone
  21:              var copy = false, r = this.pushStack(jQuery.map(this, function (a) {
  22:                  if (!copy && deep && (a.hasChildNodes() || jQuery.nodeName(a, "select") || jQuery.nodeName(a, "input"))) copy = true;
  23:                  return a.cloneNode(deep);
  24:              }));
  25:              if (jQuery.browser.msie) {
  26:                  $this.each(function () {
  27:                      // Add the events back to the original and its descendants
  28:                      var events = this._$events;
  29:                      for (var type in events)
  30:                          for (var handler in events[type])
  31:                              jQuery.event.add(this, type, events[type][handler], events[type][handler].data);
  32:                      this._$events = null;
  33:                  });
  34:              }
  35:              // copy form values over
  36:              if (copy) {
  37:                  if (!jQuery.browser.msie)
  38:                      $this = this.add(this.find("*"));
  39:                  var origInputs = $this.filter('select,input[@type=checkbox]');
  40:                  if (origInputs.length) {
  41:                      var inputs = r.add(r.find('*')).filter('select,input[@type=checkbox]');
  42:                      origInputs.each(function (i) {
  43:                          if (this.selectedIndex)
  44:                              inputs[i].selectedIndex = this.selectedIndex;
  45:                          if (this.checked)
  46:                              inputs[i].checked = true;
  47:                      });
  48:                  }
  49:              }
  50:              // Return the cloned set
  51:              return r;
  52:          }
  53:      })();
  54:  }
  55:   

 

Simple isn’t it :-)


Published: 08-07-2010 by Hans ter Wal | 0 Comments | 0 Links to this post
 

Fluent Assertions Release 1.2.2 has been released

It has been several weeks since we released a new version of the Fluent Assertions. Since then, a few small bugs were discovered and some features were requested. A few of these items have been fixed which resulted in a new release.

You can download version 1.2.2 from the CodePlex site.

Read more…

Technorati Tags:

Published: 29-06-2010 by Koen Willemse | 0 Comments | 0 Links to this post
 

Coding Guidelines for C# 3.0 and C# 4.0 now available

As promised earlier, you can now download the concept version of my new Coding Guidelines for C# 3.0 and C# 4.0 from a dedicated CodePlex site at www.csharpcodinguidelines.com. The list of changes is quite big, and includes new guidelines covering object-oriented design, design principles, C# 4.0 and the smells and heuristics from Robert C. Martin’s book Clean Code. I’ve also removed many guidelines that have become obsolete or deal with situations that rarely occur. And the entire document has become much easier to read because I’ve changed to a less formal writing style.

Read more…


Published: 28-06-2010 by Dennis Doomen | 0 Comments | 0 Links to this post
 

Scheduling Pages in Kentico CMS

image A couple of months ago, a client asked us if it is possible to schedule the publication of a page in advance. At the time I tried it and for some reason it didn’t seem to work, so we left it as something for later.

Two weeks ago I was at the Kentico-Certified-Trainer-training and I asked one of the Kentico guys if this was possible. “Of course”, they said, “You can even schedule multiple pages in advance”. Ok, so I was wrong.

But how do you set it up? It turns out to be really easy.

First, you need to make sure you have workflow turned on. Setting up workflow is part of the Site Manager, to which you may not have access. If so, ask you friendly Kentico Administrator to set it up for you.

  1. Open the site manager and click the Development tab.
  2. Click Workflows and click image next to Default workflow to edit the default workflow.
  3. Next, click on the Scope tab so we can select the part of the sitemap where we want to apply the workflow.
  4. For this example, we’ll start the scope of this workflow at the root and we will apply the workflow to all document types.  If you want, you can specify something else.
    image
  5. Click OK to save the scope.

 

Now you are ready create different versions of pages and schedule them.

To schedule pages we are going to use the publish from/to fields on the Form tab:

image

To create a new version of a page and schedule it:

  1. Edit the page, save it (don’t publish it yet) and click the Form tab.
  2. Enter the time you want to publish this version of the page from in the publish from field.
  3. Click Publish to publish the page (if you have a workflow with an approval step, you might also need to approve it). Remember that, because you entered a time in the publish from field it will not show up immediately on the live site.
  4. Now go to the Versions tab on the Properties tab. You should see something like this:
    image 
    What does this mean?
    As you can see version 6.0 of the document was published from 2:41 PM. This is the version which is currently live. Version 6.1 is an intermediate version that was saved but not published and 7.0 is the published version which is set to be published from 2:50 PM (but at the moment it is not visible as you can see from the empty Published From field).

    What will happen next is that around 2:50 PM (this is not an exact science) version 7.0 of the page will be published and version 6.0 will be unpublished as you will see because the Published to field will be set.

 

If you want to schedule multiple pages ahead of time, that is possible to: just edit the page, set a new publish from date and publish the page. One thing you cannot do is edit a page that is already published, so make sure the page is correct before you publish it.


Published: 08-06-2010 by Erwin Werkman | 0 Comments | 0 Links to this post
 

Things to do to fill up my free time

Now that my CQRS/Event Sourcing talk for DotNED is done, the pressure on the free hours between work and family has been reduced significantly. That doesn’t mean I’m going to sit back and relax. Oh no, I’m full of ideas. so let’s see some of my plans.

Read more…


Published: 30-05-2010 by Dennis Doomen | 0 Comments | 0 Links to this post
 

CQRS and Event Sourcing

Yesterday evening I did a talk on building a .NET-based system using Command Query Responsibility Segregation and Event Sourcing. We had a lot of awesome discussions on its applicability, and as usual, I ran out of time again. I could have easily spend a full day on this subject, but unfortunately, I only had about 1 hour and 45 minutes to my disposal.

Read more…


Published: 28-05-2010 by Dennis Doomen | 0 Comments | 0 Links to this post
 

May 27th: CQRS and Event Sourcing, an alternate architecture for Domain Driven Design

Most of us will be familiar with the standard 3- or 4-layer architecture you often see in larger enterprise systems. Some are already practicing Domain Driven Design and work together with the business to clarify the domain concepts. Perhaps you’ve noticed that is difficult to get the intention of the 'verbs' from that domain into this standard architecture. If performance is an important requirement as well, then you might have discovered that an Object-Relational Mapper and a relational database are not always the best solution.

Read more...


Published: 06-05-2010 by Dennis Doomen | 0 Comments | 0 Links to this post
 
 Next >>