ASN.1
-
What, has everyone forgotten about ASN.1? It's a compact binary
protocol, it's been around since forever, and it's easier to parse than
XML in some ways. Pluswhich, every web browser and server already has
an ASN.1 parser built in for decoding SSL certs.
-
Who needs ASN.1 when you have XML and Javascript?
Heck, who needs anything when you have XML and Javascript?
-
Eventhough your post implies sarcasm Alex, I must admit that my motto once was 'You can do anything in Javascript'. And for most things that has still been true (except that SP2 throws a huge wrench in the gears).
Drak
-
Easier to parse? Okay. But ASN.1 is completely
unreadable by the average person while XML gives plenty of readable
hints about the contents. Besides, XML is as easy to parse as HTML. All
you have to do is keep in mind that there are about 5 special
characters dividing everything and the rest is simple information.
-
@Katja Bergman said:
Easier to parse? Okay. But ASN.1 is completely
unreadable by the average person while XML gives plenty of readable
hints about the contents. Besides, XML is as easy to parse as HTML. All
you have to do is keep in mind that there are about 5 special
characters dividing everything and the rest is simple information.
To be perfectly honest, even if it makes me a bad admin, I have to
admit that I don't spend my days idly pondering the infinite mysteries
of sniffed client-server communication packets. The incredibly rare
times when I take even the slightest interest in the topic, I'm more
concerned with why this isn't going there, not what's in this.
I'll admit that the performance argument is spurious in some cases (and
aboslutely not in others - XML chews up ten years of Moore's Law as
efficiently as Symantec Anti-Virus, it is definitely not easy to parse,
and painful to apply a schema to), but legibility is just as spurious
on the other side, useful in a subset of data-transfer in which humans
must be involved, not a whole. Besides, being free to invent XML
interchange standards, most who try it end up with the spec version of
your average daily wtf entry.
XML is an excellent format for documents, LDAP, and other places where
its tree-based nature and access patterns are a natural fit. Perhaps
not always in its text-based form. Even then, ASN.1 schemas beat XML's
by far.
For the movement of large chunks of uniform data in an internal
environment, XML is only good for eating up processor and bandwidth
concerns.
-
@foxyshadis said:
For the movement of large chunks of uniform data in an internal environment, XML is only good for eating up processor and bandwidth concerns.
You should see
what we usehow we abuse XLM. Even in new, .NET Code ...Many of the classes have signatures like this:
public class Something
{
private string doSomething( xmlNodeList argumentNodes)
private string doSomethingElse( xmlNodeList argumentNodes)
public string Request( string requestXml );
}...the public method inputs a xml string ...
<request type="doSomething">
<argument>asdfasdf</argument>
</request>... and extracts the nodelist and sends it to the appropriate private member. And it returns Xml indicating success, failure, etc.
Oy. [:|]
-
Oh so I'm not the only one doing that?? [:$]
Drak
-
Okay, you now got my interest with this topic about ASN.1 since I
googled a bit more for it. I now wonder if there's anything that would
allow me to use ASN.1 with Delphi or another Pascal-like language. With
XML, Delphi has some nice wizard that will generate code for me so I
can read and write XML files. But is there something similar for ASN.1?
If not, it's not interesting for me and so far I haven't found anything
myself.
No use of using ASN.1 if the only language that supports it just happens to be C++...
-
@Katja Bergman said:
Okay, you now got my interest with this topic about ASN.1 since I
googled a bit more for it. I now wonder if there's anything that would
allow me to use ASN.1 with Delphi or another Pascal-like language. With
XML, Delphi has some nice wizard that will generate code for me so I
can read and write XML files. But is there something similar for ASN.1?
If not, it's not interesting for me and so far I haven't found anything
myself.
No use of using ASN.1 if the only language that supports it just happens to be C++...
Unfortunately, it looks like the only support for Delphi is an
expensive suite. Most other major languages (beyond C/Java) have free
libraries, but once again Pascal++ gets the short stick.
-
I should say that I'm not knee-jerk anti-XML. I use it myself a great
deal, and a lot of my sentiments come from using it in many different
kinds of apps. By far my most successful has been my personal library;
it uses XML for what it was originally designed for, document markup. I
could have used DocBook, but like RDF, felt it was far too advanced for
my needs, I always prefer a simpler RSS philosophy. With XML I have a
simple, friendly, flexible format that can transform into any other
document standard, without having to deal with the most of the mess of
SGML.
The least successful have been the databases, of course. The
signal-to-noise is much too low, bloat too high. The in-between things
like a database of documents - my journal - before we had XML DBMS and
tight integration of XPath in scripting languages I had no choice but
to keep everything in XML & XSL. Slow, but very powerful, and more
comfortable to me than wiki for publishing. Config files, which are
incredibly unfriendly to the people configing them - but can relay more
information to both users and the program.
And it bears remembering that XML isn't text - it's editable in a text
editors, but that only makes sense for documents. For every other use,
XML editors are a must. Why would anyone use a hex editor to edit plain
text files, or a text editor to manipulate csvs?
XML as RPC is bad because everyone misuses it - as a straight
replacement to binary it's the worst of both worlds, adding nothing but
overhead. It's when you use it to open up possibilities that fixed
formats can't handle that it's useful, which is the same place where
ASN.1 is useful and often more efficient, but as Katja points out, less
universal.
A lot of people don't like XML because it doesn't do everything, or
because it doesn't do the one thing they want well. A lot of people
like it too much and want it to do everything anyway. That's why I rant
at it. A good test is here:
And the c2 pages have a lot of good info, but you have to parse it out
of the inanity and childishness of the writers, and I'm too allergic to
slashdotters to spend much time there.
-
In the fine itch-scratching tradition, if you don't have the library or bindings you need, why not write them?