Mobile WCF: Writing IM applications with the. NET Compact Framework

Source: Internet
Author: User
Tags compact http request mail web services visual studio

This article discusses:

Message transfer in the. NET Compact Framework

Writing a simple Messaging application

WCF Message Transfer Insider detection

Consuming WCF WEB Services

This article uses the following techniques:

. NET Compact Framework 3.5, Visual Studio 2008

The ability to address mobile devices has always been tricky, making it difficult to write Windows mobile® applications that receive push data from the server. Small devices generally do not have static IP addresses or dynamic DNS entries that are bound to them. A common workaround for this type of device is to send an HTTP request to the server when the device is online, and then the server causes the request to wait until the content is pushed to the device. At this point, the server uses the updated content to respond to the request that has been waiting, while the device sends another request to wait for the next update when it starts processing the update content.

This workaround affects the scalability of the server because it must suspend many requests at the same time instead of responding to them immediately and shutting down the connection. This also shortens the battery life of the device because the device must always remain connected. If the device is not turned on when the server's updates are ready, the server will not be able to send updates, and it must discard the updates or continue to retain this state, that is, which of the devices are provided with which updates. Finally, if the network is unavailable, the application cannot send or receive messages.

Visual studio®2008 provides developers of Windows Mobile applications with access to windows®communication through the microsoft®.net Compact Framework 3.5 Founda tion (WCF) feature subset, which solves many of these problems because the tool includes two new WCF binding elements that are very useful for sending and receiving messages using e-mail transmissions. Because many devices already have e-mail synchronization capabilities, these transports can create addressable message queues with the inherent queuing nature of e-mail and an e-mail server that has been established on the Internet, which can be point-to-point, with true message push Message-level communication of the device to the server and the server to the device. In this article, I will outline the WCF subsets supported by the. NET Compact Framework 3.5, and how to leverage these transports and tools in mobile applications.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.