- Propel is an ORM (object-relational mapper) for PHP that was started in 2005 and is based on concepts from Apache Torque.
- It uses code generation from XML schemas to quickly map database schemas to PHP classes.
- Propel supports various database backends including MySQL, PostgreSQL, SQLite, MSSQL, and Oracle. It uses inheritance mapping strategies like single table, class table, and concrete table inheritance.
This session is for those who are excited by the great power of Apache Solr search for Drupal and want to take things even further. Do you want take complete control over your search interface and offer more than the default features? Have you ever wondered what it takes to add data to your search index? Curious about defining facets, custom sorting, or making cool new widgets for filtering and faceting? Join us for a technical deep dive into the world of Solr search.
The general topics of this presentation will overlap with those covered at Drupalcon SF for the Drupal 6 version, but we will focus on use of the API as found in the Drupal 7 version.
Introducing the Solr index
* Learn about Solr fields, and how to map Drupal data onto them
* See how to add data to the search index
* Execute a search in PHP code and use the results
Using the API for custom search paths and interfaces
* How to use the prepare and alter hooks for the query object, and why they differ.
* Make use facing changes, or add filters that are transparent to the user.
Build custom facets based on node fields
* What comes OOTB
* Hooks to add facets for additional field types
Your code sucks, let's fix it - DPC UnConRafael Dohms
How do you measure the quality of your code? Performance and testing are just one aspect of code, in order to meet deadlines and make maintenance quicker you also need your code to be readable, decoupled and generally easier to comprehend and work with. This talk will go over tips and exercises to help you identify trouble areas, refactor them and train you to write better code in future projects. Come make your code look and function better.
Your code sucks, let's fix it - PHP Master Series 2012Rafael Dohms
Performance and testing are just one aspect of code, to really be successful your code needs to be readable, maintainable and generally easier to comprehend and work with. This talk draws from my own experience in applying the techniques of object calisthenics and code readability, within an existing team. It will help you identify trouble areas, learn how to refactor them and train you to write better code in future projects avoiding common pitfalls.
Dig Deeper into WordPress - WD Meetup CairoMohamed Mosaad
Dig deeper into WordPress is a presentation made for Web Designers Meetup in Cairo taken place on 17th Dec 2012.
Signup at WPMonkeys.com to get notified when awesome new WordPress related content is published.
https://speakerdeck.com/willroth/50-laravel-tricks-in-50-minutes - origin
Laravel 5.1 raised the bar for framework documentation, but there's much, much more lurking beneath the surface. In this 50-minute session, we'll explore 50 (yes, 50!) high-leverage implementation tips & tricks that you just won't find in the docs: the IoC Container, Blade, Eloquent, Middleware, Routing, Commands, Queues, Events, Caching — we'll cover them all! Join us as we drink from the fire hose & learn to take advantage of everything that Laravel has to offer to build better software faster!
Powerpoint file(incl. animations!): http://db.tt/ktTDiQSG
Demostration module with example: http://db.tt/Ix2ovTno
This is the slides of the presentation "Drupal & Javascript" who presented at DrupalCamp Israel 2012.
This session is for those who are excited by the great power of Apache Solr search for Drupal and want to take things even further. Do you want take complete control over your search interface and offer more than the default features? Have you ever wondered what it takes to add data to your search index? Curious about defining facets, custom sorting, or making cool new widgets for filtering and faceting? Join us for a technical deep dive into the world of Solr search.
The general topics of this presentation will overlap with those covered at Drupalcon SF for the Drupal 6 version, but we will focus on use of the API as found in the Drupal 7 version.
Introducing the Solr index
* Learn about Solr fields, and how to map Drupal data onto them
* See how to add data to the search index
* Execute a search in PHP code and use the results
Using the API for custom search paths and interfaces
* How to use the prepare and alter hooks for the query object, and why they differ.
* Make use facing changes, or add filters that are transparent to the user.
Build custom facets based on node fields
* What comes OOTB
* Hooks to add facets for additional field types
Your code sucks, let's fix it - DPC UnConRafael Dohms
How do you measure the quality of your code? Performance and testing are just one aspect of code, in order to meet deadlines and make maintenance quicker you also need your code to be readable, decoupled and generally easier to comprehend and work with. This talk will go over tips and exercises to help you identify trouble areas, refactor them and train you to write better code in future projects. Come make your code look and function better.
Your code sucks, let's fix it - PHP Master Series 2012Rafael Dohms
Performance and testing are just one aspect of code, to really be successful your code needs to be readable, maintainable and generally easier to comprehend and work with. This talk draws from my own experience in applying the techniques of object calisthenics and code readability, within an existing team. It will help you identify trouble areas, learn how to refactor them and train you to write better code in future projects avoiding common pitfalls.
Dig Deeper into WordPress - WD Meetup CairoMohamed Mosaad
Dig deeper into WordPress is a presentation made for Web Designers Meetup in Cairo taken place on 17th Dec 2012.
Signup at WPMonkeys.com to get notified when awesome new WordPress related content is published.
https://speakerdeck.com/willroth/50-laravel-tricks-in-50-minutes - origin
Laravel 5.1 raised the bar for framework documentation, but there's much, much more lurking beneath the surface. In this 50-minute session, we'll explore 50 (yes, 50!) high-leverage implementation tips & tricks that you just won't find in the docs: the IoC Container, Blade, Eloquent, Middleware, Routing, Commands, Queues, Events, Caching — we'll cover them all! Join us as we drink from the fire hose & learn to take advantage of everything that Laravel has to offer to build better software faster!
Powerpoint file(incl. animations!): http://db.tt/ktTDiQSG
Demostration module with example: http://db.tt/Ix2ovTno
This is the slides of the presentation "Drupal & Javascript" who presented at DrupalCamp Israel 2012.
Your code sucks, let's fix it (CakeFest2012)Rafael Dohms
How do you measure the quality of your code? Performance and testing are just one aspect of code, in order to meet deadlines and make maintenance quicker you also need your code to be readable, decoupled and generally easier to comprehend and work with. This talk will go over tips and exercises to help you identify trouble areas, refactor them and train you to write better code in future projects. Come make your code look and function better.
Con la versione 7 di Drupal è stato introdotto il concetto di Entity, poi evoluto con la versione 8, utilizzato come base di buona parte degli elementi core (nodi, tassonomie, utenti, ...), ma - soprattutto - è stata data la possibilità di costruire entity custom. L'utilizzo di queste apre le possibilità di personalizzazione dello strumento ad un livello superiore velocizzando notevolmente lo sviluppo.
Verranno mostrate le potenzialità nell'uso delle Entity custom e le integrazioni possibili.
Drupal is Stupid (But I Love It Anyway)brockboland
Regrettably, my machine didn't cooperate when I tried to record this presentation. I don't think the slides will do you much good without the stuff I said, but a few people asked for them.
---
Depending on who you ask, Drupal is either a framework or a platform, but no matter how you look at it, there are things about it that suck. Hear Brock Boland talk about the pain points of coding for Drupal 6, how things have improved in Drupal 7, and what's expected to be better in Drupal 8.
As WordPress and Genesis Developers, the code is our craft, our art. Adopting proven software development principles and keys to quality code into our workflow elevates our art form. In this session, we explore the why, when, and how of writing quality code by design.
Persistence is one of the most important part in a PHP project. Persisting data to a database came with PHP/FI and its MySQL support. From native extensions and PHP4 database abstraction libraries to PDO and modern ORM frameworks, you will (re)discover how persistence has evolved during the last decade. This talk will also introduce the future of data persistence with the growing success of alternative storage engines.
Your code sucks, let's fix it (CakeFest2012)Rafael Dohms
How do you measure the quality of your code? Performance and testing are just one aspect of code, in order to meet deadlines and make maintenance quicker you also need your code to be readable, decoupled and generally easier to comprehend and work with. This talk will go over tips and exercises to help you identify trouble areas, refactor them and train you to write better code in future projects. Come make your code look and function better.
Con la versione 7 di Drupal è stato introdotto il concetto di Entity, poi evoluto con la versione 8, utilizzato come base di buona parte degli elementi core (nodi, tassonomie, utenti, ...), ma - soprattutto - è stata data la possibilità di costruire entity custom. L'utilizzo di queste apre le possibilità di personalizzazione dello strumento ad un livello superiore velocizzando notevolmente lo sviluppo.
Verranno mostrate le potenzialità nell'uso delle Entity custom e le integrazioni possibili.
Drupal is Stupid (But I Love It Anyway)brockboland
Regrettably, my machine didn't cooperate when I tried to record this presentation. I don't think the slides will do you much good without the stuff I said, but a few people asked for them.
---
Depending on who you ask, Drupal is either a framework or a platform, but no matter how you look at it, there are things about it that suck. Hear Brock Boland talk about the pain points of coding for Drupal 6, how things have improved in Drupal 7, and what's expected to be better in Drupal 8.
As WordPress and Genesis Developers, the code is our craft, our art. Adopting proven software development principles and keys to quality code into our workflow elevates our art form. In this session, we explore the why, when, and how of writing quality code by design.
Persistence is one of the most important part in a PHP project. Persisting data to a database came with PHP/FI and its MySQL support. From native extensions and PHP4 database abstraction libraries to PDO and modern ORM frameworks, you will (re)discover how persistence has evolved during the last decade. This talk will also introduce the future of data persistence with the growing success of alternative storage engines.
The importance of Historical Conscience for a creative return to the future (...CISRE Venice
The importance of Historical Conscience for a creative return to the future: Researching collaboratively the liberation of Thessaloniki as a case example for liberation by our modern ‘enemies and demons’
Tong is a data scientist in Supstat Inc and also a master students of Data Mining. He has been an active R programmer and developer for 5 years. He is the author of the R package of XGBoost, one of the most popular and contest-winning tools on kaggle.com nowadays.
Agenda:
Introduction of Xgboost
Real World Application
Model Specification
Parameter Introduction
Advanced Features
Kaggle Winning Solution
Php 102: Out with the Bad, In with the GoodJeremy Kendall
In this session, we'll look at a typical PHP application, review a few of the horrible mistakes the fictional developer made, and then refactor the app according to some best practices. Along the way you might even learn a thing or two about PHP you don't already know.
Be lazy, be ESI: HTTP caching and Symfony2 @ PHPDay 2011 05-13-2011Alessandro Nadalin
In the first part of the presentation we see how Symfony2 implements HTTP cache.
In the second one there's an explanation of why application cache layers suck, why nerly every php application does caching in the less productive way and how you benefit from HTTP cache from this point of view.
How do you measure the quality of your code? Performance and testing are just one aspect of code, in order to meet deadlines and make maintenance quicker you also need your code to be readable, decoupled and generally easier to comprehend and work with. This talk will go over tips and exercises to help you identify trouble areas, refactor them and train you to write better code in future projects. Come make your code look and function better.
n 2010, I told everyone how to start unit testing Zend Framework applications. In 2011, let’s take this a step further by testing services, work flows and performance. Looking to raise the bar on quality? Let this talk be the push you need to improve your Zend Framework projects.
Performance and testing are just one aspect of code, to really be successful your code needs to be readable, maintainable and generally easier to comprehend and work with. This talk draws from my own experience in applying the techniques of object calisthenics and code readability, within an existing team. It will help you identify trouble areas, learn how to refactor them and train you to write better code in future projects avoiding common pitfalls.
Performance and testing are just one aspect of code, to really be successful your code needs to be readable, maintainable and generally easier to comprehend and work with. This talk draws from my own experience in applying the techniques of object calisthenics and code readability, within an existing team. It will help you identify trouble areas, learn how to refactor them and train you to write better code in future projects avoiding common pitfalls.
You’ve built a WordPress site or two (or 10), your installed plugins and themes to MOSTLY get what you want. Now you’re ready to learn the inner workings of WordPress and take your development to the next level. Jump into WordPress development and PHP by building a Plugin and learn to speak WordPress’ language: PHP.
2. Was Propel Ist
PDO
PDO
MySQL
MySQL
• ORM für PHP 5
PostgreSQL
PostgreSQL
SQLite
SQLite
MSSQL
MSSQL
Oracle
Oracle
• 2005 gestartet
• basiert auf Konzepten Apache Torque
• Aufteilung in Generator und Runtime
• Schema
• MIT-Lizenz
8. Class Table
Inheritance
• Struktur analog zu Vererbung in Klassen
• Realisierung via Delegation
• ermöglicht „Mehrfachvererbung“
<?php
$basketballer = new Basketballer();
$basketballer->setPoints(101);
$basketballer->setFieldGoals(47);
$basketballer->setThreePointsFieldGoals(7);
// set player identity via delegation
$basketballer->setFirstName('Michael');
$basketballer->setLastName('Giordano');
// same as
$player = new Player();
$player->setFirstName('Michael');
$player->setLastName('Giordano');
$basketballer->setPlayer($player);
// save basketballer and player
$basketballer->save();
// retrieve delegated data directly from the main object
echo $basketballer->getFirstName(); // Michael
10. Concrete Table
Inheritance
• hält gemeinsame Informationen doppelt vor
• übernimmt Fremdschlüssel, Indexes und Validatoren
• stellt via Transaktion Integrität zwischen Super- und Subclass sicher
<?php
// create a new Category
$cat = new Category();
$cat->setName('Movie');
$cat->save();
// create a new Article
$art = new Article();
$art->setTitle('Avatar Makes Best Opening Weekend in the History');
$art->setCategory($cat);
$art->setContent('With $232.2 million worldwide total, Avatar had one of the
best-opening weekends in the history of cinema.');
$art->save();
// create a new Video
$vid = new Video();
$vid->setTitle('Avatar Trailer');
$vid->setCategory($cat);
$vid->setResourceLink('http://www.avatarmovie.com/index.html')
$vid->save();
11. Concrete Table
Inheritance
• OO Arbeiten mit den Modellen
• Denormalisierung für optimale Performance
• Propel kümmert sich um das Mapping
• PHP arbeitet…
• …mit der Vererbungshirachie
• …auf den Objekten, nicht auf Datensätzen
• …auf Collections, nicht auf Arrays
• …auf Beziehungen, nicht auf Fremdschlüsseln
15. BaseClass
• Validation Properties (getter/setter)
/**
* Sets the value of [created_at] column to a normalized version of the date/time value specified.
*
* @param mixed $v string, integer (timestamp), or DateTime value.
* Empty strings are treated as null.
* @return Category The current object (for fluent API support)
*/
public function setCreatedAt($v)
{
$dt = PropelDateTime::newInstance($v, null, 'DateTime');
if ($this->created_at !== null || $dt !== null) {
$currentDateAsString = ($this->created_at !== null && $tmpDt = new DateTime($this->created_at)) ? $tmpDt->format('Y-m-d H:i:s') :
null;
$newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;
if ($currentDateAsString !== $newDateAsString) {
$this->created_at = $newDateAsString;
$this->modifiedColumns[] = CategoryPeer::CREATED_AT;
}
} // if either are not null
return $this;
} // setCreatedAt()
16. Class
• Klasse wird tatsächlich verwendet
• überschreibt standardmäßig leer die Basis
• custom Getter/Setter
• Raum für DB-ferne, zusätzliche Funktionen
17. Class
$category = new Category(); $con = Propel::getConnection();
$category->setName('Propel');
$con->beginTransaction();
$article = new Article();
$article try {
->setTitle('Propel is Awesome') $category = new Category();
->setBody('You know why') $category->setName('Propel');
->setCategory($category)
->save(); $article = new Article();
$article
->setTitle('Propel is Awesome')
->setBody('You know why')
->setCategory($category)
->save($con);
$another_article = new Article();
$another_article
->setTitle('Doctrine not so much')
->setBody('You know why')
->setCategory($category)
->save($con);
$con->commit();
}
catch (Exception $e) {
$con->rollBack();
}
18. ModelCriteria
• Vererbungsbaum der Query-Klassen
• ModelCriteria > BaseClassQuery > ClassQuery
• ModelCriteria implementiert eine abstrakte,
formale Definition einer SQL-Datenbankabfrage
• kann überführt werden in konkrete Abfragen
für MySQL, MSSQL, etc
19. BaseClassQuery
• BaseClassQuery implementiert…
• …fluent API für ModelCriteria
• einfaches Filtern – filterByXXX()
• einfaches Abfragen – findByXXX()
• paginate, delete, update, …
• …Class spezifische Methoden (für joins, etc)
• …@method-Definitionen für IDEs für MagicMethods
20. ClassQuery
• Klasse wird tatsächlich verwendet
• überschreibt standardmäßig leer die Basis
• Ort für eigene filterBy Methoden