Archive for November, 2007

Podcasts are so last year, Vidcast Time

Posted in General
Post date: November 26, 2007

So I’ve recently been playing with LiNQ a lot and I’m starting to get a cool idea. Instead of a PODCast I think I might do a Vidcast. I’m just trying to decide whether it’ll work or not.

This brings me to an interesting question to all your geeks out there.

What is the difference between a Webcast, a VidCast and a PodCast?

WebCast –> This is essentially a live broadcast over the internet that may be recorded live and distributed later.
VidCast –> Video clip that is recorded and edited before hand and then set loose on the net.
PodCast –> An audio clip, usually part of a series of PODCasts.

These ofcourse are my own interpretations of these terms and if you disagree then good for you ;)

Blogged with Flock

Tags:

Tips on developing Facebook Applications

Posted in Development
Post date: November 18, 2007

We recently had the Johannesburg Facebook Developers Garage and I made extensive notes during the different speakers presentations. Since they gave them to us I’m use they won’t mind me sharing them. Naturally I will give credit where credit is due so if anyone minds me sharing what they said, please contact me via the post and I will remove the content. That being said I doubt it’ll happen. It was a very informative evening and some tips came up that all serious facebook developers should ernestly consider. I absolutely loved every single presentation and no-one bored me in the slightest, so if I don’t have any of your content here its because I want to focus this post solely on application considerations and not statistics.

Grant Fleming (Fontera)

——————————-

First off, before I say anything, here’s a link to a video taken of his presentation at the event: MyVideo Link.

For me personally Grant’s presentation was probably the most informative. He raised many very important points.:

1) Come up with a good, descriptive and catchy name for your application!

2) Make your applications useful as well as fun.

3) Be careful with invites, Facebook can and will BAN you if you’re not careful. So don’t spam the developer forums and other people’s posts.

4) Make sure you interact with your users. Listen to what they have to say and remember that they are ultimately your customers.

5) If you expect your app to work well, host the application outside of South Africa. We all know how expensive bandwidth is here and for example, Fontera’s applications moved over 4 Terabytes in one month!!!!

6) Although it may not seem good, if you are having scalability issues it is actually a good thing, depending on how quickly you sort it out. If you’re app faces too much downtime users will remove it more often than not.

7) Try not to make too many successive API calls as the FB API can be slow at times.

8) Make sure that you know all the POST variables of the FB API. This can come in very handy!

9) Make use of the Developer forums on Facebook. If you’re battling with something, chances are that 7 other developers have just overcome that problem!

10) Database Management is a serious activity if you want a serious FB application. Make sure the database is well indexed! If needed, de-normalize your database.

11) Remember to monetize your application. Make use of Advertising such as social media and Video Egg. This can generate much needed income!

Tyler Reed (Younique)

——————————-

Now here’s a young guy with passion for waht he does and how he does it. Definitely the most lively and enteraining presentation of the evening!

1) Understand your target user market for your application and what they want/need.

2) Try make use of technologies such as AJAX as this immediately impresses most people and it is generally extremely useful.

3) Install Google Analytics to track your traffic.

4) Interact with your users as much as possible.

5) Try keep your application’s interaction as interesting as possible.

6) Be prepared for scalability issues for your application.

7) Get your application out into the community as soon as possible! You think your idea is amazing, problem is 500 other developers might have exactly the same idea!

8) Once your application is available then worry about presentation of it and non essential stuff like that.

If you want to see Tyler’s presentation then check it out here: http://www.slideshare.net/tylerreed/facebook-m-xit-me

Eben de Wit (Microsoft)

——————————-

I’m sure he was expecting it but he got slightly bashed for being from Microsoft, either way, he still had a great presentation. He demonstrated a new application from MS called PopFly. It is currently in Alpha but looks promising for people who want to create applications but why aren’t developers. This is bascially a click and drag interface, then once you’re done, you simply export it to facebook and then its available. It is hosted on the PopFly website so check it out for useage restrictions as I’m sure there have to be some form of restrictions.

PopFly

Juan Roldan (Mentez)

——————————-

Juan was the final speaker for the evening and gave one of the most thought provoking presentation. Very interesting stuff, for this you HAD to be there to understand. I will try summarize what I got out of it but he was great!

1) You must be commited to your application.

2) Have your motivations clear for why you love this application and why you think its relevant.

3) Make sure you application has a target market!

4) Try think of something unique and useful. Something users will access/need on a daily basis. This is where his talk got interesting! You “demonstrated” brainstorming by asking a single question. “What is half of thirteen?”. The stuff we came up with was insane and nothing to do with numbers at all!

5) Target advertisers in your application to generate revenue. Example: Guy created an application whereby you could mark where in the world you had been. A few months later we sold the application for over 4 million US $ to a flight agency/airline.

6) Never fear Failure. The worst that can happen is that you fail, all you do then is try again!

7) When starting with your application, include a lot of local content BUT think globally for future use.

8) Build a separate website for your application.

9) When you initially start advertising your app to friends and family, target “champions”. Get someone influencial to use your application because if they use it, people who look up to them will use the application!

10) Try and make your application accessible from mobile devices.

11) Create tutorials for using the application if needed.

12) Always make the application using the English Language as it truely is the “universal” language.

All in all, it was an amaing evening and I would like to thank Armand and Arno for organizing everything and setting it up. It is much appreciated!

On a personal side note, I will be attending the Johannesburg Microsoft DevChat tomorrow discussing Visual Studio 2008 and its impending release and its new features. I cannot wait as I also get to spend the day with some old colleagues from the greatest company I’ve worked for thus far (www.signify.co.za). So to Johan and Gavin, see you in the morning!

Step by Step Intro to Ruby on Rails

Posted in Ruby on Rails
Post date: November 11, 2007

As you know I’ve been messing around with Ruby on Rails for the last week or so and this will be a step by step intro into the world of Ruby on Rails.

Ruby on Rails has just blown me away, if/when I ever do a private project again this will be the platform I work from. Not only is it easy to learn but your development time so much shorter compared using a language like ASP.Net with C#. Now don’t get me wrong, I am undoubtly a C# fanboy of note but there is something exciting about working with Ruby on Rails. Something exotic.

I am going to do two sets of examples for the code throughout this tutorial, the Ubuntu way and the windows way for those of you that still have not converted. If the windows code does not work please leave a comment and I’ll do my best to help you.

First off, let me explain the basics of Ruby on Rails (RoR). RoR implements a MVC pattern. MVC stands for Model, View, Controller. If you’re new to different programming patterns then check out this wiki link. In a nutshell, this pattern separates your Data and the user interface and all the data moves between these tiers via a controller class as seen below

Model View Controller Diagram

The controller classes handle all web requests sent to the application.

Now before we get started please make sure you have MySql and RoR installed. For the people using Ubuntu check out the following posts I have made regarding the installation of RoR and MySql:
Ruby on Rails in Ubuntu 7.10 (Gutsy)
Setting up MySql 5 in Ubuntu

For people running windows, make sure you have the following installed:
Ruby
      then open your command window and type: gem install rails –remote and answer “y” to any question it may ask.
MySql

once everything has been installed we are ready to begin:

Ubuntu Users:

open a terminal and type in rails appName and obviously replacing appName with whatever you would like to name your app. RoR will then create all the necessary file under your /home folder.

Windows Users:
Open a command window and navigate to where you would like the application placed, then type rails appName

This command will create all the files and folders needed for your new RoR project.

Once you have done this, open up MySql and setup your database. For Ubuntu users I suggest MySql Navigator, just search for it under Add/Remove Programs. Create a new database on your MySql server but do not create any tables just yet. Now that your database is set up, navigate to the config folder in your RoR Project and open the database.yml file. Open it in any text editor. Once its open you’ll see something interesting already. RoR gives you 3 connection options in for your application. You can have a connection to a Test Database, Development Database and a Production database. So instead of having to change connection strings later you can set them up right now. Considering this isn’t much of an issue now since we’re just playing around with RoR, set all connections up with the same settings. enter your database name, MySql UserName and password in this file and save it.

Now that our connections have been configured lets go create that table. The only “strict” part of RoR is the table naming standards. The reason behind this is that RoR implements ActiveRecord. ActiveRecord is an ORM tool. If you’re not familiar with this check out the links that I provided. Although you might initially think that being forced to name tables and columns in certain is not for you, trust me, its worth it later as you’ll see.

Lets create a simple table in the database. Create a table named “users”. Please note that the table name MUST BE lowercase. This is one of those little restrictions. Create a tinyint field and make it an auto-incrementing field. Also specify this field as the primary key of the table. Again, the field name MUST BE lowercase. Then create 2 more fields called name and age. Once this is done the fun can begin.

Remember we spoke about Models and Controllers earlier? Now we are going to create our User model and controller.

Ubuntu Users:
Open a terminal and navigate to your project folder. type “script/generate model User”
once that has completed type “script/generate controller User”

Windows Users:
Open a command window and navigate to your project folder. type “ruby script\generate model User”
once that has completed type “ruby script\generate controller User”

By generating the model and controller, the RoR framework automatically checks the database you specified in the connection file, and from this maps the class you a database table. Remember we named the table “users” yet when we generated the model and controller we created them under “User”. The RoR framework searches the database for the plural of the model name entered. Even if you named your model Company, it would search the database a “companies” table. Thus the RoR framework has a firm understanding of plurals in the english language!

This next step for me is the most magical line of code I have probably ever written. Open the project folder. Navigate to the controller folder under the app folder. Open the user_controller.rb file in a Text Editor.
Here’s what you should see

Now in the class declaration type the following:
scaffold :user

Now as you’ll see in about 2 minutes, this is an amazing line of code. By writing this single line of code you have created the following pages:
1) List Users Page
2) Create new User Page
3) Edit User Page
4) Display User Page
5) Delete User Page

All of these pages are now fully functional. Thats right, you can now start populating your database with information. To test this simply start the RoR webserver and check it out for yourself!

Ubuntu Users:
Open a terminal, navigate to your project folder and type “script/server” BUT do not close the terminal window.

Windows Users:
Open a command window and navigate to your project folder and type “ruby script\server”

Once this has been done click on the following link: http://127.0.0.1:3000/user/list. This is obviously a link to your personal computer so if you’re reading this and haven’t physically followed the steps mentioned above then don’t click on the link as it won’t do anything.

From here you can add new users, view the users, edit and delete them. As you can see the Ruby on Rails Framework is a real development time saver. This is also dependent on your project type. I wouldn’t personally user RoR for an enterprise wide application that was business critical. But for small applications and for proof of concept applications for demo purposes I don’t think there is anything better. Naturally this is a personal opinion.

Setting up MySql 5 in Ubuntu

Posted in Ubuntu
Post date: November 7, 2007

Something that will probably be needed if you going to be developing in Ruby on Rails on Ubuntu is MySql. So here’s a very quick run through of how to set it up. As per Ubuntu-usual, it is really easy to setup and the longest part of the setup, depending on your internet connection, is the download of MySql server 5.

1) Open up and terminal and type sudo apt-get install mysql-server
2) Open the /etc/mysql/my.cnf file in your text editor and replace 127.0.01 with your computer’s IP address
3) During the install it should ask you for root password for mySql but if it doesn’t type the following:
    mysql> SET PASSWORD FOR ‘root’@’localhost’ = PASSWORD(’myPasswordHere’);

Obviously where I’ve typed myPasswordHere you’ll enter your desired password.

I am currently working on nice little Ruby on Rails post so check back soon!

Ruby on Rails in Ubuntu 7.10 (Gutsy)

Posted in Ruby on Rails
Post date: November 2, 2007

So I’ve decided after a few months now to give Ruby on Rails a full go after my September debacle with Circle Hosting. Long story short I’ve just set it up in Ubuntu now. As I have previously stated, the more I use Ubuntu the more awesome it becomes.

It seems that ruby comes installed by default in Ubuntu 7.10 which was awesome. I quickly installed RubyGems and updated and installed the supporting documentation and within 2minutes it was ready. I kid you not, 2minutes and it was setup. Obviously I still to install mySql but getting Ruby on Rails installed was literally that quick in Ubuntu 7.10! I decided to just quickly share what I did to install RoR in Ubuntu so quick.

Open a terminal and execute the following commands::

1) sudo apt-get install ruby irb ri rdoc ruby1.8-dev2.2
2) sudo apt-get install rubygems
3) sudo gem update
4) sudo gem install rails –include-dependencies (thats two dashes in front of “include”, Wordpress seems to remove the second dash)

Thats it! 4 easy steps to Ruby on Rails in Ubuntu!

Microsoft DevChat - Johannesburg - November 19

Posted in General
Post date: November 1, 2007

This time around the DevChat will also be held in the major cities and the one I’m particularly interested in is the Joburg one. Now being my pushy self I decided to ask my manager whether we can go as we will hopefully be designing our current systems into VS2008. It looks like its going to be an awesome day and I cannot wait. Just hoping that some of the people I know will also be attending. Yes I’m speaking to you Craig, Andre, Johan and Gavin! ;)

The space is limited so book your seat quick before there aren’t any seats left. It promises to be a very entertaining day at the Microsoft building in Bryanston. Here is the schedule for the day:

08:30 Registration

09:00 Quick lap around Visual Studio 2008 and .NET Framework 3.5

09:45 What’s new in C# 3.0 and Visual Basic.NET 9

11:00 Tea Break

11:15 LINQ (LINQ-to-XML; LINQ-to-Objects; LINQ-to-SQL)

12:30 .NET Framework 3.5 enhancements

13:00 Lunch

13:30 Building ASP.NET Ajax Web Applications

14:00 Building Web applications with Windows Communication Foundation

14:45 Workflow Services: Combining Windows Communication Foundation and Windows Workflow Foundation

15:30 Tea Break

15:45 What’s New with Visual Studio Team System 2008

16:30 Building and Debugging SharePoint Workflows with Visual Studio 2008

17:00 Building Mobile Applications using the .NET Compact Framework 3.5

17:30 The End

Its going to be a long day but I feel a very rewarding one. Book your seat at the link below and I hope to see you there!!!

Johannesburg DevChat MS Event