|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Announcements
Want a new Job?
Chapters
Services
Feature Zones
|
IntroductionVSSThinClientSmart is a thin-client for Microsoft® Visual SourceSafe. The application targets the .NET Compact Framework and the .NET Framework to provide a user-friendly GUI to access a Visual SourceSafe database over a network from a Pocket PC / SmartPhone. The application exploits most of the major features of the .NET framework. This product is a submission for the mobile contest. Snaps
MotivationObviously, the prime motivation are CodeProject and HP! :) But, when I started to think about what I was going to develop for this contest, I was thinking like what I would expect on my Pocket PC if I am given a chance. I am working in a Software Development MNC and I have faced numerous situations wherein we need to view/verify a code when we were in a conference/chat. Though we have a computer in the conference room, we cannot provide network access to our code base directly to a common computer. Even if I had an option of a Pocket PC, I had no way to access our codebase. So, I thought it would be better if I can come up with an application to help many people around the world... and here it is!!!! A VSS ThinClient for Pocket PCs and SmartPhones. Overall DesignLet me explain about the design of my application so that you can understand and appreciate the features better. VSSThinClientSmart is not a single application, but has a WebSerivce - VSSClientWebSerivce (on .NET) and a client application - VSSThinClientSmart (on .NET Compact). As you might guess, the WebService is the one that runs on the host workstation and is going to react on VSS, on behalf of the client application. The client application and the WebService communicate through SOAP and do the job. This is why I call the application as thin-client rather than just a client. The picture would give you a clear view of the design.
FeaturesAlthough the webservice forms part of the whole application, let me talk about the client application first. More about the webservice in the Development section. VSSThinClientSmart provides almost all the commonly expected actions on SourceSafe, when in mobile. Here are the features..
Secured LoginYou need to login to the VSSDatabase before proceeding with any operation on the VSSDatabase. VSSThinClientSmart provides you with a login screen as shown in the "Snaps" section. The user should enter the following information:
The Webservice will provide a unique session ID on successful login, which would be internally maintained by the client application. This session ID will be used by the client application to authenticate itself for every operation after that. Browse through the entire databaseOn successful login, the user will be provided with a UI to browse through the entire database and menus to perform all the provided operations on the database. VSSThinClientSmart provides you with a Main screen as shown in the "Snaps" section. The tree view at the top displays the list of Projects available as per the hierarchy. On selecting a particular project in the tree view, the list of files under the selected project will be displayed in the list box provided below the tree view. Note: VSSThinClientSmart will not expand all the Projects by default. So, you can see the subprojects only on clicking on a particular project in the Projects view. This is done for optimizing the number of requests to the Webservice. FilesVSSThinClientSmart provides you with a number of operations that can be performed on a file. Every operation has to be performed only after selecting a particular file from the Operations on a file:
All these operations are available in the File menu on the client application.
Get Latest VersionGet Latest Version aids to obtain the latest version of the selected file. On successful retrieval, a Save-File dialog will be opened to select a particular location to store the file. After that, the application also would ask if the user wants to open that file. The picture shown above, shows a .jpg file opened in Internet Explorer as per user selection. Delete / Destroy PermanentlyDelete a file, aids to delete the selected file. On clicking Delete, the user would be asked if he wants to delete the file permanently. If the user chooses No, the file will be deleted temporarily and shall be recovered later (though not from VSSThinClientSmart). If the user chooses Yes, the file will be destroyed permanently and can no longer be recovered (not only from VSSThinClientSmart). View File PropertiesClicking on Properties aids the user to view the various properties of the selected file, like file name, size, checked out status etc. ProjectsVSSThinClientSmart provides you with a number of operations that can be performed on a project. Every operation has to be performed only after selecting a particular project from the Projects tree; failing which, would be reported with an appropriate error. Operations on a Project:
All these operations are available in the Project menu on the client application.
Delete / Destroy PermanentlyThe information about deleting a file and deleting a project are almost the same. Delete a Project, aids to delete the selected Project. On clicking Delete, the user would be asked if he wants to delete the Project permanently. If the user chooses No, the Project will be deleted temporarily and shall be recovered later. If the user chooses Yes, the Project will be destroyed permanently and can no longer be recovered. LabelClicking on Label aids to label the selected Project. The user would be asked for the Label Name and the Comment for the label. That's it. If the labeling action is successful, VSSThinClientSmart will report the success and switch back to the Main screen. Customize View (based on File/Project status)The user can customize the view by selecting one or more options from the View menu. The options are check options, so can be enabled or disabled using the same menu. Following are the modes of customization available to the user.
All these operations are available in the View menu on the client application.
Show only deleted filesClicking on Show only deleted files makes the File view to show only those files which have been deleted (i.e. temporarily). Show only checked-out filesClicking on Show only checked-out files makes the File view to show only those files which have been checked out (either by the current user or any other user). This is applicable only for files. Note: a tick mark will be shown in front of the menu item if the item is enabled. DevelopmentI developed this application using Microsoft® Visual Studio .NET 2003 with Pocket PC 2002 Emulator. Though I can't walk you through the entire code-base, I shall say about the methods supported in my webservice. VSSClientWebService supports the following methods:
Development Platforms
How things workThe webservice that I have developed acts as a proxy VSS Automation Component to the client. All requests from the Pocket PC/Smart Phone are sent to the WebService and the Webservice instantiates the VSS Automation Component through the .NET Interop Services, and does the job on behalf of the client and returns back the result. This has been clearly depicted in the Overall Design Architecture. Once the user logs into the database successfully, a unique session is created for that user and is held in the Server (WebService) until the user closes the database. Most of the WebMethods return a structure to provide necessary information to the client application. For example, the following is the <OpenDatabaseResult>
<bSucceeded>boolean</bSucceeded>
<SessionId>string</SessionId>
<ErrorMsg>string</ErrorMsg>
</OpenDatabaseResult>
If the Similarly, the following is the response for <GetFileInfoResult>
<isValid>boolean</isValid>
<FileName>string</FileName>
<SizeInBytes>long</SizeInBytes>
<isDeleted>boolean</isDeleted>
<isCheckedOut>boolean</isCheckedOut>
</GetFileInfoResult>
These XMLs can be directly serialized/de-serialized as objects, due to the advent of .NET, and it's that easy!! .NET features used
What's NextAlthough this application implements most of the commonly expected operations on VSS when in mobile, there are a few more operations like check-out/check-in which would enrich the application still further. The next version on this, shall include all those capabilities. References
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||