Saturday, September 19, 2009
Enterprise level Windows 7 Gadget
I recently got this email from a user who is trying to build an enterprise level Gadget for Windows 7. If you are in the same boat see if you come across similar problem (my comments below).
"I am working to build a windows 7 gadget for our enterprise. We wanted this gadget to be our desktop source for our application. Below is a brief overview of what we want to achieve:
Here is my comments on the question:
About Your scenario
1. Launch the gadget. Display a login screen in a flyout and try to connect to our server
I would suggest have the login in the settings page (Check sitemeter gadget chapter 9)
2. Once we login, try to display various modules and also favorites across each module. Each module here is an application
If these modules are hosted on a server and have a server page then you can directly login to server page in the iframe and redirect to module page, the cookies are maintained
3. If we select a module, display a flyout screen which displays the transactions within the module
this again can be both iframe based solution (server page embedded in the flyout) or an Ajax API calling the server and returning data in xml/json and parsing and displaying it in the flyout.
4. Once a transaction is selected, open the transaction in a chrome less window
This can be open a new window JavaScript method (note that Gadget supports full javascript as well as VB script)
About the comments:
"I am working to build a windows 7 gadget for our enterprise. We wanted this gadget to be our desktop source for our application. Below is a brief overview of what we want to achieve:
- Launch the gadget. Display a login screen in a flyout and try to connect to our server
- Once we login, try to display various modules and also favorites across each module. Each module here is an application
- If we select a module, display a flyout screen which displays the transactions within the module
- Once a transaction is selected, open the transaction in a chrome less window
- How to initialize a session in a gadget and how to handle sessions? This is critical because we need to find some way of logging into the application and storing the login information
- Does gadgets support handling of cookies?
- Which is the best approach to connect to our server? Based on our research, we found out that using iFrames is a good option; but the problem is they do not support or hold session variables
Here is my comments on the question:
About Your scenario
1. Launch the gadget. Display a login screen in a flyout and try to connect to our server
I would suggest have the login in the settings page (Check sitemeter gadget chapter 9)
2. Once we login, try to display various modules and also favorites across each module. Each module here is an application
If these modules are hosted on a server and have a server page then you can directly login to server page in the iframe and redirect to module page, the cookies are maintained
3. If we select a module, display a flyout screen which displays the transactions within the module
this again can be both iframe based solution (server page embedded in the flyout) or an Ajax API calling the server and returning data in xml/json and parsing and displaying it in the flyout.
4. Once a transaction is selected, open the transaction in a chrome less window
This can be open a new window JavaScript method (note that Gadget supports full javascript as well as VB script)
About the comments:
- In a Gadget the best way to maintain session is by using Gadget settings. You can easiliy read/write to the gadget settings which will persist. This can be used for both login information and user choice.
- To connect a server the gadget allows Ajax to connect to a server and retrieve data in the form of Text, HTML, XML, XHTML, XML RPC, JSON, and SOAP, any of the option can be used with Ajax with cross domain access from the gadget. (check Blog gadget example chapter 5-8)
- You can always use Iframe inside the flyout window if you need special server pages/ graphs (see chapter 9)
If you come across any problem feel free to email me.
Labels: Book, gadgets, user query, vista

