Life & much, much more

Hello SevenStrokes: Building websites … a little differently

A few months ago, Chris Paplinski, Nathan Charrois, Kaushal Inna, Andre Brokman, Kelsie Rose and I, Dion Moult, gathered to create a company. Today, we would like to present to the world: SevenStrokes.

Sevenstrokes web development

SevenStrokes is a web development company but with a few key differences.

  1. Firstly, we see websites as a service, not a product. We don’t just build a website, we treat it as part of your larger corporate strategy.
  2. We build systems that mirror your day-to-day domain issues. We use a combination of behavior-driven development and code architecture that employs the same daily language that you do. This ensures our system makes sense not just in the software world, but in real life, and thus always move a step towards achieving your corporate goals.
  3. We follow many aspects of the open-source business model, ensuring that we assign the most motivated staff that want your site to succeed just as much as you do, and that full inspection guarantees your system integrity.
  4. We push for the latest industry standards and keep on pushing, even after launch. Websites are usually short-lived, but we’re changing that with a system architecture that maximises long-term life.

So what are you waiting for? Do you need a website built? Do you need somebody to help spearhead your latest online initiative? Check out SevenStrokes: Building websites … a little differently

sevenstrokes unique web design

Technical

Separating the core application from the delivery framework with Kohana

This post is about developing web applications that don’t depend on the web.

Kohana MVC - A separated delivery mechanism architecture

MVC is probably the most popular architecture for web applications. But what’s interesting about MVC is that it’s not actually an architecture meant for your core application. It is merely a delivery mechanism.

With this in mind – a well developed application treats the delivery mechanism as a plugin and cleanly separates the core application from the web. It should be possible to remove the internet with all of its methods of interaction (eg: its HTTP Request/Response interface), and still have a working “core” application which you can use elsewhere. Say for example to make a desktop or mobile device application.

In short: your business logic doesn’t rely on the internet to exist.

With Kohana, or really any modern MVC framework which supports the PSR-0 standard, this is surprisingly easy to do. I’d like to share the convention I use.

In Kohana, all logic goes in application/classes/ (or equivalent in its CFS). This directory will contain all your delivery logic. This includes Controllers, Views, and any Models, and perhaps some Factories to DI your app.

Your actual core logic is kept in a separate repository to force yourself to remove all dependencies. When combined, I like to store the core logic in application/vendor/. With Git this can be done with a submodule. This way MVC and insert-your-architecture-here is cleanly separated.

You can then add your core application to Kohana’s autoloader (in application/bootstrap.php for convenience via spl_autoload_register(function($class) { Kohana::auto_load($class, 'vendor/Path/To/App/src'); });

And that’s it! With a little discipline we suddenly get a massive benefit of future flexibility.

If you are interested in a project which uses this separation, please see my WIPUP project. (Disclaimer: WIPUP is a side-project and is still in progress). More reading by Bob Martin here.

Life & much, much more

GetKDE.org – the workspace, and what’s going on.

Some updates. Both for newcomers to GetKDE.org and those who have seen this project before, see the homepage, the explore page, and then finally, the page I’m writing about.

Homepage has been updated too:

And explore page updated too.

Hope you like it.

I have to apologise for only having the time to work on this very sporadically. Next in the to-do list is the apps page.

Uncategorized

The Open Source Nature

Some people have heard things like “open-source”, “freeware”, “hacker etiquette”, etc. However, a lot of people are doubtful about it and this is mostly because they don’t understand it fully. I have decided that for today’s post, I will shed some light on the background behind open source culture.

Yes, there is such thing as free software

Most of the technologically savvy teenagers will go “yeah, duh” at this. However, the fact remains that when computers were coming out, if you weren’t into Unix or bothered to learn much more that “Start up. Type. Print. Shutdown”, you’d might be one of those who don’t think free software exists. There was this article about a teacher who confiscated Linux CDs because “ I am not sure what you are doing is legal. No software is free and spreading that misconception is harmful” Sounds like she needs a little exposure. Even Microsoft gives out free software. Want to bet? Look on your computer. Do you have Microsoft Movie Maker on it? How about MSN Messenger? Yes. That’s right. Free software. What about Apple? It gives us QuickTime (the player). iTunes is another one.

Free as in they don’t charge money for it?

No, not necessarily. Though this is generally the case. Free can also be as in freedom. Freedom to look at the source code and edit it. Freedom to use the program for any use. Yes, that’s right, even steal it, put it under another name, make some changes, and sell it again.

Take for example the Linux kernel. It’s free. Everybody can edit it. Everybody can do whatever they want with it. The result of this is a huge amount of Linux “distributions” which are specialised flavours of the same operating system. Benefits to the consumer? You bet. There’s lots of competition. Standards are kept high. People choose what suits them. Lots of choice.

If everybody can contribute, where’s the quality control?

Aha yes. More than half the programmers that think they’re good are crap. (Heck, I could be one of them!) They insert horrible code. They don’t follow conventions. This is why open source projects need good user and technical guidance and support, either through documentation or tutoring techniques. One popular choice is for an open source projec to have “beginner jobs”, which are simple tasks a beginner or a person just entering the project can tackle. This will give them a feel as to the style of the project, where things are located, and is a form of self induction training.

Also, it is important to note that most open source projects work in a method which can be described as people cloning the project, making edits, then applying their edits to a central repository which everybody clones from. Whilst doing this, people write logs about what changes they have made, and so on. All this information is tracked by a system. This technique is called version control. With version control, people can see what others are up to. In general if somebody sees something stupid being done, they fix it, or restrict the user from contributing further. This ensures contributions are beneficial.

Induction training? Nobody wants to do something for free.

Actually, yes they do. This is a big part of hacker etiquette. When the term hacker here is used, I am referring to the proper term hacker, which is basically an enthusiast for a certain subject, willing to delve deeper into it and learn more about the topic to suit their needs and interests. A hacker is not some idiot who tries to crack your computer.

Hackers believe in the sharing of information. They will willingly go out of their way to demonstrate a technique or to help beginners. They are fueled by personal interest. If they like a project, they will contribute. That’s how open-source projects get successful. They need to make the project appealing to developers. More developers joining will make the project progress a huge amount. This will benefit the users, who will then advertise it to the user community. Hackers interested in a topic will always hear the buzz in the relevant user community, and will then try to join too. Take for example KDE 4. These series have been all about revolutionising the desktop. They’ve done a good job of it too. Look at the logs of their version control system? You will see that the number of different people commiting changes have increased, and the frequency at which they commit changes have also increased. So yes, developers will willingly do it for free, especially if it’s something they use themselves. (dogfooding)

Uh, dogfooding? What?

This is a technique where software developers use their own software. Let’s say you were Nokia. What if all your employees used non-Nokia phones? That wouldn’t be very good for your image. Not only your image, but all your development. The best way to know what improvements would be best is to use it yourself. This is what open-source is all about. Making the improvements that people need.

When I said quality control, I meant does it provide what the user wants?

Yes. I’ve talked about the developers. To be honest, it can be said rather bluntly that developers are selfish people. If they want a feature, they add it. If they see something they don’t really care about, they won’t add it. They act in their own interests, not yours. However, since most developers are dogfooders, they themselves have similar wants to you. The way the open source community surpasses this developer-user gap is by introducing bug tracking systems and feature brainstorm systems. This allows the community to voice their ideas. Of course, the hacker are always looking at the buzz, so it’s quite likely someone will help. If a large user base agrees on the same feature being needed, a developer will always dedicate time to it. Not necessarily due extreme personal interest, but because it’s part of the hacker culture. In conclusion, this means that yes, it does provide what the user wants. I once read a quote about the upcoming Vista release: “I sure hope the Vista release is amazing, because I know that Linux will have all the same features within a year.” That’s right Vista, and there’s nothing you can do to stop them. The hacker response is “because I can and believe I should.

Give me real life proof.

Sure thing. Paulo Coelho supported piracy of his own books because he believed in the culture of sharing. Not quite open-source, but close enough. What was the effect? His book sales jumped up like crazy. It was a benefit to provide a good book for free so that people would get the hardcopy from the library. (to be honest, nobody in their right mind would only read softcopy books).

Mozilla Firefox. Supposedly the best browser on the market today. The only people trying to challenge that is the Opera people, who live in a world of their own. Pity them. Anyways, Mozilla Firefox is an open source project, and that’s what has mdae it the best browser. Does it attract developers? Sure does, the amount of addons, themes, and customisation that firefox can offer is amazing. What about Safari? Safari runs on Webkit, which was a fork of KHTML. KHTML was open source, and free software. All Apple did was steal it from the Linux KDE guys, develop improvements on it in secret, then release it under a new name. Shame on you Apple. However, that’s open-source culture! There is nothing wrong with Apple doing that. Of course, it’s a sin in hacker culture, but that’s why there’s discussion about merging Webkit and KHTML again (just google it).

Google. Google releases thousands of lines of code. Look at Google Android, the Google phone operating system. Google is a prime example of open source nature.

Wikipedia. Wikipedia runs on Wikimedia, and that is downloadable is free software. People can create their own wikis, anytime, anywhere.

Many country’s government all run Linux. Not because all governments are short on money, but because it provides what they need. The open source nature has made Linux possible to be made extremely secure and customised. The American security agency or whatever their name is all use Linux. Obama right now is encouraging businesses to consider open source and free software and viable alternatives.

One great example I read by Jeff Atwood over at Coding Horror was the comparison of open source to the self-service checkout counters available in most supermarkets nowadays. Think about it. Normally you would pay some guy to sit there checking out your stuff. This is proprietary software. Now you have the user doing their job, all for free. Why? because the user is interested in the stuff in your store (attracting developers). They are willing to do this. Not only that, but they are willing to do it well and get it done quickly and efficiently. Get it done well? This means no stealing stuff, etc. Why? because there are a dozen security cameras watching you (version control). Why quickly and efficiently? Well, nobody else in the store wants to you to check out more than you yourself do. This is a self motivated drive.

Think about open source. True, in some situations, it might not be applicable. However it’s always an option, and most of the time you just don’t see it!