Sunday, June 24, 2007

So you want to be a web2.0 programmer



Ok, there's a little buzz around web2.0 now ;-) And you want to become a part of the new wave of transforming not only the Internet but also the way business is done.

You've got an idea, you know how to program, but are new to web2.0. I'll give you a crashcourse on what you need to learn and what tools to download to be a part of the new revolution.


What you should learn (or know):

  • DHTML / XML

  • Javascript

  • PHP

  • MySQL

  • Flash / Actionscript

  • C++


What you should use:

  • Apache

  • PHP / Zend Framework

  • MySQL

  • Prototype

  • Scriptaculous

  • Flash

  • OpenBSD

  • C++


So why did I choose that?

Well, first of all, you obviously need a web server. I choose Apache since it stable, has been around forever, and it's fast.


You should do most of the stuff in a scripting language because things on the web are changing at high speed, and you want to be flexible in that way. PHP is a really easy and fast scripting language, and there are plenty of good PHP-programmers out there. When your company expand, you don't want to be slowed down because all C# and Java programmers are hired by multinational companys and demand high salaries.



Since you want to be flexible, you build your code modular. Since you want to have code that are easy to maintain, you need to have a good structure from the start. By using Zend Framework you will get all that. But don't cheat!

All websites are dynamic nowadays, so you need a database. Use MySQL. It's free, is fast and it's stable.

Since you want fun things to happen on your site, with lots of web2.0 features like Ajax and animations and you do most of that in javascript. What you don't want is to do all the work from scratch. Prototype and Scriptaculous is the answer. With Prototype, you enhance javascript and makes programming easy, and it also have great Ajax features. With Scriptaculous, you'll get loads of animation and drag-and-drop-functionality added to your javascript. Prototype and Scriptaculous is the way to go.

But no web2.0 site with any big plans can live without Flash. It's with flash you embed video, so you need to learn that too. Flash is also great for making small games and nice animations, but it's the video part that is the essential reason for learning it.

OpenBSD. As long as your site have less than a million visitors a month, a simple standard Linux-PC is ok (Windows is never ok except when you use IIS, and even then I'm not sure. Mac is just weird). But when you get Slashdotted and Techcrunched, or your facebook widget is used by hundred of thousands of simultanious users, you will need to cluster, and for clustering, OpenBSD is the best choice.


You have to use C++ for the core of your project. PHP is nice and fast, but not fast enough for processing the input of all your visitors that wants the right content presented to them instantly. C++ modules for PHP is the answer and it's easy to use in clustered environments. (You need compiled programs when you need really good benchmarks).

Well that's that. Now you have everything you need for creating 2008's version of Facebook and Digg.


About this: Mattias Johansson have programmed since 1985, for the Internet since 1994 and holds a MSc in Engineering Physics. While programming he has tested loads of different programming environments.

The combination above might not be optimal in all cases, as in the case of you being an angry Java developer, but if you go that way you will have the Gods of Programming on your side.

Zend Framework 1.0 - Now there is no other way



I was thrilled and happy when I first found Zend Framework, and now I am thrilled that it has been released in version 1.0 RC2.

I've been developing for the greater part of my life and tested a great variety of programming languages and platforms. For some reason I got hooked on PHP a couple of years ago, and I guess it was because of the ease and development speed that I really couldn't let PHP go.

After being involved in a project that grew much bigger than anyone initially anticipated, I realized that the language itself doesn't provide much help or ease in creating well structured work. At the same time I've read over and over about the great benchmarks of the PHP/Mysql/BSD combination compared to the Microsoft .Net alternative. Lot's of sites out there are using PHP/MySQL as their development platform serving millions of visitors, and PHP gave me a greater degree of freedom compared to the .Net alternative.

Recently it was time for me to start another project, but this time I realized that I had to put a greater effort in creating a much better structure from the start. I went through lots and lots of big OS PHP-projects to find the holy grale of wellstructured code, and suddenly I found the Zend Framework!


Zend Framework is a framework for creating php-projects rapidly and in a nicely, robust, modular structured way. The main contributors to the projects is Zend (obviously) and IBM, so the stability of the framework compared to alternatives are great.
It's built for using the MVC pattern architecture (Model/View/Controller) and has a wide range of modules ready to be used.

Now that Zend Framework v1.0 RC2 is released I'm happy to say that after some development I'm glad to say that I'm almost overexited about the results! Great web applications are built very fast, without giving up the flexibility of PHP or a well structured code.

If you're a php developer and haven't checked it out yet, I strongly encourage you to do so; it will make your life easier.

About ViralLinks, ViralIcons and Viral[Generic]

I've been blogging around a bit and wanted to get some tips on getting more visitors, better google rank etc, and I found lots of tips about ViralLinks, ViralIcons and other Viral things. It resembles the banner exchange programs that was popular back in the 90's and I don't remember them being that successfull. They worked a bit like a pyramid game, the earlier you joined, the better outcome you got.

I might be the same thing here with Viral[Whatever], for the early top ten it probably works fine, but as the list grows I'd guess that the google search engine will decrease the rating of the links: link-pages aren't that high ranked in google.

My experience is that it is almost always better to create an article about something, post it in some link-sites that are about specialized in that subject, and wait. Specialised link sites hold content that are relevant to the visitor and hence it gets a higher score than simple viral link lists. Moreover, specialized link sites are copied over and over by people starting new link sites, so you don't even have to work to get more links over time.

One page I posted three years ago on one site now have 10000 links to it on google, and I didn't do anything else than the initial post.

Do you agree or disagree with me?

By the way, look at a really interesting blog 49things to do - Microsoft Surface and Apple IPhone Parody for some laughs (you might allready have seen them though, but my other blog is pretty fun).