The document provides an overview of starting a new project with Symfony2. It discusses downloading the Symfony Standard Edition, installing vendor libraries, configuring the project, and initializing a Git repository. The document also introduces bundles as the way Symfony organizes code and demonstrates creating a basic bundle to develop application pages. Behavior-driven testing with Behat is also covered at a high level.
Symfony2: What's all the buzz about?
Follow along as we download, install and get a hands-on experience using Symfony2. This presentation shows you how to get started with Symfony and introduces you to the large group of new PHP libraries coming from the Symfony2 community. You'll see examples of how to create pages, use template inheritance, and create a simple JSON API.
Symony2 A Next Generation PHP FrameworkRyan Weaver
A mixture of architecture and hands-on examples, this presentation takes you through the killer features of Symfony2, how it's so decoupled, and how you can get started developing in it.
As an added bonus, a number of new standalone PHP libraries and tools are mentioned at the end.
Twig: Friendly Curly Braces Invade Your Templates!Ryan Weaver
Video: http://youtu.be/Jikkiqt-nBo
Twig! Yep, it's that fancy magic that's supposed to make theming in Drupal 8 as much fun as eating beef brisket at Rudy's Country Store in Austin (apologies to my veggie friends!). And in fact, Twig was *born* for this: a language that was created with one job in mind: making writing templates awesome and powerful. Oh, and to make you love using it.
In this talk, we'll learn about Twig from the ground-up: syntax, filters, inheritance and other tricks you can learn now to be ready for Drupal 8. We'll also look at how Twig looks inside Drupal, and how it compares to what you're used to in Drupal 7.
By the end, you'll know everything to start getting your Drupal 8 theme on and be shouting its praises from the hills! Ok, maybe not that last part (but I do love how excited Drupalers get), but you'll definitely have a new friend in your world: Twig.
Being Dangerous with Twig (Symfony Live Paris)Ryan Weaver
Twig - the PHP templating engine - is easy to use, friendly and extensible. This presentation will introduce you to Twig and show you how to extend it to your bidding.
Grand Rapids PHP Meetup: Behavioral Driven Development with BehatRyan Weaver
Testing our applications is something we all do. Ahem, rather, it's something we all *wish* we did. In this chat, I'll introduce you to Behat (behat.org) (version 3!!!!): a behavior-driven-development (BDD) library that allows you to write functional tests against your application just by writing human-readable sentences/scenarios. To sweeten the deal these tests can be run in a real browser (via Selenium2) with just the flip of a switch. If you asked me to develop without Behat, I'd just retire. It's that sweet. By the end, you'll have everything you need to start functionally-testing with Behat in your new, or very old and ugly project.
Master the New Core of Drupal 8 Now: with Symfony and SilexRyan Weaver
I'm not a Drupal developer, but I do already know *a lot* about Drupal 8, like how the event system works, what a service is, how it relates to a dependency injection container and how the deepest and darkest of Drupal’s request-response workflow looks.
How? Because I use Symfony. And if you want to get a jumpstart on Drupal 8, you should to. In this talk, we'll double the number of tools you have to solve problems (Drupal + Symfony) and start to unlock all the new important concepts. We'll start with Silex (a microframework based on Symfony), graduate to Symfony, and focus on the pieces that are most interesting to a Drupal 8 developer.
Build powerfull and smart web applications with Symfony2Hugo Hamon
Symfony2 first stable release is scheduled for the first week of March 2011. During this session, we will have a look at the new framework architecture and most of its powerfull features.
We will show you how Symfony2 implements the MVC pattern and an HTTP request is processed and converted as a response for the end user. Of course, we will talk about the configuration principles and how it's easy to configure Symfony2 project parts like the routing system or the data model. We will also focus on other major components of the framework like the Doctrine2 integration, forms, security (authentication and authorizations) or HTTP cache management.
Symfony2: What's all the buzz about?
Follow along as we download, install and get a hands-on experience using Symfony2. This presentation shows you how to get started with Symfony and introduces you to the large group of new PHP libraries coming from the Symfony2 community. You'll see examples of how to create pages, use template inheritance, and create a simple JSON API.
Symony2 A Next Generation PHP FrameworkRyan Weaver
A mixture of architecture and hands-on examples, this presentation takes you through the killer features of Symfony2, how it's so decoupled, and how you can get started developing in it.
As an added bonus, a number of new standalone PHP libraries and tools are mentioned at the end.
Twig: Friendly Curly Braces Invade Your Templates!Ryan Weaver
Video: http://youtu.be/Jikkiqt-nBo
Twig! Yep, it's that fancy magic that's supposed to make theming in Drupal 8 as much fun as eating beef brisket at Rudy's Country Store in Austin (apologies to my veggie friends!). And in fact, Twig was *born* for this: a language that was created with one job in mind: making writing templates awesome and powerful. Oh, and to make you love using it.
In this talk, we'll learn about Twig from the ground-up: syntax, filters, inheritance and other tricks you can learn now to be ready for Drupal 8. We'll also look at how Twig looks inside Drupal, and how it compares to what you're used to in Drupal 7.
By the end, you'll know everything to start getting your Drupal 8 theme on and be shouting its praises from the hills! Ok, maybe not that last part (but I do love how excited Drupalers get), but you'll definitely have a new friend in your world: Twig.
Being Dangerous with Twig (Symfony Live Paris)Ryan Weaver
Twig - the PHP templating engine - is easy to use, friendly and extensible. This presentation will introduce you to Twig and show you how to extend it to your bidding.
Grand Rapids PHP Meetup: Behavioral Driven Development with BehatRyan Weaver
Testing our applications is something we all do. Ahem, rather, it's something we all *wish* we did. In this chat, I'll introduce you to Behat (behat.org) (version 3!!!!): a behavior-driven-development (BDD) library that allows you to write functional tests against your application just by writing human-readable sentences/scenarios. To sweeten the deal these tests can be run in a real browser (via Selenium2) with just the flip of a switch. If you asked me to develop without Behat, I'd just retire. It's that sweet. By the end, you'll have everything you need to start functionally-testing with Behat in your new, or very old and ugly project.
Master the New Core of Drupal 8 Now: with Symfony and SilexRyan Weaver
I'm not a Drupal developer, but I do already know *a lot* about Drupal 8, like how the event system works, what a service is, how it relates to a dependency injection container and how the deepest and darkest of Drupal’s request-response workflow looks.
How? Because I use Symfony. And if you want to get a jumpstart on Drupal 8, you should to. In this talk, we'll double the number of tools you have to solve problems (Drupal + Symfony) and start to unlock all the new important concepts. We'll start with Silex (a microframework based on Symfony), graduate to Symfony, and focus on the pieces that are most interesting to a Drupal 8 developer.
Build powerfull and smart web applications with Symfony2Hugo Hamon
Symfony2 first stable release is scheduled for the first week of March 2011. During this session, we will have a look at the new framework architecture and most of its powerfull features.
We will show you how Symfony2 implements the MVC pattern and an HTTP request is processed and converted as a response for the end user. Of course, we will talk about the configuration principles and how it's easy to configure Symfony2 project parts like the routing system or the data model. We will also focus on other major components of the framework like the Doctrine2 integration, forms, security (authentication and authorizations) or HTTP cache management.
Drupal 8: Huge wins, a Bigger Community, and why you (and I) will Love itRyan Weaver
It's true: Drupal 8 includes big and exciting changes to its core and how Drupal code is written. These include using outside PHP libraries (Guzzle, Symfony, etc) as well as embracing PHP 5.4 and object-oriented code.
Scary, right? Definitely not! These changes give Drupal 8 so many "wins" and new possibilities that you're going to absolutely love it.
In this keynote, we'll explore the changes together and start to realize all of the wonderful things that each will bring. These include a (much) larger community, many more libraries you can use, higher quality tools, easier future upgrades, and some fantastic new features.
And because Drupal uses Symfony, you'll easily be able to use Symfony (or its little brother Silex) for any non-CMS projects. Being a great Drupal 8 developer means being a great PHP developer.
Of course, Drupal 8 has its criticisms: it will be too hard for new developers to learn, or it will not be useable for smaller sites. We'll take on these concerns directly and see why they are valid, but exaggerated.
These slides accompanied a presentation by Steve Breker of Artefactual Systems, delivered as part of AtoM Camp Cambridge, a three-day boot camp held at St John's College, Cambridge University, May 9-11, 2017 For more information, see:
https://wiki.accesstomemory.org/Community/Camps/SJC2017
These slides are intended for developers who are interested in modifying the default look and feel of AtoM - known as the Dominion theme - and developing a custom theme plugin. They include some theme examples, how to register a plugin in Symfony, and some ideas of the elements you can modify via theming, with examples.
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
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).
Composer has triggered a renaissance in the PHP community, it has changed the way we deal with other people’s code and it has changed the way we share our code. We are all slowly moving to using Composer, from Wordpress to Joomla and Drupal and frameworks in between. But many of us mistreat composer, follow outdated practices or simply lack a few tricks. In this session i’ll get you the low down on how to use composer the right way.
"Puppet at Pinterest", by Ryan Park, Operations Engineer at Pinterest. Talk from PuppetConf 2012.
Video of "Puppet at Pinterest": http://youtu.be/aU-bCbBq8zs
Learn more about Puppet: http://bit.ly/QQoAP1
Abstract: A case study of how Pinterest uses Puppet to manage its infrastructure. Pinterest has hundreds of Amazon EC2 virtual servers and uses Puppet Dashboard as the “source of truth” about its server inventory. Pinterest built a REST API for this database, which powers tools and automated scripts that integrate Puppet with internal systems and with Amazon Web Services.
Speaker Bio: Ryan Park leads operations and infrastructure at Pinterest, one of 2012’s fastest growing web sites. Pinterest’s entire infrastructure is in the cloud, built atop hundreds of Amazon EC2 virtual server instances. Ryan introduced Puppet to their infrastructure as soon as he joined the company, and they now use Puppet as the primary tool for managing their infrastructure. Prior to joining Pinterest, Ryan was the Head of Operations at PBworks, an online team collaboration service.
Symfony Live San Francisco 2017 - Symfony @ OpenSkyPablo Godel
OpenSky is one of the first large ecommerce platforms to use Symfony2. The whole marketplace has been running on Symfony for many years. Over this talk we will share:
how we use the framework and other PHP components
our deployment process
using Doctrine with MySQL and MongoDB
things we learned to avoid
running a large PHPUnit test suite
"Puppet at GitHub / ChatOps" from PuppetConf 2012, by Jesse Newland
Video of "Puppet at GitHub": http://bit.ly/WVS3vQ
Learn more about Puppet: http://bit.ly/QQoAP1
Abstract: Ops at GitHub has a unique challenge - keeping up with the rabid pace of features and products that the GitHub team develops. In this talk, we'll focus on tools and techniques we use to rapidly and confidently ship infrastructure changes/features with Puppet using Puppet-Rspec, CI, Puppet-Lint, branch puppet deploys, and Hubot.
Speaker Bio: Jesse Newland does Ops at GitHub. His favorite hobby is SPOF wack-a-mole, followed closely by guitar and piano. Prior to GitHub, Jesse was the CTO at Rails Machine where he ran a large private cloud and managed several hundred production Ruby on Rails applications using Puppet. To the delight and/or chagrin of the Puppet community, Jesse is to blame for Moonshine, the Ruby DSL for Puppet before Puppet had a Ruby DSL.
When developing symfony plugins for use and reuse in your projects and maybe (hopefully) by the symfony community you want to make sure that a new release doesn't break with backwards compatibility. While symfony comes with lime the de facto standard for unit testing in PHP is PHPUnit and it offers much more. This session will show you some of the best practices of testing symfony plugins. You will learn how to organise your tests and how to reduce your dependencies to the bare essentials.
This worksheet accompanied a presentation by Steve Breker of Artefactual Systems, delivered as part of AtoM Camp Cambridge, a three-day boot camp held at St John's College, Cambridge University, May 9-11, 2017 For more information, see:
https://wiki.accesstomemory.org/Community/Camps/SJC2017
The presentation focused on the installation of Access to Memory, and the slides from it can be seen here:
https://www.slideshare.net/accesstomemory/installing-and-upgrading-atom
This handout showed attendees how Ansible can be used to automate the deployment process of AtoM, using the publicly available Ansible playbooks. You can find Artefactual's Ansible playbooks at:
https://github.com/artefactual/deploy-pub
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!
Laravel is a great framework to use for web applications but what if you need to do more? What if you need to process data that would take longer than an HTTP request would allow?
Come learn how to harness the power of the console in your Laravel applications to do various tasks such as caching data from 3rd party APIs, expire old content from S3 or other data store, and batch process huge data sets without users having to wait for results. You can even automate tasks such as backing up your remote databases before you run migrations with artisan commands.
We'll cover creating basic artisan console commands, adding options and passing input, setting up cron jobs and scheduling our console commands to run at specific times, and how you can utilize 3rd party APIs to create fun automated message processing for social media networks.
Go beyond the documentation and explore some of what's possible if you stretch symfony to its limits. We will look at a number of aspects of symfony 1.4 and Doctrine 1.2 and tease out some powerful functionality you may not have expected to find, but will doubtless be able to use. Topics covered will include routing, forms, the config cache and record listeners. If you're comfortable in symfony and wondering what's next, this session is for you.
Drupal 8: Huge wins, a Bigger Community, and why you (and I) will Love itRyan Weaver
It's true: Drupal 8 includes big and exciting changes to its core and how Drupal code is written. These include using outside PHP libraries (Guzzle, Symfony, etc) as well as embracing PHP 5.4 and object-oriented code.
Scary, right? Definitely not! These changes give Drupal 8 so many "wins" and new possibilities that you're going to absolutely love it.
In this keynote, we'll explore the changes together and start to realize all of the wonderful things that each will bring. These include a (much) larger community, many more libraries you can use, higher quality tools, easier future upgrades, and some fantastic new features.
And because Drupal uses Symfony, you'll easily be able to use Symfony (or its little brother Silex) for any non-CMS projects. Being a great Drupal 8 developer means being a great PHP developer.
Of course, Drupal 8 has its criticisms: it will be too hard for new developers to learn, or it will not be useable for smaller sites. We'll take on these concerns directly and see why they are valid, but exaggerated.
These slides accompanied a presentation by Steve Breker of Artefactual Systems, delivered as part of AtoM Camp Cambridge, a three-day boot camp held at St John's College, Cambridge University, May 9-11, 2017 For more information, see:
https://wiki.accesstomemory.org/Community/Camps/SJC2017
These slides are intended for developers who are interested in modifying the default look and feel of AtoM - known as the Dominion theme - and developing a custom theme plugin. They include some theme examples, how to register a plugin in Symfony, and some ideas of the elements you can modify via theming, with examples.
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
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).
Composer has triggered a renaissance in the PHP community, it has changed the way we deal with other people’s code and it has changed the way we share our code. We are all slowly moving to using Composer, from Wordpress to Joomla and Drupal and frameworks in between. But many of us mistreat composer, follow outdated practices or simply lack a few tricks. In this session i’ll get you the low down on how to use composer the right way.
"Puppet at Pinterest", by Ryan Park, Operations Engineer at Pinterest. Talk from PuppetConf 2012.
Video of "Puppet at Pinterest": http://youtu.be/aU-bCbBq8zs
Learn more about Puppet: http://bit.ly/QQoAP1
Abstract: A case study of how Pinterest uses Puppet to manage its infrastructure. Pinterest has hundreds of Amazon EC2 virtual servers and uses Puppet Dashboard as the “source of truth” about its server inventory. Pinterest built a REST API for this database, which powers tools and automated scripts that integrate Puppet with internal systems and with Amazon Web Services.
Speaker Bio: Ryan Park leads operations and infrastructure at Pinterest, one of 2012’s fastest growing web sites. Pinterest’s entire infrastructure is in the cloud, built atop hundreds of Amazon EC2 virtual server instances. Ryan introduced Puppet to their infrastructure as soon as he joined the company, and they now use Puppet as the primary tool for managing their infrastructure. Prior to joining Pinterest, Ryan was the Head of Operations at PBworks, an online team collaboration service.
Symfony Live San Francisco 2017 - Symfony @ OpenSkyPablo Godel
OpenSky is one of the first large ecommerce platforms to use Symfony2. The whole marketplace has been running on Symfony for many years. Over this talk we will share:
how we use the framework and other PHP components
our deployment process
using Doctrine with MySQL and MongoDB
things we learned to avoid
running a large PHPUnit test suite
"Puppet at GitHub / ChatOps" from PuppetConf 2012, by Jesse Newland
Video of "Puppet at GitHub": http://bit.ly/WVS3vQ
Learn more about Puppet: http://bit.ly/QQoAP1
Abstract: Ops at GitHub has a unique challenge - keeping up with the rabid pace of features and products that the GitHub team develops. In this talk, we'll focus on tools and techniques we use to rapidly and confidently ship infrastructure changes/features with Puppet using Puppet-Rspec, CI, Puppet-Lint, branch puppet deploys, and Hubot.
Speaker Bio: Jesse Newland does Ops at GitHub. His favorite hobby is SPOF wack-a-mole, followed closely by guitar and piano. Prior to GitHub, Jesse was the CTO at Rails Machine where he ran a large private cloud and managed several hundred production Ruby on Rails applications using Puppet. To the delight and/or chagrin of the Puppet community, Jesse is to blame for Moonshine, the Ruby DSL for Puppet before Puppet had a Ruby DSL.
When developing symfony plugins for use and reuse in your projects and maybe (hopefully) by the symfony community you want to make sure that a new release doesn't break with backwards compatibility. While symfony comes with lime the de facto standard for unit testing in PHP is PHPUnit and it offers much more. This session will show you some of the best practices of testing symfony plugins. You will learn how to organise your tests and how to reduce your dependencies to the bare essentials.
This worksheet accompanied a presentation by Steve Breker of Artefactual Systems, delivered as part of AtoM Camp Cambridge, a three-day boot camp held at St John's College, Cambridge University, May 9-11, 2017 For more information, see:
https://wiki.accesstomemory.org/Community/Camps/SJC2017
The presentation focused on the installation of Access to Memory, and the slides from it can be seen here:
https://www.slideshare.net/accesstomemory/installing-and-upgrading-atom
This handout showed attendees how Ansible can be used to automate the deployment process of AtoM, using the publicly available Ansible playbooks. You can find Artefactual's Ansible playbooks at:
https://github.com/artefactual/deploy-pub
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!
Laravel is a great framework to use for web applications but what if you need to do more? What if you need to process data that would take longer than an HTTP request would allow?
Come learn how to harness the power of the console in your Laravel applications to do various tasks such as caching data from 3rd party APIs, expire old content from S3 or other data store, and batch process huge data sets without users having to wait for results. You can even automate tasks such as backing up your remote databases before you run migrations with artisan commands.
We'll cover creating basic artisan console commands, adding options and passing input, setting up cron jobs and scheduling our console commands to run at specific times, and how you can utilize 3rd party APIs to create fun automated message processing for social media networks.
Go beyond the documentation and explore some of what's possible if you stretch symfony to its limits. We will look at a number of aspects of symfony 1.4 and Doctrine 1.2 and tease out some powerful functionality you may not have expected to find, but will doubtless be able to use. Topics covered will include routing, forms, the config cache and record listeners. If you're comfortable in symfony and wondering what's next, this session is for you.
Cette présentation à pour but d'expliquer à des néophites les avantages du framework PHP Symfony.
Elle m'a servit en entreprise pour expliquer ses concepts complexe à des non-informaticiens.
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years laterHaehnchen
In 2013 the "Symfony Plugin" for PhpStorm was born. Today we see over 1 million downloads and several other plugins for projects like Laravel, Drupal, Shopware, ... that help to improve your productivity.
I will talk about Symfony related features and will give you some tips and tricks. Also, we take a look at the infrastructure behind these plugins and how I maintain all of them.
Moje první aplikace v Symfony 3 + překvapení (4. sraz přátel Symfony v Praze)Martin Zeman
90% webových aplikací funguje stylem "získám uživatelská data, uložím si je do nějakého storage a pak si je prohlédnu na bezpečné stránce".
Se Symfony 3 je tohle otázka pár minut.
https://github.com/Zemistr/symfony-3-first-app
Keeping the frontend under control with Symfony and WebpackIgnacio Martín
Webpack tutorial with tips for Symfony users. Topics covered include: current frontend trends, setup, loaders, dev tools, optimization in production, bundle splitting and tips and tricks for using webpack with existing projects.
Symfony Munich Meetup 2016.
Git explained, for absolute beginners. How to setup Git in windows, configuring, basic git commands, working with Github, Team-work etc explained in details with a lots of screen-shots!
You can also download it from: https://dl.dropbox.com/s/3ph3mvt3pi2yt1r/Hello%2C%20Git%21.pptx?dl=1
Introduction to the rapid prototyping with python and linux for embedded systemsNaohiko Shimizu
Short seminar for engineers who want to get the knowledge of embedded system with Linux. This slide uses RaspberryPi2 and Python for the laboratory. Make your board and try with this slide.
All of the sample codes and cross compiling environment can be downloaded from IP ARCH, Inc., my company. You can also download LiveCygwin which is ready made package just extract and do, based on Cygwin.
Requirement:
Windwos based PC with Ethernet connector. We will use peer to peer connection between PC and Raspberry Pi.
Appropriate right to control your PC to turn on the network share.
RaspberryPi B+ or RaspberryPi2 B
An ethernet cable for connect between PC and Pi
A micro USB cable for the Pi's power
A laboratory board which schematics is in the slide. You may make it with bread board.
Your effort :-)
Open up your platform with Open Source and GitHubScott Graham
Use GitHub & open source to get your users involved in projects within your company. This presentation give a quick run down of what you need to know to get started.
Webpack Encore Symfony Live 2017 San FranciscoRyan Weaver
Ready to write an amazing front-end for your app? There are *so* many great tools, like React, Vue.js, module loaders, Sass, LESS, PostCSS and more. But, they all have one thing in common: you need to configure a *build* system before you write a single line of code! Thankfully, there's Webpack: the leading tool for processing & bundling your JavaScript and CSS. There's just one problem: configuring Webpack is tough and requires a lot of Webpack-specific knowledge. Say hello to Webpack Encore: a library built by Symfony to quickly bootstrap a sophisticated asset setup, complete with minification, SASS processing, automatic versioning, Babel support and *everything* you need to start writing great JavaScript quickly. In this talk, we'll also learn about using JavaScript modules, how to bootstrap a framework (like React) and other important modern practices. Give your assets a huge boost with Webpack Encore!
The Coolest Symfony Components you’ve never heard of - DrupalCon 2017Ryan Weaver
What is Symfony *really*? It's a collection of *35* independent libraries, and
Drupal uses less than *half* of them! That means that there's a *ton* of other
good stuff that you can bring into your project to solve common problems... as
long as you know how, and what those components do!
In this talk, we'll have some fun: taking a tour of the Symfony components, how
to install them (into Drupal, or anywhere) and how to use some of my *favorite*,
lesser-known components. By the end, you'll have a better appreciation of what
Symfony *really* is, and some new tools to use immediately.
Finally, Professional Frontend Dev with ReactJS, WebPack & Symfony (Symfony C...Ryan Weaver
If you're like me, you know that being a great backend developer isn't enough. To make *truly* great applications, we need to spend significant time in an area that's moving at a lightning pace: frontend development.
This talk is for you: the backend developer that wants to hook their API's up to rich, interactive JavaScript frontends. To do that, first, we need to demystify a lot of new terms, like ES6/ES2015, ECMAScript, JSX, Babel and the idea that modern JavaScript (surprise) *requires* a build step.
With this in mind, I'll give you a brief introduction into Webpack & the modular development it finally allows.
But the real star is ReactJS. In the frontend world, you never know what new tech will *win*, but React is a star. I'll give you enough of an intro to get you rolling on your project.
The new frontend dev world is huge! Consider the starting line down an exciting new journey.
Symfony Guard Authentication: Fun with API Token, Social Login, JWT and moreRyan Weaver
There are so many interesting ways to authenticate a user: via an API token, social login, a traditional HTML form or anything else you can dream up.
But until now, creating a custom authentication system in Symfony has meant a lot of files and a lot of complexity.
Introducing Guard: a simple, but expandable authentication system built on top of Symfony's security component. Want to authenticate via an API token? Great - that's just one class. Social login? Easy! Have some crazy legacy central authentication system? In this talk, we'll show you how you'd implement any of these in your application today.
Don't get me wrong - you'll still need to do some work. But finally, the path will be clear and joyful.
Symfony: Your Next Microframework (SymfonyCon 2015)Ryan Weaver
Microservices are a huge trend, and microframeworks are perfect for them: put together just a few files, write some code, and your done!
But Symfony is a big framework, right? Wrong! Symfony can be as small as a single file!
In this talk, we'll learn how to use Symfony as a micro-framework for your next project. Your app will stay small and clear, but without needing to give up the features or third-party bundles that you love. And if the project grows, it can evolve naturally into a full Symfony project.
So yes, Symfony can also be a microframework. Tell the world!
There are so many interesting ways to authenticate a user: via an API token, social login, a traditional HTML form or anything else you can dream up. But until now, creating a custom authentication system in Symfony has meant a lot of files and a lot of complexity. Introducing Guard: a simple, but expandable authentication system built on top of the security component and introduced in Symfony 2.8. Want to authenticate via an API token? Great - that's just one class. Social login? Easy! Have some crazy legacy central authentication system? In this talk, we'll show you how you'd implement any of these in your application today. Don't get me wrong - you'll still need to do some work. But finally, the path will be clear and joyful.
Silex: Microframework y camino fácil de aprender SymfonyRyan Weaver
Ya quieres aprender Symfony? Bueno! Si eres en usuario de Drupal o si quieres aumentar sus habilidades, aprender Symfony puede ayudarte. Sin embargo, aprender Symfony puede ser difícil - y muchas ideas nuevas (pero buenas) como PHP namespaces, Composer, y código "object-oriented". Te presento a Silex: el Microframework que se construye por las mismos pedazos (HttpFoundation, HttpKernel, Composer, etc) como el Symfony Framework y Drupal 8. En esta charla, vamos a crear un mini-app con Silex para mostrarte como fácil puede ser y cuales partes son los mismos como Symfony y Drupal. Al fin, vas a estar listo entender Drupal 8 o crear su primer proyecto con Symfony.
Y porque esta charla sería mi primera en español, puedas disfrutar esta aventura conmigo :).
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other ToolsRyan Weaver
Bower, Grunt, and RequireJS are just a few tools that have been re-shaping the frontend development world, replacing cluttered script tags and server-side build solutions with a sophisticated, but sometimes complex approach to dependency management and module loading. In this talk, we'll put on our trendy frontend developer hat and find out how these tools work and how they differ from what we might be used to. Most important, we'll see how using tools like this might look in Symfony2 and how our application can be a friendly place for a frontend guy/gal.
The Wonderful World of Symfony ComponentsRyan Weaver
Wow, Symfony Components!
In this talk, we'll look at the history of PHP, and the struggles as a community to create shared libraries between our large community. Find out the significance of PSR-0 and Composer in *your* life and how you can leverage libraries from all of PHP in your projects.
We'll also look at the most fundamental Symfony2 components - HttpFoundation, HttpKernel, EventDispatcher, & Routing - including those that have been adopted by Drupal 8. We'll also check out a bunch of the other interesting Symfony2 components that can be used as tools in any PHP project.
The goal of this talk is to show you just how easy finding and using high quality libraries has become in PHP. By the end, you'll be excited and ready to high-five all of your PHP friends.
A PHP Christmas Miracle - 3 Frameworks, 1 appRyan Weaver
In this presentation, we walk take a flat PHP4-style application and gently migrate it into our own "framework", that uses components from Symfony2, Lithium, Zend Framework and a library called Pimple. By the end, you'll see how any ugly application can take advantage of the many wonderful tools available to PHP developers.
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.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
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
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.
Let's dive deeper into the world of ODC! Ricardo Alves (OutSystems) will join us to tell all about the new Data Fabric. After that, Sezen de Bruijn (OutSystems) will get into the details on how to best design a sturdy architecture within ODC.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
Search and Society: Reimagining Information Access for Radical FuturesBhaskar Mitra
The field of Information retrieval (IR) is currently undergoing a transformative shift, at least partly due to the emerging applications of generative AI to information access. In this talk, we will deliberate on the sociotechnical implications of generative AI for information access. We will argue that there is both a critical necessity and an exciting opportunity for the IR community to re-center our research agendas on societal needs while dismantling the artificial separation between the work on fairness, accountability, transparency, and ethics in IR and the rest of IR research. Instead of adopting a reactionary strategy of trying to mitigate potential social harms from emerging technologies, the community should aim to proactively set the research agenda for the kinds of systems we should build inspired by diverse explicitly stated sociotechnical imaginaries. The sociotechnical imaginaries that underpin the design and development of information access technologies needs to be explicitly articulated, and we need to develop theories of change in context of these diverse perspectives. Our guiding future imaginaries must be informed by other academic fields, such as democratic theory and critical theory, and should be co-developed with social science scholars, legal scholars, civil rights and social justice activists, and artists, among others.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
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.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Symfony2: Get your project started
1. Starting your new
project with
Symfony2
Ryan Weaver
@weaverryan
Thursday, August 18, 11
2. Who is this dude?
• Co-author of the Symfony2 Docs
• Core Symfony2 contributor
• Co-owner of KnpLabs US
• Fiancee of the much more
talented @leannapelham
http://www.knplabs.com/en
http://www.github.com/weaverryan
Thursday, August 18, 11
3. KnpLabs
Quality. Innovation. Excitement.
• Training
• Coaching / Consulting
• Fun, high-quality custom dev
Thursday, August 18, 11
4. Act 1:
Downloading the Symfony
Standard Edition
http://bit.ly/sf2-install
Thursday, August 18, 11
5. The “Standard Distribution”
• Symfony offers “distributions” (think Ubuntu)
• The “Standard Distribution” is a fully-functional
skeleton web application
• The Standard Distribution *is* the starting
point for your new project: download it and
begin developing your new application
Thursday, August 18, 11
6. Step 1: Get it!
http://symfony.com/download
Thursday, August 18, 11
7. Step 2: Unzip it!
$ cd /path/to/webroot
$ tar zxvf /path/to/Symfony_Standard_2.0.0.tgz
Thursday, August 18, 11
8. Step 3: Download the vendors
• Run the following command:
php bin/vendors install
• ...which should fill up your vendor/ directory
Thursday, August 18, 11
9. Step 3: Explained
• The “standard edition” project itself is just a
few directories and a few files
• But it relies a group of 3rd-party libraries
• The Standard edition packages a script that
downloads these libraries into your vendor/
directory by reading the “deps” file
php bin/vendors install
Thursday, August 18, 11
11. Step 4: Check your config
http://localhost/Symfony/web/config.php
Thursday, August 18, 11
12. Tend to your Garden
• Fix any major problems (e.g. missing libraries,
permissions issues) that Symfony reports
Thursday, August 18, 11
13. Cache and log permissions
• The app/cache and app/logs directories must
be writable by your web server
• There are several ways to do this depending
on your setup and platform
D o cs
T he http://bit.ly/sf2-perms
Thursday, August 18, 11
14. Head to the homepage!
This *is* your
first Symfony2
page!!!
http://localhost/Symfony/web/app_dev.php
Thursday, August 18, 11
15. End of Act1
• So far we’ve:
‣ Downloaded the Standard Distribution
‣ Downloaded the vendor libraries
‣ Setup any pre-reqs needed for Symfony
‣ Navigated to the homepage of our project:
a sample page packaged with the distribution
Thursday, August 18, 11
16. Act 2:
Storing the new project in git
http://bit.ly/sf2-git
Thursday, August 18, 11
17. Version Control
• The Standard Distribution *is* the starting
point for your new project
• We’ll use “git” as our version control tool
• Initialize a new git repository inside your
project:
git init
git status
Thursday, August 18, 11
19. Ignore Some Files
• Most of the files are *your* files: you’ll edit
them and commit them to git
• Some files, however, shouldn’t be shared:
‣ database configuration files
• Others simply don’t need to be committed
‣ 3rd party libraries (each developer can
download them via “bin/vendors install”)
‣ cache files
Thursday, August 18, 11
20. Ignore Some Files
• To ignore certain files in git, create a .gitignore
file at the root of your project and specify file
patterns that shouldn’t be stored in git
Thursday, August 18, 11
21. Recommended “.gitignore” file
{
/web/bundles/
/app/bootstrap*
“generated” /app/cache/*
files
/app/logs/*
/vendor/
db config { /app/config/parameters.ini
Thursday, August 18, 11
22. Initial Commit
• Once you’ve created the .gitignore file, you
can create an initial commit
• This commit represents the starting point of
your project: a fresh project with Symfony
git add .
git commit -m “Initial commit of the project”
Thursday, August 18, 11
23. Database Configuration
• By convention, database (and other server-
specific) configuration is stored in the app/
config/parameters.ini file
• We’ve placed this file in our .gitignore
• Every new developer that downloads the
project will need to create this file
Thursday, August 18, 11
24. Database Configuration
• To make the creation of the parameters.ini file
easy, create a parameters.ini.dist sample file that
we *will* commit to git
cp app/config/parameters.ini app/config/parameters.ini.dist
git add app/config/parameters.ini.dist
git commit -m “adding a sample parameters file”
Thursday, August 18, 11
25. Removing demo pages
• The Standard Distribution comes with some
sample pages inside a demo bundle
• Remove these before developing your own
application
https://github.com/symfony/symfony-standard
Thursday, August 18, 11
26. Finishing up Act 2
• Where are we now?
‣ The new project is stored in git
‣ Certain files are set to be ignored by git
‣ A database configuration “template” file
was created to help when the project is
cloned by new developers
Thursday, August 18, 11
27. Act 3:
What Symfony does...
in exactly 3 slides
http://bit.ly/sf2-http
Thursday, August 18, 11
28. Your job: turn a request into a response
the request
/foo
Client
Your App
(e.g. browser)
<h1>Foo!</h1>
the response
But as your app grows, staying organized is
tough, wheels are reinvented and code tends
towards spaghetti
Thursday, August 18, 11
29. Request to Response Structure
• Symfony gives you structure for reading each
request and creating the appropriate response
e.g. app.php
1) a request executes 2) matches a route 3) executes a PHP function
the front controller that you write
Thursday, August 18, 11
30. Tools for Development
• In addition to basic structure, Symfony is full of
optional tools that you can choose to use when
developing your application:
‣ security
‣ render templates
‣ send emails
‣ work with the database
‣ handle HTML forms
‣ validation
‣ caching
Thursday, August 18, 11
31. Act 4:
Creating your app
http://bit.ly/sf2-page-creation
Thursday, August 18, 11
32. Bundles!
• A standard Symfony project looks like this:
app/ app config - nothing too heavy
src/ your bundles!
vendor/ third-party libraries
web/ front controllers, CSS, JS, etc
Thursday, August 18, 11
33. Bundles: first-class plugins
• A bundle is a directory that holds *everything*
for a single “feature” - from routing files to PHP
classes to JS files
• A bundle is like a plugin, except that
everything (including the core Symfony2 files)
exists in a bundle
(this means you could replace the core framework libraries
with your own...)
Thursday, August 18, 11
34. Creating the MainBundle
• Symfony can generate a nice bundle skeleton
on your behalf:
php app/console generate:bundle
Answer the prompts:
• Acme/MainBundle
• MainBundle
• ... enter the defaults for the rest
Thursday, August 18, 11
35. Initialize the bundle
• The following was added by the task to your
app/AppKernel.php file:
public function registerBundles()
{
$bundles = array(
// ...
new AcmeMainBundleMainBundle(),
);
}
Thursday, August 18, 11
36. Where now?
• Now that you have a bundle, you can start
creating your app page-by-page:
‣ create a route
‣ create a controller
‣ create and return a Response object
(usually via a template)
• As you develop more features, you may
create more bundles, but it’s up to you
Thursday, August 18, 11
37. Open Source Bundles
• Lots of 3rd-party bundles are also available
to help you:
‣ FOSUserBundle - user management
‣ KnpMenuBundle - really smart menus
‣ DoctrineFixturesBundle
‣ StofDoctrineExtensionsBundle - easy doctrine
behaviors
‣ AvalancheImagineBundle - image manipulation
‣ KnpPaginatorBundle
... and many more...
Thursday, August 18, 11
39. Act 5:
Playing with Behat
http://behat.org
Thursday, August 18, 11
40. What is Behat
• Behat is a tool that lets you focus on
developing to the intended behavior of your
application
• You write scenarios that describe the behavior
of the features needed, which are then executed
as tests against your application
Thursday, August 18, 11
41. Example Behat Feature
Feature: Registration
In order to have an account with the system
As an unauthenticated user
I can register for a new account
Scenario: Navigate to the registration page
Given I am on "/"
When I follow "Register"
Then the response status code should be 200
And the "h1" element should contain "Register"
Thursday, August 18, 11
42. Installing Behat
• To use behat to test the functionality of your
application, you’ll need to install both Behat and
Mink
• Behat is a command-line executable that you
install via pear
• Details: behat.org
Thursday, August 18, 11
43. Installing Behat
• To use behat to test the functionality of your
application, you’ll need to install both Behat and
Mink
• Behat is a command-line executable that you
install via pear
pear channel-discover pear.behat.org
pear channel-discover pear.symfony.com
pear install behat/behat
pear install behat/mink
Thursday, August 18, 11
44. Integrating into your project
• To use Behat and Mink in your project, install
BehatBundle and MinkBundle
1. Add the deps file
2. Configure the autoloader
3. Enable the bundles
4. Configure the bundles
5. Start describing your features!
http://bit.ly/mink-bundle
Thursday, August 18, 11
45. Behavior-Driven Development
• Remember that the goal of Behat is to let you
describe the behavior of your application as
human-readable sentences
• This allows you to describe the behavior of
each feature in a common language, which is
executed as tests against your application
• Develop a feature until the test passes,
then move on
Thursday, August 18, 11
46. registration.feature
Describes your feature, but This “format” is called
not executed by Behat “Gherkin”
Feature: Registration
{ In order to have an account with the system
As an unauthenticated user
I can register for a new account
Scenario: Navigate to the registration page
{
Given I am on "/"
When I follow "Register"
Then the response status code should be 200
And the "h1" element should contain "Register"
Each Scenario is actually
executed as a test against
your application
http://bit.ly/gherkin-docs
Thursday, August 18, 11
48. Behind-the-scenes
• Behind the scenes, each line of the scenario is
executed against a collection of “definitions”
• A definition is a regular expression pattern and
a function
• When a line in your scenario matches a
definition’s regular expression, that definition is
executed
• Mink comes with a great list of
built-in definitions
Thursday, August 18, 11
50. Testing Javascript
• By default, tests are run in a “headless” or
command-line-only browser
• This means that your testing your application
as if Javascript were off
• You can also do in-browser testing by
leveraging another library called Sahi
Thursday, August 18, 11
51. In-browser testing
Feature: Registration
In order to have an account with the system
As an unauthenticated user
I can register for a new account
Activates Sahi
@javascript
Scenario: Navigate to the registration page
Given I am on "/"
When I follow "Register"
Then the response status code should be 200
And the "h1" element should contain "Register"
Thursday, August 18, 11
52. Testing Javascript
• By adding “@javascript”, the test will be run
through Sahi
• Sahi will physically open up a browser and
execute the test
• You can use headless browsers for some tests
and Sahi for others that require Javascript
functionality
Thursday, August 18, 11
54. HTTP is Simple
• HTTP is a text language that allows two
machines to communicate with each other
• Communication on the web is always a two-
step process:
1) The client sends an HTTP request
2) The server send back an HTTP response
Thursday, August 18, 11
55. HTTP Communication - from space
the request
/foo
Client
Your App
(e.g. browser)
<h1>Foo!</h1>
the response
Thursday, August 18, 11
56. The Request
• The actual request looks something like this:
GET /foo HTTP/1.1
Host: knplabs.com
Accept: text/html
User-Agent: Mozilla/5.0 (Macintosh)
Thursday, August 18, 11
57. This simple message
communicates everything
necessary about exactly which
resource the client is requesting
Thursday, August 18, 11
58. The Request
• The first line contains the two most important
pieces of information:
HTTP method URI
GET /foo HTTP/1.1
Host: knplabs.com
Accept: text/html
User-Agent: Mozilla/5.0 (Macintosh)
Thursday, August 18, 11
59. The Request
URI The unique address or location that
identifies the resource the client wants
HTTP method
The “verb” of the request: what action
you would like to perform with the
resource
Thursday, August 18, 11
60. Request Methods
Retrieve the resource
GET
from the server
Create a resource on
POST
the server
Update the resource on
PUT
the server
Delete the resource
DELETE
from the server
Thursday, August 18, 11
61. The Response
• And the response looks like this:
HTTP/1.1 200 OK
Date: Tue, 04 Jun 2011 21:05:05 GMT
Server: lighttpd/1.4.19
Content-Type: text/html
<html>
<h1>Foo!</h1>
</html>
Thursday, August 18, 11
62. The Response
HTTP Status code
HTTP/1.1 200 OK
Date: Tue, 04 Jun 2011 21:05:05 GMT
Server: lighttpd/1.4.19
Content-Type: text/html
{
<html>
Request <h1>Foo!</h1>
body </html>
Thursday, August 18, 11
63. HTTP Request-Response
• In every application, and every language, you
always have the same goal:
To read the HTTP request and create the
appropriate HTTP response
Thursday, August 18, 11
64. Request Response in PHP
• So how do you interact with HTTP requests
and responses in PHP?
<?php
$uri = $_SERVER['REQUEST_URI'];
$foo = $_GET['foo'];
header('Content-type: text/html');
echo 'The URI requested is: '.$uri;
echo 'The "foo" parameter is: '.$foo;
Thursday, August 18, 11
65. Request Response in PHP
• PHP gives you access to the HTTP request
via several “superglobal” arrays
• To create the HTTP response, use the the
header() method to set the header lines and
print content to populate the request body
Thursday, August 18, 11
66. The user sends the HTTP request...
• http://knplabs.com/testing.php?foo=symfony
<?php
// this is testing.php
$uri = $_SERVER['REQUEST_URI'];
$foo = $_GET['foo'];
header('Content-type: text/html');
echo 'The URI requested is: '.$uri;
echo 'The "foo" parameter is: '.$foo;
Thursday, August 18, 11
67. ... and PHP sends back the HTTP response
• http://knplabs.com/testing.php?foo=symfony
HTTP/1.1 200 OK
Date: Sat, 03 Apr 2011 02:14:33 GMT
Server: Apache/2.2.17 (Unix)
Content-Type: text/html
The URI requested is: /testing?
foo=symfony
The "foo" parameter is: symfony
Thursday, August 18, 11
68. Request and Responses in Symfony
• Symfony offers a Request and Response
objects that abstract the HTTP text messages
into an object-oriented format
Thursday, August 18, 11
69. use SymfonyComponentHttpFoundationRequest;
use SymfonyComponentHttpFoundationResponse;
$request = Request::createFromGlobals();
$c = 'URI: '.$request->getPathInfo();
$c .= '”foo”: '.$request->query->get('foo');
$response = new Response();
$response->setContent($c);
$response->setStatusCode(200);
$response->headers->set('Content-Type', 'text/
html')
//sets the headers and then prints the content
$response->send();
Thursday, August 18, 11
70. Thanks!
Questions?
Ryan Weaver
@weaverryan
Thursday, August 18, 11