Friday, November 28, 2008

LayerSample.November.2008.Release

I have finally released a stable version of the Layered Architecture Sample for .NET 3.5 today. You can download it here. Included in this release is the Expense Sample Application 3.0 and the SCSF Client for the Expense Sample 3.0. Both releases contain fixes to some of the problems found in the May 2008 preview.

This November 2008 release also spot a closer mapping to the new architecture diagram that was published in the patterns & practices Application Architecture Guide V2. Included with the distribution is also an architecture diagram that most developers were asking for.

Now, that I have completed this release, I hope I will be able to move on to .NET 3.5 Service Pack 1 features next. I have so far developed a lot of curiosity for ADO.NET Entity Framework and ASP.NET MVC. I hope I will be able to incorporate them in my next release.

If you have any comments or feedback on the project, please feel free to post it at the project discussion site.

Application.Architecture.Guide.2.0.Beta.2

Beta 2 of the Application Architecture Guide 2.0 is now available for download.

Thursday, November 06, 2008

LayerSample.Linked.From.MSDN?

While checking out LayerSample's site statistics today, I discovered that there were some redirections from MSDN. I clicked on the link and discovered this. WOW! This is so awesome!

Wednesday, September 03, 2008

MOSS.BDC.&.Informix.101

I'm back doing Office Sharepoint Server again! ARGGGGGGGGGGGGH!!!!

This time, I will need to get my hands dirty on Business Data Catalog (BDC). I'm supposed to help my customer to expose some data from an Informix database to MOSS using BDC *sounds exciting eh?*

Here's a tip, if you are new to BDC, check out this documentation on MSDN. Spend about two days reading it and you will become an expert! You can also watch a short screencast here. And of course, no learning is complete without practice and so, you got to do it on an actual MOSS installation. *I recommend Hyper-V-ing an image*

To make your life easier in editing the Application Definition File (and to maintain your sanity), make sure you download the latest Office SharePoint Server 2007 SDK. Why? Because there is this handy tool called Business Data Catalog Definition Editor that can help you edit the application definition file. It is not perfect but it gets 90% of the job done. For the remaining 10%, use trusty Visual Studio 2008.

The tool isn't installed by default. You have to install it from Drive:\Program Files\2007 Office System Developer Resources\Tools\BDC Definition Editor. There is a setup.exe file in there which is safe to double-click. :)

If you feel like typing out the xml in Visual Studio 2008, then I suggest you load in the schema. It is in a file named bdcmetadata.xsd located in drive:\Program Files\Microsoft Office Server\12.0\Bin. It will help get some intellisense into Visual Studio to reduce the number of typos.

To get data out from Informix, you will need to install the IBM Informix Client SDK on the MOSS machine where it will contain the necessary drivers and providers to the database. You can't use the Informix .NET Managed Provider with the BDC Definition Editor and I can't get the Informix OLEDB Provider to work. So, the only way (for me) is to use good old ODBC.

If you are using the BDC Definition Editor, do becareful that the generated SQL statements for the Informix tables will be incorrect. Remove all double quotes from the column names and replace named parameters i.e. @CategoryID with the question mark (?). It is recommended that you define primary keys for your tables in order for the editor to do its magic. Otherwise, you will go through a whole lot of clicking.

When primary keys are defined, the editor will automagically create a SpecificFinder and an IdEnumerator method for us. We just need to create a Finder method for the BDC Data List Webpart. You can test the methods by clicking the Execute button (note: this is context sensitive and only appears when a method instance is selected).

Finally, when everything is defined, right click on the BDC Application name (root) and Export the definition file. From here-on, you can import it to MOSS via the BDC section under your Shared Services Administration page.

If everything works accordingly, you should be able to use the BDC webparts to expose the data from the database. Take note that you may need to configure Enterprise SSO in order to get things working correctly.

Anyway, if you would like to play around with BDC, I suggest you use a SQL Server as it is much easier.

Application.Architecture.Guide.2.0

The Patterns & Practices group has started working on the second version of the Application Architecture Guide and is looking for feedback. You can check out J.D. Meier's post for an initial list of topics that are planned for the guide or follow it through in its codeplex site.

And incase you are wondering... Yup! I'm one of the contributors/reviewers actively participating in shaping the guide. :) Hence, I will temporary freeze the development of Layer Architecture Sample for awhile to help work on the guide first. :)

Watch my blog (or the AppArch codeplex site) for updates on the guide.

Broken.Image.Links

Apparently, SGDOTNET did another major upgrade to their site and the incident broke all my image links on my blog :(

Wednesday, May 28, 2008

Layered.Architecture.Sample.for.NET.3.5

I have just released a work-in-progress version of my Layered Architecture Sample for .NET 3.5. I have been toying with the .NET 3.5 technologies such as the new WorkflowServices and LINQ for quite a while, so I guessed it is time to push something out to the public. You can grab the source code here.

Be reminded that I'm still working on it. There are many bits that are incomplete, particularly with the client applications. I was working on a WPF client earlier on but was distracted by work to do something else. Recently, I was learning the Smart Client Software Factory (SCSF) and needed a base for my experiments. So, I developed a SCSF client for the sample just for the kicks.

It made me realized that there is another dimension that I could cover which is demonstrating how to integrate those published software factories with the Layered Architecture. If time permits, I may look at the Web Client Software Factory next.

I know some of you may be confused as to what is this Layered Architecture Sample thing. It is not a framework like my previous project - Paladin. That's history as far as I'm concern with the emergence of LINQ and I kinda gave up on building anymore frameworks for now.

Layered Architecture Sample, as the name implies is just a sample application with the emphasis on 'Layered Architecture' which means how we separate all our code into layers (like onions). Although it takes the form of an Expense application, the jewels are actually in the code and design (so don't bother about the functionality of the sample).

With so many .NET technologies available today (and many more little add-ons coming along), how are we supposed to know how to hack-up all of them into our enterprise applications? How are we supposed to upgrade to newer stuff without killing our existing applications?

Most of the samples I find out there are technology centric. They usually demonstrate all the capabilities and strong points of a particular technology i.e. User experience samples will move in with jazzy-snazzy front-ends but weak back-ends, web-services samples will go into an SOA over-drive (SOAP this, WSDL that) and O/RM samples will demo its own thing and etc. Now I'm not sure about you, when I see all these I either go into fits or give a blank DuH!

So, in my quest to explore how to put all these technologies together (little by little), I started the Layered Architecture Sample project and made it public to share with everyone. By layering my application, I can easily place and replace pieces of my code as new technologies are introduced.

The 3.5 preview release is a good example of how I could ripped out Enterprise Library from my data layer and replace it with LINQ without affecting my application. I converted my workflow without killing my client applications. And I also build a SCSF client on top of my application without breaking my workflows, business components, data components and so on. All the changes were isolated (to some extend). I also get the chance to experience what works with what.

So, that's what Layered Architecture Sample is all about. :)

Saturday, May 17, 2008

Duh.Power.of.x64

I have recently converted my Lenovo ThinkPad T61p (company asset) into a super workstation by installing Windows Server 2008 64-bit and I must say it is awesome!

The thought came a few months ago, when I learned that all Core 2 Duo processors are 64-bit (ok, I know I'm a bit dumb when it comes to hardware) and that the T61p is really a kick @$$ notebook with support for Intel Virtualization Technology (which means it could run Hyper-V!). And after getting 4GB RAM, I discovered that my 32-bit Vista can only use up to 3GB of RAM (although SP1 detects 4GB) - What a waste?!

So I went on with Windows Server 2008 x64 and since then, I have been very happy with it. On boot up it takes lesser resources than Vista and performs faster. Lenovo has all the drivers available for 64-bit - just download the ones for Vista 64-bit.

For my work, I have installed SQL Server 2005 x64 and Visual Studio (2005 and 2008) and they all worked fine. Infact, I felt that my code compiles faster! (or maybe it is just psychological).

Note: There is no 64-bit Visual Studio but there is 64-bit .NET Framework.

I also enabled the 'Desktop Experience' a.k.a. 'Aero Glass' and did some performance tuning to make it behave like a workstation. I also got Windows Sidebar working but not without some registry hacks.

Out of curiosity, I enabled Hyper-V to checkout the new virtualization technology and it is pretty cool with the ability to assign number of virtual processors (CPU), support for 64-bit guest OS and make full use of hardware virtualization. Hyper-V is still in RC now at the time of this post. My virtual machines run as fast as my host eventhough they are on external hard drives connected through USB.

So if you are thinking of reformatting your notebook, do consider Windows Server 2008 64-bit if your hardware supports it!

TFS.2008.Installation.Lesson.Learned

The beta release of Service Pack 1 for Visual Studio 2008 and Team Foundation Server 2008 were released a few days ago and I was looking forward to the promise of supporting SQL Server 2008 February CTP in this service pack release. So, I gave it a shot.

As usual, everything installed well except for TFS 2008. I got the same problem I had before. This time round I didn't configure a WSS site myself. I realized that the problem isn't really with the 8080 port. It was due to me naming the TFS web site as "Team Foundation Server".

Note: Configuring the port 8080 will allow the installation to succed but will cause Team Project Creation to fail later on.

Therefore, if you are installing TFS, make sure you don't name your extended web site "Team Foundation Server" during the stsadm command line step. Call it something else like "Team Foundation Web Site".

Now, that's really a lesson learned!

Sunday, March 23, 2008

Layered.Architecture.Sample

Finally!!! It is out of the bag - the latest release of my Expense sample application that is aimed at illustrating how to build .NET enterprise applications using the Layered Architecture concept. In case you are blur-sotong on what is Layered Architecture, it is simply a design pattern where you separate your code logic into Presentation, Business and Data layers.

Now don't confused yourself with n-tier or 3-tier which deals with physical separation of code components. This is logical separation.

I've been working on this sample for almost 2 years now with the first non-public version illustrating how to achieve layering using .NET Remoting. Then I got a little serious with it when I decided to replace remoting with WCF.

It has always been a showcase for Application Architecture on .NET to my friends, MVPs, developer communities and customers. (It is something that I will pull out on a projector when a developer asks, 'How to develop that ah?').

On August last year, I've decided to make it public on http://www.codeplex.com/LayerSample to widen the reach. Since then, I've been procastinating on writing about it on my blog. Today, I managed to resist the XBOX 360 controller and write an entry on my blog about it. :p

Here's a screenshot of the application's workflow (click picture to view in full size).


I hope I can share my insights on developing layered applications with more people around the world. This latest March release mainly focuses on my research on WCF and WF on .NET 3.0. I'm also working on a version that is looking at LINQ and WorkflowServices in .NET 3.5 which I hope I can get a CTP out within these few months.
I've really learned a lot during the construction of this sample - challenges that most people will encounter when developing applications like these. I hope you can learn a thing or two from it as well and if you like it, please help me spread the word or blog about it.
I will talk about it more in later posts. Now.... back to my controller!

Monday, February 25, 2008

Installing.TFS.2008

Few months ago, I tried installing Team Foundation Server (TFS) 2008 on a Windows Server 2008 RC with SQL Server 2008 CTP and everything just worked fine! But for the past few days, I'm unable to achieve the feat again.

I discovered that TFS 2008 no longer installs on the latest SQL Server 2008 February CTP because the Full-Text Search is being integrated nicely into SQL Server. I had to fall back to SQL Server 2005 and lucky enough for my previous problem, I managed to get Reporting Services to work on Windows Server 2008 after applying the SQL Server 2005 Service Pack 2.

Then I discovered that Windows Server 2008 no longer ships with Windows Sharepoint Services (WSS) and the feature (or Role) is missing. I had to download WSS separately and configure it entirely different from the steps mentioned in the TFSInstall.chm - I used the steps for Windows Server 2003.

After installing and configuring WSS, TFS couldn't find a site to install itself. I then have to provision a Sharepoint site complete with site collection (Good thing I know some Sharepoint).

Finally, when everything is supposed to be fine and well, TFS bombed during the last tincy-wincy-bit of installation with the message:

"Product: Microsoft Visual Studio 2008 Team Foundation Server - ENU -- Error 28925.TFServerStatusValidator: The tool could not call the Team Foundation Server ServerStatus Web service. Verify that your network is configured to allow communication between the Team Foundation application tier and the Team Foundation data tier. For more information, see the setup log."

Found this on support.microsoft.com but it didn't work. Based on some posts in the MSDN forums mentioning that it could be a TFS Web Services issue, I went on to test out the TFS Web Site. It doesn't seem to be able to connect. At last, I had this evil thought of changing my provisioned site's port number from 8088 to 8080 and TFS finally gets to install!

Anyway, I'm glad I was installing it on a VPC and I could just click 'X' and 'Save State', then troubleshoot later. Now to install the rest of the Team stuff!

Update: The actual solution to the problem can be found in this later post.

Wednesday, January 16, 2008

IIS.7.on.Vista

I was re-installing SQL Server 2005 on my notebook and as we all know, there are some issues that will prevent SQL Server Reporting Services from installing on Vista. Out of curiosity, I decided to search for a solution and I came across this KB article: How to install SQL Server 2005 Reporting Services on a Windows Vista-based computer.

I followed the steps to configure the features on IIS 7.0 but encountered an error when I tried to enable ASP.NET from the "Turns Windows features on and off" list. The installation failed with the following message:

"An error has occurred. Not all of the features were successfully changed."

I then found this KB article: Error message when you try to install the ASP.NET feature in IIS 7.0: "An error has occurred".

My machine isn't upgraded from XP and I didn't install any beta versions of .NET or Visual Studio on it. My machine has .NET 1.0, 1.1, 2.0, 3.0 and 3.5 on it though. After several tries, I still get the error.

I went on to try the following but still couldn't solve the issue:

  • Uninstalling and re-installing IIS 7.0
  • Running aspnet_regiis -i (this will fail with an error)
  • Uninstalling .NET Framework 1.1
I got so frustrated as it has taken up my whole day. Then I saw Bernard (our trusty o' IIS MVP) on my MSN list and decided to ping him for help. He then told me to uninstall Windows Process Activation Service (WAS) and try it again. Before I tried, he told me "Got only 40% chance of success ah... if not you will have to install Vista SP1". Then *poof* he disappeared.

I remember enabling WAS to try out some WCF stuff last time. So, I
  1. disabled the WCF HTTP Activation
  2. disabled the WCF non-HTTP Activation
  3. uninstalled WAS
  4. uninstall and reinstalled IIS 7.0 with all the earlier instructions of enabling IIS 6 compatibility for SQL Server Reporting Services
*WHALA!* Can enable ASP.NET liow. Then I proceeded to install SQL Server Reporting Services and it installs without any problems.

There you go, a day's adventure, a day's learning. Thanks Bernard.

Tuesday, January 08, 2008

New.Year's.Gig


I got myself Guitar Hero III during the last Christmas eve. I didn't thought I would get it since I had never paid attention to its previous releases. But it was on my company's family day that I tried it out and found that it was quite interesting.

For most games, I can just pop the disc in and play it for a few days before I can be good at it but for Guitar Hero III, it is truly a beast for me. On my first attempt, I skipped the tutorial and went straight into playing a song. When those large 'smarties' (colored notes - but they look like chocolates to me) came at me at 100 Km/h, I can't even play a single verse correctly.

That's when I told myself to go back to the basics - better yet, RTFM first! After studying the mechanics of the guitar and knowing what is "Star Power" and the "Whammy Bar", I went through the tutorial to understand what am I up against. After a few practice sessions, I could finally play a song. *Yippeee*

I started with the easiest mode, playing with 3 fingers and slowly completing each section of the songs list and then carefully 5-staring them. After completing easy, I went on to medium which now requires me to play with 4 fingers. That's when I discovered that my pinky finger is dead, retarded, whatchamacallit!

I can never get it to hit the blue button (4th fret). I was so frustrated, I even had regretful thoughts of getting the game. Thanks to my gamer friend, DreamyGhost, he has been very supportive in encouraging me to continue practising. On New's Year eve, I'm able to "Rock'n Roll All Nite" with him. Now that my pinky is 80-90% responsive, I'm starting to move into the harder difficulties to get used to the orange button (5th fret).

This game had thought me a few lessons. It has shown me how a presumably simple game like this can be so challenging. If not for this game, I wouldn't have discovered that my pinky finger was so weak (now it has better purpose than Liu-Pei-Si). The most important part is that it is teaching me to have patience in learning something and that somethings in life, no amount of reading or you-tubing would help in getting better at it other than practice, practice, practice!

I'm also seeing a greater 'enlightenment' from the game but I can only confirm it if I'm able to play the harder difficulties in the days to come.

So here I am now, "Rocking Like a Hurricane" (on medium of course!)

Sunday, November 25, 2007

The.Long.Disappearance

I know I haven't been blogging for almost two months. Well, partly is because I don't know what to blog about. And partly is because I was getting tired over typing paragraphs and paragraphs of text. I've been churning out documents like a document factory recently in a project and honestly, I'm getting a little sick of it.

Anything that doesn't compile does not excite me and I have the habit of pressing F5 ocassionally after I type. It is also quite a brain-drain for me in this project where I really need to convert those algorithms and pseudocode inside my head to nicely worded text and flowcharts. And I have to spend time to put together a list of resource links in the document.

The one thing that saddens me is when my documents are not being read. It gives me a feeling that my work is not being appreciated. Back then when I wrote a piece of code, atleast some developers will have to look at it and learn something from it. I truly believe that code speaks louder than documents in my realm.

But then, documents are what I need to deliver so, be it. I'm glad the customer is calling for some POCs to be developed and now, I can really get my hands dirty on some real work.

Design by Dzelque Blogger Templates 2008

Design by infinityskins.blogspot.com 2008