Add a Static Page to Symfony

Static pages can be added to Symfony quite easily. Edit your routing.yml file which is probably located at apps/frontend/config/routing.yml, and add the following routes to add an about, a privacy, and a terms and conditions page. # static pages about: url: /about param: { module: home, action: page, view: about } privacy: url: /privacy param: { module: home, action: page, view: privacy } terms: url: /terms param: { module: home, action: page, view: terms } If you are going to keep the generic rules, make sure you add these new rules before the default actions.

Web Development Best Practices

Choosing a Technology Framework Does it really matter if you use ASP.NET MVC, Struts 2, Yii, or Rails? Well it might, but for many websites these modern frameworks are just as competitive as the next. Use the stack that is most appropriate for your customer’s situation and is the best choice at the time. Since this is the real world, it will probably change a couple of years in the future.

Multiple Drag and Drop with jQuery

I took inspiration from David Walsh and updated his Drag and Drop script to be able to handle multiple Drag and Drop sections on one page at the same time. Plus I cleaned it up a bit by adding all the functions to a JavaScript object. As jQuery is my preferred JavaScript library this code is using the jQuery version. Checkout the demo /* create object */ function DragNDropList(selector){ this.

JavaScript Documentation

A call for better JavaScript documentation has gone out and I am 150% in favour of it. Most of the existing JavaScript code, tutorials, and examples available on the web are just messy mashups that work, but are not code you actually want to use in a website. Therefore I am adding the PromoteJS wordpress widget to my blog and I encourage you to do the same. The world needs better JavaScript documentation.

Google Hosted jQuery

Google provides hosting for many of the most popular JavaScript libraries. I’m a big fan of jQuery so I’m going to show you how to use Google’s hosted version of jQuery and thereby removing resources from your web server and speeding up site performance. Performance can be increased because your user is going to download the jQuery file from Google’s CDN network and not from your server. Also, it could be even faster if the user visited another website that also uses Google’s hosted jQuery.

MySQL Gem on Snow Leopard

Snow Leopard does not have the mysql gem installed, and my last solution for installing it only work in OS X prior to 10.6.4; therefore, when you see the following error: Building native extensions. This could take a while... ERROR: Error installing mysql: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb install mysql mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h Install the mysql gem with these steps: library OS X

Here are compiled versions of the libraries built for OS X Snow Leopard as a convenience in case you don’t want to bother compiling them. mod_mono version: 2.6.3 Download 32-bit: i386 64-bit: x86_64

Ruby Subversion Bindings

Subversion has bindings for a variety of languages: Java, Perl, Python and Ruby. Of these I am most interested in the Ruby bindings as I’m building a Rails application. Unfortunately the documentation is completely lacking and bits of it are scattered throughout the web. This is an attempt to provide the code and how-to for the most common tasks. Before we get to the code, validate you have the Ruby Subversion bindings installed correctly by running irb from a terminal:

Debugging Form Errors in symfony 1.3+

Symfony 1.3 (or symfony 1.4) provides an incredibly helpful feature to help debug forms. This new feature is included in the developer toolbar and shows valuable information about the forms on the page. To access the detailed form information, click on the view button, click on the template or partial that the form is in, and then click to expand the form. It lists each form widget and if any errors for a given widget exist they are shown right under it.

What Will Web Development Look Like in 5 Years

Developing applications for the web has changed significantly over the last 5 years. Since 2005 the term AJAX has been coined, Ruby on Rails is now an open source web application framework, jQuery was created and has subsequently revolutionized JavaScript development, and now HTML5 is the top buzzword of the day. I believe the next 5 years will hold just as many improvements for web developers. I foresee a new framework will be created to make developing fully interactive AJAX applications as easy as it is to write current MVC applications.