Thursday, November 29, 2007

SpeedMark 5 results

Macworld magazine updated its SpeedMark results for SpeedMark 5 (the latest version of SpeedMark).

I am publishing a small part of the results for reference:
  • Power Macintosh G5/Dual 2.0GHz: 166
  • 15-inch PowerBook G4/ 1.67Ghz: 92
  • Mac Pro Xeon/3 GHZ Quad Core: 274
  • 15-inch MacBook Pro Core 2 Duo/2.2GHz: 185
  • 24-inch iMac Core 2 Duo/2.8 GHz: 262
  • Mac mini Core 2 Duo/2 GHz: 172
Of course, the results do not show that my PowerMac can have up to 8Gb of RAM whereas a Mac Mini can have up to 2Gb of RAM.

The important thing to notice is that a MacBook Pro is as powerful as my PowerMac G5 DP @ 2GHz!

Wednesday, November 28, 2007

Google will offer its Gadgets to Dashboard!

According to MacWorld, Google will offer (on Thursday 29.Nov.2007) its Gadgets to Dashboard!

Google Gadgets are similar to Dashboard Widgets.

Google will publish its API that will allow the programming of its cross-platform Gadgets.

Tuesday, November 27, 2007

The Hello World! program in Objective-C

//
// File: helloworld.m
//
// Programmer: Mihalis Tsoukalos
// Date: Friday 21 April 2006
//
// Use: gcc -Wall -lobjc helloworld.m -o helloworld
// to compile it.

#include <objc/Object.h>

@interface Mtsouk:Object

{

// This is left empty
// Usually, instance variables are declared here.
// In this example no instance variables
// need to be declared.

}

- (void)hw;

@end

#include <stdio.h>

@implementation Mtsouk

- (void)hw
{
 printf("Hello, World!\n");
}

@end

#include <stdlib.h>

int main(void)
{
 id myMtsouk;
 myMtsouk=[Mtsouk new];

 [myMtsouk hw]; 
 [myMtsouk free];
 return EXIT_SUCCESS;

}



Did you find the above information helpful? You will find a lot more information in my eBook "Programming Dashboard Widgets". The eBook describes how you can create Apple Dashboard Widgets using many programming languages including JavaScript, Perl, Objective-C, and PHP. You can buy it here.

The Objective-C Programming Language


Objective-C was introduced with NeXTSTEP and OPENSTEP. It is mainly used in combination with the Cocoa framework (a collection of libraries) under Mac OS X although you can program in Objective-C without using these libraries if you want to.
Objective-C is an extension to the famous C programming language that adds support for object-oriented features. What Objective-C does is to add Smalltalk-style messaging to the C programming language.
Mac OS X is based on the NeXTSTEP operating system. In 1993, the set of libraries found in NeXTSTEP were renamed OpenStep and then Cocoa.
I very nice book for learning Objective-C is "Programming in Objective-C" by Stephen G. Kochan. I highly recommend this book. You can find more information about it here.

Monday, November 26, 2007

The back cover of the Programming Dashboard Widgets book


The eBook describes how you can create Apple Dashboard Widgets using many programming languages including JavaScript, Perl, Objective-C, and PHP. You can buy it here.

Stanford Cocoa Programming Class!

I was very surprised when I found that the famous Stanford University offers a Cocoa programming class. You can find more information about it here.


The course may help you learn Cocoa by following its assignments and reading its lecture notes! The proposed textbook is Cocoa Programming for Mac OS X, by Aaron Hillegass, second edition. You can find more information about the book here and here.

Disadvantages of Widget plugins

  • It is more difficult and time consuming to program a plugin for a functionality that is also supported by JavaScript.

  • It is more difficult to debug a plugin.
  • You have to learn Objective-C.
  • You also have to learn Cocoa.
Did you find the above information helpful? You will find a lot more information in my eBook "Programming Dashboard Widgets". The eBook describes how you can create Apple Dashboard Widgets using many programming languages including JavaScript, Perl, Objective-C, and PHP. You can buy it here.

Advantages of Widget plugins

  • Nobody can change your Widget plugin.
  • You can create commercial Widgets.
  • Your source code is hidden and more secure.
  • You can do things that simply are not possible with JavaScript and the built-in Widget functions by using the Cocoa framework.
Did you find the above information helpful? You will find a lot more information in my eBook "Programming Dashboard Widgets". The eBook describes how you can create Apple Dashboard Widgets using many programming languages including JavaScript, Perl, Objective-C, and PHP. You can buy it here.

Friday, November 23, 2007

Basic skills for creating Widgets.

Creating basic Dashboard Widgets is not a very difficult task and there is a great chance that you already have most of the necessary skills to create your own basic Widgets! The absolute musts are HTML, Cascading Style Sheets (CSS), JavaScript and the ability to use a program for designing graphical images.

An older article that I wrote for SysAdmin magazine may help you understand the basics of Dashboard Widgets.

Did you find the above information helpful? You will find a lot more information in my eBook "Programming Dashboard Widgets". The eBook describes how you can create Apple Dashboard Widgets using many programming languages including JavaScript, Perl, Objective-C, and PHP. You can buy it here.

Choosing a Mac OS X Editor

A very serious decision that every programmer has to make is to decide about her editor.
This is a decision that is hard to change afterwards, especially after getting used to working in a certain way. The most obvious choices in the Mac platform are the following:
  • TextMate: This is my favorite editor. I typeset my eBook using TextMate. A lot of Microsoft Windows users want a Windows version. I like the fact that I use it with my shell scripts, LATEX, Perl, PHP, C, C++, Objective-C, SQL, PL/SQL and text files that I write. . . It is not very expensive. Need I say more?
  • TextWrangler: This is the freeware version of BBEdit. Nevertheless, it is a very capable editor that you may use without problems.
  • BBEdit: This is the editor of choice for a lot of Mac users, especially before the release of TextMate. A very capable editor, indeed! It is relatively expensive for my taste. I would suggest that you try TextWranger first and then consider paying for BBEdit.
  • vi: This is the old time classic UNIX editor. Before using TextMate, vi was my editor of choice. I am still using it for administrative work. It is free, reliable, very capable and comes with Mac OS X.
  • Emacs: UNIX people usually fight about their editor of choice. The two opponents are vi and Emacs! I have never used it but I know that it is a powerful editor and you will not regret it if you choose to use it. It is free.
  • SubEthaEdit: SubEthaEdit is an editor with unique characteristics not found in the other editors. It supports collaborative text editing features, which means that two or more people can edit the same file at the same time! It is also a powerful editor and is not very expensive.
In order to understand the capabilities of an editor, I should tell you that I typeset my whole book in LaTeX using TextMate!

Thursday, November 22, 2007

Book Table of Contents

Chapter 1: The Dashboard
Chapter 2: Existing Apple Widgets
Chapter 3: Existing Widgets
Chapter 4: Programming the Hello World! Widget
Chapter 5: Using JavaScript for creating Widgets
Chapter 6: Creating a Widget using Perl
Chapter 7: Programming Widgets using PHP
Chapter 8: Creating Widget plugins using Objective-C
Chapter 9: A Widget that uses UNIX Shell Commands
Chapter 10: Advanced Widget Techniques
Chapter 11: A Widget that processes RSS feed
Chapter 12: A Widget that Interacts with a MySQL Database
Chapter 13: Widget Hints and Tips
Appendix A: A Short Introduction to HTML
Appendix B: An Introduction to CSS
Appendix C: Reading and Understanding an Existing Apple Widget

Programming Dashboard Widgets eBook released!


This is the first post of the official blog site for my "Programming Dashboard Widgets" eBook.

You can buy the book here.

Number of Pages: 370
Number of Chapters: 13
Number of Appendices: 3

Based on standard HTML, CSS, and JavaScript, Dashboard Widgets are simple to build and easy to extend. The "Programming Dashboard Widgets" book contains all that your need to know in order to create and program your own Apple Dashboard Widgets. The book also shows you techniques that help you fine-tune, extend and explore existing Widgets.

You do not have to be an HTML, CSS or JavaScript expert to understand the book as it presents and explains all the necessary HTML, CSS and JavaScript knowledge. Each book chapter contains bibliographic references that will help you expand your knowledge.

You can find its detailed TOC in PDF format here.

Thank you!
Mihalis.