E-commerce con SF: dal case study alla realtàSimone D'Amico
Posso sviluppare un e-commerce con Symfony? Esistono bundle disponibili oppure bisogna implementare tutto custom? In questo talk scopriremo insieme cosa offre il mondo delle librerie open source e quali sono state le scelte tecniche con cui abbiamo trasformato l’idea di un e-commerce in realtà.
This presentation is about PHP7, its innovations’ overview with practical examples. You will learn how to move to PHP7 and see performance сomparison between PHP 5.6 and PHP7.
This presentation by Dmytro Nazarenko (Senior PHP Developer / Tech Lead) was delivered at GlobalLogic Kharkiv PHP Meetup #1 on September 14, 2016.
From ReactPHP to Facebook Hack's Async implementation and many more, asynchronous programming has been a 'hot' topic lately. But how well does async programming support work in PHP and what can you actually use it for in your projects ? Let's look at some real-world use cases and how they leverage the power of async to do things you didn't know PHP could do.
E-commerce con SF: dal case study alla realtàSimone D'Amico
Posso sviluppare un e-commerce con Symfony? Esistono bundle disponibili oppure bisogna implementare tutto custom? In questo talk scopriremo insieme cosa offre il mondo delle librerie open source e quali sono state le scelte tecniche con cui abbiamo trasformato l’idea di un e-commerce in realtà.
This presentation is about PHP7, its innovations’ overview with practical examples. You will learn how to move to PHP7 and see performance сomparison between PHP 5.6 and PHP7.
This presentation by Dmytro Nazarenko (Senior PHP Developer / Tech Lead) was delivered at GlobalLogic Kharkiv PHP Meetup #1 on September 14, 2016.
From ReactPHP to Facebook Hack's Async implementation and many more, asynchronous programming has been a 'hot' topic lately. But how well does async programming support work in PHP and what can you actually use it for in your projects ? Let's look at some real-world use cases and how they leverage the power of async to do things you didn't know PHP could do.
PHP7 is here, and with it several advantages. However, when your enterprise application is almost ten years old, there are plenty of pitfalls and hidden surprises that have to be taken care of.
This is a talk about our experiences in migrating to PHP7, the advantages it brings and the problems we had.
PHP User Group Munich Meeting - September 28, 2016
Top Insights from SaaStr by Leading Enterprise Software ExpertsOpenView
Market Research
SHARE
I had the pleasure of attending the SaaStr Annual 2016 Conference in San Francisco earlier this month and wanted to share some of the insights I gathered from that event with you here. The findings below are arranged by functional area with attribution. I tried to compress the content as much as possible, but there was A TON of great information at the conference so would highly recommend spending the time to read through.
Test Automation - Principles and PracticesAnand Bagmar
Slides from my webinar for Sri Lanka Testing Community on - "Test Automation - Principles & Practices".
Details about the webinar can be found from my blog - http://essenceoftesting.blogspot.com
In era of Morden Technology, AngularJS is a structural open source Web and Mobile Application Development Framework popular because of it's strong features. Brainvire Provide the Best Development services for AngularJS Technology. See more on : http://www.brainvire.com/angular-js-and-react-js/
A look at where the market of the Internet of Things is and how technologies like Node.js (JavaScript) and the Intel Edison are making it easier to create connected solutions.
Learn more at https://losant.com.
The major topics include:
* What is the Internet of Things
* Where is IoT Today
* 4 Parts of IoT (Collect, Communicate, Analyze, Act)
* Why JavaScript is Good for IoT
* How Node.js is Making a Dent in the Internet of Things
* What npm Modules are used for Hardware (Johnny-Five, Cylon.js, MRAA)
* What is the Intel Edison
* How to Best Work with the Edison
* Tips for Edison (MRAA, Grove Kit, UPM)
* Where the World of JavaScript and IoT is Going
Databricks Spark Chief Architect Reynold Xin's keynote at Spark Summit East 2016, discussing streaming, continuous applications, and DataFrames in Spark.
Some examples and motivation for creating data structures from nothing but functions - Church Encoding! There's particular detail on how it can make free monads more efficient.
Introduction to Development for the InternetMike Crabb
Brief introduction into developing for the internet. A short history of how pages communicate with a server and a look a different web stacks that can be used in web development
TypeScript ha cambiato il modo di scrivere JavaScript ed in questo talk andiamo a scoprirne le principali caratteristiche per scrivere "JavaScript che non si rompe!"
N.B. Le slides sono aggiornate sino a TS 3.
Case study: un approccio modulare in un progetto legacyMariano Fiorentino
L'utilizzo di Zend Framework 1 all'interno del progetto Link, software usato da una 'fabbrica automobilistica torinese' per fornire servizi ai concessionari. Link è probabilmente il software in php più grande d'Europa con più di 6 milioni di righe di codice, nato nel 2003 utilizzando la versione 4 del linguaggio, Il talk illustrerà come negli anni si è passati dallo scriversi tutto in casa all'utilizzo dei moduli zend per abbassare i costi di sviluppo, migliorare la scalabilità e limitare le anomalie.">Case study: un approccio modulare in un progetto legacy
PHP7 is here, and with it several advantages. However, when your enterprise application is almost ten years old, there are plenty of pitfalls and hidden surprises that have to be taken care of.
This is a talk about our experiences in migrating to PHP7, the advantages it brings and the problems we had.
PHP User Group Munich Meeting - September 28, 2016
Top Insights from SaaStr by Leading Enterprise Software ExpertsOpenView
Market Research
SHARE
I had the pleasure of attending the SaaStr Annual 2016 Conference in San Francisco earlier this month and wanted to share some of the insights I gathered from that event with you here. The findings below are arranged by functional area with attribution. I tried to compress the content as much as possible, but there was A TON of great information at the conference so would highly recommend spending the time to read through.
Test Automation - Principles and PracticesAnand Bagmar
Slides from my webinar for Sri Lanka Testing Community on - "Test Automation - Principles & Practices".
Details about the webinar can be found from my blog - http://essenceoftesting.blogspot.com
In era of Morden Technology, AngularJS is a structural open source Web and Mobile Application Development Framework popular because of it's strong features. Brainvire Provide the Best Development services for AngularJS Technology. See more on : http://www.brainvire.com/angular-js-and-react-js/
A look at where the market of the Internet of Things is and how technologies like Node.js (JavaScript) and the Intel Edison are making it easier to create connected solutions.
Learn more at https://losant.com.
The major topics include:
* What is the Internet of Things
* Where is IoT Today
* 4 Parts of IoT (Collect, Communicate, Analyze, Act)
* Why JavaScript is Good for IoT
* How Node.js is Making a Dent in the Internet of Things
* What npm Modules are used for Hardware (Johnny-Five, Cylon.js, MRAA)
* What is the Intel Edison
* How to Best Work with the Edison
* Tips for Edison (MRAA, Grove Kit, UPM)
* Where the World of JavaScript and IoT is Going
Databricks Spark Chief Architect Reynold Xin's keynote at Spark Summit East 2016, discussing streaming, continuous applications, and DataFrames in Spark.
Some examples and motivation for creating data structures from nothing but functions - Church Encoding! There's particular detail on how it can make free monads more efficient.
Introduction to Development for the InternetMike Crabb
Brief introduction into developing for the internet. A short history of how pages communicate with a server and a look a different web stacks that can be used in web development
TypeScript ha cambiato il modo di scrivere JavaScript ed in questo talk andiamo a scoprirne le principali caratteristiche per scrivere "JavaScript che non si rompe!"
N.B. Le slides sono aggiornate sino a TS 3.
Case study: un approccio modulare in un progetto legacyMariano Fiorentino
L'utilizzo di Zend Framework 1 all'interno del progetto Link, software usato da una 'fabbrica automobilistica torinese' per fornire servizi ai concessionari. Link è probabilmente il software in php più grande d'Europa con più di 6 milioni di righe di codice, nato nel 2003 utilizzando la versione 4 del linguaggio, Il talk illustrerà come negli anni si è passati dallo scriversi tutto in casa all'utilizzo dei moduli zend per abbassare i costi di sviluppo, migliorare la scalabilità e limitare le anomalie.">Case study: un approccio modulare in un progetto legacy
Enrico Zimuel - PUG Milano meetup - Codemotion Milan 2017Codemotion
Meetup del PHP User Group Milano con presentazione delle attività del gruppo e dell'associazione GrUSP per la diffusione delle buone pratiche nel mondo dello sviluppo web. Durante il meetup ci sarà anche un intervento di Enrico Zimuel sulle novità del PHP 7.1 (e 7.2), con la presentazione del suo nuovo libro "Sviluppare in PHP 7. Realizzare applicazioni web e API professionali" edito da Tecniche Nuove.
Non Conventional Android Programming (Italiano)Davide Cerbo
Android è il nuovo sistema operativo open source per dispositivi mobili e realizzato da Google che si è posta la missione di rendere l’internet mobile accessibile a tutti tramite dispositi a basso costo.
Durante questo intervento mostrerò come sia possibile sviluppare per questo sistema operativo (e non solo) senza l’utilizzo di Java e come sia possibile utilizzare una versione light di Spring Framework nelle applicazioni mobili.
Entity Framework 6 for developers, Code-First!Michael Denny
https://www.sqlsaturday.com/viewsession.aspx?sat=355&sessionid=25373
Entity Framework è la tecnologia (open-source) di accesso ai dati consigliata e coordinata da Microsoft, in dettaglio è un ORM (object-relational mapper) nato dall'esigenza di volere accedere a dati relazionali sfruttando la pura programmazione ad oggetti, eliminando quasi completamente la necessità di dovere scrivere codice specifico per l'accesso ai dati (T-SQL). In particolare in questa sessione vedremo come sfruttare Entity Framework ricavandone il massimo dell'elasticità, partendo dal codice (Code-First) e non da un designer (Model-First), inoltre vedremo come sia possibile accedere anche ad un database esistente, sempre in code-first. Indipendentemente che siate nuovi, o abbiate già sguazzato in altre tecnologie ORM, vi mostrerò quanto velocemente sia possibile iniziare a lavorare con EF6 e aumentare la vostra produttività durante la creazione di applicazione .NET data-centriche.
Fare con Zend Framework 2 ciò che facevo con ZF1Steve Maraspin
Introduzione a Zend Framework 2 per chi proviene da Zend Framework 1, tenuta allo Zend Framework Day di Milano del 01/02/2013. Introduzione alle nuove caratteristiche e pattern architetturali di ZF2
Zend Framework 2 non è l'evoluzione di ZF, ma un progetto nuovo: il codice è stato riscritto e poche sono le parti in comune con la versione precedente. Lo sviluppatore abituato a ZF1 non ha vita facile, ed è fondato il timore di dover imparare tutto da capo. In questo talk vediamo come cambiare le vecchie abitudini di sviluppatori ZF1, per sfruttare al meglio le potenzialità del nuovo strumento. Attraverso esempi concreti, in cui vedremo all'opera i nuovi pattern e le best practice, mostriamo come - partendo con il piede giusto - il passaggio a ZF2 possa essere meno traumatico del previsto. Il talk è orientato soprattutto a chi già conosce ZF1, ma gli argomenti affrontati possono essere utili anche a chi si avvicina a ZF per la prima volta.
"(My) Best Pratices in Symfony" è una parte delle slides utilizzate durante un Train to Symfony2 organizzato in una web agency nel Giugno 2014.
Non è un elenco di best practices in senso stretto, sono semplicemente spunti dai quali partire per affrontare alcune problematiche pratiche.
Scopri su http://traintosymfony.com cos'è Train to Symfony, e quanto possa essere utile alla tua azienda.
jQuery è un framework javascript che permette di semplificare la scrittura di codice javascript, facilitando l'iterazione con gli elementi della pagina (controlli, stili, eventi, animazioni, ...), e permettendo di aumentare la user experience delle applicazioni, riducendone al tempo stesso la complessità di scrittura. Vista la sua diffusione e potenza, è stato anche incluso nei project templete di Visual Studio. In questa sessione vedremo cos'è jQuery, e scopriremo le potenzialità e funzionalità che offre, verificando se il motto "write less do more" sia vero o meno.
Una rassegna sul framework per lo sviluppo in Javascript jQuery ed alcuni suoi plugin sviluppati da Microsoft: Template e Datalink
http://www.pasqualepuzio.it
My short presentation at Symfony Live 2008 unconference, about translating Symfony docs (notice: this is a repost, since Slideshare deleted original one and has not be able to recover it. Shame on you, Slideshare!)
la mia presentazione all'incontro di novembre 2013 del PUG Roma, su come gestire le librerie di frontend (tipicamente css e javascript) in un progetto PHP, con alcune considerazioni finali specifiche per Symfony2
2. Il problema della gestione delle dipendenze affligge da tempo qualsiasi sviluppatore che non voglia reinventare la ruota. Questo problema può essere affrontato da due punti di vista: quello dello sviluppatore che ha bisogno di usare una libreria e quello dello sviluppatore che ha creato la propria libreria e vuole distribuirla
3. Una prima possibile soluzione al problema è: scaricare i sorgenti della libreria e installarli a mano. Questa soluzione ovviamente è molto scomoda e ha molti difetti: difficoltà di manutenzione, difficoltà di replicazione, difficoltà o impossibilità di versionamento. È stata mostrata solo per motivi "storici"
4. PEAR è stato per molto tempo lo standard de facto per la gestione delle librerie. Il suo problema principale era nella necessità di dover installare le librerie a livello di sistema, mentre spesso è necessario gestire versioni diverse su progetti diversi. Un altro problema è che è rimasto poco sviluppato e ancorato alla compatibilità con PHP4
5. Un altra possibile soluzione è la gestione delle dipendenze nel sistema di versioanmento: externals per subversion, submoduli per git, eccetera. Difetti di questo approccio: lo sviluppatore di librerie dovrebbe tenere un repository per ogni sistema, l'utilizzatore è costretto a gestire in contemporanea aggiornamenti delle revisioni del suo progetto e aggiornamenti delle librerie
6. Un approccio più recente e interessante è stato quello adottato da Symfony 2.0, cioè uno script di gestione scritto ad hoc. Purtroppo non era in grado di gestire le dipendenze indirette ed era legato strettamente a git
8. Il primo passo per usare Composer è installarlo. La procedura è molto semplice, trattandosi di uno script PHP da linea di comando: basta scaricare l'installer ed eseguirlo. Non obbligatorio, ma consigliato, spostare l'eseguibile sotto a un percorso incluso in $PATH. Pper sistemi non Unix-compatibili... non lo so! Arrangiatevi
9. L'installazione delle librerie è facile: basta eseguire il comando seguito dal parametro "install". Occorre però preparare un file di configurazione
10. Questo esempio di file di configurazione di Composer è tratto da Symfony Standard Edition, con alcune righe tagliate per questioni di spazio.
11. Vediamo ora un esempio su come pubblicare la propria libreria, tratta da un caso reale; un bundle per Symfony2 creato sotto PUGX. Il primo passo è quello di pubblicare il progetto su github
12. Questo è il file composer.json del bundle, con le sue dipendenze e le impostazioni per l'autoloading
13. Il passo successivo consiste nel pubblicare la libreria su Packagist, configurando le impostazioni relative all'integrazione con github
14. Tutto qui! Come direbbe il Principe, è fatta! Non serve niente di più di questo, è molto facile e consente di gestire dipendenze a cascata.
15. Ma se io avessi l'esigenza di usare una libreria che non è open source e quindi non posso mettere su github? Si possono impostare altri reposi
12. Form
class GiocatoreType extends AbstractType {
public function buildForm(FormBuilderInterface $builder, array $options) {
$builder
->add('squadra')
->add('nome')
->add('numeroDiMaglia', IntegerType::class)
;
}
public function configureOptions(OptionsResolver $resolver) {
$resolver->setDefaults([
'data_class' => Giocatore::class,
]);
}
}
13. Setters
class Giocatore {
public function setSquadra(Squadra $squadra) {
$this->squadra = $squadra;
}
public function setNome($nome) {
$this->nome = $nome;
}
public function setNumeroDiMaglia($numero) {
$this->numeroDiMaglia = $numero;
}
// ...
}
14. Getters
class Giocatore {
// ...
public function getSquadra() {
return $this->squadra;
}
public function getNome() {
return $this->nome;
}
public function getNumeroDiMaglia() {
return $this->numeroDiMaglia;
}
}
18. Setters (tipizzati)
class Giocatore {
public function setSquadra(Squadra $squadra) {
$this->squadra = $squadra;
}
public function setNome(string $nome) {
$this->nome = $nome;
}
public function setNumeroDiMaglia(int $numero) {
$this->numeroDiMaglia = $numero;
}
// ...
}
19. Getters (tipizzati)
class Giocatore {
// ...
public function getSquadra(): Squadra {
return $this->squadra;
}
public function getNome(): string {
return $this->nome;
}
public function getNumeroDiMaglia(): int {
return $this->numeroDiMaglia;
}
}
20. Oops!
Fatal error: Uncaught TypeError: Argument 1 passed to
setNome() must be an instance of string, null given
21. Oops2
!
Fatal error: Uncaught TypeError: Argument 1 passed to
setNome() must be an instance of string, null given
Fatal error: Uncaught TypeError: Return value of getNome()
must be an instance of string, null returned
25. Form
class GiocatoreType extends AbstractType {
public function buildForm(FormBuilderInterface $builder, array $options) {
$builder
->add('squadra')
->add('nome')
->add('numeroDiMaglia', IntegerType::class)
;
}
public function configureOptions(OptionsResolver $resolver) {
$resolver->setDefaults([
'data_class' => GiocatoreDTO::class,
]);
}
}
26. Action
public function nuovoAction(Request $request) {
$giocatore = new Giocatore();
$form = $this->createForm(GiocatoreType::class, $giocatore);
if ($form->handleRequest($request)->isValid()) {
$this->getDoctrine()->getManager()->persist($giocatore);
$this->getDoctrine()->getManager()->flush();
return $this->redirectToRoute('giocatori');
}
return $this->render('giocatore/nuovo.html.twig', [
'form' => $form->createView(),
]);
}
27. Action
public function nuovoAction(Request $request)
{
$dto = new GiocatoreDTO();
$form = $this->createForm(GiocatoreType::class, $dto);
if ($form->handleRequest($request)->isValid()) {
$giocatore = new Giocatore();
// ...
$this->getDoctrine()->getManager()->persist($giocatore);
$this->getDoctrine()->getManager()->flush();
return $this->redirectToRoute('giocatori');
}
return $this->render('giocatore/nuovo.html.twig', [
'form' => $form->createView(),
]);
}
28. No more Setters
class Giocatore {
public function __construct(Squadra $squadra, string $nome, int $numero) {
$this->squadra = $squadra;
$this->nome = $nome;
$this->numeroDiMaglia = $numero;
}
// ...
}
29. Action
public function nuovoAction(Request $request) {
$dto = new GiocatoreDTO();
$form = $this->createForm(GiocatoreType::class, $dto);
if ($form->handleRequest($request)->isValid()) {
$giocatore = new Giocatore($dto->squadra, $dto->nome, $dto->numeroDiMaglia);
$this->getDoctrine()->getManager()->persist($giocatore);
$this->getDoctrine()->getManager()->flush();
return $this->redirectToRoute('giocatori');
}
return $this->render('giocatore/nuovo.html.twig', [
'form' => $form->createView(),
]);
}
33. NumeroDiMaglia
class NumeroDimaglia() {
private $numero;
public function __construct(int $numero) {
if ($numero < 0 || $numero > 99) {
throw new DomainException('Il numero deve esere tra 0 e 99');
}
$this->numero = $numero;
}
public function __toString() {
return (string) $this->numero;
}
}
34. Entity con ValueObject
class Giocatore {
/* @ORMEmbedded(class=”NumeroDimaglia”) */
private $numeroDiMaglia;
public function __construct(
Squadra $squadra,
string $nome,
NumeroDiMaglia $numero
) {
$this->squadra = $squadra;
$this->nome = $nome;
$this->numeroDiMaglia = $numero;
}
// ...
}