![]() I’m using the local system time to fix any latency problems by adjusting the returned time to reflect the current seconds on the local machine. It wouldn’t make sense if each clock you add showed a different value for the seconds. That means the time returned by the web service is off by 15 seconds. The problem is that now your local time is 4:00:15. (You’re doing this because Arizona doesn’t use daylight savings time and you can’t remember if they’re 1 or 2 hours ahead.) If there is any lag in the web service, say 15 seconds, you still get back a value of 5:00:00. A slow network connection or heavy traffic on the site may cause latency on the return from the web service.įor example, let’s say you’re on the East coast, it’s 4:00:00 pm, and you’re calling the web service to get the time in Arizona. The problem with calling a web service to get time in a time zone is that you have no idea how long the request will take. The first local resource I’m using is simply the local system time. The other advantage of Smart Clients is their ability to use local resources (unlike browser-based applications). Of course, since the focus is on a rich UI, the clock has tooltip information, context menus, etc… that set it apart form a web-based alternative. The clock is tied to the time in a given time zone, displayed on the main form, and then it just keeps ticking. For this application I’ve set up a small “design environment” for a user to create and customize a clock to their liking. The clock allows for all of its display properties to be configured at design or run time. The second control is a Clock control that’s fully customizable. ![]() And yes, aesthetics and usability are a concern with Smart Clients. There is no inherent advantage to using a custom control, but it makes the UI much more appealing. The first control is a custom panel that displays a caption with a gradient background (similar to the FotoVision control). In the case of this application I created two custom controls to create a rich environment. The advantage of using a WinForms UI for Smart Client development is that you have all the power of tools like GDI+ which add flare to your UI. This remote data source is synchronized with US Naval atomic clocks and gives the user the ability to query any time zone, not just the 24 conventional areas. This Smart Client uses a web service provided by Their web service has two methods: one to get a list of time zones, and one to return the current time in a given time zone. I thought it would be fun to put together a Smart Client using the same notion of showing the current time in multiple time zones. SummaryĮvery time you go to a FedEx or UPS store, they have 5 or 6 clocks on the wall showing the time in major cities around the world. Like the previous article, all the source for this project is based on the 2.0 framework. The topics in question are the purpose of a rich (WinForms) UI and the role of local resources. There are two aspects of Smart Client design I touched on in that article, but wanted to go into greater depth. In my first article on Smart Clients, I had a personal goal to tackle the main tenants of Smart Client design. The more exposure I have to them the more I see the vast potential they offer. ![]() I absolutely love the idea of Smart Clients. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |