It has been brought to my attention that the term Web-Monkey might be offensive to some.
Being new to the list, and trying not to piss everyone off, let me clarify. I meant no offense by the term. In my previous company, the HTML coders called themselves Web-Monkies (in fact, that was their group email name). And the java programmers were called Code-Monkies. I never thought anything of it. We called ourselves that mainly because with the wonders of marketing, we didn't have a whole lot of say in how things were done, especially the HTML people. So we all felt like monkies banging out code that benefited nothing but marketing's attempt to justify their income. So, I figured I should apologize before I got lynched. Now, assuming I didn't just piss of marketing people who may/may not be watching this list, I'm done. Thank you, -David Budworth -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of David Budworth Sent: Sunday, October 28, 2001 11:01 PM To: Jboss-Development Subject: [JBoss-dev] Templating services Hi all, I am in the process of adding templating services to JBoss for my own project, and figured it might be usefull to others. Anyone have any desires for having WebMacro and/or Velocity templating services in JBoss? I personally don't like JSP pages, and find them evil when put to real production use (where you have Web-Monkies doing the HTML, and programmers doing the Java. Web-Monkies don't do well if the template logic needs to be coded in Java) The other issue is, I don't know what the policies are for using third party Open Source software in JBoss. Assuming this is a desirable feature, and a viable one in regards to using other projects software, here's my idea. You start off by registering a "key" with a template path, ie: admin = /var/templates/admin:/var/templates/shared user = /var/templates/user:/var/templates/shared The path's are just search paths for finding templates (similar to class paths) Then you'd have either: WM WebMacroService.getEngine("admin") That would return a "WM" object (A webmacro template engine) Or VelocityEngine VelocityService.getEngine("admin") to get the velocity version using the same path. I Don't really like that approach, since it allows people to much with the engine directly, thereby messing up other consumers of the engine (the engines are thread safe, so you'd return the same instance to everyone). Also, I'm pretty sure that it would be legal to return a non-serializable object. So, the way I'd do it would be: TemplateEngine.mergeWebMacro(String pathKey, String templateName, Map dataToMerge) TemplateEngine.mergeVelocity(String pathKey, String templateName, Map dataToMerge) Or better yet: TemplateEngine.merge(String pathKey, String templateName, Map data) And auto-determin the template engine to use (WebMacro prefers .wm, and Velocity has some other extensions (I don't remember exactly which right now)) A cooler way I suppose would be that when someone registers a key with a path, we bind each engine to the JNDI tree as template/webmacro/KEY template/velocity/KEY template/KEY So the use can just get the correct node from the tree and "merge(templateName, data)" But, I'm not sure an MBean can tell how someone acquired a handle to it (so it woudn't know which key to use). So, if this seems like a reasonable thing to add, lemme know. If you think I'm on crack, shut the hell up, I have to do it anyway for my project, I just won't force y'all to use it. -David _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
