June 2009 Entries

It has been exciting lately to work on a new project. Doxygen.NET is a wrapper for Doxygen’s documentation XML files. It allows you to access your documentation in a nice and flexible way. Imagine being able to access your documentation like this:

Docs docs = new Docs(Server.MapPath("~/docs-xml"));
foreach (Class c in docs.GetNamespaceByName("Ra.Behaviors").Classes) { Label nameLabel = new Label();
Label descriptionLabel = new Label(); nameLabel.Text = c.Name;
descriptionLabel.Text = c.Description; docsPanel.Controls.Add(nameLabel); docsPanel.Controls.Add(descriptionLabel);
DisplayMembers(c.Members); }

Isn’t this cool? We certainly think it is.

Doxygen is a very popular documentation system that supports many programming languages and output formats, and it is the documentation system we are using in Ra-Ajax. Doxygen has been around since 1997 and it is used in many notable projects.

We use Doxygen.NET in our documentation page for Ra-Ajax, it has helped us a lot to display the Ra-Ajax documentation in a custom and powerful way. Something like this would have been hard without Doxygen.NET.

We just released the first public version of Doxygen.NET and we decided to license it under an open source license. We chose LGPL version three to give users a great degree of freedom in using and modifying Doxygen.NET, if they wish to do so.

Share this post :

Technorati Tags: ,
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

And why shouldn’t I? I still wakeup in the morning and be able to open my eyes and see the beauty in this world. I am still able to breath fresh air and walk on my two legs by the sea. I am still able to think and use my mind. I am still able to work and earn my living. I still have my beautiful family and their love. How many people in this world can say the same?

Do yourself a favor and never define your happiness by what you don’t have. For If you keep searching for happiness in what you want to have, buy or own; you will keep searching until you reach your death. Don’t envy others, as it will only destroy you. Look around you and if you find somebody who is less fortunate, be grateful for what you have. Realize that true happiness can only be found in satisfaction and thankfulness.

If you want to taste true happiness, make it your goal in life to make others happy and do good for them. Nothing in this world can give you happiness and inner-peace like seeing them in the eyes of a fellow man that you just made happy.

Thank you God, I am the richest man in the world.

 

Technorati Tags:
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

 

The LiveMeeting Q&A session with ScottGu was, as usual, very exciting. As promised, here are some of the highlights from his answers.

Microsoft’s Development Process

In terms of the development process at Microsoft, Scott said that more projects will be developed with openness, transparency, more frequent releases, relying on customers’ feedback and with OSI open source licenses as in the case of ASP.NET MVC.

Silverlight

In regards to Silverlight 3 release date, it might be around the July 10th. time frame. Scott said that they are not sure yet about the final exact date of the release as they are still working on it. Silverlight 3 will have another option for an HTTP stack, alternative to the browser’s HTTP stack, to work around some difficulties like the ability to use HTTP verbs other than POST and GET and cross-domain networking. Printing support will not be available in version 3 but rather on the next version.

In regards to Silverlight for mobile, supported for Windows Mobile and Symbian OS, Microsoft is currently working with carriers and handset manufacturers to get Silverlight pre-installed and integrated with the mobile OS.

ASP.NET Ajax 4

Currently available in preview 4, has a nice feature called Client Templates to support data binding on the client. This is done by creating HTML markup templates and having HTML-compliant markers within those templates and then binding JSON-based objects to them with one-way and two-way data binding. The cool thing is that this is designed to work with the ASP.NET Ajax client library as well as other libraries like jQuery.

ASP.NET MVC 2.0

The preview release will probably be available within the next month or two. It will possibly be shipped as part of Visual Studio 2010. Here are some of the features expected:

  • Strongly typed helpers for UI and URLs.
  • Support to segment ASP.NET MVC apps across multiple projects with built-in support for grouping Controllers and Views together in a nice organizational way.
  • It Will be supported on both .NET 4.0/VS 2010 and also .NET 3.5/VS 2008 so you don’t need to wait for VS 2010 and .NET 4.0 to use it.
  • In terms of tooling support for ASP.NET MVC 2.0 in Visual Studio 2010:
    • Much better code-editing support.
    • The ability to write your unit tests and then create your controller classes, methods and implementation based on your tests’ contracts and signatures.

Visual Studio 2010

Visual Studio 2010 will have fully interactive WYSIWEG designers for WPF and Silverlight. It will have much richer extensibility for the editor and shell to enable more robust 3rd. party Visual Studio plug-ins. It will also have native support for Sharepoint projects with intellisense, debugging and deployment etc…

Support for multiple versions of the IDE in the same project is something that is particularly important to large teams; because usually everyone on the team can’t upgrade to the latest version of VS at the same time. Scott said that they tried hard to have that feature in VS 2010 but it was not possible. Scott also said that there are some technical reasons why this is harder than it might look and that this feature is on the agenda for Visual Studio 11. 

Share this post :

Technorati Tags: ,,
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

I will be attending a private LiveMeeting session tomorrow with Scott Guthrie, Corporate VP at Microsoft. Scott will probably discuss the new features in ASP.NET 4.0 and the future of ASP.NET Ajax. I am really excited and looking forward to this. ScottGu’s talks are always intriguing and interesting.

I will try to blog about this session and what Scott discussed during the next few days. Meanwhile, do you have any interesting questions you want to ask him? No promises, but I will try my best to get these questions through to him, if I get any.

Thanks are in order to Rune Grothaug, Community Manager at Microsoft Norway and to my friend and colleague Thomas Hansen, owner/CEO at Ra-Software AS for helping out with this.

Share this post :

Technorati Tags: ,,
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

We have been working hard on version 2.0.0 of Ra-Ajax and it is now publicly available for download. This release marks very exciting events and changes. Probably not the least of which is the switch of license from LGPL to GPL.

We have completely revamped the website design, to make it easy for visitors to find just what they need. We have a new infrastructure that will allow our existing users to get the most out of Ra-Ajax and new users to get up to speed quickly. Many changes and bug fixes were made since the last version to make Ra-Ajax even more reliable and rock-solid.

New Website and Infrastructure

The new website design is much cleaner and less noisy. Users can find information relevant to what they want quickly and without much hassle.

A core focal point for us with this new infrastructure was help and support. We wanted to make it as effortless and straightforward as we can for users to get help with Ra-Ajax.

 

Documentation and Tutorials

Ra-Ajax users can now, using the Docs page,  browse the entire list of reference documentations and tutorials available or filter them to quickly get what they want.

RaDocs1

Upon clicking a specific tutorial or reference documentation, full details will be displayed:

RaDocs2

A long with a fully functional and interactive sample, with source code:

RaDocs3

 

Q&A Support System

We have developed an awesome support system based on questions and answers, analogous to stackoverflow.com. We believe such system is perfect for support,  you can ask/answer questions, add a question to your favorites, vote a question or an answer up/down, comment on answers, search questions and much more.

Users’ activity on this system will not go unrewarded. When you ask, answer and comment on questions you will get credit points. These ‘creds’ will give you visibility and credibility among the Ra-Ajax community members.

We believe that such Q&A system would be useful for others as well. So we decided to make it an open source project and released it at Google Code as GPL.

 

Daily Build of Ra-Ajax

If you have asked for a feature or a bug fix, you don’t need to wait for the next release to get it. You can get it as soon as it is available in our source code repository. Our daily build system will create a release at 01:00 am daily (Norway Local Time) as long as it finds changes in the repository since the last daily build. The most recent five daily builds will always be available at http://ra-ajax.org/daily and the file names will contain the revision numbers they correspond to.

 

Ra-Software is a Software Factory

If you are still struggling with Ra-Ajax, or even with your own project, we have options to provide further help. Ra-Software can provide extensive in-depth training for Ra-Ajax, ASP.NET and many other topics. We also offer consultancy services for Ra-Ajax where we provide hands-on help in your project development in general or relating to adopting Ra-Ajax in your existing projects.

 

Changes and Bug Fixes

Version 2.0.0 of Ra-Ajax took a lot of time and attention from us. The changes are huge to be contained in one blog post. But here are some highlights:

  • New Behaviors:
    • BehaviorUnveiler, you can see it in action in our website menu. This Behavior can fade a Control into specified maximum opacity on mouse over, and fade it out to specified minimum opacity on mouse out.
  • New Widgets:
    • We removed WindowLight and added a new, minimalistic and a more generic widget called WebPart.
    • Inspired by the iPhone/iPod UI, we created a SlidingMenu control.
  • Dynamic JavaScript Inclusion, so no JavaScript file is loaded unless you absolutely need to use it.
  • Nicer error and exception display.

You can check out the Ra-Ajax change log for full details.

 

A Taste of What Can be Done with Ra-Ajax

Our friend Dave Lazarow, from South Africa, is an enthusiastic user of Ra-Ajax. He was building a portal for retail stores using ASP.NET Ajax and later switched to Ra-Ajax. Dave was so thrilled with the performance and productivity gains he acquired from using Ra-Ajax that he decided to create a video demoing his portal application:

 

Share this post :

Technorati Tags: ,,
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

If you don't care about retaining all the history of one of the repositories, you can just create a new directory under one project's repository, then import the other.

If you care about retaining the history of both, then you can use 'svnadmin dump' to dump one repository, and 'svnadmin load' to load it into the other repository. The revision numbers will be off, but you'll still have the history.

The above quote is from the Subversion FAQ at Tigris.org. After reading it, one might get the impression that merging two SVN repositories is a trivial process. Of course that largely depends on your situation, but it is usually not as streamlined as the above quoted text implies. In this post I will try to detail how I was able to achieve that.

Prolog

Due to certain circumstances we had to temporarily stop using the public Ra-Ajax SVN repository at Google Code and continue the development of Ra-Ajax using a private repository at our server. Now that these circumstances are gone, we wanted to merge all revisions from the repository at our server back to the Google Code repository so that we don’t lose any history of changes and can resume development using the Google Code repository.

Tools

The only tool I needed to do this is VisualSVN Server. It is a Subversion server for Windows that includes all the subversion binaries we need. It also has an MMC snap-in that allows you to manage your SVN repositories in a nice visual way:

It would be convenient after installing VisualSVN Server to add its bin folder to the PATH environment variable; since we will be using several of the utilities there from the command line.

Initial Plan

Since we wanted to retain all history of both repositories, following the advice of the Subversion FAQ was the initial plan. However, using ‘svnadmin dump’ and ‘svnadmin load’ means that you must have access to the servers that host both repositories. The reason for this is that the two commands expect a path to the repository and not a URL. This is of course possible with the repository that we want to dump which is the private repository at our server but it can’t be done, as far as I know, with the other repository at Google Code which we want to load the dumped repository into.

To overcome this problem we can mirror the Google Code repository locally and work on this mirror instead. Then we can reset the Google Code repository to revision zero and sync it to this mirror, which would finally contain the result of merging the two repositories. If this seems a little vague to you now, continue reading and more details will come.

Dumping the Private Repository

Since I have RDP access to our server, I can use ‘svnadmin dump’ from a command line to achieve this, like so:

svnadmin dump /path/to/privaterepo > PrivateRepo.dump

And this will dump the entire repository to the file PrivateRepo.dump. But here came another problem. Our repository at the server does not host only the one project we need to be dumped but it also hosts several other projects. The repository structure can be outlined like this:

  • PrivateRepo
    • Ra
    • ProjectX
    • ProjectY

Since we are only interested in the project called ‘Ra’ we can use another subversion utility called svndumpfilter to filter out the unneeded projects from the dump file like this:

svndumpfilter include --drop-empty-revs --renumber-revs Ra < PrivateRepo.dump > Ra.dump

This will filter out the unneeded projects from PrivateRepo.dump and save the result to the Ra.dump file which should only include the project ‘Ra’. The optional arguments --drop-empty-revs and --renumber-revs are necessary here to remove any empty revisions resulting from filtering and to appropriately renumber the revisions that are left.

If this works for you then good. However, filtering does not always work as expected and svndumpfilter can choke on some projects and fail to filter them out which happened in my case with an error similar to this:

svndumpfilter: Invalid copy source path '/ProjectX'

The solution I used to solve this problem is to mirror or synchronize project ‘Ra’ to its own dedicated local repository on my machine. Then dump that mirror instead.

Synchronizing Two Repositories

This can be done in following steps:

1. Using VisualSVN Server Manager, create a new user. Let’s assume username: user1 and password: user1_pass

 CreateSVNUser1

2. Right-click Repositories and create a new repository. We will call it ‘RaMirror’. It is important here to keep ‘Create default structure (trunk, branches, tags)’ unchecked since we want this repository to remain at revision zero in order to be able to sync it.

CreateSVNRepo1

3. Right-click the repository ‘RaMirror’ and click on Properties. Here you should make sure that the user we have created in step one has read and write access to this repository.

4. Before we can sync the two repositories ‘Ra’ and ‘RaMirror’ we need to edit the hook scripts for ‘RaMirror’. If you installed VisualSVN Server accepting all defaults, the folder that contains the repository files for ‘RaMirror’ will usually be ‘C:\Repositories\RaMirror’. Under the hooks folder, you will find the default hook scripts.

These are Unix shell scripts, you can of course modify them to work on Windows if you want. But in our situation we don’t really need to do that. We can just rename all hook files to use the ‘cmd’ or ‘bat’ file extensions instead of the default ‘tmpl’ extension in order to make them executable on Windows.

And for all the post scripts:

  • post-commit.cmd
  • post-lock.cmd
  • post-revprop-change.cmd
  • post-unlock.cmd

We can pretty much clear their contents; because they are mostly used to send notification emails after the corresponding action takes place. As for the other scripts:

  • pre-commit.cmd
  • pre-lock.cmd
  • pre-revprop-change.cmd
  • pre-unlock.cmd
  • start-commit.cmd

They do certain checks to make sure that the provided user credentials are allowed to perform commits, change revision properties, lock/unlock files etc…

Since we created this repository, RaMirror, locally and since we have full privileges and read/write access, we can modify their contents to just exit with a hard-coded success code. like so:

exit 0

5. We are now ready to sync the repository ‘RaMirror’ with the project that we want to dump, which is project ‘Ra’. To achieve this we will use another subversion utility called svnsync in two steps:

Firstly, we initialize the syncing process, like so:

svnsync init --source-username src_user1 --source-password src_user1_pass --sync-username user1 --sync-password user1_pass file:///Repositories/RaMirror svn://ra-ajax.org/Ra

Here we are using svnsync with the init subcommand. We are providing credentials using --source-username, --source-password for the source repository that we want to mirror,  and --sync-username, --sync-password for the destination repository which is ‘RaMirror’. Then we provide the URL of the destination repository and the URL of the source repository respectively.

Secondly, we start the actual synchronization process using svnsync with the sync subcommand:

svnsync sync --source-username src_user1 --source-password src_user1_pass --sync-username user1 --sync-password user1_pass file:///Repositories/RaMirror

Here we only need to provide the URL of the destination repository. After this finishes successfully you should have a mirror of the source subversion repository with all its history and revisions. And now we can dump this mirror to a dump file:

svnadmin dump /Repositories/RaMirror > Ra.dump

This will dump all revisions to Ra.dump, however the first revision just adds the same files and directories that already exist in the repository which we want to load this dump file into. We need to only start at the revision that had actual changes, assuming it is revision 2 and that the last revision in the repository is 100, the command we should actually use would be like this:

svnadmin dump --incremental -r 2:100 /Repositories/RaMirror > Ra.dump

Note that we also pass the --incremental option so that the first dumped revision, 2 in our case, would only describe the changes in that revision and not everything that existed in the repository as of that version.

I also similarly mirrored the repository at Google Code to a local SVN repository and named it ‘RaGMirror’.

Final Steps

Since the name of the repository we mirrored is ‘Ra’, the Ra.dump file will have the file/folder names that reside in the root of the repository prefixed with a ‘Ra’ folder. And since we need these files to be created at the root of the repository when we load this dump file not under a subfolder, we need to do some editing. You can read more about this here.

I used Notepad++ to search for all instances of ‘Node-path: Ra/’ and replaced them all with ‘Node-path: ’. We also need to search for the section that creates the ‘Ra’ subfolder and remove it. It would look like this:

Node-path: Ra
Node-kind: dir
Node-action: add
Prop-content-length: some_number
Content-length: some_number

Then we can save the dump file and start to load it into the trunk of our local ‘RaGMirror’ repository:

svnadmin load --parent-dir trunk /Repositories/RaGMirror < Ra.dump

After the loading process is finished successfully, the ‘RaGMirror’ repository would contain all revisions and full history of the two repositories that we wanted to merge.

The final step now is to sync this local repository ‘RaGMirror’ back to the public Google Code repository. Akin to what we did in step five in the previous section, but of course changing credentials and the source and destination URLs. However, before this can be done, the repository at Google Code must be reset to revision 0.

Be careful as many things can go wrong, be sure to have backups of every repository you are about to change and use the information provided here at your own risk. The image below shows the two revisions where both repositories merged seamlessly.

FinalResult

 

Share this post :

Technorati Tags: ,
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati