{"id":20,"date":"2005-04-13T23:05:11","date_gmt":"2005-04-13T23:05:11","guid":{"rendered":"http:\/\/www.reactivated.net\/weblog\/archives\/2005\/04\/why-even-use-a-schema-at-all\/"},"modified":"2005-04-13T23:08:49","modified_gmt":"2005-04-13T23:08:49","slug":"why-even-use-a-schema-at-all","status":"publish","type":"post","link":"http:\/\/www.reactivated.net\/weblog\/archives\/2005\/04\/why-even-use-a-schema-at-all\/","title":{"rendered":"Why even use a schema at all?"},"content":{"rendered":"<p>Most of <a href=\"http:\/\/www.reactivated.net\/weblog\/archives\/2005\/04\/early-work-on-gconf-based-beagle-config-system\/\">yesterdays post<\/a> was based around generating and installing a GConf schema.<\/p>\n<p>After further thought, why even use a schema at all? We don&#8217;t really want to be relying on external tools such as <strong>gconftool-2<\/strong> to install the default keys on a per-user basis, and <strong>gconfsharp-schemagen<\/strong> is too basic for our needs.<\/p>\n<p>So the new plan is just to write a <em>Beagle.Util.Conf<\/em> class which makes reading and manipulating settings easy to the rest of the code, leaving a possible window of opportunity for some automation to create this at compile-time in the future.<\/p>\n<p>As for installing default setting keys, this seems easy enough even without a schema. Monodoc contains this code snippet:<\/p>\n<blockquote><p><code>try<br \/>\n{<br \/>\nMyVal = (string) gconfClient.Get (\"\/apps\/monoapps\/SampleApp\/setting1\"));<br \/>\n}<br \/>\ncatch (GConf.NoSuchKeyException)<br \/>\n{<br \/>\ngconfClient.Set (\"\/apps\/monoapps\/SampleApp\/setting1\", \"sample\");<br \/>\n}<br \/>\n<\/code><\/p><\/blockquote>\n<p>&#8230;which pretty much tells me all I need to know.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Most of yesterdays post was based around generating and installing a GConf schema. After further thought, why even use a schema at all? We don&#8217;t really want to be relying on external tools such as gconftool-2 to install the default keys on a per-user basis, and gconfsharp-schemagen is too basic for our needs. So the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-20","post","type-post","status-publish","format-standard","hentry","category-beagle"],"_links":{"self":[{"href":"http:\/\/www.reactivated.net\/weblog\/wp-json\/wp\/v2\/posts\/20","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.reactivated.net\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.reactivated.net\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.reactivated.net\/weblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.reactivated.net\/weblog\/wp-json\/wp\/v2\/comments?post=20"}],"version-history":[{"count":0,"href":"http:\/\/www.reactivated.net\/weblog\/wp-json\/wp\/v2\/posts\/20\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.reactivated.net\/weblog\/wp-json\/wp\/v2\/media?parent=20"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.reactivated.net\/weblog\/wp-json\/wp\/v2\/categories?post=20"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.reactivated.net\/weblog\/wp-json\/wp\/v2\/tags?post=20"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}