Tonethatplone

36
Tone that Plone! How to keep your site in shape

description

Slides for talk at Ploneconf 2011, San Francisco

Transcript of Tonethatplone

Page 1: Tonethatplone

Tone that Plone!

How to keep your site in shape

Page 2: Tonethatplone

Plone can do it all...

It's the 800 pound gorilla of CMS'sEnterprise.Heavy duty.And all that jazz...

But...

Page 3: Tonethatplone

Plone can do it all...

It's the 800 pound gorilla of CMS'sEnterprise.Heavy duty.And all that jazz...

But...sometimes, too muchof a good thing can be,well, too much!

Page 4: Tonethatplone

Back to basics

You're smallThe budget is limitedLike, totally unfair...

Page 5: Tonethatplone

Your mission, should you choose to accept it...

Fight the flabResist the urge to supersizePlan for the long run

You don't need dodgy diets, wonderpills or an expensive personal trainer / consultant, just a clear purpose

Remember, staying fit & lean is a process, not a product

Page 6: Tonethatplone

The planning stage:Reduce, Re-use, Recycle

Page 7: Tonethatplone

Reduce, Re-use, Recycle (cont.)

Biggest #fail factor is overdesign.

If your plan is more than 2-3 pages, it probably sucks.And, it will be outdated next year anyway...

“Just because I can” is not enough justification for content-types, products or anything else.

Page 8: Tonethatplone
Page 9: Tonethatplone

Reduce, Re-use, Recycle (cont.)

Try to maintain a 'one in – one out' policy on addons

Reduce the content-types (“News” is just a page with a picture, after all...)

Metadata rules! As do “Topics”. Together, they can order most of your content just fine.

Page 10: Tonethatplone

Recycle bright ideas as well...

There's no shame in using external services. People like Disqus probably know more about spam-reduction than you, Cloudflare was born to fight the Slashdot effect.

It's very human to think your organisation is special, and therefore needs a special navigation and site layout. You're not. You don't.Sorry.

“Don't make me think”

Page 11: Tonethatplone

KISSAvoid the greatest& latest framework.

Quite often,the word 'web-app' is a codeword for 'frozen in time'. Or 'constant tinkering'. It can be a step back to that whole 'customized CMS' nightmare.

If your site needs to stay and adapt for a few years,you should probably be behind the bleeding edge.It's called that for a reason.

Page 12: Tonethatplone

Plan sensibly, not frugal

Will your navigation hold up to hundres of items?

That's why metadata, and nice ways of searchinglike eea.facetedsearch shine...

Page 13: Tonethatplone

Yeah, yeah, Fashion baby...

Learn to think of the design of your site in fashion terms.

Yes, that's the famousLittle Black Dress

Page 14: Tonethatplone

Haute Couture & Extravaganza

There are only a handful of people on this planet that can get away with dressing like Lady Gaga.

You're probably not one of them.

Plus, she has 15+ stylists available on a 24/7 basis. The odds are, you don't

Page 15: Tonethatplone

That's soooo three minutes ago

Page 16: Tonethatplone

So, the Little Black Dress it is.

Most women, and quite a few men, will look stylish in it.

Weddings, bar-mitzva's, funerals, or just a regular night,be confident that you're dressed for the occasion.

Boring? That's why accessories were invented!

Page 17: Tonethatplone

Now, re-phrase that in CSSStart with a clear & clean design. Your visitors and users probably want to see your content, eventually...

Navigation is not fashion, it's function. Think of it as wearing sensible shoes.

Fonts, on the other hand, are your sunglasses & handbags. As are some well-placed js effects.

A few bold statements work better than that Carmen Miranda look. For the uninitiated, that's the whole fruitbowl on your head.

Page 18: Tonethatplone

Sideline: fashion disasters...

Stuck with a designer that has only done paper? Be afraid, be very afraid. Remedy: show the design on a crappy phone to your boss.

Design is like make-up; it should come off gracefully.

(remember that douche-cartouche/trampstamp that seemed like such a good idea when you were drunk in Thailand... now think of Flash intro-pages...)

Page 19: Tonethatplone

Picking Products

Probably the most demanding task a Plonista faces...

Use a set of criteria to pick the right ones, that go further than technical stuff like unit-tests. Although these are Good Things (TM), they're not enough.

Before you start, first figure out what problem the Product is supposed to solve. In 140 characters, please.

Page 20: Tonethatplone

Social TestingDocumentation. As in, human-readable documentation.There's a special place in hell for doctest-only docs. Doctests are, at best, tests. They're not documentation.

If the author can't describe what it does, why should you care?

Well-filled issue tracker. Issues are good. It means other people use the product. If they get solved quickly, even better.

Get gmane or similar, and check how responsive the author is on the mailing lists. Gauge reputation.

Page 21: Tonethatplone

Garlic & Silver(or, signs that scream: “avoid!”)

The un-install test. On a full test-site, not a clean buildout. If it doesn't un-install cleanly, you're on a highway to upgrade hell. Do try after adding a few content items as well

Re-inventing wheels. They're round, baby!

Page 22: Tonethatplone

More Garlic & SilverNot sticking to established industry standards. Yes, the author may be smarter than the IPTC consortium. But clout always wins.

Kitchensink Syndrome. Remember, *nix is good. Small tools for specific jobs.

No i18n. Yes, even if you're from the Anglosaxon world, this is a bad sign.

Big stacks. They tend to come crashing down harder.

Page 23: Tonethatplone

I can haz complexity?

Yes, you can. I love Plomino, SQL, ...

The key, however, is to isolate it.

And, double-check those social tests. “Too big to fail” is a definite plus in this case!

If all else fails, you can magically rewrite to another instance.

Page 24: Tonethatplone

Splurge on the Good Stuff!

The wonder of Open Source gives you access to professional tools. Might as well use them.

Think LDAP. It might sound like overkill, but I use it in sites with <20 users. And thank myself regularly for it.

Even if you're the sole integrator/developer, keep your stuff in a repository. Choose your favourite, but do it. That goes for CSS files, buildout configs, notes to yourself, the lot. Your future you, or your successor, will be eternally grateful.

Page 25: Tonethatplone

Maintenance

Do tick-tock buildouts. That is, have two exact copies of your site. Update the one, test on humans, then switch the portnumber or symbolic link over. Then update the other one.

I can guarantee you that pypi will be down otherwise. And it will put a red sock in your white laundry.

Diskspace is cheap, your sanity... priceless.

Page 26: Tonethatplone

Deploying on a budget

You will have to learn some basic *nix skills. Nothing fancy, but a few choice commands can save your day.

Even for small sites, go for ZEO. One ZEO server, one client will work fine. Zeopack alone is worth it.

Learn to rewrite to canonical URL's. Google will thank you.

My best results: one system-wide NGINX, one system-wide Varnish, many sites. Consider using system packages.

Page 27: Tonethatplone

Deploying on a budget (cont.)

It can be done, Plone runs quite well on budget hardware.

Throw all of your limited resources on memory, the processor is hardly relevant anymore. Aim for 4gig, that'll do quite a few Plone sites nicely. More is better. Fast HD a bonus.

Don't go for 99.999 % uptime. If that's what you want, ask for more budget. Cron that restart!

Most sites are brought down not by visitors, but by....

Page 28: Tonethatplone

Robots, evil robots!

Page 29: Tonethatplone

Defend against the robocalypse

Get access to raw logfiles. Piwik and Google Analytics are nice, but they will only see this kind of visitor:

You know, the kind with Javascriptenabled, the kind that brush their teeth.

They are not your problem.

Page 30: Tonethatplone

The evil ones

First, get a sensible robots.txt in place that limits access rate, and do the Google dance to restrict endless links to different translations and stuff. Google has many options for taming theirbot, although they're non-standard.

Then there's these robots:

They don't listen to robots.txt

So, do what any robot would do:

Page 31: Tonethatplone

Exterminate !!!

nginx code snippet:

# Dalek attacks - must exterminate (case insensitive)# The ~* makes it case insensitive as opposed to just a ~ if ($http_user_agent ~* (Baiduspider|Jullo|Yanga|Yandex|BLP_bbot|ConveraCrawler) ) { return 403; }

Page 32: Tonethatplone

Still in trouble?

Hardware, even leased , is cheap. Throw some more at the problem. Look outside your national borders. Or, to a place with fast fibre-to-the-home. Don't go cloud, it gets expensive!

You might want to consider outsourcing your caching even further.

Look at Cloudflare. It's free, and quite capable.

Page 33: Tonethatplone

Almost there...

So, with strict planning, a restrained diet and a mind firmly set on keeping your site from ballooning, a lean, fast, update-proof site is in the reach of even small, resource-challenged organisations.

All for the new, low price of... next to nothing.

Great! Free cake for all!

But is that right?

Page 34: Tonethatplone

Does all this make me a bad person?Yes, it kind of does. Many times, smallish NGO'scan be the client from hell...

Embrace it. Smaller organisationscan, and do grow. And thepeople working there moveon. One day, you may bea valuable customer.

Page 35: Tonethatplone

Give back where you can

Bug reports are cool!

Maybe you can help translating, or write documentation.

But, take the time to learn mailing list etiquette, and the rules for valuable bug reports.

“What would Ajung say” is a very good mind-check!

Page 36: Tonethatplone

TL;DR?

- cut back on the Product & content-type carbs. Less is more.- plan flexible. Upgrades, policy reshuffles will occur.- design should be simple & elegant, spruce up with fonts- learn to spot good products. Test for tech & social status.- isolate complexity- deploy towards max memory, maybe outsource caching- robots are evil

KTHXBYE!