Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
symfony madrid - directorio betabeers
Search
Betabeers
March 02, 2012
470
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
140
karmacracy
betabeers
0
130
dogfight
betabeers
0
190
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
250
Apps móviles, ampliando horizontes
betabeers
0
300
topigames nscoder madrid
betabeers
0
620
AffinityRadar
betabeers
0
190
backbeam
betabeers
0
190
Featured
See All Featured
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.3k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
180
Music & Morning Musume
bryan
47
7.2k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
Making the Leap to Tech Lead
cromwellryan
135
9.9k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
400
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
170
Evolving SEO for Evolving Search Engines
ryanjones
0
220
YesSQL, Process and Tooling at Scale
rocio
174
15k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
250
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
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