 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
PHPMaster.com: Action Automation with MySQL Triggers
by Chris Cornutt December 11, 2012 @ 09:16:29
For the MySQL users out there, PHPMaster.com has a new tutorial showing you how to use triggers in your database to perform automatic actions on things like "before update" or "after insert".
By making MySQL do more work through triggers, the PHP side of my project was greatly simplified. So, it is the intention of this article to give you some insight into the creation and usage of MySQL triggers, so that by the end of this reading you can make use of them in your own projects.
They start by explaining what triggers are and how they're created on the database side (with an example syntax). They apply one to a more practical situation - helping keep data integrity on a revenue table based on the data inserted into an events tracking table. Their trigger ("CostCalc") calculates the time of the event on update and updates the revenue table with the correct cost. Also included is the sample PHP code (an "EventHandler") that updates the event records. The trigger fires transparently in the background with no need for the PHP script to make any additional calls.
voice your opinion now!
mysql trigger automation tutorial update
PHPMaster.com: Build Automation with Composer Scripts
by Chris Cornutt December 06, 2012 @ 11:01:49
If you're a PHP developer and have been looking for a good way to manage 3rd party dependencies in your applications, look no further than Composer. If you're already using it, you know how useful it can be, but you might not know about some of the extra features that come with it. In this new tutorial on PHPMaster.com, they describe the automation that is also possible as a part of Composer's management process.
Following Alexander Cogneau's introduction to dependency management with Composer, you now know that Composer is a resolver for managing external project dependencies and versioning constraints. But is that all it does? In this article I'll show you how Composer can also be used as a basic build automation tool.
Thanks to some handy configuration settings available in the "composer.json" file, you can execute scripts for events like "pre-install", "post-update" and "pre-uninstall". They include an example "Installer" class with methods for a few of the actions, showing some of the special methods you can use to get metadata about the current operation and environment.
voice your opinion now!
composer automation script tutorial package management
PHPMaster.com: Automate PSR Compliance through Jenkins
by Chris Cornutt July 03, 2012 @ 09:08:34
On PHPMaster.com today there's new tutorial showing how you can enforce compliance with the PSR standards in your application's code with the help of the Jenkins continuous integration tool.
Though it's still early to guarantee that the PSRs will be widely adopted as the de facto standard for writing serious PHP applications, it is interesting to note that a code sniffer and fixer that looks for code deviations was developed by nobody less than Fabien Potencier, the creator of the Symfony framework. (Et bien, ils ne sont pas fous, ces français!) In the rest of the article we shall find out what his PHP-CS-Fixer does and how can it be integrated with a CI tool like Jenkins.
He shows how to install a tool that can help you keep your source in compliance - the "fixer" (created by Fabien Potencier) to help correct the problems found in your code. He includes the command line calls you'll need to run the tool on your code and how to add the step to your build.
voice your opinion now!
automation jenkins psr compliance fixer fabienpotencier
PHPBuilder.com: My Automated PHP Scripts for Creating FTP Connections to a Remote Server
by Chris Cornutt June 19, 2012 @ 10:41:57
PHPBuilder.com has posted a new tutorial about creating automated FTP scripts to pull down information from a remote server (using FTP streams).
In 2007 I began working on a website project for an investment company in my hometown of Cleveland, Ohio USA. The purpose of this website was to automatically download financial data of traded securities from two (2) remote Web servers. [...] Both of these PHP scripts were set up on the Web server's "crontab manager" to automatically run at a set time each business day.
Code is included showing how to connect to the remote service (via curl) with a "ftp" stream-based URL as the location. Also included is an example using a fopen call to the URL and inserting the resulting data into their tracking tables. The other script pulls the data out and adds a new record to a transactions table for the current day.
voice your opinion now!
ftp tutorial connection transaction mysql cron automation
Marcelo Gornstein's Blog: PHP Continuous integration, with Jenkins and Phing
by Chris Cornutt April 27, 2012 @ 12:18:30
On his site Marcelo Gornstein has published a new guide to getting a basic automated continuous integration server set up with Jenkins and Phing.
This article is about how to use Phing in your projects, so a continuous integration server (in this case artifacts for your php application (deployment artifacts, documentation, code metrics, etc). I'll try to show why this will make your life easier when developing or auditing code, generating releases and deploying new versions, trace bugs, etc. All with just a handful of phing tasks.
He introduces the Phing tool and explains how it makes automating the steps of your process simpler, relating it to the Apache Ant tool for those familiar with it. He links to several of the resources used in the process including PHPLoc, DocBlox and the code for the article itself. He outlines the process and, complete with a screenshot of the final result, shows you how to get everything configured and running smoothly.
voice your opinion now!
continuous integration jenkins phing testing automation
Stoyan Stefanov's Blog: Automating HTTPWatch with PHP
by Chris Cornutt March 07, 2011 @ 13:49:12
Stoyan Stefanov has a two part blog post series looking at automating a tool that lets you look into the HTTP traffic coming and going on your browser - HTTPWatch.
HTTPWatch is a nice tool to inspect HTTP traffic in easy and convenient way and it works in both IE and FF now. Drawback - windows-only and paid. But the free version is good enough for many tasks. HTTPWatch can be automated and scripted which is pretty cool for a number of monitoring-like tasks.
In the first post he shows you how to get started with the tool - installation and using it in a sample script (via a COM object). He creates FireFox and IE windows and shows how to clear their caches and record the traffic. He's included a screencast of it all to show the result. In the second post he shares a library he's written to help make it even simpler to use (complete with code samples).
UPDATE: He's also posted part #3 that's more about using COM and PHP.
voice your opinion now!
httpwatch automation tutorial library screencast
PHPBuilder.com: 10 Productivity-boosting Tools for Your PHP Development
by Chris Cornutt August 25, 2010 @ 08:23:06
On PHPBuilder.com today there's a list of ten tools that can help you increase your productivity in your PHP development including ones for testing, automation and debugging.
Frustration can quickly set in when you are dealing with menial and often repetitive tasks such as manual code testing and deployment, yet you strive to become a more efficient programmer by staying DRY. So why not extend that quest to other parts of the application lifecycle, streamlining and automating such tasks? In this article I'll introduce you to ten PHP development tools that will help you do exactly that, leaving you with more time to concentrate on building great websites.
His list of ten tools consists of:
voice your opinion now!
productivity tool development testing debug automation syntax
|
Community Events
Don't see your event here? Let us know!
|