 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Richard Thomas' Blog: Solar Framework Shorts - Deleting Caches
by Chris Cornutt September 28, 2009 @ 11:11:57
Richard Thomas has posted a new "short" for users of the Solar Framework to delete cached data.
This one is simple but sweet, In your Models directory you define your Models and the basic rules they follow but do you know you can also make changes at the record level. Solar is smart and if it sees a Test/Record.php when creating records for the Test model it will load that class, this allows you to do all kinds of magic.
His example shows how the script can automatically check, on pre-save, to see if the data is different than that in the cache and remove it if so. This cached data is replaced the next time through with the latest information.
voice your opinion now!
solar framework short delete cache automatic
Ian Selby's Blog: Making RESTful Requests in PHP
by Chris Cornutt May 15, 2009 @ 07:57:19
In a new post to his blog Ian Selby looks at working with REST requests in PHP. He includes some of the basics of REST too, for those not completely familiar with the term.
APIs have become a very commonplace part of many popular web sites and services...especially REST APIs. I've already discussed how you can roll your own REST API for your PHP apps, but I've also received countless requests to go over how to actually make RESTful requests. That's exactly what we'll take a look at in this article
His tool of choice is the curl extension, making it simple to create a class wrapper with methods like executePost, executeGet, setAuth and, of course, execute. He outlines the class and gives the code blocks that fit inside each of the major functions. In the end you'll have a class that can make GET, POST, PUT and DELETE requests and be able to correctly parse the response.
voice your opinion now!
delete post put get tutorial request rest
Kris Jordan's Blog: Towards RESTful PHP - 5 Basic Tips
by Chris Cornutt December 10, 2008 @ 12:08:27
Kris Jordan recently posted five tips to help you get a "more correct" REST interface in your application.
As we entered a programmable web of applications with APIs the decision to ignore HTTP gave us problems we're still dealing with today. We have an internet full of applications with different interfaces (GET /user/1/delete vs. POST /user/delete {id=1}). With REST we can say /user/1 is a resource and use the HTTP DELETE verb to delete it.
Here's the five (six?) tips:
- Using PUT and DELETE methods
- Send Custom HTTP/1.1 Headers
- Send Meaningful HTTP Headers
- Don't Use $_SESSION
- Test with cURL or rest-client
- Use a RESTful PHP Framework
voice your opinion now!
restful rest tip put delete custom header session curl framework
DevShed: Inserting, Updating and Deleting Database Rows with Code Igniter
by Chris Cornutt September 24, 2008 @ 12:03:27
DevShed continues their series focusing on the CodeIgniter framework with the seventh part - a look at interacting with the database to update, delete and insert rows from your application.
You've seen some of the things you can accomplish with the Code Igniter PHP framework in earlier parts of this series. In this seventh part of the series, you will learn, through copious examples, how to perform insertions, updates and deletions on a selected MySQL table by using Code Igniter's database class. You'll see that these tasks are very intuitive and easy to grasp, thanks to Code Igniter's friendly learning curve.
They show how to make conditional select statements (with where clauses) and do both inserts of new information and updates to current information, all with the built-in model functionality the framework provides.
voice your opinion now!
codeigniter framework tutorial update delete insert conditional
ProDevTips.com: CRUD with PHP Doctrine
by Chris Cornutt August 25, 2008 @ 11:19:37
In a fourth part of their series looking at using Doctrine in PHP, the ProDevTips blog moves on to implementing it in a typical CRUD interface.
They create the links between the tables (two hasOne relationships), a search() method to find the destinations for a user, a sorting method to multisort based on the subkeys of the value passed in and the methods for updating the information already in the database.
That's it for now, feel free to download this tiny Smarty and Doctrine framework. Note that for this to work you have to put Smarty and Doctrine in the lib folder. There is a login interface involved, just click submit there without entering anything. There is also an SQL file in the trip_selector folder if you want to try this out with some test data (same as in the picture above).
voice your opinion now!
doctrine crud relationship update create retrieve delete
|
Community Events
Don't see your event here? Let us know!
|