Ruby on Rails is a framework for Ruby that has became increasingly popular over the last few years. The difference between a framework and a language is a language is used for compiling code whereas a framework is built on top of a language to allow for a more rapid development process.
Ruby on Rails uses the MVC (Model-View-Controller) pattern to keep code clean and organized. CakePHP is a great framework for PHP that replicates how Ruby on Rails works, the only difference being is it uses PHP and not Ruby so the code looks a lot different although some of the functions are named the same.
When learning a new language it is always best to give it your full attention for at least a week or two, because you will probably end up back where you started and not learning much more than you already knew. When using a language, frameworks, API's, etc, it is also recommended to refer to the documentation from time to time so that if you run into a bug it is more stress-free to solve.
If you are running Mac OS X then both Ruby and Rails are pre-installed. Windows and Linux users will have to download them.
This is my screencast for the Nettuts/Screenr screencast competition. I feel as though I rushed it because I had to do it under 5 minutes but I hope you learn a thing or two from it.
FancyBox is a plugin for jQuery that allows you to easily display images in the same window with a simple yet effective code. The plugin takes no time to set up and all that is required is that you include the jQuery javascript library within the pages that you are using the FancyBox plugin on.
Features:
- Display single images
- Create image galleries
- Display iFrame
- Execute Ajax
- Include Flash, movies or audio files
Using FancyBox
First of all we need to link to the jQuery and FancyBox file after we have downloaded.
<script type="text/javascript" src="path-to-file/jquery.js"></script> <script type="text/javascript" src="path-to-file/jquery.fancybox.js"></script>
There are a number of frameworks available for PHP such as CodeIgnitor, Zend, Symfony, Kohana and many more. In this article you will find tutorials that I have found on the web that will help PHP programmers that are new to the MVC pattern or CakePHP.
CakePHP is an amazing framework if you know how to use it, but the documentation for CakePHP is quite badly written and can cause confusion for new users. Here are a few links to try and make life easier for new and experienced CakePHP users.
- Validation with CakePHP
- Theming with CakePHP
- Getting started quickly with Scriptaculous effects
- Drag 'n drop tutorial with the CakePHP 1.2 Ajax helper, Prototype framework and Scriptaculous library
- Secure CakePHP via Sessions & Magic (Login / Logout)
- CakePHP ACL Tutorial
- CakePHP Bake - Baking Models, Controllers and Views the CakePHP 1.2 Way
- Cascading Dynamic Meta Tags and Page Titles in CakePHP 1.2
- jQuery image upload & crop
- Uploader - Plugin
Create a form that requires the user to enter both a username and password. If the username field or password field is left blank then a message will be displayed.
Learn how to use the animate function within the jQuery library to create an effect similar to the table of contents for the table of contents on codeigniter.com.
