El objetivo de esta charla es mostrar cómo aplicar buenas prácticas de desarrollo cuando trabajemos con WordPress, implementando PSRs y desacoplando nuestro código para poder migrarlo en un futuro a otras opciones sin esfuerzo y dotarle de una buena cobertura de tests.
Veremos cómo podemos desarrollar y mantener plataformas basadas en WordPress utilizando cosas como inyección de dependencias, rutas en anotaciones y controladores; cómo utilizar composer para plugins, themes y sus dependencias; cómo montar los despliegues y qué opciones tenemos para utilizar WordPress desde nuestros Bundes.
Building a REST Service in minutes with Spring BootOmri Spector
A walk through building a micro service using Spring Boot.
Deck presented at Java 2016
Source accompanying presentation can be found at https://github.com/ospector/sbdemo
Slide deck from my talk at the London Salesforce Developers March meetup on using the Salesforce CLI to retrieve and deploy metadata, run tests, retrieve and update data and create metadata.
Getting started with Next.js - IM Tech Meetup - Oct 2022.pptxIlesh Mistry
The October 2022 IM Tech Meetup was about Next.js.
This presentation was about Getting started with Next.js.
Web development framework created by Vercel
Open-source
Is a React framework that gives you building blocks to create websites and applications
As it’s highly connected to Vercel there is a smooth deployment platform with it
Acts as a wrapper around the benefits of React and bridges the gap for the browser. As typically React is client side, Next.js helps to pre-render content.
One of the most recognised and widely used development frameworks by the community
Big brands like TikTok, Nike, Notion, Nintendo etc… are using it
Seems like the ‘go to’ item in the tech stack, especially for front-end developers
Evolving pretty fast in the market and becoming a strong leader
Next/image - Image optimisation and others
It’s better for SEO as your HTML is pre-loaded compared to standard reach app
Building a REST Service in minutes with Spring BootOmri Spector
A walk through building a micro service using Spring Boot.
Deck presented at Java 2016
Source accompanying presentation can be found at https://github.com/ospector/sbdemo
Slide deck from my talk at the London Salesforce Developers March meetup on using the Salesforce CLI to retrieve and deploy metadata, run tests, retrieve and update data and create metadata.
Getting started with Next.js - IM Tech Meetup - Oct 2022.pptxIlesh Mistry
The October 2022 IM Tech Meetup was about Next.js.
This presentation was about Getting started with Next.js.
Web development framework created by Vercel
Open-source
Is a React framework that gives you building blocks to create websites and applications
As it’s highly connected to Vercel there is a smooth deployment platform with it
Acts as a wrapper around the benefits of React and bridges the gap for the browser. As typically React is client side, Next.js helps to pre-render content.
One of the most recognised and widely used development frameworks by the community
Big brands like TikTok, Nike, Notion, Nintendo etc… are using it
Seems like the ‘go to’ item in the tech stack, especially for front-end developers
Evolving pretty fast in the market and becoming a strong leader
Next/image - Image optimisation and others
It’s better for SEO as your HTML is pre-loaded compared to standard reach app
The State of Pagination & Infinite Scroll - BrightonSEO April 2019 - Adam GentDeepCrawl
The State of Pagination and Infinite Scroll on the Web by Adam Gent
A deep dive into the current implementations of pagination and infinite scroll across the web, and how sites can achieve technical excellence when creating a paginated series on mobile and desktop websites.
IA Event - Chat GPT-4 : La révolution du SEO On-Site.pdfLéa PICOSSON
Une conférence avec des astuces pour utiliser Chat GPT-4 afin de résoudre des problématiques de SEO On-site telle que la duplication de contenu, le maillage interne, etc.
Des pistes pour aller plus loin et des ressources sont également livrées dans ces slides.
Developing Microservices with Apache CamelClaus Ibsen
Red Hat Microservices Architecture Day - New York, November 2015. Presented by Claus Ibsen.
Apache Camel is a very popular integration library that works very well with microservice architecture. This talk introduces you to Apache Camel and how you can easily get started with Camel on your computer. Then we cover how to create new Camel projects from scratch as microservices, which you can boot using Camel or Spring Boot, or other micro containers such as Jetty or fat JARs. We then take a look at what options you have for monitoring and managing your Camel microservices using tooling such as Jolokia, and hawtio web console.
Como Utilizar a Intenção de Busca para Dominar o Google DiscoverFelipe Bazon
Como conduzir milhares de visitas do Google Discover usando o Google Web Stories e outras técnicas que você só aprenderá se assistir a esta palestra. Com estudos de casos comprovados e resultados validados.
Cloud adoption fails - 5 ways deployments go wrong and 5 solutionsYevgeniy Brikman
"All happy cloud deployments are alike; each unhappy cloud deployment is unhappy in its own way." — Leo Tolstoy, Site Reliability Engineer
At Gruntwork, I've had the chance to see the cloud adoption journeys of hundreds of companies, from tiny startups to Fortune 50 giants. I've seen those journeys go well. I've seen those journeys go poorly. In this talk, I discuss a few of the ways cloud adoption can go horribly wrong (massive cost overruns, endless death marches, security disasters), and more importantly, how you can get it right.
To help you get it right, we looked at the cloud journeys that were successful and extracted from them the patterns they had in common. We distilled all this experience down into something called the Gruntwork Production Framework, which defines five concrete steps you can follow to adopt the cloud at your own company—and hopefully, to end up with your very own happy cloud deployment.
Laravel, längst kein unbestriebenes Blatt mehr, gewinnt immer mehr an Popularität.
In diesem Vortrag wir Laravel kurz vorgestellt mit Themen wie:
- Was ist Laravel?
- Woher kommt Laravel?
- Was bietet Laravel?
- Laravel und sein Ecosystem.
und einiges mehr...
Building an SEO Exponential Growth model by closing your content gapsRazvan Gavrilas
Content Gap Analysis, Keyword Research & Content Optimization for SEO is one of the most powerful techniques to achieve continuous SEO growth. It will allow you to discover new opportunities & optimize to achieve top rankings in Google for both existing & new content. BrightonSEO April 2019.
Next.js vs React | what to choose for frontend development_ForceBolt
Vercel built the Next.js framework. It's free and open-source, built on Node.js and Babel, and it works with React to create single-page apps. This simplifies server-side rendering.
Symfony Guard Authentication: Fun with API Token, Social Login, JWT and moreRyan Weaver
There are so many interesting ways to authenticate a user: via an API token, social login, a traditional HTML form or anything else you can dream up.
But until now, creating a custom authentication system in Symfony has meant a lot of files and a lot of complexity.
Introducing Guard: a simple, but expandable authentication system built on top of Symfony's security component. Want to authenticate via an API token? Great - that's just one class. Social login? Easy! Have some crazy legacy central authentication system? In this talk, we'll show you how you'd implement any of these in your application today.
Don't get me wrong - you'll still need to do some work. But finally, the path will be clear and joyful.
Refactorizando Pccomponentes.com con SymfonyMario Marín
Partimos de un reto: cómo cambiar una web con millones de visitas, con un entorno en constante cambio, con una deuda técnica crítica y un equipo aumentando en número, en procesos para la generación de software de manera automatizada, documentada, probada y coordinada para la consecución de nuestras metas.
En esta charla se presenta el caso práctico de la implantación de Symfony como pieza fundamental del puzzle y la integración continua como camino a seguir. Pruebas, integración, bundles, bases de datos, rendimiento... Aspectos claves para la consecución de nuestros objetivos.
The State of Pagination & Infinite Scroll - BrightonSEO April 2019 - Adam GentDeepCrawl
The State of Pagination and Infinite Scroll on the Web by Adam Gent
A deep dive into the current implementations of pagination and infinite scroll across the web, and how sites can achieve technical excellence when creating a paginated series on mobile and desktop websites.
IA Event - Chat GPT-4 : La révolution du SEO On-Site.pdfLéa PICOSSON
Une conférence avec des astuces pour utiliser Chat GPT-4 afin de résoudre des problématiques de SEO On-site telle que la duplication de contenu, le maillage interne, etc.
Des pistes pour aller plus loin et des ressources sont également livrées dans ces slides.
Developing Microservices with Apache CamelClaus Ibsen
Red Hat Microservices Architecture Day - New York, November 2015. Presented by Claus Ibsen.
Apache Camel is a very popular integration library that works very well with microservice architecture. This talk introduces you to Apache Camel and how you can easily get started with Camel on your computer. Then we cover how to create new Camel projects from scratch as microservices, which you can boot using Camel or Spring Boot, or other micro containers such as Jetty or fat JARs. We then take a look at what options you have for monitoring and managing your Camel microservices using tooling such as Jolokia, and hawtio web console.
Como Utilizar a Intenção de Busca para Dominar o Google DiscoverFelipe Bazon
Como conduzir milhares de visitas do Google Discover usando o Google Web Stories e outras técnicas que você só aprenderá se assistir a esta palestra. Com estudos de casos comprovados e resultados validados.
Cloud adoption fails - 5 ways deployments go wrong and 5 solutionsYevgeniy Brikman
"All happy cloud deployments are alike; each unhappy cloud deployment is unhappy in its own way." — Leo Tolstoy, Site Reliability Engineer
At Gruntwork, I've had the chance to see the cloud adoption journeys of hundreds of companies, from tiny startups to Fortune 50 giants. I've seen those journeys go well. I've seen those journeys go poorly. In this talk, I discuss a few of the ways cloud adoption can go horribly wrong (massive cost overruns, endless death marches, security disasters), and more importantly, how you can get it right.
To help you get it right, we looked at the cloud journeys that were successful and extracted from them the patterns they had in common. We distilled all this experience down into something called the Gruntwork Production Framework, which defines five concrete steps you can follow to adopt the cloud at your own company—and hopefully, to end up with your very own happy cloud deployment.
Laravel, längst kein unbestriebenes Blatt mehr, gewinnt immer mehr an Popularität.
In diesem Vortrag wir Laravel kurz vorgestellt mit Themen wie:
- Was ist Laravel?
- Woher kommt Laravel?
- Was bietet Laravel?
- Laravel und sein Ecosystem.
und einiges mehr...
Building an SEO Exponential Growth model by closing your content gapsRazvan Gavrilas
Content Gap Analysis, Keyword Research & Content Optimization for SEO is one of the most powerful techniques to achieve continuous SEO growth. It will allow you to discover new opportunities & optimize to achieve top rankings in Google for both existing & new content. BrightonSEO April 2019.
Next.js vs React | what to choose for frontend development_ForceBolt
Vercel built the Next.js framework. It's free and open-source, built on Node.js and Babel, and it works with React to create single-page apps. This simplifies server-side rendering.
Symfony Guard Authentication: Fun with API Token, Social Login, JWT and moreRyan Weaver
There are so many interesting ways to authenticate a user: via an API token, social login, a traditional HTML form or anything else you can dream up.
But until now, creating a custom authentication system in Symfony has meant a lot of files and a lot of complexity.
Introducing Guard: a simple, but expandable authentication system built on top of Symfony's security component. Want to authenticate via an API token? Great - that's just one class. Social login? Easy! Have some crazy legacy central authentication system? In this talk, we'll show you how you'd implement any of these in your application today.
Don't get me wrong - you'll still need to do some work. But finally, the path will be clear and joyful.
Refactorizando Pccomponentes.com con SymfonyMario Marín
Partimos de un reto: cómo cambiar una web con millones de visitas, con un entorno en constante cambio, con una deuda técnica crítica y un equipo aumentando en número, en procesos para la generación de software de manera automatizada, documentada, probada y coordinada para la consecución de nuestras metas.
En esta charla se presenta el caso práctico de la implantación de Symfony como pieza fundamental del puzzle y la integración continua como camino a seguir. Pruebas, integración, bundles, bases de datos, rendimiento... Aspectos claves para la consecución de nuestros objetivos.
There are so many interesting ways to authenticate a user: via an API token, social login, a traditional HTML form or anything else you can dream up. But until now, creating a custom authentication system in Symfony has meant a lot of files and a lot of complexity. Introducing Guard: a simple, but expandable authentication system built on top of the security component and introduced in Symfony 2.8. Want to authenticate via an API token? Great - that's just one class. Social login? Easy! Have some crazy legacy central authentication system? In this talk, we'll show you how you'd implement any of these in your application today. Don't get me wrong - you'll still need to do some work. But finally, the path will be clear and joyful.
Before Symfony was spelled with a capital “S” there was another symfony, the first version of the framework. It already meant a lot to me at the time. But with the arrival of Symfony 2 it became clear that something very important was happening in the world of PHP programming. It appears that this framework is able to turn amateur website makers (like I used to be) into actual software developers. What is the secret? What makes Symfony so special? And why am I still hooked?
We’ll look at pieces of code, the Symfony ecosystem, the people behind it, the things that have been written about it, and the experience that I have with it. We’ll take a trip down memory lane, collecting pieces for our Symfony scrapbook, while we try to construct an answer to these questions.
Integrando React.js en aplicaciones Symfony (deSymfony 2016)Ignacio Martín
Introducción a React.js + técnicas y conceptos útiles, como aplicaciones universales (isomórficas) o cómo usar json schema para facilitarnos la vida al trabajar con formularios.
Keeping the frontend under control with Symfony and WebpackIgnacio Martín
Webpack tutorial with tips for Symfony users. Topics covered include: current frontend trends, setup, loaders, dev tools, optimization in production, bundle splitting and tips and tricks for using webpack with existing projects.
Symfony Munich Meetup 2016.
Symfony: Your Next Microframework (SymfonyCon 2015)Ryan Weaver
Microservices are a huge trend, and microframeworks are perfect for them: put together just a few files, write some code, and your done!
But Symfony is a big framework, right? Wrong! Symfony can be as small as a single file!
In this talk, we'll learn how to use Symfony as a micro-framework for your next project. Your app will stay small and clear, but without needing to give up the features or third-party bundles that you love. And if the project grows, it can evolve naturally into a full Symfony project.
So yes, Symfony can also be a microframework. Tell the world!
Finally, Professional Frontend Dev with ReactJS, WebPack & Symfony (Symfony C...Ryan Weaver
If you're like me, you know that being a great backend developer isn't enough. To make *truly* great applications, we need to spend significant time in an area that's moving at a lightning pace: frontend development.
This talk is for you: the backend developer that wants to hook their API's up to rich, interactive JavaScript frontends. To do that, first, we need to demystify a lot of new terms, like ES6/ES2015, ECMAScript, JSX, Babel and the idea that modern JavaScript (surprise) *requires* a build step.
With this in mind, I'll give you a brief introduction into Webpack & the modular development it finally allows.
But the real star is ReactJS. In the frontend world, you never know what new tech will *win*, but React is a star. I'll give you enough of an intro to get you rolling on your project.
The new frontend dev world is huge! Consider the starting line down an exciting new journey.
Introduction to React in combination with Redux. Redux helps you to develop applications in a simple way while having features like time-travel available during development.
Integrating React.js Into a PHP ApplicationAndrew Rota
React.js has taken the web development world by storm, and for good reason: React offers a declarative, component-oriented approach to building highly-scalable web UIs. But how can we take advantage of a JavaScript library like React in our server-side PHP applications. In this talk l cover the different ways React.js can be integrated into an existing PHP web application: from a client-side only approach to multiple techniques that support full server-side rendering with a Node.js server or PHP’s v8js. I also discuss the trade-offs in each of these designs and the challenges involved with adding React to a PHP site. Most importantly, I consider the higher-level issue of how to improve view cohesion across the client-server divide in a PHP application.
Explanation of the fundamentals of Redux with additional tips and good practices. Presented in the Munich React Native Meetup, so the sample code is using React Native. Additional code: https://github.com/nacmartin/ReduxIntro
Sobreescritura y extensión de validaciones, formularios y entidadesdualhand
Después de estar trabajando casi dos años en el desarrollo de un conjunto de librerías (o core) que debían compartir el resto de proyectos de clientes de una agencia de publicidad, hemos aprendido muchas cosas de cómo hacer los third-party bundles extensibles y heredables permitiendo adaptarse a todo tipo de proyectos.
En la charla explicaremos estrategias y mecanismos que ofrecen Symfony y Doctrine para conseguir sobreescribir las validaciones y formularios o extender las entidades de Doctrine, como son relaciones mediante interfaces, Load Class Metada event, mapped superclass, Doctrine ORM compiler pass y disciminator map. Todo ello acompañado de ejemplos prácticos.
Por Germán Figna (@gerfigna) y Alfonso Machado (@almacbe)
Cucumber sucks. Features are hard to write and constantly break when the UI changes. Step definitions are annoying to create and a freaking nightmare to maintain. And Cucumber suites take for-EVER to run, because you have to wait for a web browser.
Except... [almost] none of that is actually true.
After years of making awful messes with Cucumber, I finally found a way to use it that worked well, and a project I couldn't have done without it. I'd like to show you one way to use Cucumber that can be elegant, powerful, expressive, and—believe it or not—fast.
The e-commerce is one of the main points of modern software. The e-commerce sector is growing about 15% annually, which is why it deserves special attention from software engineers. Speaking of e-commerce and open source at once is not easy. For many years we have identified the concept with pain and despair, so we must work urgently to change the way we understand it should be. What are the important points to consider? Where do we find the line between architecture and pragmatism? Are we walking in the right direction? How can Symfony help in this?
Por diversas causas, nos podemos encontrar con el reto de desarrollar plataformas y servicios online que requieren escalabilidad pero que también estén basados Wordpress.
Más allá de instalar plugins o modificar themes desde el backoffice, requerimos trabajar con Wordpress como si fuese un framework tipo Symfony o Laravel, algo para lo que este CMS no está diseñado.
En esta charla veremos qué problemáticas tiene enfrentarse al reto de crear código mantenible con Wordpress, usando patrones como la inyección de dependencias, soluciones como composer y herramientas que estamos acostumbrados a encontrar no en una solución de CMS, sino en frameworks, más adecuados para esta tarea.
Customizer: configurando un sitio en tiempo realwpargentina
Customizer está siendo fuertemente impulsado no sólo dentro de wordpress.org, sino que hay mucho trabajo independiente en torno. Compañías como Obox han creado un theme que extiende en gran manera sus capacidades, convirtiéndolo en un constructor de sitios muy flexible. Otras como Themify emplean Customizer únicamente con controles propios que tienen mayores capacidades que los estándares.
Para usuarios finales, esto significa una mayor facilidad al configurar el sitio en una interface que muestra directamente el tema aplicado, con la chance de cambiarlo y aplicarlo instantáneamente, y configurar apariencia y hasta opciones en tiempo real apreciando cada cambio.
El taller practico y la documentación usada la encuentran en leninmhs.wordpress.com
Presentación que acompaño a taller practico del framework de desarrollo web de PHP5 YII, con postgreSQL como manejador de bases de datos y sobre s.o Canaima, en la 5ta Jornastec del 2011.
Código fuente y demás recursos del taller en: http://leninmhs.wordpress.com/2011/10/18/v-jornastec-taller-yii-framework/
Cómo hacer llamadas AJAX correctamente en Wordpress y cómo llamar tus ficheros javascript en el template con ejemplos. Dentro de las sesiones de formación de Artvisual del 2012
Silex, desarrollo web ágil y profesional con PHPJavier Eguiluz
Silex es el microframework de moda en el mundo PHP. Silex te permite desarrollar aplicaciones web profesionales con una agilidad sin precedentes. Su aprendizaje es tan rápido y sencillo que podrás dominarlo en menos de una hora.
Introducción al microframework basado en Symfony 2 de PHP Silex por Sergio Gómez en el IV Betabeers Córdoba http://betabeers.com/event/4-betabeers-cordoba-626/
Los hooks son parte esencial en la programación con WordPress, y que cada desarrollador llegado el momento, tiene que afrontar su comprensión y buen uso para crear mejores temas o plugins.
Con los hooks podemos modificar o añadir funcionalidades personalizadas a cualquier evento de WordPress sin modificar su código fuente.
En esta ponencia vamos a introducir a cualquiera que desarrolle con WordPress, o pretenda mejorar sus conocimientos, al uso de hooks (o ganchos). Aprenderemos para qué sirven, cómo se usan, con ejemplos prácticos y algo de código.
Similar a Desarrollo código mantenible en WordPress utilizando Symfony (20)
Charla para el evento Sevilla Mobility Day.
Desde hace pocos años, desarrollar sitios y aplicaciones web aplicando diseños responsive ha dejado de ser opcional.
Para dispositivos móviles, empieza a ser necesario ir más allá y crear experiencias de usuario dedicadas a estos entornos.
Presentación de la plataforma abierta Ubiqarama.orgAsier Marqués
Ubiqarama nace como una plataforma abierta, instalable como theme para Wordpress, que permite documentar y narrar sobre mapas historias en formato digital.
En est
Repasaremos conceptos y principios para que una arquitectura sea RESTfull, se explicará cómo se ha plateado el framework Leophard para seguir estos y otros principios.
Proyectos fallidos: Rooms.fm en #webdevbilbaoAsier Marqués
Charla sobre proyectos fallidos en el evento webdevbilbao.
Comenté la experiencia construyendo rooms.fm un sitio web similar a airbnb.com que nunca vió la luz.
(PROYECTO) Límites entre el Arte, los Medios de Comunicación y la Informáticavazquezgarciajesusma
En este proyecto de investigación nos adentraremos en el fascinante mundo de la intersección entre el arte y los medios de comunicación en el campo de la informática.
La rápida evolución de la tecnología ha llevado a una fusión cada vez más estrecha entre el arte y los medios digitales, generando nuevas formas de expresión y comunicación.
Continuando con el desarrollo de nuestro proyecto haremos uso del método inductivo porque organizamos nuestra investigación a la particular a lo general. El diseño metodológico del trabajo es no experimental y transversal ya que no existe manipulación deliberada de las variables ni de la situación, si no que se observa los fundamental y como se dan en su contestó natural para después analizarlos.
El diseño es transversal porque los datos se recolectan en un solo momento y su propósito es describir variables y analizar su interrelación, solo se desea saber la incidencia y el valor de uno o más variables, el diseño será descriptivo porque se requiere establecer relación entre dos o más de estás.
Mediante una encuesta recopilamos la información de este proyecto los alumnos tengan conocimiento de la evolución del arte y los medios de comunicación en la información y su importancia para la institución.
3Redu: Responsabilidad, Resiliencia y Respetocdraco
¡Hola! Somos 3Redu, conformados por Juan Camilo y Cristian. Entendemos las dificultades que enfrentan muchos estudiantes al tratar de comprender conceptos matemáticos. Nuestro objetivo es brindar una solución inclusiva y accesible para todos.
(PROYECTO) Límites entre el Arte, los Medios de Comunicación y la Informáticavazquezgarciajesusma
En este proyecto de investigación nos adentraremos en el fascinante mundo de la intersección entre el arte y los medios de comunicación en el campo de la informática.
La rápida evolución de la tecnología ha llevado a una fusión cada vez más estrecha entre el arte y los medios digitales, generando nuevas formas de expresión y comunicación.
Continuando con el desarrollo de nuestro proyecto haremos uso del método inductivo porque organizamos nuestra investigación a la particular a lo general. El diseño metodológico del trabajo es no experimental y transversal ya que no existe manipulación deliberada de las variables ni de la situación, si no que se observa los fundamental y como se dan en su contestó natural para después analizarlos.
El diseño es transversal porque los datos se recolectan en un solo momento y su propósito es describir variables y analizar su interrelación, solo se desea saber la incidencia y el valor de uno o más variables, el diseño será descriptivo porque se requiere establecer relación entre dos o más de estás.
Mediante una encuesta recopilamos la información de este proyecto los alumnos tengan conocimiento de la evolución del arte y los medios de comunicación en la información y su importancia para la institución.
Actualmente, y debido al desarrollo tecnológico de campos como la informática y la electrónica, la mayoría de las bases de datos están en formato digital, siendo este un componente electrónico, por tanto se ha desarrollado y se ofrece un amplio rango de soluciones al problema del almacenamiento de datos.
6. WtfPress hell
— HTTP vs WP_Query
— Hooks oriented development
— Dependencias (plugins) delegadas en el
usuario
— Ausencia de aplicación de PSRs
— No se utiliza Composer
15. Cómo mejorarlo
— Composer
— Injección de dependencias
— Mejor gestión de rutas
— Eliminar lógica de negocio en templates
— MVC
— Sin romper compatibilidad
18. Inyección de dependencias
$container = new ContainerBuilder();
$loader = new YamlFileLoader($container,
new FileLocator([__DIR__ . "/Config"]));
$loader->load('services.yml');
19. Nuestro controller
class MiControlador {
/**
* Route("/custom-path/{method}", name="mi_ruta");
*/
function miAccion(Request $request)
{
return 'template.php';
}
}
20. Anotación de ruta
/**
* @Annotation
* @Target({"PROPERTY"})
*/
class Route{
/** @var string */
public $path;
/** @var string */
public $name;
function __construct( $data=[] ){
if (isset($data['value'])) {
$data['path'] = $data['value'];
unset($data['value']);
}
}
}
21. Recopilando las rutas
$routes = [];
AnnotationRegistry::registerFile( __DIR__ . "/Annotations/Route.php" );
$reflClass = new ReflectionClass("MiControlador.php");
foreach($reflClass->getMethods() as $method) {
$classAnnotations = $reader->getMethodAnnotations($method);
foreach ($classAnnotations as $route) {
$routes[$route->name] = $route;
}
}
24. ¿Twig?
Una de las formas de hacerlo (ejemplo simplificado)
add_filter( 'template_include', function ( $template ) use ($container) {
if ( $template = $container->get("wp_query")->query_vars["twig.template"] ) {
$twig = $container->get("twig");
$twig->render( $template );
// gestionar el response y terminar ejecución
}
return $template;
}
30. Estructura de directorios con Composer
Gestionados por composer
— public/_wordpress/
— public/wp-content/
— vendor/
Punto de entrada y configuración
— public/index.php
— public/wp-config.php
38. Conclusiones
— Se puede crear buen código en WordPress
sin estar acoplado
— Se puede iniciar un proyecto en
WordPress y migrar a Symfony después
— Se pueden integrar ambas plataformas