Why XML is SUX

Ini adalah sebuah sample kecil kenapa XML itu SUX. Sample ini diambil dari log transaksi SMS dengan protokol MM7.

--fh-mms-multipart-boundary-28418
Content-Type: text/xml; charset="utf-8"
Content-ID: <cid-0003F7FA34C58BE@3>

<?xml version="1.0" encoding="UTF-8"?>
<soap-env:Envelope
  xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://schemas.xmlsoap.org/soap/envelope/soap-envelope.xsd">
  <soap-env:Header>
    <TransactionID
      soap-env:mustUnderstand="1"
      xmlns="http://www.firsthop.com/specs/MM7-extended/MM7-extended-1-3"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.firsthop.com/specs/MM7-extended/MM7-extended-1-3 MM7-extended-1-3.xsd"
      >fh-transaction-id-0003F7FA34F5785</TransactionID>
  </soap-env:Header>
  <soap-env:Body>
    <DeliverReq
      xmlns="http://www.firsthop.com/specs/MM7-extended/MM7-extended-1-3"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.firsthop.com/specs/MM7-extended/MM7-extended-1-3 MM7-extended-1-3.xsd">
      <MM7Version>5.5.0-extended</MM7Version>
      <LinkedID>routerSMSNode1@cs01cwbp:177057</LinkedID>
      <Sender><Number>+628XXXXXXXX</Number></Sender>
      <Recipients><To><ShortCode>XXXX</ShortCode></To></Recipients>
      <TimeStamp>2008-06-03T13:01:29-00:00</TimeStamp>
      <Content allowAdaptations="true" href="<00003F7FA2F5435A@XXXXXX.com>" type="SMS" />
    </DeliverReq>
  </soap-env:Body>
</soap-env:Envelope>
--fh-mms-multipart-boundary-28418
Content-Type: text/plain
Content-ID: <00003F7FA2F5435A@XXXXXXX.com>

hello world
--fh-mms-multipart-boundary-28418--

Setelah melalui SOAP parser aplikasi saya, hasilnya adalah — straightly taken from application log:

2008-06-03 20:02:22,534 [btpool0-23] INFO  - deliver: trxid=fh-transaction-id-0003F7FA34F5785,linkid=routerSMSNode1@cs01cwbp:177057,msisdn=628XXXXXXX,src=XXXX,ts=2008-
06-03 20:01:29,msg=Hello World

Dari snippet XML yg penuh dengan tag2, ternyata yg berguna cuman segitu. Yg lain: nyampah… Whua…. udah debugnya susah, nulisnya susah, implementasinya dimana2.

8 komentar

  1. silent bilang:

    XML itu kan awalnya untuk interoperabilitas antar server2 dari perusahaan yang berbeda. Cuman, memang overhead dari XML itu ya, tag2nya itu sendiri.

    June 4th, 2008 at 05:59
  2. Aryo Sanjaya bilang:

    Ingat pelajaran dari pak Handoyo, Kompatibilitas vs Kesederhanaan.

    Lek gak lali se ;))

    June 4th, 2008 at 15:52
  3. Yeni Setiawan bilang:

    Iyah, XML kalo dipake untuk aplikasi sendiri memang boros sampah byte. Mendingan CSV atau SSV (Sembarang Separated Value) :D

    Saya gunakan XML hanya untuk keperluan lintas aplikasi/platform.

    June 5th, 2008 at 08:40
  4. ferdhie bilang:

    @silent
    itu mah bukan overhead

    @aryo
    gitu deh

    @yeni
    xml sih xml, nih SOAP hrs ada namespace, dll yg buset … buanyak. Itu udah gw tata rapi, dengan indent, bayangin jika dalam 1 baris … nangis darah debugnya

    June 6th, 2008 at 09:05
  5. eko bilang:

    xml oh xml

    ada ide yang lebih simpel?

    June 7th, 2008 at 23:34
  6. Dolly Aswin Hrp bilang:

    Kalo untuk membawa data yang sedikit seperti ini sih emang gak sebanding antara header dengan data yang dibawa.

    June 11th, 2008 at 15:04
  7. Culinary arts schools. bilang:

    Scottsdale culinary institute….

    Culinary unions in spokane washington. Culinary accessories. Culinary cruises….

    July 3rd, 2008 at 04:11
  8. Ash soma. bilang:

    Ash soma….

    Ash soma….

    July 10th, 2008 at 03:56

Tinggalkan Komentar





*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word