Liam McLennan

October 2009 Entries

jquery ui dialog: Part 1 – The Default Dialog

This series is going to document increasingly complex usages of the jQuery UI Dialog widget. This first part of the series will demonstrate how to display the default dialog.

Other series members:

jQuery UI Dialog: Part 2 – The Modal Dialog

The jQuery UI Dialog is a powerful client-side dialog control. It is bundled as part of the jQuery UI suite and as such it is available on the Google CDN. Some of its more interesting features are:

  • Modal / non-modal dialogs
  • Support for resizing and dragging
  • Support for buttons
  • Support for Theming
  • Stacking
  • Partially transparent modal overlay layer

The simplest usage of the dialog control is to select a div, and call the dialog() function.

View a Demo

Here is the complete code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>Default dialog</title>
    <link href="ui-darkness/jquery-ui-1.7.2.custom.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script>
</head>
<body>  
    <p>Some text on the page.</p>
    
    <div class="make_me_a_dialog">Content of div</div>
    
    <script type="text/javascript">

        $(document).ready(function() {

            $('.make_me_a_dialog').dialog();

        });
        
    </script>  
</body>
</html>

Development Journal

Maybe you are like me and regularly work on multiple projects. If not, please send me a cheque for the $0.00001 worth of bandwidth you have wasted.

Sometimes a week or two can pass between looking at a project and I find when I go back to it I lose a couple of hours just trying to work out where I was up to. To solve this problem I have started a development journal for my more neglected projects. At the end of every coding session I record a few key pieces of information to help orientate me the next time I come back to it. Here is an example entry:

----------
2009-08-19
----------

WORKING ON:

Testing the graph navigator code that produces cycles. Discovered and addressed a few edge cases such as non-cyclic journeys where the shortest spanning tree visits every node.


NEXT THING TO DO:

Complete the scenarios in BuildingCyclesTests using the style of the first two already completed scenarios.


TESTS:

63 passed, 0 failed, 1 skipped, took 13.21 seconds

It is just a plain text file that I have added to my visual studio solution items so that I can edit it in visual studio.

An emerging business model for development tool micro isvs

The traditional, Paul Graham style of technology start-up is:

  1. Someone has an idea
  2. They try to validate their idea
  3. The idea is implemented
  4. The idea is communicated to the market

While the importance of step 2 has always been emphasized the weakness of the above remains that the product may not gain significant visibility to the market. The products never reach critical mass and so they fade gradually into obscurity.

Recently I have noticed a new model emerging that promises far less risk at the tail end of the product cycle:

  1. Build a personal brand. This is usually done by making open-source contributions.
  2. Develop a product that is related to your brand.
  3. Use your brand to reach a market

The advantage here is that the market is ready and waiting and has a degree of trust in the entrepreneur. Here are some examples of development tool isvs that are using this strategy:

  Brand building activities Related commercial activities
Ayende Open source contributions to Rhino Mocks and NHibernate. NHProf (NHibernate Profiler)
Rob Conery Subsonic and MVC Storefront Tekpub (Screencast subscriptions)
Jeff Atwood Coding Horror blog stackoverflow Q & A site
Nate Kohari Ninject IoC Container Zen Kanban application
Kent Beck TDD, XP and lots of other things JUnit Max

I am sure there are others but that is all I can think of right now. Personally, I think it is great that these people are able to leverage their excellent contributions to produce a viable business.

Thoughts on webaii functional / web testing framework

WebAii is a proprietary, but free, functional testing framework from ArtOFTest. It has become more visible since telerik started bundling it with their ASP.NET AJAX UI Controls framework...

Read the full article

Why Team Foundation Server did not work for us

Between 2nd October and 18th October my current team was using Team Foundation Server for source control and integration. On Sunday I merged the changes from TFS back into our old subversion repository, effectively throwing away the two weeks of work that one of the guys spent setting up TFS. Why did we make this decision and what did we learn?

Read the full article

 

Executable Specifications in .NET

Executable specifications are the holy grail of software development. The idea is to specify the behaviour of a system in some structured way that can be automatically verified. It is something that I am interested in so I have been keeping an eye on the options that are available for .NET...

Read the full article

 

twitter is the new seek / monster / careerbuilder / jobsite

There has always been an employment back-channel. Maybe there was a time when people would pick up the phone when they needed to fill or find a job. More recently people might have sent an IM in that situation. But now it seems that twitter is the medium on which employment transactions occur...

Read the full article

 

Nullable properties with Fluent nhibernate automapping

If you are using fluent nhibernate then mapping nullable columns is easy – just call the .Nullable() method for the property mapping’...

Read the full article

 

asp.net mvc: Why doesn’t Id get bound?

From time to time I find that I have properties on my action parameter that don’t get bound. Most commonly for me this occurs when the action parameter type as a property called ‘Id’...

Read the full article