Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
symfony madrid - directorio betabeers
Search
Betabeers
March 02, 2012
490
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
symfony madrid - directorio betabeers
Betabeers
March 02, 2012
More Decks by Betabeers
See All by Betabeers
Cómo diagnosticar problemas de rendimiento en entornos LAMP @crononito
betabeers
1
150
karmacracy
betabeers
0
130
dogfight
betabeers
0
200
Patrones de diseño y ejemplos prácticos en JAVA @47deg_es
betabeers
0
8.4k
Introducción a REST y ejemplos prácticos con JAVA @47deg_es
betabeers
0
260
Apps móviles, ampliando horizontes
betabeers
0
310
topigames nscoder madrid
betabeers
0
630
AffinityRadar
betabeers
0
190
backbeam
betabeers
0
200
Featured
See All Featured
A Tale of Four Properties
chriscoyier
163
24k
Music & Morning Musume
bryan
48
7.4k
Paper Plane (Part 1)
katiecoart
PRO
2
11k
Into the Great Unknown - MozCon
thekraken
41
2.7k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
510
Designing Powerful Visuals for Engaging Learning
tmiket
1
580
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
440
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.8k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.8k
Being A Developer After 40
akosma
91
590k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
340
Transcript
Directorio Betabeers 5 meses | 613 commits | 2342 redbulls
@miquelcamps
Eduardo Gulias ¡Gracias por los 20 commits!
Estructura - Pajas mentales con symfony - Entorno de trabajo,
Bundles, Bloques, integración bootstrap.io - Chapuzas - Métricas - Gamificación - Capturas backoffice - Cosas por hacer
¿Por qué symfony? - Lo conocí en la php conference
barcelona - No tenía experiencia con frameworks - Proyectos ya lo usan en producción producción (ulabox,facultia) - Comunidad - Documentación
Lo que me gusta 1- Actualización de tablas app/console doctrine:schema:update
--force 2- Generador app/console generate:bundle 3- Estructura de ficheros 4- Twig y los bloques 5- Comunidad
No me gusta 1- Tamaño 2- Error al editar un
controlador
php app/console cache:clear
None
Entorno de trabajo local --> github --> producción
Entorno de trabajo 1- local (mac + mamp + sublimetext2
+ redbull) 2- commit github (github client mac) http://github.com/miquelcamps/directoriopro 3- pull servidor dedicado kemsirve.es (linux ubuntu) Comando mágico git pull;rm -rf app/cache/prod/;mkdir app/cache/prod;chmod 777 app/cache/prod
Bundles De terceros Pagerfanta de Pablo Díez @pablodip https://github.com/whiteoctober/Pagerfanta Propios
Anuncios User Event Place Test Api City Project
Bloques Layout /AnunciosBundle/Resources/views/layout.html.twig <html> <head> <title>{% block title %}{% endblock
%} - {{sitename}}</title> {% if canonical_url is defined %}<link rel="canonical" href="{{ canonical_url }}"/>{% endif %} </head> <body> <!--header--> {% block content %}{% endblock %} {% block sidebar %}{% endblock %} <!--footer--> {% block load_src %}{% endblock %} {% block script_load %}{% endblock %} </body> </html>
Bloques sección /AnunciosBundle/Resources/views/Post/index.html.twig {% extends "ApplicationAnunciosBundle::layout.html.twig" %} {% block title
"Bolsa de empleo 2.0" %} {% block sidebar %}bla bla{% endblock %} {% block content %}bla bla{% endblock %} {% block load_src %}bla bla{% endblock %} {% block script_load %}bla bla{% endblock %}
Integración bootstrap.io Estáticos /web/ -> ficheros Template layout /AnunciosBundle/Resources/views/layout.html.twig Template
form /AnunciosBundle/Resources/views/Form/fields.html.twig /AnunciosBundle/Resources/views/Post/new.html.twig
Integrar bootstrap.io en formularios $form = $this->createForm(new LoginType(), $entity); $form['pass']->addError(
new SymfonyForm\FormError( "La contraseña no es correcta" ));
Integrar bootstrap.io en formularios {% form_theme form 'ApplicationAnunciosBundle:Form:fields.html.twig' %} <form
class="form-horizontal" action="x" method="post" > {{ form_row(form.email, { 'label': 'Email' }) }} <div class="form-actions"> <button type="submit" class="btn btn-primary">Crear cuenta</button> </div> {{ form_row(form._token) }} </form>
Chapuzas - facebook connect No he podido hacer funcionar FOS
(friends of symfony) 1- login facebook fbloginAction() /src/Application/UserBundle/ 2- se require del ejemplo de facebook /vendor/facebook/example.php https://github.com/facebook/php-sdk
Chapuzas - URLs bonitas /post/86/show --> /post/esto-es-una-prueba-9/ urls en twig
{{ path('post_show', { 'id': entity.id, 'slug': entity.slug }) }} controller action 1 @Route("/{id}/show", name="post_show2") $this->redirect($this->generateUrl('post_show', array('id' => $entity->getID(), 'slug' => $entity->getSlug() )),301); controller action 2 @Route("/{slug}-{id}/", requirements={"slug" = "[a-z0-9\-]+", "id" = "^\d+$"}, name="post_show") layout {% if canonical_url is defined %} <link rel="canonical" href="{{ canonical_url }}"/> {% endif %}
Métricas Contabilizar visitas $session = $this->getRequest()->getSession(); $session_id = $session->get('id'); if(
$session_id != $entity->getUserId() ){ $entity->setVisits( $entity->getVisits() + 1 ); $em->persist($entity); $em->flush(); } Geolocalización geonames.org (country_id, city_id) Dashboard (totales generales) Google Analytics analizar que busca el usuario https://support.google.com/analytics/bin/answer.py?hl=es&answer=1012264
Gamificación Captar nuevos usuarios
Gamificación
Gamificación
Gamificación Obligar el usuario a rellenar perfil
Dashboard
Backoffice anuncios
Backoffice usuarios
Cosas por hacer... - Optimizar queries (likes) y cacheo -
Internacionalización - Hacer autoescalable mover a phpfog - Mejorar seo (sitemaps, urls bonitas)
Megacracks de symfony @egulias @raulfraile @nacmartin @ricardclau @Osukaru80 @moisesgallego
¡Gracias! Posts de como empezar: http://miquelcamps.com/symfony/ Repositorio betabeers: http://github.com/miquelcamps/directoriopro Twitter
@miquelcamps