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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
120k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
200
A designer walks into a library…
pauljervisheath
211
24k
BBQ
matthewcrist
89
10k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
220
Faster Mobile Websites
deanohume
310
31k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
430
Leo the Paperboy
mayatellez
7
1.8k
Automating Front-end Workflow
addyosmani
1370
210k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.1k
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