Hopbot log for 2008-05-16 - Helma IRC channel: #helma on irc.freenode.net

2008-05-16:

[6:20] <Helma6> Hello hello
[6:20] <bslivka> Neato web based client!
[6:25] <bslivka> onSessionStart doesn't seem to exist...
[6:25] <bslivka> or onNewSession, or whatever it should be called
[6:31] <zumbrunn> hi bslivka
[6:31] <bslivka> Hello!
[6:32] <zumbrunn> you are probably right
[6:32] <bslivka> Having a look at Helma NG api's.
[6:32] <bslivka> Kinda what I do with sessions now feels a bit like a hack.
[6:33] <bslivka> I have a function that renders the page for me, based on what the action name is.
[6:33] <bslivka> and I shimmed in a check for session data in that function
[6:33] <bslivka> but it feels like the wrong place to put it.
[6:34] <zumbrunn> somehow I feel like this has come up before
[6:35] <zumbrunn> but my quick search of the archives didn't turn anything up
[6:37] <bslivka> I only bring it up because I noticed "isNew()" in the session api for helmaNG
[6:38] <bslivka> I would still need to put such a thing in onRequest() or something
[6:38] <bslivka> if(session.isNew()){ /* put data into session object */ }
[6:40] <bslivka> it's not in the docs for helma 1.6 though...
[6:40] <bslivka> so it looks like a helmaNG thing
[6:41] <zumbrunn> I guess... if (!session.data.foo) session.data.foo = true; ...would have the same effect in Helma 1.x
[6:43] <zumbrunn> if (!session.data.foo) { session.data.foo = true; /* put data into session object */ }
[6:55] <bslivka> Right. I probably oughtta just put that into onRequest instead of render()
[7:14] <bslivka> The other thing that I found in helma today that bugs me a bit- The Xml.write() function.
[7:14] <bslivka> it's hardcoded to only descend 3 levels deep!
[7:15] <bslivka> there it is in XmlWriter.java line 41
[7:16] <bslivka> while on line 146 a comment claims the default is 50
[7:32] <zumbrunn> The docs for Xml should probably note that this built-in parser is kind of half deprecated
[7:32] <zumbrunn> it just doesn't really make sense to have an xml parser as part of the helma core
[7:32] <zumbrunn> there are better alternatives out there
[7:32] <zumbrunn> JAXP and Xerces comes to mind
[7:33] <zumbrunn> plus you have E4X built-in to Rhino
[7:37] <zumbrunn> and the jala XmlWriter
[7:37] <zumbrunn> http://helma.zumbrunn.com/reference/jala.XmlWriter.html
[8:33] <hannesw> Helma NG callbacks: http://dev.helma.org/ng/Callbacks/
[8:33] <hannesw> Comments are welcome.
[9:25] <bslivka> The thing though with helma's Xml object is that it's not a generic Xml reader/writer
[9:26] <bslivka> It's tied in with the xmldb code in such a way that you can say Xml.write(root, "file.xml")
[9:26] <bslivka> and it will serialize your application's entire object graph into a single file
[9:26] <bslivka> and then Xml.read("file.xml", root) will read it back in.
[9:27] <bslivka> to do the same with the generic Xml libraries would require considerably more work.
[9:28] <bslivka> I see from jala.XmlWriter that it really just represents an Xml document generically, and isn't providing a mechanism for serialization in the same way that Xml does.
[9:29] <bslivka> the Xml.read() function allows via the use of a properties file to specify declaratively how to generate hopobjects from an xml document
[9:31] <bslivka> being able to output and read back in application state like that is something that I've found quite useful-
[9:32] <bslivka> especially now that I've figured out that it can be used as an easy way to migrate an application from builtin db to sql
[9:32] <bslivka> or it would be if maxLevels=3 weren't hardcoded in

 

 

In the channel now:

Logs by date: