Zend Framework, where do you want to go tomorrow?

Two weeks ago I started working with Zend Framework at work. I chose to use Zend Framework for one primary reason: Zend. Even though I have plenty of experience with CodeIgniter and Kohana, I simply could not take any risks using them for a rather large project at a company I had just joined.

My experience so far is mixed. Probably because I am so used to the way CodeIgniter and Kohana do things, Zend Framework just appears utterly complicated and difficult to work with (at the beginning).

Read the rest of this entry »

  • Digg
  • description
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • LinkedIn
  • Live
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • TwitThis
  • YahooMyWeb

Related posts

Tags: , ,

Variable methods and accessors in Ruby

Yeah I am a lame PHP guy who hasn’t gotten too deeply into Ruby yet. ;)

In PHP I often use variable methods, for example:

$foo = new Foo();

$funcname = 'dynamic_method';
$foo->$funcname();
// Same as calling $foo->dynamic_method();

$varname = 'dynamic_accessor';
$foo->$varname = 'some value';
// Same as calling $foo->dynamic_accessor = 'some value';

Now, because Ruby does not prefix $ in front of variables, it is impossible to use variable methods the way we do in PHP.

I am sure for Ruby gurus it’s pretty obvious but for me, I just spent more than 30 minutes searching for an alternative other than evil eval, and I finally found one.

We use the PHP call_user_func and call_user_func_array equivalent in Ruby: send or __send__.

Luckily accessors in Ruby are methods, so we are able to use the send method for both methods and accessors.

For example we can set a variable accessor like this:

foo = Foo.new

funcname = 'dynamic_method'
foo.send "#{funcname}"
# same as calling foo.dynamic_method

varname = 'dynamic_accessor'
foo.send "#{varname}=", 'some value'
# same as calling foo.dynamic_accessor = 'some value'

I wish in future versions of Ruby, we can somehow assign accessor values the way we do in PHP. :)

  • Digg
  • description
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • LinkedIn
  • Live
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • TwitThis
  • YahooMyWeb

Related posts

Tags: , ,

Ruby on Rails, Passenger (ModRails) vs CodeIgniter and Kohana

Disclaimer: This is a very simple, ‘Hello World’ benchmark which has no impact to any real world applications. A more thorough benchmark test (by building two real world applications) is planned. :)

Disclaimer 2:I apologise for posting such a useless benchmark (I certainly didn’t expect it to hit the DZone front page), but I think most of you missed the point. I merely posted this as a result of surprise (to me anyway). At a later stage I will conduct a much more meaningful comparison between some of the frameworks. Until then, please ignore this post. :)

Last few days I have been playing with Ruby and Rails, again.

Today, when someone was asking on a forum about the efficiency of web frameworks, I thought I’d give the few frameworks I work with some more benchmark testing.

So I went ahead and benchmarked CodeIgniter, Kohana and Rails, using a simple ‘Hello World!’ page. Now before I post any benchmark results, you should know that I have previously done a benchmark test on CodeIgniter, Kohana and CakePHP. CodeIgniter and Kohana shared similar results.

Read the rest of this entry »

  • Digg
  • description
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • LinkedIn
  • Live
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • TwitThis
  • YahooMyWeb

Related posts

Tags: , , , , , , , , ,

SyntaxHighlighter Plus: Now Supports Bash and Wordpress MU

A while ago Tim and Nick Anderson have submitted their patches to me (big applause to them!), today I finally have the time to include the patches to the official Wordpress repository.

Please head to the plugin page or the Wordpress page for more information.

Caution: If you have altered your CSS file, make sure you back it up if you’re going to use Wordpress 2.5’s automatic plugin upgrade.

  • Digg
  • description
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • LinkedIn
  • Live
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • TwitThis
  • YahooMyWeb

Related posts

Tags: , , ,

Firefox on OS X and Linux: Spell Check and Mouse Gestures

Since I fully switched from Windows platform to OS X, I noticed that the spell check in Firefox no longer works. A quick google search revealed that the problem is caused by All-in-One Gestures and persists on both OS X and Linux.

I have been using All-in-One Gestures on Firefox for a very long time (primarily on Windows). Fortunately I only use the two very basic gestures: back and forward, so it’s okay to ditch it and find an alternative.

There are only two alternatives to date: Mouse Gestures and FireGestures. The former has not been updated since 2006 and breaks the spell check at least on my system. So I gave FireGestures 1.0.5 (the current version on the Firefox Extension website) a try, sadly it breaks the spell check too. I then went to the developer’s website and found out that there is a 1.1 dev version, and it has what I have been looking for: [Linux][Mac] Fixed bug: Breaks inline spell checker (Alternative words is not showing).

Downloaded, installed, and sweet, the spell check is back! :)

  • Digg
  • description
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • LinkedIn
  • Live
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • TwitThis
  • YahooMyWeb

Related posts

Tags: , , , , ,

Magento 1.0 is out

Magento 1.0 is out.

Last time I checked (when it was 0.8 beta) I couldn’t install because my host doesn’t have pdo_mysql. Since then I requested pdo_mysql to be compiled and now is a great time to give it another spin. ;)

It should be very interesting because Magento is built on Zend Framework.

  • Digg
  • description
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • LinkedIn
  • Live
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • TwitThis
  • YahooMyWeb

Related posts

Tags: , ,

© Copyright 2008 Beyond Coding
Design by: styleshout | Colourise by: Theme Lab and Search Marketing | Customised by BeyondCoding.com
Powered by WordPress