Design a message format

Where there is communication,there is message exchange.
In a SMS(short message system),there are binary stream based protocols,such as SMPP,SGIP,CNGP,SMGP,etc.
Using binary messages results in efficient exchanges because the message payloads are compact.However,because they are also intended to save space,binary messages sacrifice self-descriptiveness.Consequentyly,both client and server must know the format of binary messages in advance,which means that client and server are tightly coupled.
Extensible Markup Language(XML) messages are at the complex end of the range of messge formats.The MIDP specification does not require XML support.However,developers are free to add XML support to a MIDP application by incorporating additional libraries.
For XML parsing and general processing,developer can choose DOM(Document Object Model) and the SAX(Simple API for XML).
Developer should take care when adding XML support to an application.In addition to the costs in size and bandwidth,there are non-trivial costs in memory,processing, and storage.Developers are advised to measure these costs when deciding to support XML.
發佈了0 篇原創文章 · 獲贊 2 · 訪問量 3171
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章