Friday, January 9, 2009

Using Windows Live Writer with Google’s Blogger

After some time of interruption I start to blog again.

To mark this event I decided to assign a new domain name for my blog address, http://blog.hosimauthuc.net, as you have seen.

I came across Windows Live Writer (WLW) while playing with BlogSvc, an open source ASP.NET 3.5 blog engine built with ASP.NET MVC framework. I found Windows Live Writer quite useful as a blog authoring tool, especially in the following points:

  • It allows me to author my blog posts offline. When I get online, just one mouse click will bring the post to my blog.
  • It uses my blog theme inside its IDE. I can almost write and preview my posts as the same time.
  • It has plug-ins to support formatting code examples.

The last point is quite important for technical bloggers like me. Leo Vildosola’s plug-in is a popular one (downloadable from here). Here below is a code snippet example created with Leo’s tool:

   1: public ActionResult Search()
   2: {
   3:     string query = Request.Form["keywords"];
   4:     char[] par = { ' ' };
   5:     string[] keywords = query.Split(par);
   6:     ResourceStorage rs = SearchService.SearchByKeywords(keywords);
   7:     rs.Name = query;
   8:  
   9:     return View("Search", new SearchResults(rs));
  10: }

Some kind souls in the above places have recommended the following two tips to get a clean display:
  • Remove max-height attribute from the generated source to get rid of the vertical scroll bar.
  • Change WLW’s blog settings to generate HTML markup (instead of XHTML as the default one) to avoid broken style when writing blogs for Google’s Blogger.
BlogSettings

I discovered that sometimes WLW's generated markups don't fit my expectation on Blogger (this may happen for Blogger only). Under those circumstances I log on to Blogger and perform final layout clean-up there.

Sunday, May 4, 2008

Talks at Microsoft Launch Event of Windows Server 2008, VSTS 2008 and SQL Server 2008

I gave two talks at Microsoft Launch Event of Windows Server 2008, VSTS 2008 and SQL Server 2008 on April 22, 2008 in HCMC, Vietnam.

They are on Agile development in Visual Studio Team System 2008 and Software Testing with VSTS 2008. The first talk discusses Microsoft VSTS 2008 integrated capabilities for agile development. The second one hightlights the automated testing inside VSTS 2008 for Unit Testing, Web Testing and Load testing.

You can download the above presentations at the following links.

VSTS 2008 for Agile Development (Vietnhamese)
Software Testing with VSTS 2008 (Vietnamese)

Sunday, December 9, 2007

Live Club Microsoft Technology Kick-off

Yesterday, Live Club Microsoft Technology Kick-off Event occurred at the Grant Hall of University of Natural Sciences, Saigon. I am among the key members of the newly-born club. The team did a good job to get the launch event. Almost one hundred visitors and club members were present at the event. I gave a presentation on MOSS as a development platform. Two other guys talked about MOSS's general features and deployment.


Nice event indeed. We are glad that the club has now come into being. You can visit the club web site at http://liveclub.vn for more details or to register as club members.

Friday, November 23, 2007

Email alerts not sent from SharePoint Portal Server 2003

Recently I ran into a problem with SharePoint Portal Server 2003: email alerts are not sent from any alerts created on any lists in the portal. Users still can see alert results under "My Alerts" on their personal sites. However, email alerts are sent if alerts are created on a list in a WSS site.

The situation is similar to the issue described in Jopx's blog. However, the hotfix mentioned in that blog post is obsolete now, since the described problem was addressed by SharePoint Portal 2003 Service Pack 2.

Unfortunately, even SP2003 SP2 does not remove the problem that I faced.

After several desperate experiments, a surprisingly simple solution popped up. SharePoint Alert and SharePoint Timer services must use a domain account. This is necessary even when I have a local database in a single server deployment.

The true reason behind this is that these services need to contact Active Directory for security issues. When a user browses to his/her My Site, the site owner was already authenticated so the alert results show up properly. However, before sending out alert emails, SP2003 services need to make sure that the receiver already has enough authorization to see the alert results. Hence at least read-access to Active Directory is required, whereas a local system account can't satisfy.

You can read more about discussions around this issue in this forum thread.

The moral here is that many things might be quite complicated although they appear simple. Furthermore, single server deployment of SharePoint 2003 in production environment may not be in common, so a quick search with Google would not yield the required answer.

Saturday, October 13, 2007

Hosting Silverlight Applications with Silverlight Streaming

Developing a Silverlight mini-application is not hard. There are excellent tutorials such as the QuickStarts series on Microsoft Silverlight web site. However, most Silverlight tutorials assume that you can deploy your multimedia Silverlight application to a web server that you have complete control over. What would you do if you don't have enough control over your web server on the Internet?

I ran into similar situation when I tried to deploy my Silverlight control in Google Blogger. Fortunately, after some Internet search, the following solution is found.

Microsoft offers Silverlight Streaming, a free hosting service that can solve this problem. All you need is a web page where you can place html and javascript code. The major parts of your Silverlight app will be hosted at http://silverlight.live.com/, including XAML files, media resources and javascripts. When your web page is displayed, your hosted Silverlight contents will be streamlined from the host to the client browser. Hence the name of the service is Silverlight Streaming.

The following steps describe what you need to do to get the Silverlight Streaming service work. I also included code snippets for a Silverlight mini-application that displays a smile as illustrating example.

Step 1.
Develop your Silverlight application with any existing development tools. At the time of this writing, Microsoft Blend 2 September Preview is my favorite one.

A typical Silverlight application will include

  • A .html web page to host the Silverligh plug-in control

  • A .xaml file to hold XAML script for display

  • .js files to hold javascript code


Not all of Silverlight application files will be uploaded onto the hosting service. Before uploading, test your Silverlight application locally to make sure it works as you expect.

Step 2.
Prepare a package to host your Silverlight application.
The package should have .zip format and includes the followings:

  • manifest.xml file to describe the contents of your package

  • The manifest.xml file for the example I developed will look like this



  • all .xaml files, javascript files required by your Silverlight application (excluding the Silverlight.js file containing Microsoft's Silverlight javascript code)

  • The Smile.xaml file for the example



  • all required media files (if any)

  • .html files should be excluded


The package used in my example contains only the XAML file and the manifest. Currently Microsoft Silverlight Streaming site is still at Alpha state only. The maximum size of the .zip package is set at 22MB. Hope that when it comes to release phase later, this limitation can be significantly improved.

Step 3.
Obtain your Silverlight Streaming account at http://silverlight.live.com
You will need a Windows Live ID to register for the Silverlight Streaming account. When registration succeeds, you will be given a public Account ID and a private Account Key to access the uploaded contents. Only the public Account ID will be needed in this example. Upload your Silverlight application package using "Manage Applications" section. All your uploaded applications can also be managed from there.

Step 4.
Create web pages that will display a Silverlight plug-in with your Silverlight application contents. You can copy the code snippets offered by Microsoft Silverlight Streaming service after uploading your application. Your Account ID will be already inserted into the code snippets properly.

If you can't modify the html header section of your web page, it will be fine if you inline all javascript code and html in the body of the page.

The resulting web page in my example will look as follows. Note that the call to

Silverlight.createObjectEx({source: "XAML_file", ...})

has been replaced by

Silverlight.createHostedObjectEx({ source: "streaming:/your_Account_ID/hosted_application_name", ...})



That's it! Just point your browser to the URL of your web page and enjoy your deployed Silverlight application.

Sunday, October 7, 2007

MOSS as Microsoft's top product in 2007

While there are still many debates going on around what is Microsoft's greatest product release in 2007, I strongly believe that Microsoft Office SharePoint Server (MOSS) could be the winner.

Here are my arguments to support this evaluation. The first one is from the point of view of system integration, and the last two ones are from software architecting and development perspectives.
  1. MOSS is a truely integrated collaboration environment. It brings into one place Enterprise Content Management (ECM), rich features for business management through built-in workflows and dashboards, and easy access to a variety of data sources with Business Data Catalog (BDC). Excel Services and InfoPath make MOSS environment even more tightly integrated with other products in Office 2007.

    Before MOSS the enterprise world is full of many ECM systems, both proprietary and open sources. With MOSS now including ECM and taking into account the large number of SharePoint users (up to 85 million licenses sold as Tom Rizzo said in his Foreword to the book "Essential SharePoint 2007", Addison-Wesley, 2007), it can be foreseen that ECM providers now face a strong competitor.

  2. MOSS is built on matured and new Microsoft technologies such as ASP.NET 2.0, web part frameworks and .NET 3.0. Customzing MOSS is now much easier than customizing SharePoint 2003. Everyone who worked with SharePoint 2003 knows how painful it is to introduce a custom branding to SharePoint 2003 deployment, or to make a SP2003 site internet-facing.

    It is easy to change the look-and-feel of MOSS portals with ASP.NET master pages. MOSS architecture also supports Internet-facing sites with non-Active Directory authentication mechanisms. Hawaiian Airlines and Glu Mobile’s Website are great real world success stories of MOSS sites presence on the internet.

  3. MOSS should not be approached like a shrinked-wrapped product. It fact, it has become a full-scale environment for enterprise computing. This environment comes with very strong out-of-box capabilities, such as the ones mentioned in section 1. above.

    However, MOSS also provides lots of support for third-party development within the environment. Imagine what we can achieve if we consider MOSS as a delivery channel where end-users can access their digital resources within a rich, customizable, web-based environment, with version control, BI elements. These digital resources can be processed outputs from other line-of-business applications. Full stand-alone packages or independent software applications may be built or re-architected to take into account MOSS capabiltities. For example, they can output their reports to MOSS document libraries or dashboards and let end users consume these outputs from there. MOSS can also be used to host the productivity-layer components as proposed by Microsoft in realizing composite applications by OBAs.

With these enhancements, MOSS bring more opportunities to system integrators and ISVs. They can offer services and products with MOSS in one of the following areas:

  1. Deployment and integration of MOSS into existing IT infrastructure.
  2. Development of MOSS web parts for rich business working contexts, or components to relialize the concepts of composite applications. Microsoft has already actively promoted Office Businesss Applications (OBA) in this direction.
  3. Re-architecting existing products with WSS or MOSS as the delivery channel. Again, Microsoft has spent lots of effort in this direction. Many serious products such as Microsoft Visual Studio Team System/Team Foundation Server and Microsoft Project 2007 already rely on WSS as an output environment. The latest release of Microsoft BI products (PerformancePoint Server 2007) also includes WSS 3.0 and MOSS components. While observing these products are gaining more popularity, many other software vendors may follow this approach.