Re-design update

By jiminy, this new template is so much cleaner… I'm even getting Domino to do more of the HTML gruntwork. Er, within reason. At this early stage, much of the stuff I've coded thus far is solely in the back-end. I needed to re-jig how the site works in terms of things like blogrolls and including resources in weblog entries. Why? Because I'm doing more and more stuff from the Mac client, and as we all know, there ain't no Designer for the Mac. So, I'm having to stop my laziness ("Ah, I'll just edit the design one more time") and really think about day-to-day requirements. So that's good. I'll also sort out the sorry state of my commenting code. What a hack that all is…

Moving on, there are a few things I'm glad I finally coded into the referrer routines:

  • I parse out the common search engine referrers, and trap the requests they're slinging my way
  • I now have configurable IP address and referrer blocking (this used to be hard-coded)
  • I've optimised the referrer logging code — it's a wee bit faster now, even though it's doing a little more

I suppose I'd better beef up the web interface when I come to polish off the user interface, but 'blogging from the Notes client means I can do all sorts of things so much more easily than on the web. A couple of examples: (1) I can link to other sites with one click and; (2) I can attach images and parse out their dimensions for programmatic URL generation. Not to mention ad hoc agent creation and general document tweaking. Now, much of the fancy UI stuff can be done with enough time and hacking on my DHTML. But I don't want to spend too much time on that to be honest.

It's probably just as well that my 'blog templates don't become public property eh!


  1. Ben - I'm interested in this comment…"I can attach images and parse out their dimensions for programmatic URL generation". Does this mean you have a method of programmatically determining the image dimensions when you attach an image file? I've been looking for something like this for a image gallery database but couldn't get it working (I looked at two examples from the Sandbox but neither worked for me).Colin Williams#
  2. Ben, you are catching up with Movable Type. :-)Volker Weber#
  3. Yup, dead on. It's Win32 code though: Lotusscript based on some VB routines publicly posted by David Crowell. I'll clean it up and post it if anyone's interested.

    I may well change the implementation to a Java version at some stage, I dunno.Ben Poole#

  4. I've always used ImageInfo when I need to extract an images' dimensions programmatically in Java. It's very good, very small, and pretty flexible. Phil Wilson#
  5. Ben - please post away. Phil - thanks for the heads up, will check it out!Colin Williams#
  6. Colin: 'twill be done.

    Phil: thanks for the link, great stuff. I looked in my Java bookmarks, and sure enough, ImageInfo was in there — I knew I'd searched for code like that before!Ben Poole#

  7. Ok, well I remember actually using Davids code - it worked for some images but not others - can't handle a single image from my digi-cam - error given "Variant does not contain a container". I've tried other images from other digi-cams and no worries. The only thing that I can think of is that my Nikon camera saves a pile of metadata with the image that most cameras do not. Wierd but ruins my plans to use it.Colin Williams#
  8. Ok, I should try harder…its the image size that stops it working, not the camera metadata (resized the image using a tool that respects the metadata). It doesn't like JPGs over the 900kb mark - given that is larger then anything I'm going to want to show in the gallery, its worth looking at further I think. Sorry Ben for hijacking your post!Colin Williams#
  9. No probs. Again, you're spot on. The code is limited in that really big JPEGs may fail. The buffer size is limited to 32KB (Lotusscript's memory limit) which is why you had that problem.

    I suspect you may be able to up the buffer in Notes 6 though… can't remember if the Lotusscript memory limit has been raised or not. Either way, as you say, for simple galleries and web content management, small files are key anyway! The article will be up in a couple of ticks.

    Ben Poole#
  10. Now Volker, I'd never want to claim to be copying Moveable Type: look at the trouble that causes! :-DBen Poole#
  11. Hi Ben,

    Geting off image size and onto another design feature I'm afraid.

    I'm just developing something quick and dirty to attach "write and forget" actions to a project description doc. You know the sort of thing, Date, Name, Action etc.

    It struck me that what I want to do is similar to how your/codestore's blog comments work. ie you can see all existing comments with the main doc AND enter a new one at the bottom.

    I downloaded Jake's blog template and discovered he uses a HTML form to create the input form. Does your site do the same? If so what is the advantage of this method over just sticking a Notes subform at the bottom of the main form? Just trying to get things clear before getting my head down and doing it.Declan Smith#

  12. oops - just realised your comments are separate from the blog body.

    The main question holds true though. How have you implemented this "add a comment" feature, with pure HTML creating a Notes document or with a Notes subform at the bottom of the view template.

    I'm being nosey really since I'm half way down the subform route now anyway.Declan Smith#

  13. Yup, spot on Declan. I work that way 'cos that's how I've always done it. The reason I use an HTML form rather than say a Notes subform, is so I can control what gets posted, and to where.

    For example, this $$ViewTemplate contains an HTML form that posts its content to my comments form… does that make sense?Ben Poole#

  14. I think so, but I'm not sure why having a computed subform would be different… Doh, just realised my confusion, a subform would create the doc in the form it lives in, the html approach allows the info collected to be piped to a different form entirely.

    Thanks for the reply, talking these things over often sorts my head out.Declan Smith#

Comments on this post are now closed.


I’m a software architect / developer / general IT wrangler specialising in web, mobile web and middleware using things like node.js, Java, C#, PHP, HTML5 and more.

Best described as a simpleton, but kindly. You can read more here.