Rick Hurst Web Developer in Bristol, UK

Menu

Category: plone

OK maybe this Zope object database makes sense now..

I’ve just made a breakthrough in my perception of Zope and its object database. Despite the fact I have been working with Plone for over three years i’ve always struggled to shift my way of thinking away from relational databases and SQL queries, due to my previous experience of building sites and applications mainly with asp (classic) and php, hooked up to a relational database.
So what caused my Eureka moment? A combination of:-

a. Not developing with plone for a while

Since going it alone I have been doing an eclectic mix of work for different agencies and companies, who all have their own pet technologies and ways of working (so far I have slotted straight into them all with a minimum of fuss- Jack-of-all-trades at your service! Except Perl. I had to turn that one down).

b. Doing a bit of old school Zope

From the moment I started with plone, when I haven’t been skinning/ templating, I have worked almost entirely with Archetypes. Archetypes generates forms for you and all the other “magic” – some lovely helpful magic, some dark voodoo that shouldn’t be spoken aloud in front of non-programmers (like me). This means that with Zope I never learned how to do a typical build a form that posts to script, script writes to database, script pulls out of database and renders it back in the page/form routine, which is usually the first thing I would learn with any other web technology/scripting language.

c. Starting to think in objects

Once again, this had more to do with not working with zope for a while. Before zope I only had a basic understanding of objects and only used them where I was forced to because I was working with someone elses code. I would encapsulate functionality by sticking a load of php/asp functions in an include file with a meaningful name, but I never took the step of wrapping them up in a class and treating the piece of functionality as an object. Something must have sunken in during my Zope years, because now I find it difficult to not think of something as an object.

So, i’m rambling – what exactly was my moment of clarity? It was simply adding a few extra fields (wait – properties) to portal_memberdata and personalize_form in Plone. I went off searching for the python script that would take the data out of the database and pump it into an object for me to use again in a page template – but of course, being stored in the ZODB, it already was an object. Z.O.D.B. Zope Object DataBase – geddit?

So in summary, I think anyone new to plone development could do with learning things the “old” way before they move onto developing with Archetypes – purely for the sake of demystifying the ZODB, especially if like me you come from a php/asp background and have trouble understanding why you would use an object database rather than a relational database.

Next stop Zope 3 – I’ve read several reports about the large amount of boiler plate code needed to create something fairly simple with Zope 3, and a few solutions to speed up the process, but I will definitely make sure to understand how it is done “manually” before attempting to move onto using any shortcuts this time.

i’m joining the circus

I once remember reading somewhere that leaving a steady job to set up your own business is the adult equivalent of running off to join the circus. But that’s what i’ve decided to do – as of June the 1st I will be my own boss, as after a lot of deliberation and heel dragging I have decided to bite the bullet and leave my contented job at Netsight to go into business with a friend of mine. I have always wanted to start my own business, but for various reasons I haven’t, and a business opportunity was put in front of me, that if I didn’t take then maybe it would never happen. At this point I wanted to link to the website of my new web application development company, but embarassingly I haven’t built it yet, so I’ll post about that when I have done it, and talk more about the new company, and the products and services we will be providing.

A few people have asked me if I will be continuing to work with Plone and the answer is basically this: The core business of my new company will be packaged web applications and these will not be built in plone, as the applications aren’t CMS-like, and plone wouldn’t be relevant. The applications will be built using some* scripting language/framework plus a RDMS. Zope 3 is a contender, but I don’t have the experience to hit the ground running with that, but i’ll certainly endeavour to get up to speed on it when time allows. However, the company will also be offering bespoke and ad-hoc development services and these will include Plone. For larger Plone projects and implementations I will refer enquiries to Netsight, as beyond the Plone skinning and customisation expertise that I have built up at Netsight over the last three years, the new company will not have the resources or expertise to support large plone projects. I will also still be contracting/freelancing for Netsight on Plone work – intially a couple of days a week, until they change the locks 😉

Anyway, new company website to follow, and more details about exactly what we will be doing.

* probably unpopular amongst plonistas – check out my previous commercial experience and fill in the blanks yourself!

archived comments

Good luck with your new venture Rick!

Andy Gale 2007-06-15 08:44:51

ah, that’ll be why they were advertising in the pest. Funnily I stumbled across your blog as the top result in googling Plone Confrence 2006. I’m looking for a good quality copy of the Eben Moglen speech.

sean 2007-07-11 22:12:25

Architen Landrell site launched

arhciten landrell website screengrab

Netsight have been so busy recently that we haven’t updated our portfolio for a while, but I wanted to mention this site, as it gave us an excuse to experiment with some nice visual features such as scriptaculous effects, flash galleries etc. The site has a plone back end for Content Management, but the front end was built from the ground up, so is a nice example of a “non-ploney” plone-based site. It helps that Architen had some excellent photography to use on the site – all maintained by themselves via plone including image resizing and cropping for the portfolio pages.

For more details on the project see the write-up here

Recent windows update “monkeys” with Plone as service

A bit of an exaggeration maybe, but I thought I would blog this just in case anyone encounters the same problem. A client phoned yesterday to say that his Plone (2.0.5 on W2K3 server) intranet wasn’t working and could see that the python/zope service was not starting. As it had been running fine for months previously (albeit a bit of memory leakage), my first question was if anything had changed on the server. Other than windows updates, nothing had changed. Not being a windows expert and having burnt through hours trying to resolve a previous plone issue on their old windows server, I threatened to go over there and install vmware and give him a virtual machine running linux or FreeBSD to run the Plone intranet on. At that moment, the unix-phobic client spotted that where he had previously set the IIS https/ssl service to manual startup, the recent updates had reset it to automatic. This was stopping Zope binding to one of the ports (or something like that), hence the service failing on startup.

This was a fairly obscure, but it just goes to show that sometimes the mere mention of unix can sometimes solve windows problems 🙂

archived comments

Of course it monkeys with Plone! Plone is one of those software projects that makes Microsoft executives wet their pants!

Yaro 2008-07-24 18:46:56

A few tips for running a web forum

I recently stepped down from my voluntary role as one of the Administrators for a popular skateboarding web forum (for old gits), due to time commitments (i.e. I couldn’t commit any). I thought I would share a few tips I picked up from that and other forums i’ve implemented. The forum in question uses phpBB, but I think some of my observations will be useful for users of other forum software.

Choose your hosting carefully

A high volume web forum requires more availability than your average website, as regular users accessing it around the clock can get pretty upset when the forum is running slow or timing out. Physical location of the hosting can make a difference too – the host of this particular forum seemed to be having routing problems, with the forum unavailable for days at a time for some people while fine for others. Users complained a lot, and people complained that they couldn’t get to the forum to complain, and that sometimes the forum timed out while they were complaining, resulting in them posting their complaints multiple times!

Over xmas, the (windows) host was infected by a virus, which resulted in the server being rolled back with no warning several days to the point in time before it got infected. This meant that the forum lost all content in the meantime. I had my own nightly off-site backups (i’ll touch on this later), but because this happened over xmas and wasn’t keeping an eye on the forum, people came onto the forum and posted before I had a chance to restore it from one of my backups, so there wasn’t really much I could do without a lot of gruntwork, to merge it all back together, as there would have been problems with duplicate id’s.

I don’t want this to be a “linux vs windows” argument, because a linux server could also be hit by a virus and/or hacked, but I suspect – wrongly or rightly – that it’s much more likely to happen on a windows host. Apparently this one was infected by a customer with ftp access.

Server resources are also important for a forum, particularly if the server is on shared hosting. The phpBB based forum I administrated would frequently grind to a halt, with no real way of telling what the problem was without direct access to the server (as it is on shared hosting). The search index (mysql) table for the forum is massive (i.e. hundreds of thousands of rows) and this is searched everytime anyone hit the site, not just by people making searches, but to display things like “posts since last visit”. This also sais something about the efficiency of the phpBB software – it would be interesting to compare the efficiency with other systems once the search index has reached this sort of size.

I didn’t choose the hosting for the forum in question, but it was chosen by someone (non-techie) on the basis that they host several other (static) sites with the company and never had any problems. Running a web forum is a different ballgame to hosting static sites. People hardly ever complain when they can’t reach a static site, and a static site is less likely to go down because there are less failure points, and less resources needed.

Forums often have email notification functionality, i.e. people can choose to be notified when something is updated – this is also another point of failure on an inadequate host, such as this one.

I wasn’t going to name and shame the host, but they haven’t been too helpful in resolving the problems so I think in the interests of the public I would advise people not to use this company for a high volume web forum.

If your host turns out not to be suitable, you will need to move it somewhere else which can upset forum users even more, as it inevitably takes a few days for DNS servers to settle down.

If it’s not essential, block the forum from search spiders

This won’t be suitable for every forum, but if you don’t want or need the forum content to be indexed by search engines, use robots.txt to exclude the forum directory. I did this after being hit by the infamous phpBB virus which used google to search for phpBB based sites to take down. I reasoned that this alone would help hide it from repeat attacks. It has also proven fairly useful to hide from spambots that use search engines to find victims, and makes the forum less attractive to those seeking to improve their pagerank by having links on the forum.

remote backups

I mentioned before that the host server got hit by a virus resulting in the machine being rolled back several days – database backups stored on that machine would have been lost too. I used a mysql server client and cron job running on a linux machine to keep 30 days worth of remote backups in the form of date stamped sql dump files. If I had managed to disable posting on the forum as soon as it had been rolled back I could have restored remotely from one of the backups and only lost a few hours worth of content.

Don’t make people think

As the majority of the users of the forum are non-techies, they can have trouble with certain features such as posting images and links etc. The more features you give them, the more requests for help you will get. Only enable what you don’t mind supporting. A good example of this is enabling HTML in posts, then requiring people to select “disable HTML” for a post where having HTML could cause problems (e.g. the built in phpBB code that is usually used for formatting).

Avatar Size


One modification I did make was to use CSS to limit the area shown of an avatar. This was in response to people huge avatars and distorting the page, then either complaining, or not understanding when they were asked to limit the width of their linked (i.e not hosted on the server) avatars. Since I made this very simple hack, people tend to understand what they need to do to make their avatar display properly. On systems where avatars are uploaded to the host and resized, this isn’t a problem.

Modification hinders upgrades

The more you modify a piece of forum software, the more difficult it is to upgrade and apply security patches.

Single sign-on and spam handling

On a seperate forum where we (we = netsight) have integrated the sign-on (and sign-up) for an Invision Power Board (IPB) and a Plone site, we have just started having problems with spam, because the default plone sign-on allows people/spambots to bypass the anti-spam measures, and the user management features built into IPB. I should point out that anti spambot mods are available for Plone.

Beware banning IP addresses, and especially ranges of IP addresses


Some users share blocks of IP address, i.e people using a particular ISP. Banning an IP address or range of IP addresses can have the knock-on effect of blocking a whole load of innocent users. As people without fixed IP addresses get a different IP address virtually every time they log on, and spammers are well versed in spoofing and changing IP addresses, using IP addresses to block individuals is largely pointless, unless you can identify a persistent spammer who happens to have a fixed IP address.

Spam, spam, spam

Spam is the biggest challenge in running a public web forum, and it is getting more difficult. Multiple guards (Captchas, email verification, javascript foo, concealed weapons and lie detectors) should be used where possible. The more popular your web forum software is, the more it will be targeted (but also patches and mods will appear quicker)
Anyway, just a few noteson my experiences. I’m keep to hear other tips on this subject and to hear tips from people using a recent version of PloneBoard which I am about to start using for a commercial project.

archived comments

I would love to hear about your Ploneboard experiences. I have put it on a few websites for smaller needs but am really reluctant to migrate much bigger websites and boards to it as I cannot find a example of high traffic, large installation that is running well.

The guys over at livemodern.com seem to have the biggest Ploneboard installation but also seem to be going through huge growing pains (bugs, speed issues, etc).

Watching that website alone has kept me from using Ploneboard more.

BZ

BZ 2007-02-07 13:33:43

Excellent piece – ta. I facilitate online forums and have an entirely social aspect to them, but this is really handy.

Ed 2007-02-15 15:35:31

Hi Rick
Found this post of yours. We are getting ready to relaunch something that predates web forums – CIX Conferencing. Would be interested to get you to take a butchers if you are interested. This is web accessible but has always been a closed community. Drop me an email if you’d like a look.

Graham (MD)

Graham 2008-02-18 19:41:45

Plone Skinning SkillSwap was a success!

Plone skinning Workshop by Rick Hurst at the Watershed in Bristol

I am really pleased to say that the Plone Skinning presentation last night was a success! About 30 local web designers/developers and people interested in using Plone turned up – a much higher attendance than my previous “Plone Demo” talk. I used the Plone S5 product to create a simple set of slides with a few bullet points to keep me from jumping around too much, but it was mostly a hands on presentation demonstrating a bit of basic customisation via the ZMI, then the process for creating a filesystem based skin.

I ran plone locally and used dreamweaver (in code view with large fonts) to do ZPT editing to keep things familiar for those designers who may be scared by the idea of terminals and Emacs!

I also tried to dispell the “all plone sites look the same” myth by taking a random design I had knocked up as a static html page and inserting the minimum possible ZPT markup to make it function as a front end plone main template rendering the body content and portlets (with none of the plone CSS).

The Q&A was really good – it ranged from basic questions about templating to “can plone do….?” type questions. I think I managed to field them all fairly well – i’ll have to wait to see the video (coming soon) to listen back for any clangers I may have made. I was disappointed however that all the free beer had gone by the end of the Q&A – a conspiracy maybe? “psstt… keep Rick talking while we drink all the beer – ask him if there is a cow-milking module available…”.

The event was sponsored by Knowledge West (room/projector hire/buffet) and beer kindly provided by Team Rubber.

archived comments

Any chance you could make the hacked main_template.pt available to look at?

Shane Graber 2007-01-17 13:35:33

Congratulations for this successfull event. Is there any Screencast available for the Plone comunity ?

Norbert M Haigermoser 2007-01-17 12:01:07

Yes the presentation was videoed and will be put online in the near future – I will post a link on my blog when it is ready.

Rick 2007-01-17 12:06:58

sure – http://www.rickhurst.co.uk/code/minimal_main_template.pt.txt

in fact the doctype slot and top slot aren’t strictly necessary here, but this shows the basics of rendering the body content and portlets (just cut and pasted from plone default main_template.

word of warning though, as this doesn’t render any links to places like the prefs_portalskin_form or the ZMI, inexperienced users may lock themselves out if not careful! Having a minimal template like this is only intended for where you use a seperate skin (i.e. usually Plone Default) for editing.

Rick 2007-01-17 14:48:17

Looking forward to seeing the screencast of this event when its ready, especially after recently watching the video on the first Plone event which was great – any idea when this might be up? 🙂

David 2007-02-25 11:03:02

I’ve been nagging the guy who is sorting the video – he is trying to get it sorted but has a genuine lack of editing time available at the moment i’m afraid 🙁

Rick 2007-02-25 19:54:59

It’s look something interesting. May I know where i should get the detail of Plone Skinning Information

Ritz 2007-12-27 02:24:30

Another Plone skillswap

I have volunteered to give another Plone related skillswap at the Watershed in Bristol (UK), on 16th January. The previous one (a general plone demo) went down well, and this time I am going to cover the basics of skinning a plone site, from basic Through The Web (TTW) customisation, to creating an installable skin product. I think it will be streamed live – check here for details. If you are in the Bristol area come along (it’s free)!

I am going to rig up a device that gives me an electric shock every time I say the word “umm..”, to train me up abit better for this public speaking lark..

archived comments

Volunteering to promote opensource web applications is good work and should be appreciated.

Also regarding

“I am going to rig up a device that gives me an electric shock every time I say the word “umm..”, to train me up abit better for this public speaking lark.. “

Find a Toastmasters club near you , (Bristol Toastmasters club) to improve your public speaking.

Web developers 2007-01-10 10:52:39

“I am going to rig up a device that gives me an electric shock every time I say the word “um..””, to train me up a bit better for this public speaking lark.. “

Interesting but a bit drastic. There was a guy who tried something like that with a wrist watch back in the 60’s. He wanted a little shock, not much more than a watch battery back then would provide. He woke up dead or didn’t wake up as the case may be.

There are better ways to reprogram the brain. Some will even argue that you can use the and-uhs to sound natural. The best is to just slow down, have a pause to allow what you said to sink in, and let the thoughts flow.

Best wishes and how ever you may fare, may you fare well.

Jonathan

Jonathan Steele, RN 2007-01-10 12:03:32

Hi Rick

Can you advise on a Toastmaster’s club in Bristol please?

Thanks.

Kind regards
Meera

meera kumar 2007-02-07 12:27:32

am I a splogger?

A new term for my web buzzword vocabulary today: “splogger” – a term I just saw on scobelizer, apparently used for “someone who uses a system to automatically copy blog posts from other people”. I am doing something similar with the “skatevine” page on dfr skate zine, but I prefer the term “news aggregator”. I’m not profitting from this as I don’t currently carry advertising on DFR – my reasons for doing it were basically:-

  • make the site more useful, a source of skateboard news for people who don’t use an RSS aggregator (or even know what one is)
  • a platform to experiment with RSS aggregation tools in plone (currently using CMFSin, shortl^h^h^ eventually to be moved to feedfeeder)
  • To provide links back to the sites it aggregates content from in a useful way.

I can see that some people might get annoyed if their content appears on other sites without their permission, especially if the site in question is passing the content off as their own and/or using it to drive ad-revenues. Site owners who carry advertising may also worry that people reading their content on other people sites aren’t going to see (and click on) their ads, but the flipside of this is that if they do link back to the original content, this will boost the pagerank of the original content, therefore making people more likely to see it and click on the ads – this wouldn’t happen if everyone used a personal news aggregator).

I can also see how it can be annoying if search engines rank the aggregated posts higher than the original posts (which was the point of Scobles post I think….), I guess if they got this sorted it wouldn’t be such an issue.

archived comments

While I appreciate you being honest about what your doing here. the bottom line is if your are copying content word-to-word then yes you are Splogger even if your leaving a link back.

“news aggregator” only aggregate the headlines from blogs and point a Link back to the orignal articles they don’t rip content off.

Scribez 2006-12-14 12:45:08

Splogger – spam/blogger?

[I first read about it here – http://www.wired.com/wired/archive/14.09/splogs.html?pg=1&topic=splogs&topic_set= ]

Nick 2007-01-08 17:44:34