May 11th, 2008 by Jarrod Goddard
I was recently working on a custom content management system for a client and I was adding a search box to the site to allow users to search the client’s site. Because all the content is contained within a database, I can easily search through the pages table to grab any pages that have the search terms contained within their title, content, or keywords meta tag. I wanted to make it a little more robust than simply doing a select statement and grabbing any pages with the search term and I wanted to also rank the results based on a relevance factor determined by where the search words were found.
I was recently putting together a custom search form for a client, and wanted to improve on it from the basic “SELECT title FROM page WHERE title LIKE ‘%search-query%’” method of searching a site. I wanted to include some more relevance to the search so pages that have the search words in their title were a little more relevant, as well as pages with the search term in the filename, and keywords meta tag as well as the body.
2 Comments »
May 4th, 2008 by Jarrod Goddard
Jonathan Snook, who I’m a huge fan on, just wrote a post about freelance developers being a recipe for poor software. After reading about the planning and development methodologies of NASA he talks about how freelancers may not be able to create products that are of as high quality as they should be. Although I agree that some freelancers can create poor software – real programmers create higher quality code as freelancers in my mind.
No Comments »
April 29th, 2008 by Jarrod Goddard
In my past post, I talked about how to improve performance of your SQL queries by using a simple WHERE clause. In other instances when you’re trying to improve performance you may take each query and find that there’s not much you can do to improve the individual queries, however, you may be able to combine multiple queries by using subqueries and thus reducing the number of database connections required by your page, and significantly improving your page performance.
No Comments »
April 26th, 2008 by Jarrod Goddard
Optimizing SQL queries is something that most beginning and novice web developers either aren’t experienced enough to worry about, or they just simply don’t consider it. I’ve worked on a lot of sites built by other people where the most simple SELECT statements are used, even if it means using 3, 4, or more database queries when only 1 is really necessary. The problem is that most of the beginners simply get the site to “work” and if everything is showing up on the page properly, then they consider the task complete. SQL can be very easy to learn and if your sites are relatively low-traffic, then it really doesn’t make a difference if you’re querying the database more than you need to - or if your queries aren’t optimized like they should be - since the site won’t get overloaded with 500 visits per day. However, as soon as you start to get a lot of traffic to your site, your page can start to really slow down. That’s when you need to either upgrade your server or hosting plan, or you can improve on your SQL.
No Comments »
January 24th, 2008 by Jarrod Goddard
This week, we got some news from the Internet Explorer team about IE8. I’ll be totally honest and say this is probably the worst move Microsoft can make with the future development of their market share-leading web browser. I’m really disappointed.
No Comments »