Tuesday, June 21, 2005

My Fantasies

When I was attending session on "Windows Forms Internals" at TechEd, I came to know about some really good features in Windows Forms 2.0. Here is a big list:
1. Now you can have menus (MenuStrip) looking similar to those are in Office 2003. Before Windows Forms 2.0, you had to achieve this by buying some third party control.
2. Your menus may have an icon for each MenuItem. Previously you had to write some junk code to first make it in OwnerDraw mode and then draw custom icon.
3. Common item of general menus will be added for you by default. It is another fact that you have to do code to implement the logic behind them. Any way it saves you some amount of time from coding those items.
4. Now you can have toolbar (ToolbarStrip) similar to Office 2003.
5. It also does have common items created out for you.
6. Now you can place a dropdown list box on toolbar without doing much wrestling with this control
7. Another amazing control is ToolbarStripContainer. It may host MenuStrip as well ToolbarStrip and guess what feature does it give to you. You make it the parent of MenuStrip and ToolbarStrip and set its dock mode as DockFill and see the magic. Now you can move either your MenuStrip or ToolbarStrip to any corner of your Form. Isn't it cool? Do you strill remember how much juggling you had to do with native APIs to achive the same thing.
8. Another sibling of these controls is StatusbarStrip. It does have same amount of exciting as other controls are having. Now you can have ProgressBar as well as DropDownlist in statusbar without digging into the details of owner drawing.
9. Do you remember yourself trying to accomplish out something with Windows Forms in .Net 1.1 or earlier. You poor boy. Windows Forms datagrid control in .Net 1.1 was the worst control in universe. Do you still remember, how much wrestling you had to do with DataGridColumnStyle to put a dropdown list in Windows datagrid. Now gone are those days. Windows datagrid in .Net 2.0 gives you all kinds of column styles those you need in simple life. It is a boon, if you need to give some sort of tabular capabilities to your application.

Now what? After getting these many new features, you are ready to create your next killer application. A great amount of thanks to Microsoft Windows Forms team, which has done a great job. All of my fantasies about Windows Application have come true. :)

Monday, June 20, 2005

Office Smart Clients and Visual Studio Tools for Office... From Tech Ed 2005

To get a better picture of smart clients we have to look for thin client and rich client application models.

Rich Client Rich client mostly used to be in 2-tier applications. Presentation tier used to have entire business logic and data store used to dothe job of data layer. These kinds of applications are hard to update, in case of any update to presentation tier or business logic. You have to distribute all files to each and every user who are using your application. Though it provides rich experience and response to users, installation of another application may break existing application (widely known as DLL Hell).

Thin Client With the advent of internet and its wide availability gave us opportunity where all business logic sits at server. If any modification is needed in any logic, we can go and update the server. Though thin client application model solves the problem of deployment, but it lacks the rich UI experience. This kind of application may not provide drag and drop support, undo-redo andcontext sensitive help. Due to business logic sitting at server, all clients need to have network connection all the time. Once you request to server, you have to wait for server to get the response. This makes thin client application less responsive, usable and efficient.

Solution to these problems?

Smart Clients Smart client application model gives you the benefit of both the worlds. It gives you deployment manageability of thin clients and user experience of rich clients. Though striking the perfect balance of both worlds depends upon you. In smart client application you can have following characteristics:

· Use of local resources
Use of network resources
· Support for occasionally connected users
· Provide intelligent installation and update.
· Provide client device flexibility

You can have your next killer smart application in three ways:

· Windows smart client application
Office smart client application
· Mobile smart client application

I will just bring out some main points about advances of office smart client applications.

Developer Productivity
· Support for Excel 2003, Word 2003, Outlook 2003 (Add in support).
Full access to .Net framework
· Integrated debugging through VS.Net 2005
· Support for managed controls. No more ActiveX controls
· CLR based security
· Support for Smart Tags
· Support for Action panes. Sadly still no support for Research pane

Deployment Made Easy
There are three ways you can deploy the application:
· Local / Local Your document as well as assembly both will be at client computer. Do you notice any thing important here? This model gives you maximum offline support but has all problems of rich clients. You have to take trouble of updating all clients in case of any update.
· Local / Network In this model only document will be at client machine. Assemblies used by this document can be hosted at server. Document maintains dependency of assemblies based on embedded application manifest. In case you update one assembly at sever, document will be able to see the updates and it downloads the latest assembly from server.
· Network / Network In this model both your document and assembly will sit in server. You can update document as well as assembly without troubling your clients. But this brings the issue with thin clients. Now you need network access even if you want access only to document.

Maintaining Security
Do you smell anything wrong here? Do you see the issues those were with Office macros?
No not at all. After all CLR is there to maintain security. .Net code within document will run only when all four security policies (Enterprise, Machine, User and Application) agree to grant the permission. When permission is asked by document, an intersection is done of all four policies and if it agrees then only document gets the permission and can execute.

· Office 2003 Professional Edition SP1
.Net 2.0
· Visual Studio Tools for Office runtime (Client machine)
· Office Primary Interop Assemblies (PIA)
· Appropriate Security Policies

Could not load package xxx. Contact package vendor error comes in Visual Studio 2005 Beta 2

It was saturday night, when I started with Visual Studio 2005 Beta 2. I had got the DVDs at Tech Ed 2005, B'lore. It started well. It started installing products one after another. After some one hour of wait installation was through. Ahhh... now I could try out my hands with Visual Studio 2005 Beta 2. But alas! It didn't work out. It spit out one big error message, "Could not load package xxx". It was package related to Team System, so I ignored it. I went ahead and IDE came properly. I started with creating a new Windows Application. VS 2005 created it but again gave me somewhat similar message, "Could not load package Microsoft.VisualStudio.CommonIDE". Hmmm... What could be the issue? I checked for this DLL in installation folder. This DLL was not there. So I added it to GAC. After doing this I tried to open design surface of Form. It said "Could not load package from Microsoft.VisualStudio.Interop.Shell.8.0. Contact package vendor". Hmmm... now what? I searched for similar DLL in installation folder. No vain. I searched DVD also but to no avail. At this point I was not ready to give up. Package vendor without any doubt is Microsoft. They might not be wrong, but something wrong with installation. I peeked into GAC again and here comes the solution. There are two versions of "Microsoft.VisualStudio.Interop.Shell.8.0" with similar version and culture. I deleted one of them and voila, VS 2005 has started working properly. Now it's time to put some controls over form. It cried "Could not load package from Microsoft.VisualStudio.Interop.Design". :) Now I know where to go and fix. After fixing this, I am ready to go. Pressed F5. Wow this time, VS 2005 crashed. But by this time I knew, where to go and fix these issues. Delete one entry of Microsoft.VisualStudio.Interop.Debugging DLL from GAC and now you should be back in business. I am running fine after doing this much solution hunting around VS 2005 Beta 2 installation. Hope to have some good experience around .Net 2.0.

Friday, June 17, 2005

Summary of Tech Ed 2005

Well it started with all fancy things like laser show etc. Then Director of Developer Evangelist in India came and said, "Do you know why am I wearing sun glasses? Because future is so BRIGHT in Microsoft horizon." Though I am fan of Microsoft technologies and its innovations, I could not bear this statement. Any way after this key note session started. It was full of demos of some upcoming technologies that include Visual Studio Team System and Visual Studio Tools for Office. All these demos made me kind of sleepy. Actually I was expecting some marekting guys to come there and display some good looking presentations on upcoming technologies. As against of this, some techie guys came and ruined the key note session.
Any way after this I decided to attend "Smart Clients and Connected Systems" track. It started off with introduction to Visual Studio Tools for Office. It was a good session. Presenter showed the next version of VSTO and showed how well they are integrated with .Net framework. All the control to be used in VSTO are managed controls. VSTO gives amazing felexibility in order to develop Office Smart Client Applications.
At the end of Tech Ed 2005 India, I realized that Micorost is screaming SOA like any thing. They are plumbing their money in SOA. Microsoft is getting SOA in its dreams as well. Each of their product is getting aligned with the concept of SOA. You see Office Smart Client Application. It gives you capabilities to develop SOA application. You see Biztalk Server 2004. It gives you amzing features to enable your application SOA. You see Indigo, see at SQL Server 2005. All are touted to support SOA from their heart. As obvious, I heard enough of SOA in Tech Ed, hence I am going to repeat all that here too. Wait for upcoming posts...

Friday, June 10, 2005

Food for brain...

Today when I was browsing, I got two wonderful links on net.

Below is the link to patterns and practices wiki on security. It is extremely good in order to prevent your application from any security threat. In this site you will find scenarios where you can save your application. Authorization, cryptography and lots of other points are discussed in detail at this place. Plus of this site is, it is addressing ASP.Net 1.1 as well as 2.0

For those who won't be able to make it to Tech Ed 2005, here is the link of live webcat of tech Ed 2005. You can watch almost of them online...

Friday, June 03, 2005

Attending TechEd 2005 India


Recently I am nominated to attend Tech Ed 2005. I will be attending it in Bangalore. I have chosen to take part in "Connected Systems and Smart Clients". It has sessions of Indigo, BizTalk Server 2004 etc. I am really eager to see, how Indigo is going to change developer's life. BizTalk Server 2004 has already proven itself as a matured and successful product. Let's see if we put Indigo and BizTalk Server 2004 together, what kind of wonders can be accomplished. See you there at Tech Ed 2005 B'lore India.