Where to put all that data? S3 resources

Lets face it, web apps are getting bigger. At least in terms of the amount of data they store. Take two big poster siblings, Flickr and del.icio.us. All those user accounts, all that interlinking between then, all that meta data. Technorati is another example – trying to keep up with all blogs everywhere in as near to real time as possible has got to be seriously data intensive. And at times this has shown through, all have had problems at some point in their short histories.

If you are looking to get into the world of big, community focused, web apps then you need space. And I know I cant afford a huge outlay on storage and bandwidth, even most small web shops would probably have something of a problem with the large outlay, limited short term money making problem.

An interesting solution to this would appear to exist in the shape of S3 from Amazon. It has been around a little time, and others have been intrigued enough to mention it, but I decided not to ramble on until I’d had a brief play. Well, it’s quite cool.

Amazon themselves provide a number of useful code examples in different languages, including Perl, Python, C\#, Java, Ruby and PHP. They also provide examples of the raw HTTP requests for thos that way inclined.

This openness (OK, so they dont really have a choicee, the whole product consists of an open API, it being closed would seem to limit it’s usage!), as always, has allowed the community to run with the idea, building up sample apps and some easy to use wrappers:

Nothing here feels complete as yet. Most are early hacks by people getting on board early and giving the rest of us a starting point.

Overall I like things like S3. If it works reliably and scales well then it could become something that just sits behind all sorts of realy cool ideas, preventing data loss and removing another potential headache for the small developer.

Any other resources, or ideas, more than welcome.

Speak and a Drink

I’ve been going along to the local industry do Think and a Drink for a good long while now and they have talked me into speaking at the next do. So I wont be thinking for the first hour, rather rambling on about the chosen topic of Web 2.0. My loose plan is to mock the term and big up the technology involved. Someone else has the job of looking at the business implications, which should also be pretty interesting.

Apparently this is me:

Gareth works at TH\_NK – a newcastle based brand technology company. He is involved in a number of areas of the web design and development process, from the design of modern web applications to building effective online interfaces. In his spare time, he blogs on web design, development and accessibility at morethanseven.net and organises events for the local developer community on newcastlenewmedia.org. Keeping up-to-speed with web trends and new technology is something Gareth is passionate about – and it shows.

If anyone who has never been before, or isn’t a codeworks member, wants to go along then let me know. I’m sure Heather would love more people along, and be good to see some familiar faces (or at least familiar domain names) in the audience.

I’ll publish my brief presentation if it’s any good after the event. See you there?

Beware. Nudity Warning

Rejoice. It’s CSS Naked Day!

Come on everybody, get your markup out for the ladies.

PAS 78

I dont often ramble about accessibility issues on here, something I’ve only just noticed. Quite suprising as it’s one of those things that I’m pretty interested in – and have been for a good long time.

Anyway, I’ve just finished reading through PAS 78 or Publicly Available Specification 78, Guide to Good Practice in Commissioning Accessible Websites. It’s a document aimed at those buying websites, especially in the public sector, who probably know accessibility is a good think but could get easily hoodwinked by anyone with even a modicum of knowledge and evil intentions.

Rather than just provide information about the what and why, considering the doc was launched a month ago, I’ll just point you to a good synopsis from Isolani. A few other notables have posted good reads. Joe Clark, as always, has an opinion which is both anally detailed and all true. Bruce also has a run down from a (some what) insiders point of view.

My feeling was, overall, pretty positive. I’d love to see all the clients I deal with having read this. It’s a pretty good intro to the issues at hand, though it is maybe a little long and technical for some of its audience. One area in particular that got quite a bit of coverage, rightly so in my mind, was testing. Their still isn’t enough testing of any sorts for websites, even with all these beta tags going around. The testing area covers all sorts of bits and pieces, again not in enough detail for the implementor but certainly enough for any good procurement office to be able to separate the wheat from the chaff.

A good series of mentions goes to ISO 13407 which covers Human centred design processes for interactive systems and as luck would have it the subject of a workshop I’m attending with Gilbert in Sunderland on monday. More on that after the fact.

Anyhow. I’d recommend getting your bosses to pay the £30 (or for bosses, stump up your selves) for the PAS 78 PDF. It’s a pretty good read anyhow, and hopefully more and more proper clients will be reading it soon. Forewarned is forearmed as they say.

Playing with Python - first impressions

Ok, well not quite first impressions. I’ve dabbled before but not for a particular reason and never actually built anything – but I’ve spent most of today getting stuck into Python.

I have a couple of reasons for wanting to learn another language properly, and I’m more interested in Python as a general scripting language than as a replacement for PHP as my web language of choice (Rails hasn’t really caught me yet, sorry). I could do some of this with PHP I know but that brings me to my second reason. I’ve been reading the Pragmatic Programmer recently and one of the things it has to say is:

“Learn at least one new \[programming\] language every year. Different languages solve the same problems in different ways. By learning several different approaches, you can help broaden your thinking and avoid getting stuck in a rut.” The Pragmatic Programmer

I like the idea of that. The rest of the book has a number of interesting things to say about programming in general, much of which is easily actionable.

A few of my regular reads sing occasionally about the joys of Python, which was probably another reason I’ve gone that way as well.

Anyway, first impressions is that Python is pretty easy to pick up. I keep wanting to put in braces and semi-colons but looking at the code it looks clean, simple and readable. Arrays, string functions and flow control appear to be present and correct. They work how you would expect which is what you want really for core functionality. Objects are next on my list of things to look at.

I’m building a simple log file analysis tool as I go. I’m fine with it being a command line app to be honest, but I might end up tinkering with some of the GUI features at a later date. One of the reasons for going for Python was it’s flexibility in this regard. Hopefully building something as I go will make it more likely that I’ll keep playing. I have a couple of other sample apps I’d like to make as well which is probably a good thing again to maintain interest.

Anyway, depending on how things go some more comments or code may emerge. Anyone else taking similar advice to learn new languages? If so which ones?

The Wisdom of Clouds

I’m playing with a few thinks at the moment and one of those had me thinking of tag clouds. For those who dont spend time on flickr or similar you may not have seen then, or at least heard of the terminology. All we are really taking about here is a visually weighted list.

I dont agree with Jeffrey here unfortunately, who has issues. I can see the point, that sometimes information is better organised by one person than many (think your weekly food shopping list) but in some cases it can be nice – especially where it provides an alternative navigation method. Maybe I just missed the part where everyone had a tag cloud? I’d love to see, for instance, a tag cloud on last.fm of bands that I might like based on my listening habits, and those of a similar musical persuasion.

An interesting article on where next for tags clouds throws up a few interesting points but one thing I have not seen discussed at all is the accessibility angle. Visual prominence is one thing, but without some sort of semantic prominence those not viewing the content visually lose out. A very unscientific survery involving the del.icio.us tag cloud confirmed what I though would probably be the case – the visual effects (ie. bigger or highlighted text) are implemented purely via classes on the links.

What would be the effect of using plain links, moving to emphasis for the next level, up to strong for the really important tags? We can style the content exactly the same as before, but we have added some sematic prominence to the content.

Anyone had any experience implementing tag clouds in live projects? Even better, anyone had experience of user testing such interface devices? Real bonus points for accessibility related testing.

Reading up on a speedy industry

I had cause today to stop and think about books relevant to learning the bigger picture side of building web sites and applications. Code, graphic design, whatever your bag in between, you are either aiming to become, will become or at least affected by people in management positions. Even small companies are not immune, though they can avoid some of the problems (but often by causing some other ones as well.)

I’m a big fan of books, I read lots online but when it comes to regular, night after night reading I much prefer to be in bed with a book than a laptop. I have no problem at all falling asleep and the book falling lightly on the floor for the morning.

Books do however date, or rather some do, or maybe if you take them as gospel they do. Anyhow, I see them as useful – perhaps even more so in distilling knowledge for consumption by other, less obsessive, members of out industry?

Without further ado I present a short(ish) list of books I think everyone involved in web software should read:

Some are most definately on the software side, others very web centric while more still are a little older and just plain odd. However all of them serve a purpose, they let people see into a way of thinking. The idea that programmers are wizards annoys me. It’s not magic, it’s creativity, just with tools most people are not familiar with.

If you are someone involved with the building of appications give some of the above a try if you ever feel like reading up on something different, apart from the latest CSS or Javascript tricks.

If your involved in the management of projects but come from a non software (dont kid yourself because it’s the web it’s not software) background then dive in. You’ll start to understand some of the little bits that puzzle you so.

Anyone else got any books in a similar vein? I’m always on the look out for an interesting read. Or do you complely disagree – do you even still read books?

Apples and PEARs

I’ve finally decided that PEAR is a good thing. For those unfamiliar with it it’s a little like CPAN for Perl. For those unfamiliar with that it’s a repository of high quality PHP code, covering everything from benchmarking and debugging to database abstraction.

I’m about to dive back into PHP after a minor break playing with mainly client side toys, and with my work now mainly on the markup/styles and planning side of things PHP is a nice break. PHP isn’t the devil as far as I’m concerned, and I think now I’ve grown up PEAR is part of the non devil like side to PHP – the professional side if you will.

I like PHP for it’s flexibility. The same problems this causes in terms of it being easy to write poor, unmaintainable code are the same boons in brings if you use it nicely. I dont want static typing, on occasion being able to get down and dirty with procedural code is handy and with so much good code out there in places like PEAR it’s often very quick to put together something from existing parts.

I even went as far as getting a book, PHP Tools to have a good going through. I’ve been on something of a mad web design book shopping spree of late, so I’ll try do a quick round up of books soon as well.

Anyone else have much playtime with PEAR, or similar code repositories?

PS. Apologies for the two week hiatus. I’m something of a busy person at the moment. More quality posts as soon as possible. Promise.

keyboards and web applications

Web applications are still evolving. This we know. One thing any power user tends to pick up on pretty quickly in desktop applications is the keyboard shortcuts. We just cant get enought of them. Why dont we see them more in web applications? Well a couple of reasons as it happens:

  • Potential clashes with browser or OS shortcuts
  • Many web applications are still evolving from more promotional websites. The learning curve for a website needs to be instantaneous, otherwise your potential customer just left. But what about a web application? The users may have to use it, as well as having documentation and maybe even training.
  • Because we dont see them in web applications? The circular argument.

Personally I think in some cases keyboard shortcuts would be nice, I have a little plan for something in mind as well so started experimenting. The clash issue I’m going to leave for another post as it will take a bit of brute force experimenting but I did start playing with a simple way of assigning functions to keys.

The following code creates an object to store the lookup/hash/two dimensional array (pick one you like). This is a simple associate between a key, and a function to run when it’s pressed. A function is then assigned to the onkeyup and onkeydown events which monitors them, checks for one of the keys in the lookup to be pressed (in this case along with the ctrl key) and runs the assigned function.

<txp:php> include('/www/htdocs/morethanseven/scripts/sample/keyPress.js'); </txp:php>

A simple library function is used to add the event to the document onload. My library obviously includes other helper functions but we dont need any of those for this example.

<txp:php> include('/www/htdocs/morethanseven/scripts/sample/lib.js'); </txp:php>

Some improvements I can spot from here which I’ll implement as I actually take this out of the lab and into something production like.

  • JSON (or YAML) data storage. Either one makes configuration simpler and scores geek points. It’s a win win.
  • Abstract the use of the ctrl key from the function and allow other modifiers to be set when used.

I’ll try get round to the look at keyboard shortcut clashes, or link to someone who already has, as I get round to it. In the mean time, what do people think about the use of keyboard shortcuts in web applications? Any good or bad examples welcome.

Last Week with Ajax

Last friday I got the chance to stick around in London and attend the Clearleft Ajax workshop with Jeremy Keith. 30 people from different web disciplines and backgrounds trying to get as much out of a single day on the latest buzz word has to sound like fun?

I had heard Jeremy’s speak before at @media last year where he was one of the highlights and friday was much of the same. In a good way. Clear, to the point, explanations. Examples where they help to make a point, some wry humour and the odd culinary simile. The only real let down there was he’s cut his hair short. This tendency for minimalism in hair cuts amongst web designers is disturbing me. Only Norm can save us now.

Back on topic the day covered everything from theory and first principals to some fully working examples, but stuck with playing with Javascript and code from scratch, rather than frameworks and server side stuff. A descision I think really made the day useful.

The morning was, to be fair, less useful from my standpoint. The speed introduction to Javascript, and some of the concepts of Ajax where covering ground I’d already covered personally. That’s not to say they weren’t well placed or interesting though, far from it, and did provide some people with what was probably the best crash course in Javascript imaginable.

The afternoon really kicked into gear though. Lots of examples; from simple updating content through to making use of the Yahoo API. Throw in some examples with server side code, the obligatory shopping basket example and, particularly impressive, a detailed look at JSON. This all in one afternoon remember.

The code examples we got to take away with, and much of this was generic enough to have already found it’s way into my working library. I’m very much a fan of Jeremy’s DIY ethic with regards Javascript. I too am sceptical of using huge frameworks to crack nuts without a clue about what they are doing. The actual simplicity of the Ajax methods I think was one thing that Jeremy got over better than anyone I’ve listened to date. It really is about application design more than new, fancy, complex technology.

A few other people who attended have posted their opinions .I’m really not stalking Molly by the way.

As Molly had hinted, Jermey is also very quotable. So here are a few of the things I’m sure he said, any loss of context here is completely my fault though:

The validator is my friend

What’s the problem? Reality! (refering to IE)

DOM is like a scalpel, innerHTML is like a sledgehammer!

It’s hard to argue with one line of code (on innerHTML vs DOM)

Pointing at Google maps as an example of Ajax is like pointing at a ferari on a race course as an example of the combustion engine. You spend most of your time going wow!

We closed up the afternoon with some discussion of the accessibility concerns, some of the development issues (wireframing ajax apps anyone?) and a whistle stop look at frameworks. All in all a very useful day, both personally (ie. I had fun) and professionally (I think my employer got value for money.) It also reinforced what I’ve been thinking more and more recently. It’s nearly all about design when it comes to real work. When and where and why must come first, and how is often more trivial than you think.