Archive for the ‘Web Development’ Category

New Website for Activo:

November 23rd, 2010
Comments Off

I have good news and bad news to tell you, well it is not really bad news, but just wanted to use that saying…

The bad news is that this website is has just become absolute. Meaning we will no longer publish anything new or introduce any new content on this website. The good news is that we already have a new website and the new website can be found at Notice that we got the domain name that we always wanted to have for Activo – Yeah!


For those of you who are interested, the new website was launched in late August of 2010. The domain was purchased back in November of 2009. The site currently already have twice the amount of traffic that this website has. The site also reflects a few changes in Activo:

  1. We moved our offices from Santa Clara to Los Angeles – and we love it down here. In fact LA is a great hub for techies and entrepreneurs, believe it or not.
  2. We now have a virtual team of developers, designers, and project managers. Yes – it was a decision we had to make back in the days before we moved and it turned out to work great. Our customers love it.
  3. We have decided to focus on Magento Development and Magento Extensions. I got to say, what a great decision that was!

So, check out the new website and our new blog. I (Ron Peled) will continue to post regularly about our daily grind and share with you as much as possible from what I am doing at any given time. Drop me a line if you have any suggestions or recommendations.

.NET Framework, AJAX, Content Management Systems, eCommerce, Ektron, Joomla, LAMP: Linux Apache MySQL PHP, Magento, Performance Optimization, PHP/MySQL, Project Management, Search Engine Optimization (SEO), Web Application Hosting, Web Design, Web Development, Web-based User Interfaces, ZenCart

Response to Sitepoint Podcast #40: A Googol of Googles

January 29th, 2010
Comments Off

I wanted to respond to Sitepoint’s podcast #40 since I did not see a way to add a comment on the podcast page.

First let me say that I really enjoy the podcast produced by Kevin Yank and discussed by his colleges: Patrick O’Keefe, Brad Williams and others – keep up the great work guys!

Here is what I wrote in an email to Kevin, explaining what I think are some points that were missed from the podcast:

Hi Kevin,

I had a few comments about your podcast about the Google apps and services, #40. Sorry, to respond so late as I listen to the podcasts in my spare time.

I think you totally missed the point on a few items. What Brad, Patrick, and you often miss about Google’s moves is that you have to remember that Google is a business. So, if you try to look what makes them try new services you should not be naïve in thinking that they are simply ‘trying to make things better for everyone to use’. The catch is how are they going to make more money as a result of offering these services to the world. Here are a few points you may have missed in your show:

  1. Google Public DNS service – you forgot to mention that if many people use their DNS service, they can now tell where these people browse and spend their internet time even when outside the Google universe. For an internet company this gives tremendous insights on what to focus next and get a head of the competition.
  2. Google changes to the home page – notice how many changes Google has introduced in the last 12 months? Or 6 months? It seems to me that Microsoft’s Bing is causing a lot of these changes. Notice how Google changed their input box size and button shine after Bing was launched. This is all to not lose market share in the search game, etc. This is hardly a UI decision at heart.

When you start thinking on the business side, many other issues come to light. Please do not miss that in future podcasts as you may be doing disservice to your listeners.


Ron Peled

Web Development

3 Interesting Trends in Web Browsers

November 26th, 2009

1. Opera is on the rise, especially in Europe

Recently I am reading more and more articles about the Opera browser. This browser is well known in the mobile space and is pretty much under the radar in the desktop space. However, recently I have been noticing a change upwards, especially in Europe. Opera has hired the graphic designer who worked on FireFox, has improved significantly its set of features and design, and keep introducing new innovative features such as the Opera Unite. As a web developer, I would keep an eye and make sure new site do not break in Opera, especially global sites with European audience.

2. FireFox’s (Mozilla) revenue is tapering off

According to a post “State of Mozilla” by Mitchell Baker, Mozilla has increased overall revenue in 2008 but at a slower paste. This along with large dependence on revenues coming from the main competitor, Google, brought a slew of articles and questions from Analysts and Enthusiasts. The main question from a web developer’s perspective is the long term validity of the FireFox project. At the moment, it does not seem to be in jeopardy at all and according to the article, perhaps even in a better state due to increased innovation and development as a result of fierce competition. In most cases, competition is a good thing. The dependence on Google revenue is a problem, and if I was running the show – working on decreasing this dependence will be my main priority.

3. IE9 – Performance is one of the main improvements

According to the IE team, the new IE9 which is currently being developed will be much faster then its predecessors. This is great news as speed is now the main advantage of using its competitors. Now that Microsoft is in favor with the public again due to Windows 7 and since it is continuing to push new features to IE, I think the rate of market share decline will decrease if not reverse itself and we will see a rise in market share. As a web developer this means no change: still utmost respect to IE, make sure that all websites (new or old) work on IE. Soon, we will need to test for IE6, IE7, IE8, and IE9 and notice that none of them pass the acid test. The good news is that we will drop support for the painful IE6 browser soon (will depend on the rate of adoption of Windows 7 in corporate).

Happy Thanksgiving!

Web Development , , ,

Updating iNove to work with KeywordLuv plugin

October 5th, 2009

Last week I discussed a new wordpress plugin that got me excited: KeywordLuv. I also promised to show you how I fixed the issue with iNove theme. Here it goes:


The main issue is that the iNove theme uses the get_comment_author_url() and the KeywordLuv works on a different method, the get_comment_author_link(). So, here are the steps to update your iNove theme in a way that the author will show the Author name and the keywords properly:

  1. Go to your WordPress admin area
  2. Install the DoFollow plugin
  3. Install the KeywordLuv plugin
  4. Go to the Appearance tab
  5. Click on the Editor (Themes Editor for wordpress)
  6. Click on the ‘Theme Functions‘ file (functions.php)
  7. Look for these lines of code around line 230:

    <?php if (get_comment_author_url()) : ?>
    <a id="commentauthor-<?php comment_ID() ?>" href="<?php comment_author_url() ?>" rel="external nofollow">
    <?php else : ?>
    <span id="commentauthor-<?php comment_ID() ?>">
    <?php endif; ?>
    <?php comment_author(); ?>
    <?php if(get_comment_author_url()) : ?>
    <?php else : ?>
    <?php endif; ?>
  8. Erase the above lines and instead insert the following code:

    <?php echo get_comment_author_link(); ?>
  9. Save by clicking the ‘update file’ & check your work

That should do it. Notice that this site already has it installed and working properly. Disclaimer: the steps above are provided with the intention that it may fix an issue – there is by no means a guarantee. Each blog is slightly different.

Let me know how this worked out for you.

Web Development ,

KeywordLuv: a must have wordpress plugin

October 2nd, 2009

KeywordLuv is the latest hot wordpress plugin. It did not officially catch on fire yet, but it will. I won’t be surprised to find it built in next versions of wordpress. So what is it anyway? From the publisher’s website:

Description: Reward your commentators by separating their name from their keywords in the link to their website, giving them improved anchor text.

- Stephan Cronin

keywordluv-google-wonder-wheelIn other words it lets commentators leave a comment and allow area for their name and keywords while showing clear separation.  Instead of having Dedicated Advanced Hosting or Magento Plugins post comments on your site, the author of the comment can leave their name and get the credit they want with the keywords they selected. Three immediate benefits arise from this plugin/feature:

  1. Clear separation between author name and the keyword.
  2. Since the plugin needs a DoFollow plugin installed and the keywords entice authors to comment on your posts, more people will potentially join the discussion.
  3. Ability to separate between spammers and non spammers easily (for now).

There was a tiny issue with inove and the usage of this plugin. Next week, I will share with you how to address the issue in the iNove theme.

Let me know if you find this plugin useful or not.

Web Development

Required PHP Extensions for Magento eCommerce

August 27th, 2009
Comments Off

When I setup a new linux server I make sure to set it up lean since performance is always on my mind. I usually install packages manually, so here is the list of PHP extensions that are needed for the latest stable version of Magento:

  • PHP
  • php-mysql
  • php-mcrypt
  • php-hash
  • php-xml (will be required for Magento 1.4.xx)
  • php-gd
  • php-pdo
  • php-mhash
  • php-soap

Here is the command line that will do the job:

yum install php php-mysql php-mcrypt php-xml php-gd php-pdo php-mhash php-soap

Tip: you should use PECL extension APC. Also known as Alternative PHP Caching. This little extension can speed things up significantly. Assuming you have setup Atomic as a repository in yum, you can run this command:

yum install php-pecl-apc

Web Development

A Quick Way to Download, Install, and Setup pdnsd (local DNS Caching)

August 26th, 2009
Comments Off

Back in December of last year I posted an article about setting up pdnsd. This is a revised version of the same howto, but with a shorter approach for fast setups. I also changed the IP addresses to point to the OpenDNS servers which has proven to be both effective and reliable.

rpm -i pdnsd-1.2.7-par_sl5.x86_64.rpm
echo "server {" > /etc/pdnsd.conf
echo "label=\"opendns\";" >> /etc/pdnsd.conf
echo "ip =,;" >> /etc/pdnsd.conf
echo "}" >> /etc/pdnsd.conf
service pdnsd start

echo START_DAEMON=yes > /etc/default/pdnsd

Edit your resolve.conf file and make sure that the first row has nameserver=, the rest should remain the same. Here is how:

vi /etc/resolv.conf

Restart your network service:

service network restart

Last: make sure that pdnsd auto starts on boot, I use ntsysv for this.

Web Development

Setting noatime and nodiratime for improved disk performance

August 25th, 2009

This is great if you have a server that performs plenty of disk access operations and you are interested in speeding things up a bit. Here is how to do this in three steps. First some assumptions:

  • You have root access
  • You are the only one that will ever need to mount or unmount this file system
  • Running CentOS (this may work, but was not tested on any other linux server)

This is what we are doing:

  1. Editing /etc/fstab to set the noatime and nodiratime flags for the file system
  2. Remounting the drives/file systems (without rebooting)
  3. Checking our work

Step 1: Edit the /etc/fstab, type:

vi /etc/fstab

Add the noatime, nodiratime flags right after the defaults flag in the “/” root mount partition. Repeat to all the partitions that you wish to speed up. Here is how my fstab file looks like after the change (click to enlarge):

etc-fstab-in-vi_with_noatime_nodiratimeStep 2: Remount the file system:

mount -oremount /

Step 3: Check our work:

cat /proc/mounts

Tip: the following command will perform a tiny benchmark test, in case you want to see how fast your hard drives perform. If you want to compare, you should perform a before and after tests.

hdparm -tT /dev/sda

Web Application Hosting, Web Development ,

Magento: Hard but not Impossible

August 4th, 2009
Comments Off

magento_hard_but_not_impossibleIn the last few weeks I have been hard at work on a Magento plugin that extends the eCommerce app to become a front end of a POS (point of sale) system. With over 6,000 files Magento can certainly be intimidating at first, but as you get familiar with its architecture you find it less and less intimidating. One main design feature makes it easy to find a class by its class names.

For example, the class Mage_Catalog_Model_Product will be located in the /app/code/core/Mage/Catalog/Model folder and the file name is Product.php. If you ever need to instantiate the class, use Mage::getModel(‘catalog/product’).

Another useful tip about the architecture is that most everything is handled in the various session objects and every operation is basically an event that occurs which then calls a certain method within a particular class. Some of these events are dispatched and can be used by Magento’s event/observer architecture but most are not and therefore one needs to override the class instead.

I know this is very vague but will make sense if you are knee deep inside the magento code.

eCommerce, Magento, Web Development

PHP SimpleXML Rules!

August 1st, 2009
Comments Off

Last week I was debugging an xml parsing utility in PHP. Debugging can be enjoyable when it goes well but in my case it just wasn’t happening. It felt like chewing mud. The issue was actually a bug within the libxml library which is a native PHP extension. Apparently it was a bug that was introduced in PHP version 5.2.6 and was addressed in version 5.2.8 or 5.2.9. The bug presented itself when using the xml_parser methods which are built into the PHP. It is the old way of parsing XML with PHP, the new way is using SimpleXML, SimpleXMLElement, or XMLReader objects.

Now, once I read over the documentation I realized how easy it is to use the new SimpleXML. Additionally, I reduced my XML related code size from 100+ lines to less than 20. Fun!

Here is a short example of how to use it, let’s say we have the following XML structure:

 <purpose>eCommerce LAMP Development</purpose>
 <application isInstalled="1">Apache</application>
 <application isInstalled="1">MySQL</application>
 <application isInstalled="1">PHP</application>

Now lets observe how to use the SimpleXML class:

//We'll assume that the above xml is represented as a string and located inside $xmlDoc
//Here we create the SimpleXML object named $xml from the xmlDoc shown above
$xml = simplexml_load_string($xmlDoc);

//Now we can loop through the nodes 
//Notice how the node translates to a property of the object)
foreach($xml->webservers->webserver as $webserver)
  //Here we can use $webserver as a sub-node
  echo "My Web Server Info:\n";
  echo "Hostname: " . $webserver->hostname . "\n";
  echo "Purpose: " . $webserver->purpose . "\n";
  echo "OS: ". $webserver->os . "\n";
  //Now we'll see how we can use the xml node attributes
  foreach($webserver->applications as $application)
    echo "Application: ". $application;
    echo ($application['isInstalled'] == 1 ? " is installed" : " is not installed");
    echo "\n";

That is it! easy right? I thought so. At least it is much easier than working directly with the old xml_parser methods which turns to be buggy in recent versions of PHP.

A word of caution: I found it is necessary to join the values of the SimpleXML object to a string, sometimes even to an empty string in case that I am sending it to a function. In other words, i had to use:


instead of simply:


and the reason is that otherwise PHP would pass a copy of the object instead of triggering the toString() method. By adding the empty string we force PHP to first convert it to string and then send it to the function or method.

Web Development ,