David Hurth's blog

Compress JavaScript with Gzip

I found interesting tutorial today about using JavaScript with Gzip:

The main problem when we are using ajax framework is because of their big size. Of course, it will extremely slow down the sites load time. For example, if we use the standard jQuery, it’s almost 100Kb. It’s even more if we use the complete Prototype and Scriptaculous that will cost around 150Kb.Compress JavaScript with Gzip | Ajax Tutorial, Nov 2008

Read the whole tutorial here.

Putting the Google Base API to Good Use - Part 1


A while back I wrote a post about creating a Product search using the Google Base API. We'll I've made a few examples for another blog that I've been writing on called The Porsche Guy's.

Since the blog focuses on Porsche related news and projects (I happen to have an older Porsche 944, so enjoy talking about the cars) I created two Porsche related searching tools. The first is a Porsche Parts finder that makes it easy to find the best prices on the Web for Porsche parts (you can go to the Porsche Parts Finder here). The second is a Porsche Finder, so it you are looking for a good deal on a Porsche then this tool will find the best on the web (You can see the Porsche Finder here).

My next post will go into detail as to how exactly I created these searching tools including code snippets, so look for part 2 of this post. Until then check out my first post about creating a Google Product Based Search Application here.

SharePoint Conference 2009


This week I have been at the SharePoint 2009 Conference in Las Vegas. The highlight of the conference so far was the keynote on Monday.

The keynote featured Steve Ballmer, Microsoft's CEO and focused on SharePoint 2010. Ballmer went through all of the new features of SharePoint 2010 and announced the release date of the public beta. The public beta will be released in November and the final version is scheduled for release in early 2010.

The new features of SharePoint include easier to use development tools, debugging and profiling features inside of SharePoint and easier implementation of Internet sites. The development tools are built into Visual Studio 2010 and allow for things such as starting templates for Web Parts. This reduces the amount of hand written code to start creating a Web Part.

According to Ballmer there are quite a few Internet sites that are already using SharePoint by companies such as Ferrari, Volvo and EA. SharePoint 2010 will make it much easier for more companies to do the same (without as many issues as the before mentioned companies had in implementing).

The look and feel of the new SharePoint looks a lot more like the newer versions of Office. In fact with the new version of Office connects to SharePoint, so users will be able to do quite a bit of the work that they would do in SharePoint through the Office 2010 application that they would like.

Microsoft is also releasing a service called SharePoint online. This service is running a SharePoint service in the Cloud. Because of this you get the advantage of having Microsoft keeping the servers up and the SharePoint patched, but you do lose some administrative privileges. It is also possible to have a portion of your SharePoint running in the Cloud and the rest running on-premise.

Microsoft sees SharePoint as almost a type of Operating System, so it will be interesting to see what the future of SharePoint holds.

How to Make a Search Based on Google's Product Search

You may have seen the Google Product Search and may have thought that it would be useful to include a customized version of the search into a website or application. Unfortunately, you can't just create a custom search engine based on the Product Search using Google's custom search creator.

So, how would you incorporate the Product Search into an application? The answer is to use the Google Base API. The API allows for you to call a feed and if you use the [item type:products] option it will use the Product Search data.

The API allows you to receive the feed in Atom, RSS and JSON formats. Google has also made it very easy by making a feed URL builder (you can access the builder here).

So, if you want to make an application using the Products Search now you can.

15 PHP regular expressions for web developers


Regular Expressions can be very useful tools for web developers. However, they can be a bit tricky to use, especially when you are not very experienced in web or software development. Well, over at Cats who Code they have put together a list of 15 useful regular expressions for web developers. The code is written in PHP, but should be fairly easy to translate to other languages.

Below is an excerpt from the post.

For many beginners, regular expressions seems to be hard to learn and use. In fact, they're far less hard than you may think. Before we dive deep inside regexp with useful and reusable codes, let's quickly see the basics:

Regular expressions syntax

Regular Expression Will match...
foo The string "foo"
^foo "foo" at the start of a string
foo$ "foo" at the end of a string
^foo$ "foo" when it is alone on a string
[abc] a, b, or c
[a-z] Any lowercase letter
[^A-Z] Any character that is not a uppercase letter
(gif|jpg) Matches either "gif" or "jpeg"
[a-z]+ One or more lowercase letters
[0-9.-] ?ny number, dot, or minus sign
^[a-zA-Z0-9_]{1,}$ Any word of at least one letter, number or _
([wx])([yz]) wy, wz, xy, or xz
[^A-Za-z0-9] Any symbol (not a number or a letter)
([A-Z]{3}|[0-9]{4}) Matches three letters or four numbers


PHP regular expression functions

Function Description
preg_match() The preg_match() function searches string for pattern, returning true if pattern exists, and false otherwise.

The preg_match_all() function matches all occurrences of pattern in string.
preg_replace() The preg_replace() function operates just like ereg_replace(), except that regular expressions can be used in the pattern and replacement input parameters.
preg_split() The preg_split() function operates exactly like split(), except that regular expressions are accepted as input parameters for pattern.
preg_grep() The preg_grep() function searches all elements of input_array, returning all elements matching the regexp pattern.
preg_ quote()

Quote regular expression characters

You can read the full post here.

Google Helps Make the Web Faster


Google is looking to help developers make the web faster. They have put together quite a few articles on optimizing your web site or web application.

The topics of these articles include:

  • HTTP caching
  • PHP performance tips
  • Optimizing web graphics
  • Optimizing JavaScript code
  • And many more

You can get to all of these articles here.

It's always good when a company like Google helps the developer community with tricks a techniques that they use. So, take a look at a few of these articles and work on making web a faster place.

Best free HTML editors


One thing that all web designers need is a good HTML editor. Plus with the economy the way it is the right price is FREE. Well, over at DevelopersVoice they have put together a good list of the best free HTML editors.

Below is an excerpt from the post.

Aptana Studio :

Aptana Studio is the free, open source Web development environment optimized for use with Ajax libraries and scripting languages like JavaScript, Ruby and PHP. Aptana Studio is considered by many developers the best-in-class authoring environment for today’s more rich and interactive Web pages and Ajax applications.

There is also support for Adobe AIR, Apple iPhone, PHP, and Ruby on Rails development, which comes via additional development plugins.

Pros: Complete IDE, many plugins

Cons : Complicated, developer oriented

Homepage : http://www.aptana.com/studio/

Download : http://www.aptana.com/studio/download

Size : 131 MB License Type : Unrestricted Freeware OS : Windows, Mac, Linux
Free HTML editor

KompoZer :

Kompozer is an open source web development tool built on NVU. The project strives to fix bugs in the NVU project and added new features to it. Both the HTML editor as well as the CSS editor has so far be fixed and updated as part of the Kompozer project - and many more changes are scheduled. Apart from that the main feature set is exactly as in NVU. And one of the most important features is still that editing take place in WYSIWYG (What You See Is What You Get) mode allowing you full control of layout as you work with your web design.

Pros: full featured WYSIWYG editor

Cons : not updated , Last release 2006

Homepage : http://kompozer.net/

Download : http://kompozer.net/download.php

Size : 7.6 MB License Type : Unrestricted Freeware OS : Windows 98 – Vista
Free HTML editor

You can read the full post here.

Animal Swap - A Fun Free Flash Game


Not that long ago I mentioned that I have been working on a few fun Flash games. The first game that is finished is called Animal Swap and is a simple pattern matching puzzle game.

The game is very simple and hopefully addictive. If anybody is interested in coding a Flash game and wants to see the source code, just send me a note and I can send it to you.

You can play the game here

You can find more games including this one at my other site wastingtimegames.com.

I'd love to get your thoughts on this game, so feel free to leave a comment about it.

Canvas 3D - The future of the web?


Today I ran across a cool 3D world terrain texture map demo. The demo is made using Canvas 2D with the 3D code written in JavaScript. The demo runs in Firefox 3, Safari 3 and Chrome. This got me thinking about the future of the web and if we will see a lot of 3D on the web.

Mozilla is working on a Canvas 3D plug-in to ship with a future version of Firefox what will be using a simplified version of OpenGL. The hope is that some cool apps will be made using this plug-in and that will force other browsers to use some form of Canvas 3D (and eventually adhere to standards). So, if some very cool on-line game or useful charting application is made in 3D it is possible that we will be coming up with some interesting 3D user interfaces using Canvas 3D in the future (hopefully in the near future).

This brings up the question of what would you use 3D on the web to do? Do you think it would be useful or just fun? The answers to these questions could shape the future of the web.

You can see the demo here.

Back to the 90's


It's Friday and everyone wishes it was Saturday. Wouldn't it be great to get a jump start on your weekend video game playing. Well, while surfing the web I found a great Doom clone written in Flash (so you can play it once the boss leaves early on Friday, but I wasn't the one that said that). The game is an exact clone of the 90's classic and is still a lot of fun to play.

You can play the game here.

Update: I had the wrong link above (it took you to a link to the game), here is the direct link.

Syndicate content