Wednesday, March 17, 2010

Silverlight and WP7 Learning Resources

Whilst trying to get my head around Silverlight a bit better (it is one of the 2 programming models for Windows Phone) I came across some useful new learning resources:

And if you want to get started with Windows Phone development, the best resources are:

There's also a good video of Mike Harsh going through Developing for Windows Phone 7 with Silverlight and his Slides and demos from his MIX10 Session.


Wednesday, March 3, 2010

Getting Started with Graffiti CMS

Getting up and running with Graffiti is very easy and one of the things that I really enjoy about using it. One of the things that I've struggled with when using some of the other larger open source products is just getting them going. For example, having to use SQL Server often means that I need to install it, then create the database (and pray that the scripts work) and then do configuration.

Also, some Open Source products are heavily dependant on other open source software. This makes them brittle and tied to what often becomes other unsupported legacy code. This has the knock on effect of making the product harder to get started with as time goes by.

Graffiti on the other hand is lightweight and relatively free of external bindings. This has meant that getting going with an Access database as the backend has not changed significantly in the 3 years that I've been using the product.

To get started, browse to the Graffiti CMS site on CodePlex and work through the "Getting Started" notes that appear on the home page. These lead you through the following steps:
  • Download the v1.3 source code
  • Download "extra" assemblies from http://graffiticms.com/lib/lib.zip
  • Unzip and add the extra assemblies to the \Branches\v1.3\src\Lib folder
  • Open the \Branches\v1.3\src\Graffiti.sln solution file with Visual Studio 2008
  • Update web.config to use the desired database settings
  • If you are not running IIS7 and ASP.NET 3.5 SP1, you should enable the "Generate Folders..." option in the admin >Site Options > Configuration page

Extra Assemblies

The extra assemblies are:
  • Telligent.DynamicConfiguration
  • Telligent.Glow - Web Controls by Telligent
  • Telligent.Glow.Editor - Web Controls by Telligent
These assemblies provide additional functionality and web controls and I believe that they are packaged separately because they needed to be subject to different licensing from the core Graffiti software.

Database settings
The notes for getting a database up and running for your Graffiti installation can be found . Essentially there are 3 parts to this:
  • Choose your Provider.  This is set via the "DataBuddy::Provider" key in web.config.
  • Update your connection string in web.config. There are samples provided, so just copy the one that is relevant for your database provider.
  • Set up your database as per the notes that can be found in the \Branches\v1.3\data\read_me.txt file.
If you are using MS Access for your database then getting up and running is as simple as copying a template .mdb file into your App_Data folder and then running the solution. I like the Access database option as it makes the entire website self contained, making it easy to move around and deploy.

Generate Folders
After you have installed and configured your basic set up, you should read through the Getting Started Guide to gain an understanding of more advanced configuration options that you might need to consider. One of the major things that you need to be aware of is the difference between how the site runs under IIS7 and IIS6.

Running under IIS7, the site uses an inbuilt routing mechanism for serving up virtual paths. When running under IIS6, the inbuilt routing is still used, however for that to work, the folders for paths need to physically exist on disk. To acheive this you need to log in to the Administration section and go to Site Options / Configuration and ensure that the "Generate Folders for Posts/Categories" option is checked.

Running the solution
From within Visual Studio, run the application. You can either click login or browse directly to /graffiti-admin/ and then login as an Administrator to start creating content and managing other aspects of the site. The initial Administrator username is 'Admin' and the password can be found in the Graffiti:User:DefaultPassword key in web.config.

Learning how to use Graffiti CMS

I've been thinking about CMS for a while and recently decided to get back in to using Graffiti CMS as my CMS tool of choice. I've used Graffiti before and I believe that, for a .NET developer, it is probably one of the best CMS tools around.

Late last week I downloaded it and used it to bang out this simple little hockey club website - http://web9ecf9dd.titan.studiocoast.com.au/.  Over the next few days I’m going to add several articles which explain how to get up and running using Graffiti and you will see the topics of these articles from the text in square brackets in the bullet pointed list below.

The things that I like about Graffiti CMS are that:

  • It is .NET based. I am a .NET developer and I really need my tool of choice to have a .NET flavor to it so that I can feel confident that I have full control over the final product. [Using Macros and Chalk Extensions]
  • It is lightweight. In fact it's probably the lightest of all CMS engines that I know of relative to the number of features and amount of power that it affords. In fact, from the time you download Graffiti CMS, you can be up and running in under a minute if you choose the MS Access data provider. [Getting Started with Graffiti CMS]
  • It gives me full control over the rendered HTML - Graffiti CMS layout templates are very powerful. [Understanding Graffiti Layouts and Templates]
  • It's extensible. I can create custom extensions very easily to do pretty much whatever I want. [Developing your own custom Chalk Extension]
  • It comes with lots of rich features that make it very easy to quickly build and deploy advanced websites. [Users and Permissions], [Themes]
  • It's open source and it's free. 

Further Reading
My Move to Graffiti - nice comparison of different tools