LWN.net Logo

DIY document management system with Simple Groupware (Linux.com)

Linux.com looks at the Simple Groupware package. "But what sets Simple Groupware apart from similar applications, is its own XML-based language called sgsML, which allows you to customize the existing modules and create new ones even if you don't have any prior programming experience. For example, the default file manager is fine as it is, but you can also turn it into a simple document management system using the tools provided by sgsML."
(Log in to post comments)

DIY document management system with Simple Groupware (Linux.com)

Posted Sep 20, 2006 18:12 UTC (Wed) by smitty_one_each (subscriber, #28989) [Link]

XML makes sense as a lowest-common-denominator approach for moving data.
Using it to as a programming language (XSLT and Ant build scripts are two examples that come to mind) somehow lacks charm.

OTOH, YAML...

Posted Sep 20, 2006 20:20 UTC (Wed) by hummassa (subscriber, #307) [Link]

looks just like python and makefiles....

DIY document management system with Simple Groupware (Linux.com)

Posted Sep 21, 2006 2:06 UTC (Thu) by xoddam (subscriber, #2322) [Link]

> XML makes sense as a lowest-common-denominator approach
> for moving data.

Lowest common denominator? It imposes a hierarchical document structure!

*Totally* inappropriate for many applications. Yet it's shoehorned in
everywhere. One common excuse is "What, you want to write a new parser?
Parsers are bug-prone. Don't add another one, we already depend on
libxml2".

I just don't get it.

"we already depend on libxml2/libsyck"

Posted Sep 21, 2006 9:00 UTC (Thu) by hummassa (subscriber, #307) [Link]

This is actually a good excuse IMHO.

"we already depend on libxml2/libsyck"

Posted Sep 21, 2006 21:07 UTC (Thu) by bronson (subscriber, #4806) [Link]

I disagree. Using XML saves you from writing a tokenizer, true. But tokenizers are trivial! Just use flex / re2c / whatever you want.

Once your XML "parser" has turned your document into a strict and perhaps needless hierarchy of tokens, you still need to actually parse it! Have you ever tried to read a complex Ant makefile? It's a nightmare to read, for human and computer alike, and full of hackish workarounds. Using an XML-based file format certainly did not make Ant a better product. XML is slow, unreadable, and overcomplex (just try handling entities properly -- nobody else does!)

Now, I'm not saying it's all bad -- XML is very useful for doing quick, generic data interchange and manipulation. And for reading trivial config files. It's just that many people are under the illusion that using XML everywhere makes their lives easier, just like in the mid-90s they thought that using C++ everywhere made their lives easier...

Well, we'll see what history says. :)

Which would you prefer -- to parse a flat file, or interpret a tree with three kinds of nodes?

Posted Sep 22, 2006 5:46 UTC (Fri) by xoddam (subscriber, #2322) [Link]

> you still need to actually parse it!

Bullseye. An XML parser gives you a syntax tree without any semantics
whatsoever. Semantics are entirely application-specific, and
interpreting a tree is every bit as complicated and mistake-prone as
the trivial task of parsing bytes.

"we already depend on libxml2/libsyck"

Posted Sep 22, 2006 14:18 UTC (Fri) by vmole (subscriber, #111) [Link]

XML is very useful for doing quick, generic data interchange and manipulation. And for reading trivial config files.

For desiging extensible, interchangeable, hierarchal and/or table/record-like dataformats (i.e. ways to make B2B database transfers), XML is great, especially if intergrated in a way that no human ever has to deal with it.

But "trivial config files"? If it's trivial, then it *should* be human editable, and a simple "x=y" (possibly with sections) is a much better choice. And there are plenty of free libraries to read such formats, all much much smaller and easier to use than libxml.

Configuration files about the worst possible use of XML, unless you can gaurantee that no-one will ever have to edit it by hand. And you can't. (Yes, Freedesktop people, I'm talking to you. Yeah, too late.)

DIY document management system with Simple Groupware (Linux.com)

Posted Sep 21, 2006 15:23 UTC (Thu) by smitty_one_each (subscriber, #28989) [Link]

>It imposes a hierarchical document structure!

Not intrinsically.
Hierarchy comes into play if the *schema* mandates it, not as the result of using XML.
XML doesn't kill peoples' joy in life: people kill peoples' joy in life.

DIY document management system with Simple Groupware (Linux.com)

Posted Sep 21, 2006 21:18 UTC (Thu) by bronson (subscriber, #4806) [Link]

Erm... You're claiming that XML isn't intrinsically hierarchical?

Then what is it?

You'd better notify Microsoft, Linux Magazine, SQLMag, the W3C, etc., all of whom appear to disagree with you.

DIY document management system with Simple Groupware (Linux.com)

Posted Sep 22, 2006 8:54 UTC (Fri) by smitty_one_each (subscriber, #28989) [Link]

My point is that you could easily do an old .ini-style file in XML, or a file of key-value pairs. It's just Unicode, you know. Let the schema fall where it may.
The bikeshedding about attributes vs. entities does occur with depressing regularity. However, I'm arguing this is Human Cranial-Rectalitis (HCR), rather than blaming the XML.

Copyright © 2006, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds