Templating Confluence notification emails

the details are listed here

http://confluence.atlassian.com/display/DOC/Customising+the+eMail+Templates
Customisations to the Confluence email templates will need to be reapplied when you upgrade Confluence. Consider this before making drastic changes to the layout, and be sure to keep a list of what you have changed for your upgrade process later.

Only administrators with access to the server where Confluence is running can modify the Confluence email templates.

Process to change the email templates
1.Shut down your test instance of Confluence.
2.In the Confluence web application folder, find the file /confluence/WEB-INF/lib/confluence-2.x.jar.
3.Make a copy of this file as a backup.
4.Learn how to edit files within .jar archives.
5.Within the jar file, find the /templates/email folder. Find the appropriate file(s) within that folder.
6.Edit the file with a text editor to make the required changes. The content is mostly HTML, but has some Velocity template variables in it. See Velocity Template Overview for more information about how these work.
7.Again using the guide on editing files within .jar archives, either rejar the set of folders or drop the new files into the identical folder structure in the WEB-INF/classes directory.
8.Start Confluence up again and test your changes.
9.Apply the changes to your production Confluence instance.
The same process can be applied to modify most of the templates in the Confluence web application. For velocity files that are not in a jar file, you need not shut down and restart Confluence. Be careful to test your changes before applying them to a live site. The templates contain code that is vital for Confluence to function, and it is easy to accidentally make a change that prevents use of your site.

For me jar alternation and replacement did not work since there was some conflicting chars in the css, however placing the vm files under WEB-INF/classes worked fine for me after sorting out the css. e.g I replaced the header.vm and footer.vm under the folder \templates\email\html\includes with exactly the same folder hierarchy and it worked for me.

Installing Google notebook extension of Firefox 3.5.x

I love google notebook, it helps me organize my daily activities and I use it as a task tracker as well. I had the firefox google notebook extension installed in previous version of firefox, but it fails to upgrade when I moved to firefox 3.5. However after some investigation I found out this very useful post of how to go about installing google notebook extension for firefox 3.5.2 , it worked really well for me and I though I should share this information as well.

Mindtouch Wiki Review

    Requirements

    To find a wiki that supports the following

  1. An Invitation system that allows to invite new users to the wiki, the user receives an invitation email and then responds to join the wiki. There is a filtration process to only allow invites to be sent to specific email domains.
  2. Enterprise architecture to be able to create multiple spaces or working groups.
  3. Manage permissions per space or working area.
  4. Be able to have discussions around wiki pages or contents.
  5. Email updates of latest contents.
  6. Document attachments.
  7. Mindtouch Investigation.

    http://www.mindtouch.com/

    Installation and Architecture

    Mindtouch application consists of middle tear application architecture built on c# mono platform so that it can run on most platforms that supports mono. The middle tear exposes all capabilities as a REST end point, the front end is built on PHP and consumes the REST end point.

    The installer is available as a VM image and also as an installer for each operation system, I had problems with installing Mindtouch on Vista to download and got the VM image running, it was very simple and straight forward to run the VM, the VM is a Linux image and is not heavy on resources.

    Out of the box the interface does not support multiple spaces , however one can create hierarchy of pages and then allocate permissions to individual pages to block access to a specific user or groups, this allows all sub pages to be blocked as well, so in theory it is a good idea to manage work spaces.

    The permission system allows creation of users, and also allows external authentication , which is support a very impressive list including LDAP , open if, facebook, wordpress etc, etc.

    The permissions can be managed based on roles and groups.

    One can invite users to collaborate on contents, however there is no work flow that can satisfy our filtered invitation work flow.

    Once can watch wiki pages and get register oneself for notifications. Once can register for page and all sub pages for notification, which means that one can register for notifications for a specific work space.

    The page edit and attachments interface is very good, the WYCIWYG editor Is very good and useful, there is a extensions interface that allows one to add internal and external contents in edit mode. One can pull in external contents like flickr pictures, twitter feed, RSS etc .

    All in all it’s a very good enterprise level wiki, and is free, the pricing model is based on add-on applications and support.

Reblog this post [with Zemanta]

Started working with Ruby on Rails

For a current project that I am working on I had to start working with Rugy on Rails. My first impression of both Ruby and Rails has been quite nice, although still lacking the good debugging capabilities like visual studio provides, but I hope that slowly and gradually I will be able to manage that better as well.

The tip of the day for Ruby is to use .blank? to check if an object is null rather then using .nil? or .empty? , this approach is suppose to be much better to use and suppose to be the prefered choice going forward with ruby.

Tip picked up from the forum post http://www.railsforum.com/viewtopic.php?id=18292

 

Reblog this post [with Zemanta]

CSharp Templating Engine investigation

    In order to render html from our C# REST service we had to look into templating engines available in C#, since we wanted our generated html to be altered on the fly.

    We came across the following

    4 View engines exist in

    MVCContrib project

    Which are

  1. Brail
  2. NHaml (NHaml has been moved from MvcContrib into a separate project)
  3. NVelocity
  4. XSLT
  5. In addition we found the following two engines

    Spark

    StringTemplate and StringTemplateMVC

    Asp view from Castle project

    Each engine aims to keep the focus on the generated html, and the dynamic contents are inserted into the html.

    Our decision about which language to use was based on the following conditions

  6. Be able to use the same templating / view engine in asp.net MVC.
  7. Do not have to learn a new templating language if possible.
  8. Be able to keep the business logic separate from the view templates.
  9. Have the least learning curve to implement a basic use case.
  10. Has enough capability to be able to use advance features and capabilities.
  11. Should be extendable if needed.
  12. Should have a very strong developer community to support and sort out the bugs with.
  13. Should be in use for sometime to be able to determine its stability.
  14. After doing quite some investigation we decided to go for Spark templating engine, primarily because of the capability of being able to use c# like syntax in templates, and the initial configuration and setup was very simple and easy.

Reblog this post [with Zemanta]

Visual Studio 2008 Internal Web Server stopped working in Vista

I have been debugging perfectly fine using Visual Studio 2008 using visual studio internal web server, but suddenly today it stopped working (maybe due to windows update, but still not sure about the cause of this suddenly not working), On starting the debugger IE came up with a blank page saying the page could not be opened, same happened in firefox when I tried to use that for debugging, It took me sometime to realize that this was due to a vista Issue, IPv6 gets installed with Vista and cannot be un-installed or disabled easily, and that creates the problem. I followed this post to sort out my issue.

The main action that sorted this out for me was to edit the hosts file in C:\Windows\System32\drivers\etc

and change the localhost entry from

::1             localhost

to

:::1             localhost

one more Collen.

So if you are having this issue as well, do not pull your hair out but follow the post linked above or change your host file entry for localhost as explained above.

MovableType Invalid login error on XML-RPC call

I have worked with XML-RPC calls in the past to interact with MT in the past but after release of version 3.2 onwards I did not get a chance to work with it again, until recently. I used the Argotic Syndication Framework to interact with the MT XML-RPC. However I was constantly getting ‘Invalid login’ error even when I used the MT administrators details. I even tried using Fiddler to make sure that it was nothing in my code that was creating the issue.  The method mt.supportedMethods returns all supported methods perfectly fine, however metaWeblog.getRecentPosts returned invalid login error.

After doing a lot of debugging I finally found out this documentation which indicates that each user has got a separate password for remote API.  Once I changed the password for the user I was using to connect through the remote API, all started to work okay.

The way to alter this password is as under.

1. Log into MT
2. Click on your username in the top navbar to go to your profile
3. Scroll down to the bottom where you see “API Password”
4. Input the password of your choice and save. For security reasons, it should be different from your normal password
5. Use that password in your client software

Integration testing In .NET

According to Wikipedia

‘Integration testing’ (sometimes called Integration and Testing, abbreviated I&T) is the phase of software testing in which individual software modules are combined and tested as a group. It follows unit testing and precedes system testing.

Integration testing takes as its input modules that have been unit tested, groups them in larger aggregates, applies tests defined in an integration test plan to those aggregates, and delivers as its output the integrated system ready for system testing.

Strategies

You can do integration testing in a variety of ways but the following are three common strategies:

· The top-down approach to integration testing requires the highest-level modules be test and integrated first. This allows high-level logic and data flow to be tested early in the process and it tends to minimize the need for drivers. However, the need for stubs complicates test management and low-level utilities are tested relatively late in the development cycle. Another disadvantage of top-down integration testing is its poor support for early release of limited functionality.

· The bottom-up approach requires the lowest-level units be tested and integrated first. These units are frequently referred to as utility modules. By using this approach, utility modules are tested early in the development process and the need for stubs is minimized. The downside, however, is that the need for drivers complicates test management and high-level logic and data flow are tested late. Like the top-down approach, the bottom-up approach also provides poor support for early release of limited functionality.

· The third approach, sometimes referred to as the umbrella approach, requires testing along functional data and control-flow paths. First, the inputs for functions are integrated in the bottom-up pattern discussed above. The outputs for each function are then integrated in the top-down manner. The primary advantage of this approach is the degree of support for early release of limited functionality. It also helps minimize the need for stubs and drivers. The potential weaknesses of this approach are significant, however, in that it can be less systematic than the other two approaches, leading to the need for more regression testing.

Finding a Tool


While trying to find a good framework for integration testing I came across FIT framework for integration testing , but considering the amount of support and documentation available for the framework I decided not to investigate it further. So using Nunit for Integration testing seems to be the best way to go about doing integration testing at this time.

In order to use Nunit for Integration testing I found one good blog post here and another one here however it does not give a definite answer of what’s the best way to go about Integration testing.

Spring framework gives some guidance how to use integration testing for the database objects and spring objects but I think for the moment if we mock up the spring framework tests then we should be fine.

In case of using Nunit to do integration testing , and keep the tests separate there are two suggested methodologies

1. Categories the Integration tests and Modular tests separately and then one can use Nunit to test each category.

2. Keep two projects separately one, for Unit tests and one for integration tests.

http://www.testdriven.net/ is a useful .net tool that allows to integrate nunit within visual studio.

A quick comparison of the testing frameworks for .net are listed here

A good checklist of unit testing practices to consider for doing Unit testing is listed here.

Conclusion :

It seems that at this time the best way to go about Integration testing is to use Nunit or Xunit whatever one prefers as a testing framework, and adopt either one of the ways listed above to separate your unit tests from integration tests.

Getting Started With Windows Azure Development

In order to start working with Windows Azure Development following components are required

Windows® Azure™ Software Development Kit

Windows Azure Tools for Microsoft Visual Studio

Login to Windows Azure services

Windows Azure Consists of following four main components

  • Windows Azure: Provides a Windows-based environment for running applications and storing data on servers in Microsoft data centers.
  • Microsoft
    .NET Services: Offers distributed infrastructure services to cloud-based and local applications.
  • Microsoft
    SQL Services: Provides data services in the cloud based on SQL Server.
  • Live Services: Through the Live Framework, provides access to data from Microsoft’s Live applications and others. The Live Framework also allows synchronizing this data across desktops and devices, finding and downloading applications, and more.

    In order to develop a hello word web cloud service I installed the SDK and found the following Visual Studio templates installed in my VS 2008.

    In order to run the Service Bus Echo sample I compiled the sample placed at C:\Program Files\Microsoft .NET Services (Nov 2008 CTP) SDK\Samples\ServiceBus\GettingStarted\Echo\CS35

    Which is a simple Echo application. On running the application I was able to connect to my Windows Azure online Service bus end point by providing the solution name and the password for the solution set in the service Credentials interface. Similarly I was able to connect to the Service using the client application and the resulting echo sent from the client application was Echoed on the Server application. So in short the client and server where able to talk to each other through an intermediate service bus provided by windows Azure services. If this client and server live in separate data centres behind firewall or whatever, as long as they can access the internet they will be able to communicate to each other.

    This all looks very interesting and I am inclined to look into it in more detail and utilize my windows Azure account to develop applications against it.References :

    the excellent White Paper by David Chappell

    Blog post by Mike Ormond

    MSDN Azure Services platform

First Look at LINQ

I have been wanting to look into LINQ for quite sometime and finally last week, due to the requirements of our current project I had to quickly get into it and use it.
My first impression is that although a bit tricky to get your head around terms like Expression Tree’s , Lambda Expressions, and Extension Methods etc, once your understand the tricky notations it really is fascinating what you can do with it.

Last week I attended a London.net user group meeting on DSL and realized how much Domain Driven Development is being utilized in LINQ , and that is surly one of the upcoming development methodologies , so one thing is for sure that I need to spend much more time understanding LINQ and the related technologies.

A simple LINQ to Object example looks something like this

string[] presidents = {

“Adams”, “Arthur”, “Buchanan”, “Bush”, “Carter”, “Cleveland”,

“Clinton”, “Coolidge”, “Eisenhower”, “Fillmore”, “Ford”, “Garfield”,

“Grant”, “Harding”, “Harrison”, “Hayes”, “Hoover”, “Jackson”,

“Jefferson”, “Johnson”, “Kennedy”, “Lincoln”, “Madison”, “McKinley”,

“Monroe”, “Nixon”, “Pierce”, “Polk”, “Reagan”, “Roosevelt”, “Taft”,

“Taylor”, “Truman”, “Tyler”, “Van Buren”, “Washington”, “Wilson”};

IEnumerable<string> items = presidents.Where(p => p.StartsWith(“A”));

foreach (string item in items)

Console.WriteLine(item);

The LINQ Project is hosted here