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. Errors are also highlighted to make them easy to spot.
The symfony debug toolbar will look like this when there is a validation error in one of the forms on the current page. This is one of the most incredibly useful features I’ve seen and greatly improves productivity while building forms in the symfony framework. Congratulations to the symfony developers who came up with this tool!
Have symfony 1.1 or 1.2? read catch symfony form errors.
- Animation Library. While script.aculo.us and jQuery have made simple animations and visual effects much easier to do, I believe we can go even farther. Web applications also need to gain that fluidity and soft animations that desktop applications such as ExposÃ© have had for a couple of years.
I also see huge resources being directed towards mobile development because ALL current generation smart phones are built for an incredible web browsing experience. As home users have switched from desktop computers to laptop computers in the last few years, people will slowly start switching to hand-held devices for their primary communication and Internet needs. Most likely this will have one primary effect: web frameworks will have a mobile optimized version of the site done automatically. Little to none developer intervention will be required as only resolution, text sizes, and layouts will be modified for the mobile version.
Lastly I see tools and libraries around 2D and 3D drawing elements. Most likely these libraries would be rendering to a Canvas or a WebGL element but something better could be created. Both of these are young standards right now that show a lot of promise on delivering the ability to draw pixels directly in a native HTML web page. While they will be used first in simple computer games, I am very interested to see what libraries are created to facilitate these elements being used appropriately inside next generation web applications.
What do you think the next 5 years will bring?
Bash is a shell scripting language included on most Linux and Mac computers. It’s useful for writing small scripts that don’t require another software language to be installed and are immediately portable. Good places to use bash scripts are when you want to write a cronjob, backup some files, or run an update task. Here are the basics to get you started.
Start your script with She-Bang header:
Variables are assigned by a key-value pairing:
You can print to the console by using echo:
An IF statement:
if [ ! -s $FILENAME ] ; then
The bang ! negates the result, and the -s parameter checks if a file exists.
Example of a function:
# function contents here
# the hash symbol makes the rest of this line a comment
Call this function by using its name:
You can pass a variable to a function:
And use it within the function by reference to $1
A content disposition header can be used to tell web browsers to ask the user where they want to save the file (and download it) instead of actually opening the file in a browser tab/window. Very handy if you want to have a download button.
Content-Disposition: attachment; filename="filename.mp3"
Tested in: Firefox, Safari, IE, Opera, and Google Chrome
PHP supports sharing sessions among subdomains which can be very useful for sharing cookies and sessions among multiple web applications.
I wanted my users to remain logged in while navigating from www.example.com to site1.example.com. By default PHP will treat these domains as two separate sites and users would have to login to each subdomain.
All you have to do is to either set the following setting in your php.ini file:
session.cookie_domain = .example.com
Or, set it from within your code before you create your session: