2008-01-13:
[0:10] <robi42> hi, is there a (convenient) way to make custom java classes which are added into the scripting environment of a helma app via class.properties vanilla HopObjects (i.e. extend/inherit from HopObject)?[0:17] <midnightmonster> not sure I followed that altogether, but if I did the answer is yes[0:19] <robi42> use case: the business logic / model of my app is written in java and i'd like to use helma e.g. for the web tier (controller/view) plus its ORM and URL tree generation/mapping.[0:19] <midnightmonster> I'm not much for Java, but I believe there are some relevant goodies. let me see if I can dig them up again[0:23] <robi42> some research brought me this so far: http://helma.org/pipermail/helma-user/2001-September/003865.html, http://helma.org/docs/guide/properties/class.properties/[0:27] <midnightmonster> right. those're them[0:28] <robi42> thanks. so when i include the java classes to my helma app[0:28] <midnightmonster> but you're right in thinking the objects won't inherit from HopObject[0:28] <robi42> i'm able to add skins, actions, script functions/methods to those objects via their resp. prototype dir[0:29] <midnightmonster> right[0:29] <robi42> but, in fact, they don't inherit from HopObject[0:29] <midnightmonster> right[0:29] <robi42> so i can't e.g. use helma's ORM on them[0:30] <midnightmonster> I think you can[0:30] <robi42> how?[0:30] <robi42> :-)[0:34] <midnightmonster> I think *something* would happen if you just did it[0:35] <robi42> http://helma.zumbrunn.com/reference/HopObject.html[0:35] <midnightmonster> verily, the HopObject reference.[0:36] <midnightmonster> dunno. I guess it probably wouldn't work[0:36] <midnightmonster> I was thinking you could just set up your mappings as usual and see what happens[0:37] <robi42> i tried, it doesn't (as the reference explains).[0:38] <midnightmonster> ok, so guess not. I guess the supposition is that your private business logic would include the mapping of that logic to the DB[0:38] <midnightmonster> (er, the mapping of your data)[0:40] <midnightmonster> 'cause if you did have your own data loading and saving stuff done, you could implement getChildElement, getParentElement, and getElementName in Java or JavaScript and have your objects work with Helma's url mapping[0:40] <robi42> yep, so i'd have to use hibernate (and the likes) which i'd prefer not to.[0:40] <bard> robi42: just shooting in the dark, but with latest rhino you might able to get away with some metaprogramming, i.e. create thin objects in javascript that impersonate java objects for the sake of persistence but delegate all the rest to java.[0:41] <robi42> since i really like the way helma does it (the ORM that is).[0:41] <robi42> good point, something like JSAdapter, JOMP.[0:42] <robi42> thought so too, but need to dig deeper into that one.[0:42] <bard> yep[0:42] <robi42> thanks.[0:42] <bard> yesterday zumbrunn uploaded a rhino build with jomp[0:42] <robi42> cool, i'll check it out.[0:42] <midnightmonster> (link in yesterday's chat log)[0:43] <bard> http://helma.zumbrunn.com/downloads/anteportas/helma.jar http://helma.zumbrunn.com/downloads/anteportas/rhino.jar[0:43] <midnightmonster> :-P[0:43] <bard> :-)[0:43] <robi42> perfect, thank you. :-)[0:46] <midnightmonster> later.[0:47] <robi42> cheers.[17:52] <zumbrunn> bard, you asked about e4xd and how it relates to Page[17:53] <zumbrunn> the easiest way to get the e4xd code to actually do something is to drop that file into myapp/Page/[17:54] <zumbrunn> and to set the myapp/Root/type.properties file to _extends = Page[17:55] <zumbrunn> and myapp/Page/type.properties to...[17:55] <zumbrunn> _children = collection(Page)[17:55] <zumbrunn> _children.accessname = name[17:55] <zumbrunn> name[17:56] <zumbrunn> I'll make a little demo app tomorrow
In the channel now:
Logs by date: