From: <Kea...@di...> - 2003-06-10 15:11:24
|
WM has always stayed focused on just being a template system that works well and can interoperate with other frameworks. I think that is a good approach given our limited resources. However, having said that, I think that adding out-of-the-box functionality on top of WM, like a WIKI .war would add tremendous value. You're wishlist sounds a bit ambitious, but I like the general idea -- as long as the WM core remains distinct and focused. My personal priorities for prepackaged WM apps are: - user management: registration, passwords, profiles, etc. with pluggable back-end (JDBC, LDAP, XML) - threaded discussion list - data abstraction layer (a beefed up version of DataTable?) - WM admin UI - workflow enabled content management system (probably a pipe dream) All this on top of core improvements such as - code refactoring: removing dead code (e.g., Filter stuff), cleaning up broker and property operator, etc. - better documentation - improved bean/tool management/configuration - improved whitespace handling I also dream of integration with tools like DreamWeaver, Eclipse, NetBeans, jEdit, etc. I'm sure I could think of lots more, but that should keep me/us busy for a bit. Keats On Tue, 10 Jun 2003 14:52:36 +0100, Marc Palmer <ma...@an...> wrote: > > Hi, > > I was thinking - we should get some "unified strategy" together for WM > 2.0 and beyond. I forgot to add that we should also aim to provide WM plugins/implementations for common MVC application frameworks in addition to our own applications: i.e. at least Struts and Turbine - I'm sure there are many others. There are so many MVC frameworks around now, it's hard to work out what everything does. Tapestry?! Marc -- Marc Palmer Contract Java Consultant/Developer Currently available for hire! http://www.anyware.co.uk/marc/ http://www.wangjammers.org ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. _______________________________________________ Webmacro-devel mailing list Web...@li... https://lists.sourceforge.net/lists/listinfo/webmacro-devel |
From: <Kea...@di...> - 2003-06-10 15:50:35
|
> Yes, I was wondering about that. I don't know of any editors that support > "plugins" for rendering content. Do you? DreamWeaver has this. It used to be that you had to do it in JavaScript or C, but I think they support Java now too. NetBeans makes a pretty good dev environment for WM using its Tomcat plug-in. Some kind of syntax highlighting/checking would make it really nice. Keats |
From: Marc P. <ma...@an...> - 2003-06-10 15:58:42
|
On Tue, 10 Jun 2003 11:50:22 -0400, <Kea...@di...> wrote: >> Yes, I was wondering about that. I don't know of any editors that > support >> "plugins" for rendering content. Do you? > > DreamWeaver has this. It used to be that you had to do it in JavaScript > or C, but I think they support Java now too. > > NetBeans makes a pretty good dev environment for WM using its Tomcat > plug-in. Some kind of syntax highlighting/checking would make it really > nice. I tried this once with IDEA but it doesn't like using # as a directive symbol, and the rest of the options are pretty limited. However we definitely need a "Using WebMacro with Authoring Tools" Wiki page and links to downloadable config files and plugins where appropriate. Most of these things can't be that hard to do. -- Marc Palmer Contract Java Consultant/Developer Currently available for hire! http://www.anyware.co.uk/marc/ http://www.wangjammers.org |
From: Marc P. <ma...@an...> - 2003-06-10 16:05:01
|
Actually the latest IDEA (3.0.4) is working with WM syntax highlighting! It can highlight directives and blocks, and correctly highlights line and block comments. Can't get it to do anything with WM var/tool refs though. I'll write a bit on how to do this with IDEA on the Wiki site soon. -- Marc Palmer Contract Java Consultant/Developer Currently available for hire! http://www.anyware.co.uk/marc/ http://www.wangjammers.org |
From: Marc P. <ma...@an...> - 2003-06-10 16:23:39
|
On Tue, 10 Jun 2003 17:03:42 +0100, Marc Palmer <ma...@an...> wrote: > > Actually the latest IDEA (3.0.4) is working with WM syntax highlighting! [snip] > I'll write a bit on how to do this with IDEA on the Wiki site soon. Done it - it was so easy as someone had already created a page for this with DW info. I tidied it up a bit. http://www.webmacro.org/AuthoringTemplates ...and also added a link to this (as couldn't find it except with search) from http://www.webmacro.org/WebMacroDocumentation -- Marc Palmer Contract Java Consultant/Developer Currently available for hire! http://www.anyware.co.uk/marc/ http://www.wangjammers.org |
From: <web...@st...> - 2003-06-16 11:40:17
|
On Tue, 10 Jun 2003, Marc Palmer wrote: | > I'll write a bit on how to do this with IDEA on the Wiki site soon. | | Done it - it was so easy as someone had already created a page for this | with DW info. I tidied it up a bit. | | http://www.webmacro.org/AuthoringTemplates Do anyone understand that comment about code within HTML comments? And wouldn't that example there leave a bunch of mismatched "-->" and "<!--"'s around?? -- Mvh, Endre Stølsvik M[+47 93054050] F[+47 51625182] Developer @ CoreTrek AS - http://www.coretrek.com/ CoreTrek corporate portal / EIP - http://www.corelets.com/ |
From: Marc P. <ma...@an...> - 2003-06-16 11:58:30
|
On Mon, 16 Jun 2003 13:40:10 +0200 (CEST), Endre Stølsvik <web...@st...> wrote: > On Tue, 10 Jun 2003, Marc Palmer wrote: > > | > I'll write a bit on how to do this with IDEA on the Wiki site soon. > | > | Done it - it was so easy as someone had already created a page for this > | with DW info. I tidied it up a bit. > | > | http://www.webmacro.org/AuthoringTemplates > > Do anyone understand that comment about code within HTML comments? And > wouldn't that example there leave a bunch of mismatched "-->" and "<!-- > "'s > around?? Haha yes you're right. Looks like it would. I don't know who wrote that. Marc -- Marc Palmer Contract Java Consultant/Developer http://www.anyware.co.uk/marc/ http://www.wangjammers.org |
From: Keats <ke...@ea...> - 2003-06-16 15:05:33
|
VGhhdCB3YXMgbWUgd2hvIHdyb3RlIHRoaXMsIGFuZCBubyBpdCBkb2Vzbid0IGxlYXZlIG1pc21h dGNoZWQgY29tbWVudA0KZGVsaW1pdGVycyBsYXlpbmcgYXJvdW5kLiAgSXQgZG9lcyBsZWF2ZSBl bXB0eSBIVE1MIGNvbW1lbnRzIGluIHlvdXINCmdlbmVyYXRlZCBzb3VyY2UsIGJ1dCB0aGlzIHNo b3VsZG4ndCBiZSBhIHByb2JsZW0uDQoNClRoZSByZWFzb24gZm9yIGRvaW5nIHRoaXMgaXMgdGhh dCBpdCBsZXRzIHlvdSBzZWUgYSB0ZW1wbGF0ZSBpbiBhIFdZU0lXWUcNCmVudmlyb25tZW50IGxp a2UgRHJlYW1XZWF2ZXIsIG9yIGV2ZW4ganVzdCBpbiBhIGJyb3dzZXIsIHdpdGggYWxsIHRoZQ0K Zm9ybWF0dGluZyBhcyAgY2xvc2UgYXMgcG9zc2libGUgdG8gdGhlIHdheSBpdCB3aWxsIGxvb2sg aW4gdGhlIGdlbmVyYXRlZA0KcGFnZS4gIFRoaXMgd2FzIGEgaHVnIGl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0K |
From: Marc P. <ma...@an...> - 2003-06-16 15:27:31
|
On Mon, 16 Jun 2003 11:04:25 -0400, Keats <ke...@ea...> wrote: > That was me who wrote this, and no it doesn't leave mismatched comment > delimiters laying around. It does leave empty HTML comments in your > generated source, but this shouldn't be a problem. Er, now that is really obtuse but I see how it works now. That really is obtuse! -- Marc Palmer Contract Java Consultant/Developer http://www.anyware.co.uk/marc/ http://www.wangjammers.org |
From: <web...@st...> - 2003-06-16 15:31:34
|
On Mon, 16 Jun 2003, Marc Palmer wrote: | On Mon, 16 Jun 2003 11:04:25 -0400, Keats <ke...@ea...> wrote: | | > That was me who wrote this, and no it doesn't leave mismatched comment | > delimiters laying around. It does leave empty HTML comments in your | > generated source, but this shouldn't be a problem. | | Er, now that is really obtuse but I see how it works now. That really is | obtuse! Yeah, I got it too now..! The first comment-opening, and the last comment end fixes it all, doesn't it?! ;) These mails here should be pasted in there.. -- Mvh, Endre Stk M[+47 93054050] F[+47 51625182] Developer @ CoreTrek AS - http://www.coretrek.com/ CoreTrek corporate portal / EIP - http://www.corelets.com/ |
From: Marc P. <ma...@an...> - 2003-06-16 16:46:56
|
On Mon, 16 Jun 2003 17:31:24 +0200 (CEST), Endre Stølsvik <web...@st...> wrote: > Yeah, I got it too now..! The first comment-opening, and the last comment > end fixes it all, doesn't it?! ;) > > These mails here should be pasted in there.. No way, our mails are very uninformative to the outsider! I have added some text to it: " <table> <!-- #foreach $User in $Users --> <tr><td>$User.Name</td><td>$User.Address</td></tr> <!-- #end --> </table> This would render as a table, whereas without the comments it might not. The above workaround works in a way that may not be immediately obvious. Empty HTML comments are left in the output for each row (--> and <!--) and the outer comment open/close finish it all off so it is legal HTML." -- Marc Palmer Contract Java Consultant/Developer http://www.anyware.co.uk/marc/ http://www.wangjammers.org |
From: <har...@ko...> - 2003-06-10 18:04:17
|
----- Original Message ----- From: "Eric B. Ridge" <eb...@tc...> Sent: Jun 10, 12:18 PM > Are we doing this just for ourselves? You guys are doing great stuff and should not feel discouraged. Webmacro is good and stable so hugely useful but maybe a bit boring. Your contributions are very appreciated. Harmeet One satisfied user. We use WM to generate email notifications, create webmacro/DB driven dynamic sites and to paramterize protocol simulation for testing. |
From: Eric B. R. <eb...@tc...> - 2003-06-10 18:21:01
|
On Tuesday, June 10, 2003, at 02:02 PM, har...@ko... wrote: > ----- Original Message ----- > From: "Eric B. Ridge" <eb...@tc...> > Sent: Jun 10, 12:18 PM >> Are we doing this just for ourselves? > > You guys are doing great stuff and should not feel discouraged. > Webmacro is good and stable so hugely useful but maybe a bit boring. That's great to hear! Really! Wanna really boost our (okay, maybe just my) morale? Go download WM about 10,000 times from SF so our download stats won't suck as bad. :) > Your contributions are very appreciated. Well, from a user perspective, what things do you think are necessary for WM 2.0? eric > Harmeet > > One satisfied user. We use WM to generate email notifications, create > webmacro/DB driven dynamic sites and to paramterize protocol > simulation for testing. > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Etnus, makers of TotalView, The > best > thread debugger on the planet. Designed with thread debugging features > you've never dreamed of, try TotalView 6 free at www.etnus.com. > _______________________________________________ > Webmacro-devel mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webmacro-devel |
From: Harmeet B. <ha...@ko...> - 2003-06-16 04:25:55
|
----- Original Message ----- From: "Eric B. Ridge" <eb...@tc...> > > Well, from a user perspective, what things do you think are necessary > for WM 2.0? Sorry about the huge delay in respone but here goes. - Precompiled/Optimized templates: A mode to generate java code and classes from wm files would be good. One example is jython. It is interpretted, there can be a pool of interpretters to execute code but it has a tool to generate java source and class files. I would like to use WM like precompiled JSP files and not put wm source code on production server. I would also like to profile these end precompiled templates and see if there are any bottlenecks. For instance if a precompiled template does not have any shared state and no need to reload, should ideally have no synchronized calls. - Sandbox. I realize that WM templates depends only on model, but it would be nice to make the view as tight as possible, for instance if I need to exposed, HttpServerletRequest object to WM, would it be better to instead expose a ServletRequest Object inside a wrapper and allow server administrator to control what can or cannot be invoked. Some support for sandoxing say by automatically creating proxies and tying permissions to user roles may be helpful. I don't have any concrete ideas but if you could keep security/safety as you add more features that would be awesome. - Safe. Loops and cyclic loops can be written in JSP. With webmacro it is very hard. I use 1.0 with constraints on include directive to control looping( I only allow templates in subfolders and no url include). WM Templates should not be able to bring server down, either by intent or by coding error. Of course this does depend on exposed model, but if model is safe, templates should be safe too. I think this can be done by making some changes to tools in 1.0 and Include directive. In later versions my impression was that macros can cause loops. If this is true, from safety perspective it may not be a step forward. - Throttling. Would be cool to have a way to monitor long running threads and maybe reduce priority or kill those threads. A threshold time check and unchecked error if limit is reached may be one way I could think of. - Powerful but documented. For a lot users security and safety may be less important. If you do decide to add powerful features, please do document and make it possible to disable features that could cause security/safety issues. thanks, Harmeet |
From: Brian G. <br...@qu...> - 2003-06-16 06:42:35
|
> - Precompiled/Optimized templates: A mode to generate java code and classes > from wm files would be good. Why? For performance, or for another reason? If its for performance, I'd point out that this is one of those things that everything thinks is very cool, but so far I've not seen anyone present any evidence that compiling to java code / bytecode would provide a meaningful performance improvement. (I have some doubts that this would really make a difference.) In fact, I've not seen any credible evidence that WM has any significant performance problems at all, other than a few very poorly chosen tuning parameters. Have you actually experienced a performnace problem with WM, and do you have any evidence that the problem is in page execution, or are you just assuming there's a big win to be had here? Parsing templates is slow, but since templates are cached, the amortized overhead is small. > One example is jython. It is interpretted, there can be a pool of > interpretters to execute code but it has a tool to generate java > source and class files. I would like to use WM like precompiled JSP > files and not put wm source code on production server. WM compiles templates into an object representation that could easily be made serializable and loaded without generating any bytecode. If your concern is source code, this is a far simpler solution. And loading in template classes and executing them has far more security risks than exposing template source code -- a WM template can't do all that much evil, but arbitrary bytecode could do anything. > I > would also like to profile these end precompiled templates and see if there > are any bottlenecks. For instance if a precompiled template does not have > any shared state and no need to reload, should ideally have no synchronized > calls. Again, do you have any grounds for suspecting that WM has performance problems, or is this just a "its interpreted, so it must be slow" thing? > - Throttling. Would be cool to have a way to monitor long running threads > and maybe reduce priority or kill those threads. A threshold time check and > unchecked error if limit is reached may be one way I could think of. WM doesn't create its threads, it uses the threads given it by the environment (such as the servlet container.) Pruning these is the container's job. |
From: Harmeet B. <ha...@ko...> - 2003-06-17 03:14:51
|
["Harmeet Bedi" <ha...@ko...>] > > - Precompiled/Optimized templates: A mode to generate java code and classes > > from wm files would be good. ["Brian Goetz" <br...@qu...>] > Why? For performance, or for another reason? ["Harmeet Bedi" <ha...@ko...>] Performance and more importantly don't want to deploy source tempates on production server. There is no need to reload and don't want a someone/me to open file and make a mistake. ["Brian Goetz" <br...@qu...>] > Again, do you have any grounds for suspecting that WM has performance > problems, or is this just a "its interpreted, so it must be slow" thing? ["Harmeet Bedi" <ha...@ko...>] No I haven't and looking at the source code it appears that WM developers have spent good time on tuning. Also WM seems very responsive. It is more based on the gut feel that you are using Java interpreter and WM interpretter on top of it, if you remove one layer the system becomes easier to understand and profile. This is esp. important if one does not care about reloading templates. [From: "Marc Palmer" <ma...@an...>] > Like Brian I think this is a bad idea. Generating (or compiling) code is > not a good plan for template-based scripting. It complicates things and you ... > You might benefit from some compile-time optimisations but like Brian I > doubt it would be significant. ["Harmeet Bedi" <ha...@ko...>] As a general rule, yes I agree templates don't need compilation and it robs them of power, but as a user in one case I don't want the templates to be modifiable. Structure to support dynamic reloading of templates is unnecessary. A jar file with classes may be more comfortable than deploying source templates. These classes could be generated from wm templates. I am not sure why it would complicate things. I was thinking it would be a translation into java objects from wm template and writing the restulting structure on disk rather than executing when user hits a template. ["Harmeet Bedi" <ha...@ko...>] > > - Throttling. Would be cool to have a way to monitor long running threads > > and maybe reduce priority or kill those threads. A threshold time check and > > unchecked error if limit is reached may be one way I could think of. > ["Brian Goetz" <br...@qu...>] > WM doesn't create its threads, it uses the threads given it by the > environment (such as the servlet container.) Pruning these is the > container's job. ["Harmeet Bedi" <ha...@ko...>] True but WM could say a thread local variable which monitors start time of interaction and check for threashold at different points and if the execution time is more than allowed throw a runtime exception. ["Harmeet Bedi" <ha...@ko...>] > > - Sandbox. I realize that WM templates depends only on model, but it > > would > > be nice to make the view as tight as possible "Marc Palmer" <ma...@an...> > There's also the problem of providing runtime help information for template > writers, tackled to a large degree by my Ignition webapp. We could solve > both of these problems in one go, very simply: > > * Add an option to WM for "StrictJavaClasses" mode. (and > "StrictJavaClassesExcludes=") > * Add a flagging interface called something like WMScriptSafe ... > By having the flagging interface we are forcing people to implement a new > class that wraps non-safe classes, therefore giving them the ability to ["Harmeet Bedi" <ha...@ko...>] Thanks for the tip, will look into Ignition. The one problem with wrapping a unsafe object is that often it is hard to figure out what is safe and not. So it would be nice if WM folks could provide a set of object wrapper with degrees of safety. So for instance NoviceReadonlySafeHttpServletRequest for some templates and maybe a more advanced AdvancedRedirectAndContextAllowedSafeHttpServeletRequest for a more power user. I realize though that this is slippery slope and users may want different things, but I also think some common safe objects could help a lot. ["Harmeet Bedi" <ha...@ko...>] > > - Safe. Loops and cyclic loops can be written in JSP. With webmacro it is > > very hard. I use 1.0 with constraints on include directive to control > > looping( I only allow templates in subfolders and no url include). WM > > Templates should not be able to bring server down, either by intent or by > > coding error. Of course this does depend on exposed model, but if model > > safe, templates should be safe too. ["Marc Palmer" <ma...@an...>] > I don't see how #include can bring the server down. You get a ["Harmeet Bedi" <ha...@ko...>] Sorry I ment that it shold not cause stack overflow. It has a bad impact on CPU and can cause other requests to be less responsive. Assuming (a) model and context varialbes exposed to templates is well thought out and safe, and (b) anyone is allowed to add their templates, it would be really nice if there can a way to prevent stack overflow condition. It would be harder to debug these conditions for a end user and would have less than nice impact on server, so would be nice to have way to prevent it. Harmeet |
From: Marc P. <ma...@an...> - 2003-06-17 07:50:46
|
On Mon, 16 Jun 2003 23:13:11 -0400, Harmeet Bedi <ha...@ko...> wrote: > ["Harmeet Bedi" <ha...@ko...>] > As a general rule, yes I agree templates don't need compilation and it > robs > them of power, but as a user in one case I don't want the templates to be > modifiable. Structure to support dynamic reloading of templates is > unnecessary. A jar file with classes may be more comfortable than > deploying > source templates. These classes could be generated from wm templates. Solution: Put your templates in a .JAR file and sign the templates. Make your code check the signature of the templates at startup (because they are in a jar, they can't be modified while the code is running) and if the files have been modified, don't execute. > I am not sure why it would complicate things. I was thinking it would be > a > translation into java objects from wm template and writing the restulting > structure on disk rather than executing when user hits a template. That's a serious complication compared to the existing code! You've got source-code generation or byte code generation to do in there. > ["Brian Goetz" <br...@qu...>] >> WM doesn't create its threads, it uses the threads given it by the >> environment (such as the servlet container.) Pruning these is the >> container's job. > > ["Harmeet Bedi" <ha...@ko...>] > True but WM could say a thread local variable which monitors start time > of > interaction and check for threashold at different points and if the > execution time is more than allowed throw a runtime exception. I'm pretty sure this is beyond the scope of WM. > ["Harmeet Bedi" <ha...@ko...>] > Sorry I ment that it shold not cause stack overflow. It has a bad impact > on > CPU and can cause other requests to be less responsive. Assuming (a) > model > and context varialbes exposed to templates is well thought out and safe, > and > (b) anyone is allowed to add their templates, it would be really nice if > there can a way to prevent stack overflow condition. It would be harder > to > debug these conditions for a end user and would have less than nice > impact > on server, so would be nice to have way to prevent it. You will very quickly notice that this is a problem, because people will get StackOverflowError showing in the error response they get. If your admin doesn't fix it after users tell him that, then you should fire him! Marc -- Marc Palmer Contract Java Consultant/Developer http://www.anyware.co.uk/marc/ http://www.wangjammers.org |
From: Marc P. <ma...@an...> - 2003-06-16 07:35:20
|
On Mon, 16 Jun 2003 00:25:17 -0400, Harmeet Bedi <ha...@ko...> wrote: > - Precompiled/Optimized templates: A mode to generate java code and > classes > from wm files would be good. One example is jython. It is interpretted, > there can be a pool of interpretters to execute code but it has a tool to > generate java source and class files. I would like to use WM like > precompiled JSP files and not put wm source code on production server. I > would also like to profile these end precompiled templates and see if > there > are any bottlenecks. For instance if a precompiled template does not have > any shared state and no need to reload, should ideally have no > synchronized > calls. Like Brian I think this is a bad idea. Generating (or compiling) code is not a good plan for template-based scripting. It complicates things and you just have to do almost exactly the same things - iterate over the syntax tree etc. You might benefit from some compile-time optimisations but like Brian I doubt it would be significant. > - Sandbox. I realize that WM templates depends only on model, but it > would > be nice to make the view as tight as possible, for instance if I need to > exposed, HttpServerletRequest object to WM, would it be better to instead > expose a ServletRequest Object inside a wrapper and allow server > administrator to control what can or cannot be invoked. Some support for > sandoxing say by automatically creating proxies and tying permissions to > user roles may be helpful. I don't have any concrete ideas but if you > could > keep security/safety as you add more features that would be awesome. Now this is quite an interesting idea that I quite like, having felt quite strongly about this in the past. For example, we've all done this: context.put( "myVar", myHashtable); Even though the data in the Hashtable should be immutable. Sure there's Collections.unmodifiableMap(myHashtable) but it's still ugly. There's also the problem of providing runtime help information for template writers, tackled to a large degree by my Ignition webapp. We could solve both of these problems in one go, very simply: * Add an option to WM for "StrictJavaClasses" mode. (and "StrictJavaClassesExcludes=") * Add a flagging interface called something like WMScriptSafe When "StrictJavaClasses" is true, WM would throw an exception if any object is put into the context that does not implement the (empty) interface WMScriptSafe. This immediately forces the programmer to realise that they need to make a decision about what they are doing. It stops HttpServletRequest being put in but allows WMSafeHttpServletRequest being put in, which would expose only certain properties etc. In addition to this, WM could provide a mechanism to show introspected help information about any objects placed into the context (#help ?) that implemenet WMScriptSafe, looking for the BeanInfo of the script-safe object - i.e. WMSafeHttpServletRequestBeanInfo. By having the flagging interface we are forcing people to implement a new class that wraps non-safe classes, therefore giving them the ability to implement a BeanInfo object that can provide documentation that WM template writers can understand - instead of any existing "Java programmer" BeanInfo provided on the original bean. Granted, not that many people use BeanInfo, but it's an under-used facility if you ask me. We use it to great effect in Ignition. Take any existing Bean and you can use it as a helper in WM, and if the Bean has a BeanInfo impl, you get to see all the help info about it. No special interfaces to implement. > - Safe. Loops and cyclic loops can be written in JSP. With webmacro it is > very hard. I use 1.0 with constraints on include directive to control > looping( I only allow templates in subfolders and no url include). WM > Templates should not be able to bring server down, either by intent or by > coding error. Of course this does depend on exposed model, but if model > is > safe, templates should be safe too. I think this can be done by making > some > changes to tools in 1.0 and Include directive. In later versions my > impression was that macros can cause loops. If this is true, from safety > perspective it may not be a step forward. I don't see how #include can bring the server down. You get a StackOverflowError before the server comes down. Same with infinite loops. Recursive #include or #templet (when we get that) would have the same outcome, a stack overflow which just kills the current page render, not the whole container. It is possible to create infinite loops in WM but not using WMScript. You could for example add a context variable that is an Iterator, which is badly implemented and continuously returns the same element, never stopping. There's nothing we can do about that. Best wishes, Marc -- Marc Palmer Contract Java Consultant/Developer http://www.anyware.co.uk/marc/ http://www.wangjammers.org |
From: Marc P. <ma...@an...> - 2003-06-16 08:25:29
|
On Mon, 16 Jun 2003 08:33:28 +0100, Marc Palmer <ma...@an...> wrote: > Now this is quite an interesting idea that I quite like, having felt > quite strongly about this in the past. For example, we've all done this: Quite, quite, quite. Sorry it was early and strangely obsessed with the word "quite". -- Marc Palmer Contract Java Consultant/Developer http://www.anyware.co.uk/marc/ http://www.wangjammers.org |
From: Marc P. <ma...@an...> - 2003-06-10 18:30:54
|
On Tue, 10 Jun 2003 11:02:46 -0700 (PDT), <har...@ko...> wrote: > You guys are doing great stuff and should not feel discouraged. Webmacro > is good and stable so hugely useful but maybe a bit boring. > > Your contributions are very appreciated. > Harmeet > > One satisfied user. We use WM to generate email notifications, create > webmacro/DB driven dynamic sites and to paramterize protocol simulation > for testing. Great news! Thanks for the words of support. If you haven't already, register for the Wiki site and add yourself to the page on solutions built using WebMacro. I know what you mean about WM being a bit "boring". Hopefully my forthcoming webapp will spice things up a bit. I'm certainly excited about converting all my existing sites to use it. Although perhaps for public-relations reasons we should introduce some new directives that will make it easier to render pages containing naked women? Marc -- Marc Palmer Contract Java Consultant/Developer Currently available for hire! http://www.anyware.co.uk/marc/ http://www.wangjammers.org |
From: Eric B. R. <eb...@tc...> - 2003-06-10 18:44:41
|
On Tuesday, June 10, 2003, at 02:29 PM, Marc Palmer wrote: > Although perhaps for public-relations reasons we should introduce some > new directives that will make it easier to render pages containing > naked women? Anyone want to help me write the #domyjobforme directive? I suppose we'd want a #while directive too: #while (!$HaventBeenCaughtSurfingForPorn) { #domyjobforme } eric > > Marc > -- > Marc Palmer > Contract Java Consultant/Developer > Currently available for hire! > http://www.anyware.co.uk/marc/ > http://www.wangjammers.org > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Etnus, makers of TotalView, The > best > thread debugger on the planet. Designed with thread debugging features > you've never dreamed of, try TotalView 6 free at www.etnus.com. > _______________________________________________ > Webmacro-devel mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webmacro-devel |
From: Marc P. <ma...@an...> - 2003-06-10 18:45:29
|
On Tue, 10 Jun 2003 14:35:00 -0400, Eric B. Ridge <eb...@tc...> wrote: > On Tuesday, June 10, 2003, at 02:29 PM, Marc Palmer wrote: > >> Although perhaps for public-relations reasons we should introduce some >> new directives that will make it easier to render pages containing naked >> women? > > Anyone want to help me write the #domyjobforme directive? I suppose we'd > want a #while directive too: > > #while (!$HaventBeenCaughtSurfingForPorn) { > #domyjobforme > } Haha, well actually that's kind of what we want WM to be able to do :-) Can you remember the times before we used WM for our web projects. Arrrrgh! I'm really keen on getting XML RPC call + SOAP call actions written for the webapp. They will be easy to write and provide us with some very neat stuff indeed. One thing I am really really desperate to get happening is making WM much easier to use by providing lots of info (from the application) about what variables, helpers etc are available. I've got all that going in the webapp but what I don't have (yet) is a really nice way to display it all. It's a very long page at the moment! The thing to remember is that Velocity has got so much exposure through other Jakarta projects. WM has not had any of this. In fact we've had only negative publicity from Apache because of all the old docs lying around saying how they used to use WM but it sucked so they wrote Velocity. We really must get them to take that rubbish down. Marc -- Marc Palmer Contract Java Consultant/Developer Currently available for hire! http://www.anyware.co.uk/marc/ http://www.wangjammers.org |
From: <Kea...@di...> - 2003-06-10 18:46:09
|
It's hard to make a strong case against Velocity, as it is so similar to WM. Our major benefits AFAICT are a nicer syntax, more flexibility in configuration, and a more pluggable architecture. Velocity has an advantage in 3rd party support and tool integration as well as a simpler (though ugly) syntax. We've never really tried to promote WM. It seems like we've been pretty happy to serve our little user community and ourselves. It does irk me a bit sometimes to see all the kudos going to Velocity, but they say that imitation is the sincerest form of flattery. We may be victims of our own success. Not just Velocity, but JSP has adopted many of WM's innovations. I think when JSP 2.0, with its JSTL-EL, becomes widely supported, the case for WM (and Velocity) will be weaker. WM syntax is still much nicer, but the difference is not as pronounced. For example: JSTL: <c:forEach var="item" items="${sessionScope.cart.items}"> ... </c:forEach> WM: #foreach $item in $Session.Cart.Items { ... } Clearly WM wins, but not by miles. Given the broad industry support for JSP, the momentum is clearly in their favor. One niche where WM may continue to compete is in non-Servlet templating applications, but that seems to be a relatively small sector. Sorry if this sounds bleak, but I think it's really a good thing. How does that old saying go ..."they won the war after losing every battle"? I expect that WM will continue to be a nice little tool for a small group of diehards (like me), but the big guns will continue to rule roost as far as developer mind-share goes. (And then M$.Net takes over the world ...) Keats On Tue, 10 Jun 2003 13:01:30 -0400, Eric B. Ridge <eb...@tc...> wrote: > On Tuesday, June 10, 2003, at 12:25 PM, Brian Goetz wrote: > >>> I'm sorry, did you say "success"? >> >> Velocity copied our entire syntax and design. >> Resin has extended their JSP engine to support WM-style tags. >> >> Our design is successful, even if our project is not. > > That's all fine and dandy, but there's almost no user-land activity now. > Hate to admit it, but it's a severe motivation killer when it comes to > doing things like reformatting source code and reorganizing package > structures. We can get 'em back! We just need to produce new stuff and promote it. We need to sing WM's praises, not assume that everybody will just "know" its benefits. -- Marc Palmer Contract Java Consultant/Developer Currently available for hire! http://www.anyware.co.uk/marc/ http://www.wangjammers.org ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. _______________________________________________ Webmacro-devel mailing list Web...@li... https://lists.sourceforge.net/lists/listinfo/webmacro-devel |
From: Marc P. <ma...@an...> - 2003-06-10 18:55:53
|
On Tue, 10 Jun 2003 14:45:38 -0400, <Kea...@di...> wrote: [snip] > We may be victims of our own success. Not just Velocity, but JSP has > adopted many of WM's innovations. I think when JSP 2.0, with its JSTL- > EL, becomes widely supported, the case for WM (and Velocity) will be > weaker. WM syntax is still much nicer, but the difference is not as > pronounced. For example: > > JSTL: > > <c:forEach var="item" items="${sessionScope.cart.items}"> > ... > </c:forEach> > > WM: > > #foreach $item in $Session.Cart.Items { > ... > } > Clearly WM wins, but not by miles. Given the broad industry support for > JSP, the momentum is clearly in their favor. Well don't forget the other "features" of JSP. Um, requiring a java compiler for one. Poor performance for number two. Extreme ugliness 3? > One niche where WM may continue to compete is in non-Servlet templating > applications, but that seems to be a relatively small sector. > > Sorry if this sounds bleak, but I think it's really a good thing. How > does that old saying go ..."they won the war after losing every battle"? > > I expect that WM will continue to be a nice little tool for a small group > of diehards (like me), but the big guns will continue to rule roost as > far as developer mind-share goes. Perhaps, but it I really think it doesn't have to be so. You can't beat true simplicity. WM will always be much nicer than JSP for non-programmers to use. Remember there are millions of people out there who can just about hack together HTML but will freak if you talk to them about XML or non-HTML tags. Step in, WebMacro Ignition :-) Very close to the alpha release now. Sorry about all the false deadlines. Just quite a big project. I'm hoping to release for you tomorrow or Thursday. Doing README, version number stuff, and one potential bug to fix. -- Marc Palmer Contract Java Consultant/Developer Currently available for hire! http://www.anyware.co.uk/marc/ http://www.wangjammers.org |
From: Mike W. <m.w...@tr...> - 2003-06-11 06:07:48
|
At 08:02 PM 6/10/2003, you wrote: >----- Original Message ----- > > Eric B. Ridge > > Are we doing this just for ourselves? > >You guys are doing great stuff and should not feel discouraged. Webmacro >is good and stable so hugely useful but maybe a bit boring. > >Your contributions are very appreciated. >Harmeet > >One satisfied user. We use WM to generate email notifications, create >webmacro/DB driven dynamic sites and to paramterize protocol simulation >for testing. Harmeet, I couldn't agree more! Webmacro is a great and stable product! We use it for web aplications: - Ecommerce system - Web content management system - Generating E-mail letters. - Grabbing web pages and getting information out of it, like the weather forecasts etc. - and a lot more nice things. What I / we like to see in the new 2.0 release: - We need the template tool / (directive?) Whe have a string (out of the database for example) and this string has to be parsed within a template. (just like a seperate template, but it uses the current context). <CODE EXAMPLE> #set $tmplText = $webUtil.getFromDatabaseForExample() // $tmplText now contains : "This is $MyTest and this is $dummy" #set $MyTest = "test 123" #set $tmpl = $Template.fromString($tmplText) #set $tmpl.copyCurrentContext() #set $tmpl.Args.dummy = "my dummy argument" $tmpl.eval() The result of the evaluation has to be : "This is test 123 and this is my dummy argument" </CODE EXAMPLE> All the other improvements etc... I dont'n know if we will use them, but it sounds good! * Another satisfied user. Webmacro user since version 0.95 / 0.98 Mike Weerdenburg - Development Traction Information Technologies B.V. Bedrijvenweg 6a 1424 PX De Kwakel The Netherlands tel. +31 (0)297 386850 fax. +31 (0)297 386851 http://www.traction-it.nl |