Archive for October 9th, 2009

Poker Planning for Windows Mobile

I got annoyed this week.  We were doing our planning poker (with the cards) when one of my coworkers broke out his IPhone instead.  He had a planning poker app on his freaking IPhone.  I whipped out my Windows Mobile phone and – did nothing.  I grabbed a deck of card and moved on.

Afterwards though, I did a couple of quick searches and found nothing.  Near as I can tell there is no Planning Poker app for Windows Mobile.  So I made one.

http://planningpoker.codeplex.com/

The app should run on Windows Mobile 5, 6, and 6.5.  It required .Net 2.0 Compact Framework to run as well.  If someone really wants, I can compile it down to pre-Window Mobile 5.  Also, I wrote it with touch screens in mind.  It might work on a non-touch screen device, but I really don’t know.

The part that made be blog about this though was the amount of time it took to make this.  About an hour.  Start, finish, and install.  So it is possible to make an app quickly in Windows Mobile if you want to.  — OK, reality check, we are not talking about a complicated app here.  The point is, the application did not take any longer than a normal WinForms app would take to code.

The entire project is up on CodePlex, code and all.  MS-PL license, so go nuts if you want to.

image image


gRaphaël: JavaScript Charting Library

ggRaphaël is an open source JavaScript charts library based on Raphaël JavaScript library for vector graphics. You can use gRaphaël to create static and interactive pie, bar, line and dot charts. gRaphaël is cross browser and supports all major browsers including: Firefox 3.0+, Safari 3.0+, Opera 9.5+ and Internet Explorer 6.0+.

Since gRaphaël is based on Raphaël JavaScript library; SVG and VML are used as a base for creating charts, and you should be able to add interactivity to your charts by attaching JavaScript event handlers.

Developed by Dmitry Baranovskiy, Raphaël is released under the MIT License. You can find further information, demos & download on gRaphaël Website.

Similar Posts:


Exploring NServiceBus

I’ve been learning a bit more about Service-Oriented Architecture (SOA) and Event-Drive Architecture (EDA) over the last couple of months. Something that kept coming back in the articles and books I’ve read so far is the concept of an Enterprise Service Bus (ESB). I’ve heard numerous times about NServiceBus, Mass Transit and Rhino Service Bus in the past, but I’ve never fully realized what types of problems these technologies try to solve. Besides trying to learn about the scenarios and business needs that drive these technologies, I also decided to take a closer look at NServiceBus by creating the simplest example I could think of: Starbucks!

You’ve probably found out by now that yours truly isn’t capable of making up innovative sample applications, but since we actually have two (!) Starbucks shops already here in Belgium, I couldn’t let this go unnoticed either.

The scenario is actually quite simple:

  1. The customer places his order at the cashier.
  2. The cashier passes the order to a barista who starts preparing the drinks.
  3. The cashier asks the customer to pay for his order.
  4. When the customer paid for his order at the cashier, the barista is informed that the payment has been completed.
  5. When the barista finishes its order, he checks whether payment has been completed and delivers the order to the customer.

I’ve used NSB 2.0 for this exercise, which is the trunk version at the moment. The thing that amazed me the most was how easy it is to get started. I pretty much expected to be muddling around for a week before I could actually send my first message, but this was certainly not the case. Let me show a couple of basic code snippets that illustrate how NSB is used.

Here’s an example of the fluent API for bootstrapping NSB:

Configure.With()
    .StructureMapBuilder(ObjectFactory.Container)
    .MsmqSubscriptionStorage()
    .XmlSerializer()
    .Sagas()
    .NHibernateSagaPersisterWithSQLiteAndAutomaticSchemaGeneration()
    .MsmqTransport()
        .IsTransactional(true)
        .PurgeOnStartup(false)
    .UnicastBus()
        .ImpersonateSender(false)
        .LoadMessageHandlers()
    .CreateBus()
    .Start();

Notice that I’m able to reuse my IoC container of choice that is also used elsewhere in the application. After bootstrapping NSB, the IoC container contains an instance of IBus which we can use to send and publish messages, etc. …

A message that can be sent with NSB must implement the IMessage interface.

[Serializable]
public class NewOrderMessage : IMessage
{
    ...
}

Notice that NSB doesn’t require a message to be a class. You can just as well use an interface:

public interface INewOrderMessage : IMessage
{
    ...
}

A message can be send using an instance of the bus:

_bus.Send(new NewOrderMessage(...));

Handling a message is accomplished using a message handler that implements the IHandleMessages interface:

public class CashierMessageHandler
    : IHandleMessages<NewOrderMessage>
{
    public void Handle(NewOrderMessage message)
    {
        ...
    }
}

The destination of a message must be configured in the configuration file of the sending application.

<UnicastBusConfig>
    <MessageEndpointMappings>
        <add Messages="CashierContracts" Endpoint="cashier"/>
    </MessageEndpointMappings>
</UnicastBusConfig>

When publishing a particular message, this kind of configuration goes in the configuration file of the subscribing application instead of the publisher.

Bus.Publish(new PaymentCompleteMessage(...));
<UnicastBusConfig>
    <MessageEndpointMappings>
        <add Messages="CashierContracts.PaymentCompleteMessage,
                       CashierContracts"
             Endpoint="cashier"/>
    </MessageEndpointMappings>
</UnicastBusConfig>

NSB also supports sagas. Here’s an example of how to create a saga.

public class CashierMessageHandler
    : Saga<CashierSagaData>,
      IAmStartedByMessages<NewOrderMessage>,
      IHandleMessages<PaymentMessage>
{
    public void Handle(NewOrderMessage message)
    {
        ...
    }

    public void Handle(PaymentMessage message)
    {
        ...
    }
}

public class CashierSagaData : IContainSagaData
{
    public virtual Guid Id { get; set; }
    public virtual String Originator { get; set; }
    public virtual String OriginalMessageId { get; set; }

    ...
}

The saga data class contains data that should be persisted during the lifetime of a saga so that it can be used when different messages arrive. So make sure that the public members of saga data classes are virtual!

You can find the code of this sample application using NServiceBus at the Elegant Code repository (turns out we actually have one of those at Google Code). I’ve probably did a whole bunch of things wrong with it, but I definitely learned a thing or two in the process :-) .

There’s a lot more that I want to learn about NSB like testing sagas, the generic host, etc. …

Let me round of this post by providing a couple of resources that were very helpful:

I just want to say thanks to Andreas for answering my stupid questions on the NServiceBus user group.

Till next time,


WSS as a platform for public-facing, anonymous-access Internet websites

As I mentioned in a post last week, our public website is a MOSS-based site and we are celebrating its first birthday this month (We launched it on October 1, 2008. Prior to that we had a standard HTML website since 2003.). For the most part, we are very happy with our decision to launch our new site on MOSS.

Reality is that there aren't that many companies that can afford to pay the licensing costs to have their public Internet running on MOSS. The stated retail price for MOSS for Internet Sites is $41,134 per server.

So, if you are running a couple of load-balanced servers for your Internet site, you are looking at around 80k to license MOSS for Internet Sites for them. The only piece of good news here (financially speaking) is that this gives you unlimited anonymous user access - so there are no CALs to buy. (In case you are wondering, since we are Microsoft Gold Partner, we get our licenses as part of the Gold Partner program and pay much, much less than this - otherwise, we wouldn't be able to afford MOSS for our Internet site.)

So, what are you to do if you want a SharePoint-based Internet site? Well, it is not all that widely publicized, but several businesses around the world have figured out how to do this quite nicely with WSS only. And, more importantly, there are no (zero) SharePoint licensing costs if you do it this way.

You say, hold on now, there is no way that can be true! First, I don't believe that you can develop a really polished public site with WSS!

Well, I am not going to argue about this using words. Instead, I am going to point you to some examples that I think prove differently. All of these sites are built using WSS 3.0:

http://6sc.com/default.aspx (check out this page for how they did it)

http://www.zevenseas.com/en/default.aspx

http://www.nestle.si/default.aspx

http://www.acision.com/default.aspx

There are more out there, but these are four that I particularly like.

OK, if I have convinced you about the viability of developing a public website using WSS 3.0, what about whether or not I have my facts straight about the no-cost for licenses?

First, in case you don't already know, WSS 3.0 is a free add-on to Windows Server 2003 and Windows Server 2008. If you have Windows Server licensed properly, you don't have to pay anything else for WSS - period. This is a pretty commonly known fact so I am not goint to bother hyperlinking to any proof of it.

Second, there is a very popular and well-respected Microsoft (as in, employee) architect in New Zealand, Ian Morrish, who blogged about this in March of this year. Here is the link to his blog post: http://www.wssdemo.com/Blog/archive/2009/03/06/Web-Content-Management-with-Windows-SharePoint-Services.aspx. Make sure and read the comments at the bottom of the post, because Ian says the following in response to a question about whether this is "legal" or not:

Ian says:

"It is legal. If you are using full SQL server then SQL Server must be per-proc licensed but the built in DBthat comes with single server WSS is free. If you want to authenticate Internet users then you only need the Windows Internet licence which is cheap compared to MOSS for Internet license."

The Windows Internet license he mentioned (its formal name is Windows Server External Connector license) is required (but, according to Ian only if you want to authenticate external users - which most Internet sites don't), but it is a Windows Server licensing add-on, not a SharePoint license. Again, as long as you have Windows Server properly licensed, there are NO additional licenses required for WSS in any scenario. WSS is truly a free add-on to Windows Servers.

I know at this point you are wondering what is the cost of the Windows Server External Connector license if it turns out I need it? Well, according to this page on Microsoft's site it retails for $1999 for Windows Server 2008 (scroll down towards the bottom to find it). This license is purchased per server. So, if you have a two server farm for running your public website and you want to use WSS as the platform, the retail license cost to get you there would be $3998. Furthermore, this will allow unlimited external users to access your website.

Now, I am not saying that WSS is as good as a platform for public websites as MOSS is. PLEASE, don't hear me say that! MOSS has some great features that make it very, very nice as a web content management system. WSS does not include these features at all. One of the biggest of these features is the publishing subsystem that allows you to decentralize content authorship for different portions of you website. It includes a robust approval system so that approver's can be assigned to review authored content before it goes live. WSS does not have this same level of functionality.

But, for those companies where MOSS is simply not an option due to the cost, it certainly appears that there is evidence that WSS 3.0 can be used successfully as an extremely low-cost platform for building Internet sites.

I'd say that right now WordPress is probably the most popular open source platform for building high-quality websites. If you thought WordPress is only for blogging, you thought wrong. There are thousands of websites around the world running on WordPress (here is a good example). I like WordPress a lot, but I think WSS 3.0 is a very capable website platform as well and would definitely evaluate both of them if I were setting out to build a new website.

JXT – Javascript XHTML Tags

First of all, I would like to thanks Rich Tretola and O'REILLY, for the possibility to write on this blog and talking about my project (http://www.jxtproject.com), I'm very thankful for that! ...and I'm quite embarrassed, because this is my...

  • Sponsored Links

  •  

  • .

    Copyright © 1996-2010 Answer My Query. All rights reserved.
    iDream theme by Templates Next | Powered by WordPress