Monday January 20, 2003
|
Vanity Foul Dedicated to the wanderings of an egotistical mind. |
|
Velocity Rocks It's the greatest thing since sliced cheese. Or sliced bread (mmmmm, toasted cheese sandwiches...). Okay, maybe that'll balance out my Velocity Sucks post. Jon's subtle prod to keep looking inspired me to checkout the Velocity-tools project, where I found the VelocityViewServlet, which gave me the hint to my solution: the WebappResourceLoader. Additionally this requires the "Velocity Servlet" to set the ServletContext during it's init() or initVelocity(). You can see the PageServlet to see an example of this and other fun manipulating the init parameters. ( Jan 20 2003, 06:25:27 PM ) Technology Permalink [Trackback] [Link]
Bad JSP, Naughty JSP So now Andy is knocking JSP:
I've developed JSP for over 4 years, and I've never run into this need to "go outside" to get the results of a JSP. So far as I've witnessed any dispatcher includes all happen within the servlet container (but I've never used Tomcat 3.x). Andy, can you clarify? (Btw, I can't wait for FreeRoller to get comments so I can just ask you in your own blogspace) On Email Integration In planning features for Geekblog, Ted raises good issues on the difficulties of implementing "Post via Email". This feature has been requested for Roller as well, and I've put some thought into from time to time, coming to much the same points as Ted. One point I'm not sure he covers clearly is authentication; making sure that the email is genuinely from the owner of the blog. Since email headers are easy enough to fake, going off the From: address isn' enough. But putting a password in the email exposes it in many ways, and increases the complexity of the API: now the user has to put password=mypassword in the body somewhere, and specify the body of the post seperately (entry=blah blah blah). Starting down this slipperly slope leads to all sorts of things that could be specified: post-time(future/past), public/private, category.... For now I'm punting on the whole idea, sadly. ( Jan 19 2003, 09:55:49 AM ) Technology Permalink Comments [2] [Trackback] [Link] Velocity sucks I've been trying for days to get it working as advertised, see Velocity help sought. Of course it doesn't actually suck, but it has been quite frustrating, and I'm surprised at its shortcomings given the adoption it has received from people whose technical skills I've come to respect. Velocity doesn't allow for overloading macros (more than one macro with the same name but different arguments), and it throws parse exceptions if a macro calls another macro that hasn't been declared yet at parse time. In the latter case it still works, but you'll see errors in the log. Finally, if I try to load a macro library using \#parse("lib.vm") the macros in that file are not visible to the calling template. I've been all through the documentation, many times, but haven't found a setting to fix this (in fact, found some text that implies this is forbidden). I think I understand the technical implications, but damn, this seems like an important bit of functionality. My particular problem has been getting macros read in at servlet startup time. I've followed the directions, Googled, read the mailing lists, queried the mailing lists, and experimented extensively. No good. The macros themselves are fine, because if I \#parse("roller.vm") in a page Velocity finds and parses it just fine. So it isn't finding the file on startup, but it throws a NullPointerException rather than a ResourceNotFoundException, which is odd. There appears to be no way to get a stacktrace of the error so that I can be sure, and the ResourceManager.getResource() has the exact same exception message in two places so that I can't tell which one is throwing the error (without a stacktrace). So I'm frustrated. I'm sure Velocity is a fine piece of engineering, but it won't work for me. Argh. It occurred to me in the middle of the night that perhaps bad-mouthing Velocity would get me more help than my (so far) polite requests for assistance.
Featuritis Matt likes the proposed feature list from Ted's Geekblog:
Someone recently posted an "integration" between HEP and Roller, I believe it provided a mechanism to "post via email". I've got to try it out sometime. It is a good list, and Roller is well on its way, with several implemented or in the works. Roller also shares some "planned features", comparing the list against our JIRA entries. And I don't see any reason why Roller and Geekblog couldn't crib code from each other, providing our licenses are compatible. ( Jan 17 2003, 10:47:01 PM ) Roller Permalink [Trackback] Velocity help sought I'm still pretty new to Velocity, and I've run into a problem I cannot solve (yes, I've searched the Velocity archives, read the docs, did a Google search). I've converted all the behaviour from Roller's Macros object into a velocimacro library and made it the "default global" macro library, but Velocity is choking on it: [info] Velocimacro : initialization starting. It looks like it is finding the file alright, but having trouble loading it. I've used the velocidoc and VeloEdit tools on roller.vm, and neither of them have complained... I don't know if the problem is really Velocity, or some "Velocity & Servlets" problem. If you'd like to help and take a look I'd appreciate it. Release Soon? I think Dave, Matt, and I need to discuss releasing 0.9.7 soon. I've been working on making Roller use Velocity in a "true" manner, Dave has implemented Linkback functionality, and there have been a mess of other changes. Both Dave and Matt have features they want to work on. I'm thinking we should get something out soon before adding more, but then releases are a lot of work in and of themselves. ( Jan 16 2003, 08:34:01 AM ) Roller Permalink Comments [1] [Trackback] [Link] Hollywood gets what it paid for Sad, to be expected, but sad. Your entertainment dollars at work. ( Jan 15 2003, 08:34:12 PM ) News Permalink Comments [1] [Trackback] |
|
||||||||