Tuesday, December 29, 2009

My top 5 Tech Moments of 2009

As year 2010 is approaching, I am taking a look at all things significant (to me) from year 2009 in retrospection, and here’s the rundown in reverse order: 

5. Windows 2008 R2

The Windows 7 for geek/developers. Installed it, loved it, and still having random blue screen on my Vostro 1400… anyway, its one of the best Windows i had used so far (the last time I said this was on Windows 2008). The new taskbar reminded me of Mac’s Dock, and works just well. Also am impress with how the new Network settings are presented, everything common can be done through the notification area, neat!

 

4. Owning my first Mac

Unlike a lot of tech guys in the field, I don’t remember owning a Mac before. I vaguely remembered an IBM AT during some point of my early computing days but that is as far as it goes :D

Being a windows guy for my entire life, on 2009, I finally got myself my first Mac - the most entry level Mac Book (white), and, the reason? to try out Xcode… hey… You can’t blame a tech guy for being techie! Anyway, the Mac fluent user experience and iLife, swipe me away straight away!! Wow, not to mentioned the amount of cool effects I can do in iMovie, and the amount of time I spent jamming weird notes in GrageBand, the photo of my trips popping up in different part of the globes in iPhoto, all in all, one word, “Fascinating!”.

Now that I had seen elegance I always force myself to rethink a few times when I am architecting my solutions - Is my solution already Mac’s elegance or only Windows usable

3. New Media – Twitter, and Podcasts

Now, talk about late adopter, how about start twittering on 2009? I started to look at twittering after reading Time Magazine’s article on twitter, and wonders, “how the h*** the entire world had passed me unnoticed!”. Anyway, after twittering for a while, my take? “Nah, its overrated”. Maybe it matters more to people working on media. The nice things I get so far from twitter is maybe nice tips about AppStore sales from AppSlappy, some great tech news on SharePoint, some great tips and new plugin of jQuery… Maybe, I’ll be more into twitter when more of my friends circle starts to twitter regularly.

Now, podcast is one of my life changing events in 2009. Since moving to Hong Kong at 2008, I had to endure daily, twice, 1/2 hour commute in MTR. Not too bad, but still a time waster, furthermore, the train is so crowded that one hardly have any places to stand, not to mention read or surf net. That’s when I ‘discovered’ podcasts. From the cool gadgets (Engadget Podcast), to daily doses of tech news (Buzz Out Loud), to the entertaining Twitt with Leo and gangs, to the far-fetched (for me) but real This American Life, commuting is never the same again. Imagined I had transformed from never-listen-to-walkman guy to never-leave-house-without-earphone guy overnight, this sure is one of the ‘moment’ in my life.

2. SharePoint Once Again

My bread and butter. This year, I ‘discovered’ web 2.0 in SharePoint (2007) using a combination of jQuery, .NET 3.5, AJAX (JSON) and imagination. Had the chance to perfect this trade on a few interesting projects, and my client just loves the end results. Talk about ‘elegence’…

Another milestone this year was the time I finally touched SharePoint 2010 for the first time, in a lab, in SPC2009 at Las Vegas. SharePoint had came a long way since 2001! More opportunity for customization consultants like us in the future? Not really! As SharePoint 2010 had fixed a lot of kinks of 2007, I foresee much DIY in-house development scenario for SharePoint 2010 to come in year 2010. Anyway, this is the reality of tech life. Everyday is a new day, and we just got to work on perfecting our skills and prepare a strategy to handle the unknown. And I still have high hope in my company in able to pull this out, as how we had did it switching form 2001 to 2003, and 2003 to 2007!

 

1. Owning my first & second iPhone

Again, talk about late adopter… Anyway, finally got myself an iPhone 3G early 2009, after it had been buzzing for a few years (replacing my Samsung Omnia WM6.1). Bought a 2nd one (iPhone 3GS) this Oct (argh the Apple tax!)… and, I had never been as happy about a phone before!!!!

Still remember vividly the first few moments when I started using iPhone, the way it automatically connects to Wifi when awoke, the full html in email, the beautifully rendered and fully functional webpages in Safari, the instant locating in Google Map. The swiping motion and fluent animations. and don’t get me started with all the fantastic apps that I had bought. These all, adds up to an unparallel mobile computing experience! I cant imaging how i live with the awkward lag and weird navigate and limiting functions of my Omnia phone before this!

My phone is literary my couch computer nowadays. On a Sunday morning, I’ll relax on the couch and use the phone to surf for web comics, news, and even do some internet banking. Finally on 2009, one of my dream came true. As I had always fantasized of being able to do the exact same things with a ‘PDA’ since I first own a HP Jornada at 2000. Kudos technology! Kudos Apple! and Kudos for a great year, 2009!

Wednesday, December 2, 2009

Changing the Forms of your SPList in WSS/MOSS 2007

Had been browsing the web and found no good solution to this, I think I’ll write about this instead.

Basically the whole idea is to change the Display/Edit/New form of a specific list to point to another page, rather then the default NewForm.aspx or EditForm.aspx or DispForm.aspx (for custom lists for example). And would like to do so without going through all the pain of creating a new list definition.

Now, a quick solution would be to use SharePoint designer, where you can change those form’s URL directly through the List Property. However, a caveat, you are only allowed to point the form URL to a page that exists in the current web. In other words, you cannot point them to custom pages you deployed _layouts folder. A possible solution here might be writing ‘stub’ pages, that will further redirect users using javascript to the correct _layouts pages.

Another more elegant solution would be to change the forms’ URL programmatically through SharePoint DOM. However, take note that SPForm object cannot be modified. For example, the following will give you error:

SPForm newForm = list.Forms[PAGETYPE.PAGE_NEWFORM];
newForm.Url = "xxxxx";

Now, the fun part is, although SPList’s forms do not change,  SPContentType allows you do to so! The solutions I have is:

  1. Configure the list so that it supports ContentType (in advance list settings). For Custom List, this will create a content type named “Item” and content type named “Folder” for this particular list
  2. Using powershell/other coding means, do the following:

SPContentType ct = list.ContentTypes[0]; //assume it is the first
ct.NewFormUrl = "_layouts/MyNewForm.aspx";
ct.EditFormUrl = "_layouts/MyEditForm.aspx";
ct.DisplayFormUrl = "_layouts/MyDisplayForm.aspx";
ct.Update();

Now, this particular list will use the correct pages you deployed in the layouts folder!

Tuesday, November 24, 2009

My SharePoint Server 2010 is fast!

Finally! Manage to get SharePoint Server 2010 to run (fast)!! As an attempt to try SharePoint Server 2010, and to avoid multiple servers (at this moment), I decided to setup SharePoint Server 2010 in standalone mode (using SQL Express). Tried it on a Hyper-v VM with Windows 2008 R2 (with Hotfix: 166231), the server is crawling (like a turtle that is, not crawling as in FAST indexing) with 1GB ram setup.

I guess it would be correct to assume that SharePoint 2010 will run a lot faster if I just assign more RAM to the VM. [UPDATE (27 Dec): Yeap, confirmed, assigned 2gb to the VM, SharePoint 2010 works quite fine] However, why stop here? I tried a totally radical approach instead: BOOT-VHD. Now my SharePoint 2010 is literary flying in my Laptop of 4GB ram with direct hardware access! summary of steps I did as following:

  1. Prepare Windows 2008 R2 VM using Hyper-v
  2. Use BCDEDIT to mount the VHD into boot menu.
  3. Boot into the vhd [note 1]
  4. Install relevant drivers
  5. Install pre-requisites for SharePoint Server 2010
  6. Install hotfix 166231
  7. Install SharePoint Server 2010 (standalone)
  8. SharePoint 2010 flies :D Nice!

Anyway, Reza Alirezaei’s article is a great source of reference:
http://blogs.devhorizon.com/reza/?p=989
I followed his steps and success except that I did not Sysprep (as I am running the VHD in the same laptop, and it works in my case without sysprep).

note 1: In step 3, I got a 0x00000136 Blue Screen, (“VHD does not have enough free space to expand the vhd”) after select to boot into the VHD in the boot menu. Now this is an interesting one, seems like when you boot into vhd, the disk size you specified for the VHD will be ‘virtually’ pre-allocated in the drive. Note, it is the size you specified during creation of the VHD, not the actual disk space it uses. My VHD is ‘virtually’ 120GB, but physically only around 7GB, but i still need at least 120GB free on the drive that i stored the VHD for it to boot success… Also worth notice, when I booted into the VHD, other drives (physical harddisk drive) are also visible, and I notice the drive storing the vhd have 120GB less of space, which is ‘virtually’ pre-allocated. When i booted back to my host OS, those spaces are still available for use.

Friday, November 20, 2009

You can uninstall VM Additions version 13.813 and later from Hyper-V!

Okay, I admit, maybe its just me amusing myself.

I always remembered (from the old days of Hyper-V…) that we are not able to uninstall VM Additions installed by Virtual PC when the VM is running in Hyper-V... I had to hack Windows 2008 to boot into non-hyper-v, to run Virtual PC, so that I can uninstall the damn VM additions!

Today, after installing Win2k8 R2, I imported some old VPC’s VM into Hyper-V, and go to Add/Remove programs to try my luck... And it works this time round!!

Some digging into TechNet found out that we actually can uninstall certain version of VM Additions directly in Hyper-V. Not sure when this was out, but it sure is news to me! (and a time save too!)

image

Improvement in Importing VM in Hyper-V on Windows 2008 R2

Had recently ran out of space in my dev laptop’s old 250GB hard disk. Just moved-in to the new Windows 2008 R2 with Seagate 7200.4 320gb hard disk, and, of course first thing to do is to fill it all up again with with tons of Hyper-V VM. To my amazement, I get some cool new options in the Import VM screen:

image

Now this is some real improvement! Especially the ‘Duplicate’ check box!!! Can’t count how many times I accidentally imported my archived Hyper-V VM in the old Hyper-V and found out that it cannot be imported anymore!! Now at least the options are clear and able to ‘duplicate’ sure helps! Was a shamed that these are not able in the ‘old’ Hyper-V, everyone, just update to R2 already!

Thursday, November 19, 2009

No Luck on SharePoint Server 2010

Well, my installation of SharePoint Server 2010 failed. It is not supported in Windows Server 2008 R2 yet... found out the hard way, sigh...

Required some sort of service pack for Windows Server 2008 R2

http://blogs.msdn.com/opal/archive/2009/11/16/installation-notice-for-sharepoint-2010-public-beta.aspx

Time to roll back to good-old SharePoint Foundation.

Wednesday, November 18, 2009

Here comes SharePoint Foundation (beta)

Just got SharePoint Foundation 2010 up and running!

image

It sure takes a lot of RAM! maybe its because of the x64.

Installation generally went well, the SharePoint Foundation installation got stuck in the last stage “Applying Updates…” for around 50 minutes, but it continued on and completes as usual.

SharePoint Configuration Utility for SharePoint Foundation failed for the first time around step 8, weird error, “User not found” some where at the configuration database, captured in the log file. However, I re-run the configuration utility, and it works fine!

Now to shutdown the VPC and give it more RAM before I install SharePoint Server 2010.