hivemind-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hivemind-...@jakarta.apache.org
Subject [Jakarta HiveMind Wiki] Updated: NotXMLProposal
Date Mon, 26 Apr 2004 23:22:31 GMT
   Date: 2004-04-26T16:22:30
   Editor: HowardLewisShip <hlship@apache.org>
   Wiki: Jakarta HiveMind Wiki
   Page: NotXMLProposal
   URL: http://wiki.apache.org/jakarta-hivemind/NotXMLProposal

   no comment

Change Log:

------------------------------------------------------------------------------
@@ -19,46 +19,45 @@
 
 Here's some examples along the lines of thinking:
 {{{
-module  myapp.ui.toolbar, version 1.0.1
-
-configuration-point ToolbarActions
+module (id=myapp.ui.toolbar version="1.0.1")
 {
-  element item
+  configuration-point(id=ToolbarActions)
   {
-    required attribute label;
-    required attribute icon;
-    attribute action-class;
-    attribute service-id;
-
-    conversion (class=myapp.ui.toolbar.ToolbarAction)
+    element(name=item)
     {
-      map (attribute=action-class property=action translator=object)
-      map (attribute=service-id property=action translator=service)
+      attribute(name=label required=true);
+      attribute(name=icon required=true);
+      attribute(name=action-class);
+      attribute(name=service-id);
+
+      conversion (class=myapp.ui.toolbar.ToolbarAction)
+      {
+        map (attribute=action-class property=action translator=object);
+        map (attribute=service-id property=action translator=service);
+      }
     }
   }
-}
-
-contribution ToolbarAction
-{
-  item(label=Open icon=Open.gif service-id=OpenService)
-}
 
-service-point OpenService interface=myapp.ui.toolbar.ToolbarAction
-{
-  invoke hivemind.BuilderFactory
-  {
-    construct(class=myapp.ui.toolbar.impl.OpenActionImpl log-property=log messages-property=messages)
-    {
-      set(name=frob value=grognard)
-      set-service(name=dialogViewer service-id=myapp.ui.DialogViewer)
-      set-configuration(name=pipeline configuration-id=myapp.ui.FileOpenPipeline)
-    }
-  }
+ contribution(configuration-id=ToolbarAction)
+ {
+  item(label=Open icon=Open.gif service-id=OpenService);
+ }
+
+ service-point(id=OpenService interface=myapp.ui.toolbar.ToolbarAction)
+ {
+   invoke-factory(service-id=hivemind.BuilderFactory)
+   {
+     construct(class=myapp.ui.toolbar.impl.OpenActionImpl log-property=log messages-property=messages)
+     {
+      set(name=frob value=grognard);
+      set-service(name=dialogViewer service-id=myapp.ui.DialogViewer);
+      set-configuration(name=pipeline configuration-id=myapp.ui.FileOpenPipeline);
+     }
+   }
 
-  add-interceptor service-id=hivemind.LoggingFactory;
+  add-interceptor(service-id=hivemind.LoggingFactory);
+ }
 }
-
-
 }}}
 
 This is pretty obviouslly darn isomorphic to the existing XML format. Remember, XML started
as a document format, where using punctuation for blocking delimiters
@@ -73,4 +72,11 @@
 
 JoeDuffy, April 26 2004
 
-What about using something like Groovy to configure and wire everything up? This has the
obvious downside that you're working at an imperetive vs. declarative level, probably interacting
with the HiveMind object model in some fashion, but has the benefit of being a familiar syntax,
very lightweight, and is reusing an existing technology (rather than inventing a proprietary
grammar).
+What about using something like Groovy to configure and wire everything up? This has the
obvious downside that you're working at an imperetive vs. declarative level, probably interacting
with the !HiveMind object model in some fashion, but has the benefit of being a familiar syntax,
very lightweight, and is reusing an existing technology (rather than inventing a proprietary
grammar).
+
+HowardLewisShip: Groovy may not be fully stable for months and represents a significant new
dependency at a time when I'd like to remove dependencies. I'm also not sure how we could
get
+the desired level of (line precise) exception reporting.  However, I'd like folks to noodle
some more on the ideas of using scripting languages to perform some of the work (especially
+with respect to the conversion of XML objects).  Maybe that is the right approach to removing
XML from !HiveMind ... that's thiking outside the box.
+
+In the meantime, I've updated the example above to reflect a slightly more verbose but significantly
more consistent approach (based on additional thoughts I had composing [http://howardlewisship.com/blog/2004_04_01_archive.html#108300769165342372
this blog entry]). Keeping the design isomorphic to a subset of XML had advantages ... I can
just make my parser spew out SAX events, maybe even feed it into a SDL (Simple Data Language)
to XML to HTML pipeline.
+

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-cvs-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-cvs-help@jakarta.apache.org


Mime
View raw message