28 Feb 2009 @ 7:02 PM 

Hi folks, I have just finished creating my first CakePHP component and I wanted to share it with the community.  After I finish writing this article, I will be submitting it to CakePHP for inclusion.

The component is called StringExtractComponent.  As you may guess, it extracts content from a piece of content.  I have created this component to mimic the STREXTRACT function in Microsoft Visual FoxPro.  I have come to fall in love with this function because it makes retrieving data from a string with a start and end delimiter.

To help you understand how it is used, I read the contents of one of my articles into a string.  I then proceed to extract a specific section that is contained within the code syntaxes that exist in the article. More »

  • Share/Bookmark
Posted By: Jamie
Last Edit: 28 Feb 2009 @ 07:06 PM

EmailPermalinkComments (1)
Tags
 28 Feb 2009 @ 9:47 AM 

I thought I would follow-up my “How to get indexed by Google in ONE hour” article with my top 5 SEO (search engine optimization) tips.

The following 5 items are by no means in order of importance, it’s best to try the ones that you think you can do first.  When you are implementing the following 5 SEO tips, it’s important to not rush anything.  When you are creating a web site and writing content, it’s important to take your time, write good content, read it, update it to better market your keywords, and read it again to ensure you are marketing your keywords to the best of their potential. More »

  • Share/Bookmark
Posted By: Jamie
Last Edit: 28 Feb 2009 @ 10:00 AM

EmailPermalinkComments (6)
Tags
 27 Feb 2009 @ 9:20 PM 

If you are not familiar with database indexes or even if you are, but not sure when to use them, this article will be perfect for you.

In this article, I will show you an example of a simple query without an index and then that same query again with the index.  I am certain that you will be shocked by the difference.

More »

  • Share/Bookmark
Posted By: Jamie
Last Edit: 27 Feb 2009 @ 09:20 PM

EmailPermalinkComments (6)
Tags
Tags: ,
Categories: Optimization, SQL, Theory
 24 Feb 2009 @ 3:36 PM 

I’ll continue today with another good database programming article.  If you missed yesterdays, you may view it here.

Today’s article will discuss when to use a static COUNT() versus a dynamic COUNT().  On a regular basis we are tasked with creating a message center or a photo album and we need to display a count of new messages or pictures in the album.

The obvious solution is to do a simple query: SELECT COUNT(*) FROM pictures WHERE album_id = 1 and display the result beside our album name.  Now, let’s assume that we allow multiple albums our actual query would be closer to this: SELECT albums.*, COUNT(pictures.*) as picture_count FROM albums INNER JOIN pictures ON albums.id = pictures.album_id WHERE albums.id = 1.  This will of course work, but let me show you a better, more practical approach that will improve performance significantly on large databases. More »

  • Share/Bookmark
Posted By: Jamie
Last Edit: 24 Feb 2009 @ 03:36 PM

EmailPermalinkComments (2)
Tags
Tags: , ,
Categories: Optimization, SQL, Theory
 23 Feb 2009 @ 4:51 PM 

Quite often we get a complaint from a client that their homepage is too slow.  The first thing we do is load the homepage up and see for ourselves.  Yep, it looks slow, so the next step is too see what is being done.  Quite often you’ll see some random data being displayed on the homepage.  Whether it’s random news articles, photos, videos, etc…If this is not the case, you may find my article on improving slow loading web pages more useful.

If the homepage is slow because of random data, you can lay a bet with high certainty that those 10 random articles are being pulled with an ORDER BY RAND() OR NEWID() slowing the site to a crawl.  In case you are curious the difference, RAND() is the MySQL way and NEWID() is the SQL Server way.  In this article, I’ll show you why you should avoid these functions and several different solutions to help you overcome this issue. More »

  • Share/Bookmark
Posted By: Jamie
Last Edit: 23 Feb 2009 @ 04:52 PM

EmailPermalinkComments (3)
Tags
 22 Feb 2009 @ 9:42 AM 

Man, what a week it has been.  As you may have noticed it’s been a few days too many since my last post.  The reason for that is a hectic week at work has prevented me from having time.

Now that the week is over and it was hectic because of my own stupidity, I mine as well write an article about it to save you some time. More »

  • Share/Bookmark
Posted By: Jamie
Last Edit: 04 Mar 2009 @ 05:27 PM

EmailPermalinkComments (0)
Tags
Tags: , ,
Categories: Theory
 18 Feb 2009 @ 2:56 PM 

Recently on a project I was working on, I was tasked with fixing drag and drop that was terribly slow.  The drag and drop was implemented with scriptaculous on a calendar system.  When you clicked an event to drag it it took about 5 seconds before the page would actually let you drag it!  This was clearly unacceptable and it has to be possible because Google Calendar is lightening fast.

 The first thing I did was download and setup jquery to see if it was related to how scriptaculous was created.  After setting up jquery, it was just as slow.  This lead me to believe that it was a fundamental problem with how the drag and drop was set up in both libraries. More »

  • Share/Bookmark
Posted By: Jamie
Last Edit: 17 Feb 2009 @ 06:12 PM

EmailPermalinkComments (3)
Tags
 17 Feb 2009 @ 1:46 PM 

Are you a person who dislikes frameworks?  Or are you a person who loves frameworks?  Or are you even a person who isn’t quite sure what a framework is?  The following article will discuss the pros and cons of frameworks and the common downfalls that people fall into.

I’m not sure if it’s only people I meet or a world-wide thing, but it seems people do not like to use frameworks (at least at first).  At my work, we use them on every new project.  So, when a new hot shot developer joins our team, we inevitable get to have the battle of “Ugghh, I don’t want to use a framework I want to code my way and only my way”.

If this is your typical response to frameworks, I suggest you continue to read and let me enlighten you on why we live and die by our frameworks. More »

  • Share/Bookmark
Posted By: Jamie
Last Edit: 16 Feb 2009 @ 06:47 PM

EmailPermalinkComments (1)
Tags
Tags: ,
Categories: CakePHP, Theory
 16 Feb 2009 @ 1:16 PM 

The following article is going to be short and sweet, but applying this technique will help you move up those all important rankings.

The technique involves updating your <title> tag.  With a few simple changes, your ranking for your targetted keywords will begin to immediately climb (well not immediately, but next time Google crawls your web page). More »

  • Share/Bookmark
Posted By: Jamie
Last Edit: 16 Feb 2009 @ 01:16 PM

EmailPermalinkComments (2)
Tags
 16 Feb 2009 @ 7:05 AM 

This is the first article to follow-up on my why “Why Is Internet Explorer Better?“.

Today’s article is going to discuss how Internet Explorer deals with margins.  To explain this weird and frustrating issue, I am going to build a photo gallery and break it down into several steps. More »

  • Share/Bookmark
Posted By: Jamie
Last Edit: 16 Feb 2009 @ 07:08 AM

EmailPermalinkComments (3)
Tags
Tags: , ,
Categories: CSS, Theory

 Last 50 Posts
 Back
Change Theme...
  • Users » 8
  • Posts/Pages » 72
  • Comments » 198
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight