Angry Monkeys

Angry Monkeys is a web dev team based in Melbourne. We build software for smarter simians.

Of stacks and faces

posted August 30th 2009

I have recently been considering the issues involved in using fonts of varying x-heights in my font stacks. As Andy Clarke explains:

…there’s the problem with CSS, right there. Different typefaces, even common ones, that have been designed with different x-heights, need different amounts of line-height. Calibri less than Verdana and different again to Arial or Helvetica. But CSS does not provide the facility to specify a varying line-height if a font in the stack is not installed, as it retains the same set line-height value for all typefaces specified in the font-stack.

One possible way of addressing this issue is to detect which fonts a user has installed via font detection scripts like this or this. Using this method a script could automatically adjust the font size at runtime to ensure a consistent layout. However, a lot of people worked really hard to ensure the content, presentation and behaviour of our websites remain seperate and we don’t want to be pissing on their parade.

The answer to this problem potentially lies in the newly adopted @font-face declaration in CSS3. The @font-face declaration to those unfamiliar allows designers to reference a font for embedding inside a page. The syntax looks like this:

@font-face {
  font-family: <a-remote-font-name>;
  src: <source> [,<source>]*;
  [font-weight: <weight>];
  [font-style: <style>];
}

The syntax currently has support specifying a font’s weight and style, this is because they act as constraints on the actual embedding and therefore reduce how much of the font needs to be downloaded. What I would like to see is the addition of the font-size property so that designers would have a greater degree of control over their typography. Below is how you would potentially normalise the x-heights of your font stack using @font-face:

@font-face {
  font-family: L-Calibri;
  src: local(Calibri);
  font-size: 115%;
}
@font-face {
  font-family: S-Verdana;
  src: local(Verdana);
  font-size: 85%;
}
body {
  font-family: L-Calibri, S-Verdana, Arial, sans-serif;
}

I’d be quite keen to hear other people’s thoughts on this, and to see if anyone else has any ideas on how to move typography forward on the web.

I turned to the dark side…

posted August 30th 2009

I have a confession….

I bought an iPhone. Actually, I bought two. One for me, and one for my wife.

I didn’t want one, I swear. But I had no choice. We have a couple of clients who really want iPhone versions of applications that we are currently building for them (and probably websites too I am sure). So what can you do? We use .NET solely because that is what our clients want us to use, and now we have iPhones solely because our clients want us to build stuff for them.

I’m a late comer to the iPhone craze. I sometimes think that I get on these things just as the rest of the world is moving on to something else. But I have to say, the possibilities in terms of applications and/or games is pretty amazing. At the moment a fairly large proportion of stuff on the app store is frankly shit. The sort of thing you see advertised on late night TV by those dodgey $6 a week sms clubs. But I would imagine it is only a matter of time before the quality is given a chance to rise to the top of the cesspool. Once the platform matures a bit it will definitely become something worth targetting.

At the moment, I’m not entirely sure it is worth developing a game or an app which you plan on selling for 99c, unless it is a throw away app you built in a couple of weeks or while on holiday. For me, it’d be hard to justify building something which I’d need to sell 20,000 copies of to break even on. Of course, the more you spend making something, the more copies you need to sell, or the more you need to charge. Even if you develop a great tool or game and charge a minimal amount for it, there is still only a very small chance that your app will even be seen by the vast majority of iPhone owners. Given the sheer number of apps for sale at bargain basement prices, it seems to be a pretty tough marketplace to break into.

We’ll keep you updated when (or if) we start developing for the iphone. In the meantime, it’s back to “paper toss” for me!

ExtJS and .NET MVC

posted August 27th 2009

I’ve been using JQuery with .NET MVC for a while now, and it works wonderfully. I’ve made a couple of post previously on the subject. In my most recent project I’ve been using ExtJS with .NET MVC and it works wonderfully well (for the most part!).

Since the latest version of ExtJS (v3) came out, it has gotten a whole lot easier with full REST support for data stores.

When I first sat down to write my data components for this particular project, I made my subclass of the Store class (or JSONStore depending on what I was doing), and implemented my own REST-style interface. This basically involved providing a URL and then appending _get, _set, _delete etc to get the appropriate URL. It was messy and ugly and didn’t work like REST should.

Fortunately, around this time version 3 of ExtJS came out and solved all my issues in one go.

Now by including the property “restful:true” into your Store, the store will automatically wire up the get, set, update and delete methods for you.

var store = new Ext.data.Store({
restful: true,
...

In my case, I am using a datagrid with a row editor. This means that when I click add, delete, update or load, the data store will take care of everything. All I need to do is provide a URL. Now, most ASP.NET developers will have never come across this, but it’s definitely something you should be aware of.

All 4 actions use the same URL (and hence the same method name in the controller) but with varying HttpVerbs.


        [AcceptVerbs(HttpVerbs.Delete)]

        [AcceptVerbs(HttpVerbs.Post)]

        [AcceptVerbs(HttpVerbs.Put)]

        [AcceptVerbs(HttpVerbs.Get)]

What this means is that in your controller you can have ONE method name (but 4 separate methods) to handle all requests for this data type. Not only is it a lot neater, it’s a lot easier to understand.

Hello World!

posted August 24th 2009

I suppose it’s fair to say that my joining up with Angry Monkeys has been a long time coming. Alan and I have had the pleasure, sometimes not, of working together in various capacities over the last 3 years. Amusingly, over the course of the last 12 months, our collaborations have been so numerous that our respective portfolios became almost identical.

I am incredibly excited by the prospect of being a full-time Angry Monkey and working in an environment where my sometimes obsessive enthusiasm for all things web is not only tolerated but appreciated, also as Alan pointed out, it beats “whoring”.

With that, I’m off to make msyelf another cup of coffee :)

Welcome Matt (heh)

posted August 20th 2009

Matt has been working on and off as a contractor for Angry Monkeys since we started 2 years ago. He’s been a great help in times when we’ve needed it, and we’ve been able to help him out on a few of his projects as well. As time has gone on, it has become more and more apparent that our collaboration was going to be a long term deal, and that the need to formalize it has become more important. From his point of view, a regular income means he doesn’t have to whore himself out to a dozen different companies, and from our point of view we get the security of having a designer who is always available.

So I’d like to be the first to say welcome to Angry Monkeys! Enjoy your stay and don’t drink all the coffee!