This document discusses Phing, an open source build tool for PHP projects that is based on Apache Ant. Phing uses XML build files to define targets and tasks for automating build processes like deployment, testing, documentation generation, and more. It provides features like file manipulation, code analysis, packaging, and integration with tools like Subversion, PHPUnit, and PhpDocumentor. The document provides examples of how to install, configure, and use Phing to implement automated build processes for PHP projects.
Building and deploying PHP applications with PhingMichiel Rook
Slides for my talk at the PHP UK Conference 2012.
Some of the examples discussed during the talk can be found at http://www.touchdownconsulting.nl/conferences/phing-phpuk2012-examples.tgz
If you attended, please leave me some feedback at http://joind.in/4954 - thanks!
Once you're done coding, the project is all but finished. There are lots of tools to keep control over your code outside your IDE. Especially continuous integration tools are really helpfull for this purpose. Under the hood of a CI, or at commandline, Phing can be used for lots of PHP specific tasks that are usually executed within a CI. Phing is a sort of PHP version of the Apache Ant tool, which is neatly integrated with some handy PEAR packages. During this presentation you'll get a basic understanding about Phing and its features. We will walk through some examples and screens, so you get some basic knowledge about phing and in what type of fields it can be really usefull.
Building and Deploying PHP apps with PhingMichiel Rook
Slides of the talk that I gave during PHP Johannesburg 2014
https://joind.in/talk/view/10411
Manually creating builds and running deployments can be scary, tedious, error-prone, boring, stressful (check all that apply). What you need is a tool that helps automate the necessary steps to build, test, package and deploy your app.
During this talk you will be introduced to the workings of Phing, it's rich set of out-of-the-box tasks and easy extensibility. Step by step, you will learn how to write a comprehensive deployment script. A number of demonstrations will cover testing, packaging, database migration, continuous integration, multi-server deployments and other real-world use cases.
Deploying an application can be tedious and error-prone. Using Phing’s rich set of tasks, easy extension points and simple XML build files to handle the packaging, deploying and testing of your application can help you save time and increase quality. After this talk you will know how to use Phing and how to tailor it to your specific situation. A number of demonstrations will help illustrate transformation, file synchronization, database migration and other real-world use cases.
The focus of the presentation is on organizing your PHP app build process, employing continuous testing, JS testing, automatic documentation, software metrics and other tools. The end result is expected to be a more stable, reliable, documented and healthy code base.
Phing - A PHP Build Tool (An Introduction)Michiel Rook
PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant.
These are slides from my talk during the Unconference at the Dutch PHP 2011 Conference (Amsterdam). During this talk I gave an overview of the features and how to use, adapt and extend Phing.
Building and deploying PHP applications with PhingMichiel Rook
Slides for my talk at the PHP UK Conference 2012.
Some of the examples discussed during the talk can be found at http://www.touchdownconsulting.nl/conferences/phing-phpuk2012-examples.tgz
If you attended, please leave me some feedback at http://joind.in/4954 - thanks!
Once you're done coding, the project is all but finished. There are lots of tools to keep control over your code outside your IDE. Especially continuous integration tools are really helpfull for this purpose. Under the hood of a CI, or at commandline, Phing can be used for lots of PHP specific tasks that are usually executed within a CI. Phing is a sort of PHP version of the Apache Ant tool, which is neatly integrated with some handy PEAR packages. During this presentation you'll get a basic understanding about Phing and its features. We will walk through some examples and screens, so you get some basic knowledge about phing and in what type of fields it can be really usefull.
Building and Deploying PHP apps with PhingMichiel Rook
Slides of the talk that I gave during PHP Johannesburg 2014
https://joind.in/talk/view/10411
Manually creating builds and running deployments can be scary, tedious, error-prone, boring, stressful (check all that apply). What you need is a tool that helps automate the necessary steps to build, test, package and deploy your app.
During this talk you will be introduced to the workings of Phing, it's rich set of out-of-the-box tasks and easy extensibility. Step by step, you will learn how to write a comprehensive deployment script. A number of demonstrations will cover testing, packaging, database migration, continuous integration, multi-server deployments and other real-world use cases.
Deploying an application can be tedious and error-prone. Using Phing’s rich set of tasks, easy extension points and simple XML build files to handle the packaging, deploying and testing of your application can help you save time and increase quality. After this talk you will know how to use Phing and how to tailor it to your specific situation. A number of demonstrations will help illustrate transformation, file synchronization, database migration and other real-world use cases.
The focus of the presentation is on organizing your PHP app build process, employing continuous testing, JS testing, automatic documentation, software metrics and other tools. The end result is expected to be a more stable, reliable, documented and healthy code base.
Phing - A PHP Build Tool (An Introduction)Michiel Rook
PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant.
These are slides from my talk during the Unconference at the Dutch PHP 2011 Conference (Amsterdam). During this talk I gave an overview of the features and how to use, adapt and extend Phing.
Website deployment is a tedious and intricate task that lends itself to human error (oops, did I forget to update the DB schema?). Using Phing in conjunction with deployment techniques can greatly reduce the risk of human error and increase productivity. The presentation will cover using Phing to sync files, run tasks, migrate databases, target configuration, and other deployment techniques.
Best Practices in PHP Application DeploymentShahar Evron
An overview of the challenges in managing the web application development lifecycle and how a correct deployment system can help. A few common deployment techniques are reviewed. In addition, some info on an upcoming Zend Server deployment feature.
When pushes to production fail the "blame game" starts between developers and devops, then everyone scurries to figure out what happened...fast! Adam Culp will show how a PHP application can be deployed flawlessly using Jenkins. Then see how "Dev" and "Ops" are supported by a system if the application breaks and the nightmare happens.
An introduction to Zend Framework 1.8 using Zend_Tool, Zend_Application, a simple DAO and a very simple model that uses that DAO.
In the end you have a fully working application
Modulesync- How vox pupuli manages 133 modules, Tim MeuselPuppet
Managing a single Puppet module isn't easy, especially if you want to stay up-to-date with current best practices, modern testing, and the Puppet-DSL guidelines. This becomes even more difficult when maintaining multiple modules. Modulesync is the open source tool to change this! Learn from Vox Pupuli how we manage over 130 modules with no overhead and how we lowered the bar for newcomers in the open source world to more easily contribute.
Php Dependency Management with Composer ZendCon 2016Clark Everetts
A deep-dive for beginners into Composer, the dependency manager for PHP. Learn how Composer helps you obtain the components your applications depend upon, installs them into your project, and controls their update to newer versions.
Developers need to be able to run an application on an environment as closely matched to production as possible. We can already do this through Vagrant.The problem with Vagrant is that it is slow and takes a lot of resources both in cpu and space. Docker doesn't have this problem and gives you a tool to create hundreds of different application environments on the same machine and distribute them through a registry. As Git replaced SVN, so has Docker replaced vagrant for application environment setups.Leave the future behind, own today (like a boss).
Zend con 2016 bdd with behat for beginnersAdam Englander
Learn the basics of behavioral driven development (BDD) with Behat to build high quality and well documented applications. You'll learn how BDD can help you deliver greater business value more efficiently while accurately documenting the functionality of your application along the way. You'll learn how to utilize Behat as your BDD tool. With Behat, you'll create tests for the features in your application by utilizing a natural language syntax called Gherkin backed by PHP code to execute the steps executed in the feature's scenarios.
This will be a hands-on tutorial. You'll learn how to implement BDD for a web application. This will include utilizing Selenium WebDriver for real world multi-browser testing including introductions to Selenium Grid and hosted integration services utilizing Selenium.
Easily Manage Patching and Application Updates with Chocolatey + Puppet - Apr...Puppet
Automate your Windows environment faster with Puppet + Chocolatey. Together, Puppet and Chocolatey bring faster and more secure deployments to your Windows environments. By using Chocolatey for package management and Puppet to automate and guarantee the desired state of your Windows infrastructure, your teams can securely deploy applications faster than ever.
With Composer as an integral part of Laravel 4 PHP framework, PHP programmers finaly have a way to break the complex projects into smaller independent units (Laravel Packages) that can later easily be used in any other project. This brings code reusibilty to a completely new level. Lecture describes the proccess of creating a simple Laravel package with Facade and Artisan CLI support. Detailed walkthorugh is available as a github project as well: https://github.com/orangehill/Laravel-Workbench-Walkthrough
How Social Media took on Big Meat and changed the Meat system forever.
I recently was asked to head a panel discussion for the Good Festival in March. The panel was suppose to be titled "Sustainable Meat" I am big believer in sustainability and its fundamental definition of a system that “meets the needs of the present without compromising the ability of future generations to meet their own needs." However, Local meat has taken a much more aggressive posture in the last 5 years and evolved well beyond the simple title of sustainable meat. simply put, I believe the local meat system has tipped and gone mainstream. What once was called Sustainable local meat, I now call Meat 2.0. Therefore, I called the panel Local Meat 2.0. To understand 2.0 lets take a look at 1.0.
Meat 1.0 started roughly in 1993 when certain farmers and localvore leaders at the time (although they didn't know it) felt that "Good Meat" was raised primarily on grass and solely on grass in lush green pastures under blue skies. Unlike "Feedlot Cattle" they were not fed grain or antibiotics or hormones or steroids to accelerate their growth but to just feed the animals what they are suppose to eat all their lives - Grass! Turned out the meat actually tastes better, its more healthy, its more humane to the animals and supports a sustainable environment. An industry was born.
From 1993 to roughly 2006, this notion of Grass-Fed meats grew rapidly within the bohemian and localvore communities. The American Grass-fed Association was started by Dr Patty Whisnant who later grew her Rain Crow ranch Grass-Fed Beef business to a multi-million dollar powerhouse in the midwest. In Local Meat 1.0 buying decision were simple and composed of local meat lovers whose buying decisions were based on several simple factors:
"Meet the Farmer "
1.Buy direct From Farm by going to the Farm
2.Sustainability
3.Goodness - Tastes Great!
4.Humane Treatment of the animals
5.Trust the Farmer
6.You get to pet a pony
In 2006 two things happened: Michael Pollens book, the Ominores delima became a best seller, changing the intellectuals in the countries notion of just what kind of meat we might be eating and what it is doing to the environment. This spurred the USDA to recognize local sustainable meat, specifically Grass-Fed as a bonifide product and thus labeled it such.
March 8th, 2008 was the year I feel, Local Meat Tipped! You will see by the slide presentation the factors that led up to this Big Meat disrupting tipping point moment. The final deadly blow, that shock the nation, was Diane Sawyers ABC expose on the now famous "Pink Slime" The headlines that appeared in the media was, I believe" Pink Slime Found In 70% Of Supermarket Ground Beef In ABC Investigation." Ouch.
Website deployment is a tedious and intricate task that lends itself to human error (oops, did I forget to update the DB schema?). Using Phing in conjunction with deployment techniques can greatly reduce the risk of human error and increase productivity. The presentation will cover using Phing to sync files, run tasks, migrate databases, target configuration, and other deployment techniques.
Best Practices in PHP Application DeploymentShahar Evron
An overview of the challenges in managing the web application development lifecycle and how a correct deployment system can help. A few common deployment techniques are reviewed. In addition, some info on an upcoming Zend Server deployment feature.
When pushes to production fail the "blame game" starts between developers and devops, then everyone scurries to figure out what happened...fast! Adam Culp will show how a PHP application can be deployed flawlessly using Jenkins. Then see how "Dev" and "Ops" are supported by a system if the application breaks and the nightmare happens.
An introduction to Zend Framework 1.8 using Zend_Tool, Zend_Application, a simple DAO and a very simple model that uses that DAO.
In the end you have a fully working application
Modulesync- How vox pupuli manages 133 modules, Tim MeuselPuppet
Managing a single Puppet module isn't easy, especially if you want to stay up-to-date with current best practices, modern testing, and the Puppet-DSL guidelines. This becomes even more difficult when maintaining multiple modules. Modulesync is the open source tool to change this! Learn from Vox Pupuli how we manage over 130 modules with no overhead and how we lowered the bar for newcomers in the open source world to more easily contribute.
Php Dependency Management with Composer ZendCon 2016Clark Everetts
A deep-dive for beginners into Composer, the dependency manager for PHP. Learn how Composer helps you obtain the components your applications depend upon, installs them into your project, and controls their update to newer versions.
Developers need to be able to run an application on an environment as closely matched to production as possible. We can already do this through Vagrant.The problem with Vagrant is that it is slow and takes a lot of resources both in cpu and space. Docker doesn't have this problem and gives you a tool to create hundreds of different application environments on the same machine and distribute them through a registry. As Git replaced SVN, so has Docker replaced vagrant for application environment setups.Leave the future behind, own today (like a boss).
Zend con 2016 bdd with behat for beginnersAdam Englander
Learn the basics of behavioral driven development (BDD) with Behat to build high quality and well documented applications. You'll learn how BDD can help you deliver greater business value more efficiently while accurately documenting the functionality of your application along the way. You'll learn how to utilize Behat as your BDD tool. With Behat, you'll create tests for the features in your application by utilizing a natural language syntax called Gherkin backed by PHP code to execute the steps executed in the feature's scenarios.
This will be a hands-on tutorial. You'll learn how to implement BDD for a web application. This will include utilizing Selenium WebDriver for real world multi-browser testing including introductions to Selenium Grid and hosted integration services utilizing Selenium.
Easily Manage Patching and Application Updates with Chocolatey + Puppet - Apr...Puppet
Automate your Windows environment faster with Puppet + Chocolatey. Together, Puppet and Chocolatey bring faster and more secure deployments to your Windows environments. By using Chocolatey for package management and Puppet to automate and guarantee the desired state of your Windows infrastructure, your teams can securely deploy applications faster than ever.
With Composer as an integral part of Laravel 4 PHP framework, PHP programmers finaly have a way to break the complex projects into smaller independent units (Laravel Packages) that can later easily be used in any other project. This brings code reusibilty to a completely new level. Lecture describes the proccess of creating a simple Laravel package with Facade and Artisan CLI support. Detailed walkthorugh is available as a github project as well: https://github.com/orangehill/Laravel-Workbench-Walkthrough
How Social Media took on Big Meat and changed the Meat system forever.
I recently was asked to head a panel discussion for the Good Festival in March. The panel was suppose to be titled "Sustainable Meat" I am big believer in sustainability and its fundamental definition of a system that “meets the needs of the present without compromising the ability of future generations to meet their own needs." However, Local meat has taken a much more aggressive posture in the last 5 years and evolved well beyond the simple title of sustainable meat. simply put, I believe the local meat system has tipped and gone mainstream. What once was called Sustainable local meat, I now call Meat 2.0. Therefore, I called the panel Local Meat 2.0. To understand 2.0 lets take a look at 1.0.
Meat 1.0 started roughly in 1993 when certain farmers and localvore leaders at the time (although they didn't know it) felt that "Good Meat" was raised primarily on grass and solely on grass in lush green pastures under blue skies. Unlike "Feedlot Cattle" they were not fed grain or antibiotics or hormones or steroids to accelerate their growth but to just feed the animals what they are suppose to eat all their lives - Grass! Turned out the meat actually tastes better, its more healthy, its more humane to the animals and supports a sustainable environment. An industry was born.
From 1993 to roughly 2006, this notion of Grass-Fed meats grew rapidly within the bohemian and localvore communities. The American Grass-fed Association was started by Dr Patty Whisnant who later grew her Rain Crow ranch Grass-Fed Beef business to a multi-million dollar powerhouse in the midwest. In Local Meat 1.0 buying decision were simple and composed of local meat lovers whose buying decisions were based on several simple factors:
"Meet the Farmer "
1.Buy direct From Farm by going to the Farm
2.Sustainability
3.Goodness - Tastes Great!
4.Humane Treatment of the animals
5.Trust the Farmer
6.You get to pet a pony
In 2006 two things happened: Michael Pollens book, the Ominores delima became a best seller, changing the intellectuals in the countries notion of just what kind of meat we might be eating and what it is doing to the environment. This spurred the USDA to recognize local sustainable meat, specifically Grass-Fed as a bonifide product and thus labeled it such.
March 8th, 2008 was the year I feel, Local Meat Tipped! You will see by the slide presentation the factors that led up to this Big Meat disrupting tipping point moment. The final deadly blow, that shock the nation, was Diane Sawyers ABC expose on the now famous "Pink Slime" The headlines that appeared in the media was, I believe" Pink Slime Found In 70% Of Supermarket Ground Beef In ABC Investigation." Ouch.
This is a presentation I did, but never got to deliver. The audience was a group of credit managers and I think they were all running for cover causing the event organizer to cancel the event. Now, I provide it free to you.
The current trends to work in Agile and DevOps are challenging for database developers. Source control is a standard for non-database code but it’s a challenge for databases. This talk has an ambition to change that situation and help developers and DBA take over control of source code and data.
As a PHP developer building web applications is besides making a living a lot of fun too, especially when you can deploy your apps to any kind of environment and on any platform. In this session I take a non-standard PHP application (based on Zend Framework) and deploy it to a bare metal environment running LAMP, Windows 2008 Server with IIS7 and to cloud instances like Azure and Amazon.
The goal is to provide information on how to deploy to these various environments manual and automatic, but also to show it doesn't really matter anymore what the targeted platform is, as long the apps are written in PHP.
Alfresco’s highly customizable repository can often seem overwhelming. Learn approaches for adding common customizations requests (Extending Javascript API, Content Modeling, Permission Modeling, packaging, etc.) from current and former Alfresco consulting staff. Learn where we often see the most common errors and participate in open Q&A.
Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)Codemotion
DevOps is increasingly blending the work of both application and network security professionals. In a quest to move faster, organisations can end up creating security vulnerabilities using the tools and products meant to protect them. What happens when these tools are used insecurely or - even worse - they are just insecure? Technologies discussed will encompass AWS, Puppet, Hudson/Jenkins, Vagrant, Docker and much, much more. Everything from common misconfigurations to remote code execution.
Generating a custom Ruby SDK for your web service or Rails API using Smithyg2nightmarescribd
Have you ever wanted a Ruby client API to communicate with your web service? Smithy is a protocol-agnostic language for defining services and SDKs. Smithy Ruby is an implementation of Smithy that generates a Ruby SDK using a Smithy model. In this talk, we will explore Smithy and Smithy Ruby to learn how to generate custom feature-rich SDKs that can communicate with any web service, such as a Rails JSON API.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
3. Why use Build Automation?
“We are human, We get bored,
We forget things, We make mistakes”
• Improve product quality
• Consolidate scripts
• Eliminate repetitive tasks
• Minimize error (bad builds)
• Eliminate dependencies (Easier handover)
• Highly extendible
• Saves time
09/07/12 http://coderinsights.blogspot.in 3
4. What is [PHing Is Not Gnumake]
• It's a PHP project build tool based on Apache Ant
• Opensource
• Mostly Cross platform
• Uses XML build files
• No required external dependencies
• Built & optimised for PHP5
09/07/12 http://coderinsights.blogspot.in 4
5. What can you do?
• Lots –Not just for deployment
• SVN tasks
• PHPUnit/SimpleTest
• Code analysis tasks
• PhpDocumentor
• Zip/Unzip
• File manipulation
• Various OS tasks
09/07/12 http://coderinsights.blogspot.in 5
7. Phing Philosophy
• Build scripts contains "Targets"
– Targets should be small and specialized.
– Example Targets:
• clean
– Clear temporary and cached files
• copy
– Copy files to their intended destination
• migrate
– Upgrade the database schema
09/07/12 http://coderinsights.blogspot.in 7
8. Phing Philosophy
• Targets can have dependencies
– Target "live" can depend on clean, copy, and
migrate
– Meaning, when we run the "live" target, it first
runs clean, copy, then migrate
• And any tasks they depend on
09/07/12 http://coderinsights.blogspot.in 8
9. Installing Phing
• pear channel-discover pear.phing.info
• pear install phing/Phing
• Want all the dependencies?
– pear config-set preferred_state alpha
– pear install –alldeps phing/Phing
– pear config-set preferred_state stable
– pear install phing/phingdocs
• Also available from:
– SVN
– Zip Download
09/07/12 http://coderinsights.blogspot.in 9
10. Running Phing
• $> phing –v
– Lists Phing version
• Phing expects to find a file "build.xml" in the
current directory
– build.xml defines the targets
– You can use the "-f <filename>" flag to
specify an alternate build file like
• $> phing -f build-live.xml
09/07/12 http://coderinsights.blogspot.in 10
11. Syntax
• Build File uses XML
• Standard Elements
– Task: code that performs a specific function
– Target: groups of tasks
– Project: root node
• Variables
– ${variablename}
– Conventions
• Psuedo-Namespaces using periods
• ${namespace.variable.name}
09/07/12 http://coderinsights.blogspot.in 11
12. Basic Conventions
• build.xml
– Central repository of your top-level tasks
• build-*.xml
– Can be included into build.xml.
– Usually for grouping by target (dev, staging,prod)
or task (migrate, test, etc.)
• build.properties
– Technically an INI file that contains variables to be
included by build files.
09/07/12 http://coderinsights.blogspot.in 12
16. Executing External Tools
• Nearly all file transfer tools will be external
commands
• For this we need the Exec task
<exec command="cp file1 file2" />
09/07/12 http://coderinsights.blogspot.in 16
21. Database Migrations
• Set of delta SQL files (1-create-post.sql)
• Tracks current version of your db in changelog
table
• Generates do and undo SQL files
CREATE TABLE changelog (
change_number BIGINT NOT NULL,
delta_set VARCHAR(10) NOT NULL,
start_dt TIMESTAMP NOT NULL,
complete_dt TIMESTAMP NULL,
applied_by VARCHAR(100) NOT NULL,
description VARCHAR(500) NOT NULL
)
09/07/12 http://coderinsights.blogspot.in 21
22. Database Migrations
• Delta scripts with do (up) & undo (down) parts
-- //
CREATE TABLE ‘post‘ (
‘title‘ VARCHAR(255),
‘time_created‘ DATETIME,
‘content‘ MEDIUMTEXT
);
-- //@UNDO
DROP TABLE ‘post‘;
-- //
09/07/12 http://coderinsights.blogspot.in 22
27. Pitfalls
• Cleanup Deleted Source Files
– Usually only a problem when you have * include
patterns
• Undefined properties not raised as an error
• Little to no IDE support (Minimal support
using Ant Plugin for Eclipse)
09/07/12 http://coderinsights.blogspot.in 27
We are human We get bored We forget things We make mistakes Repetitive tasks like Versioncontrol (Unit)Testing Configuring Packaging Uploading DBchanges
Phing is Recursive acronym In its simplest form, Phing allows you to copy code from your source control repository (SVN or Git) to your server via SSH, and perform pre and post-deploy functions like restarting a webserver, busting cache, renaming files, running database migrations and so on. With Phing it’s also possible to deploy to many machines at once. Original PHP4 version by Andreas Aderhold Cross-platform(for Windows) Build Systems Apache ANT Capastrano Plain PHP or BASH or BAT Files
Interface to various popular (PHP)tools
Introduced facade targets • Moved all the properties out • Used properties for configurability • Defined and reused elements with ids • Use of reflexives and replacements • Separating build files
Other useful options: – Help (-h) – Specify properties (-D propname=value) – List targets (-l) – Get more output (-verbose or -debug)
Task : code that performs a specific function (svncheckout, mkdir,etc.) Target : groups of tasks, can optionally depend on other targets Project : root node, contains multiple targets