Dreamweaver CS5 offers some tools to quickly get CRUD up and running with your data.
I suggest for a rapid workflow, develop on your local machine and when happy with what you created, upload it to your live server.
Here’s a brief video of what we’ll be creating:
Steps to getting CRUD working using Dreamweaver CS5
- Here’s a video on installing XAMPP which will allow you to have Apache, MySQL and PHP (the AMP stack) working on your local machine.
- A few times I had the unfortunate experience of having to update my files on a live server. The internet connect was slow and this was a horrible experience.
- Make life easy on yourself and don’t worry about a slow internet connection. Find a local server and add it to your laptop/desktop or both… it really is a simple process. I show you how to use XAMPP but there are many other AMP stacks available. MAMP and XAMPP are the most popular.
- You will be surprised about how easy it is to create a database. I don’t want you to think that databases are a small topic for they are far from it. Libaries of books have been written on the subject but with a relatively small amount of knowledge about Relational databases, you can accomplish a lot of neat stuff. If you want to be a database ninja, think of investing time in learning the ins and outs of SQL (Structured Query Language).
- In this example we’ll need data to work with and in this video I show you how to quickly add some data.
- (NEW!)Many people have Macs and will install MAMP. Here is a great video tutorial that shows you how to install and configure Dreamweaver when using MAMP.
- Your website exists someone on your computer. Where is it located? When you define a site you tell Dreamweaver where all your stuff is located. This video walks you through this process.
- It should not be easy to get data from your database. MySQL makes it pretty darn hard but the good news is using dreamweaver, the communication between your website pages and the database can easily be added. This video shows you just how to add this layer to your website.
- note: This is the ‘R’ of CRUD which stands for ‘Read’
- All this means is you have all this great content in your database but it is no use if you can show it to anyone. SQL has a SELECT clause that let’s the user access and show this data. The good news is the user just has to click some buttons in Dreamweaver and all the code is quickly written in the background.
- note: This is the ‘C’ of CRUD which stands for ‘Create’
- This is a very important step. You could train the user how to use a GUI interface like phpMyAdmin to manipulate your database content but that would be a recipe for disaster for many reasons. Two quickly come to mind:
- Your client will scream at you for introducing complexity into their already busy lives
- Your client will make a mistake and destroy the database and eventually they’ll be screaming at you again.
- Make life easy on yourself and your client by allowing them to manipulate data from the database using their very own browser. Hopefully you designed their forms in a super usable manner so that manipulating data on the site you built for them is not only easy, but also intuitive. (Bonus points if you make the forms fun to use)
- The Insert Record Server Behavior in Dreamweaver makes adding this capablily super simple.
- note: This is the ‘D’ of CRUD which stands for ‘Delete’
- Whenever you Delete data from the database you need to be very careful. Using the Dreamweaver Delete Record server behavior is so easy, it could be very dangerous if you aren’t careful. Use with caution.
- note: This is the ‘U’ of CRUD which stands for ‘Update’
- This step is crucial and the most difficult in CRUD. It will take you a few times to get it down pat. The good news is Dreamweaver makes this complex step less complex but it still is a bit confusing. This video aims at removing any confusion.
- If we don’t set up an administration side to our site then anyone can manipulate our data which is definately a capability we do not want to instill on the anonymous user. The solution is to make sure we have admin user’s log in. Once they are logged in a session variable is created with the user’s access information. If the user’s access information matches what’s in the database, they get in, if not they have to keep trying to log in until they enter the correct log in information. The good news is Dreamweaver CS5 once again makes this process super simple.
- User’s will be able to directly type a URL and access a page. This, unsurprisingly is something we don’t want to happen. The Restrict Access To Page Dreamweaver server behavior enables us to add this protection to any page with a couple clicks.
- This screencast shows you how to import and export your SQL file to phpMyadmin. If you learn how to do this, you’ll never lose your database again.
- It is only a matter of time before Sublime Text 2 becomes the standard IDE for web development. You should start using it. Here is a hybrid approach to using ST2 and Dreamweaver to show you how to quickly create a form to insert data into your database.
- At some point you are going to want to keep track of images and show your users images in your websites. This two-part screencast series show you how.
- This screencast shows you how easy it is to limit your search results and let the users navigate through those results easily and efficiently.