Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symfony as a helper for Wordpress plugin development

I have seen several integrations between wordpress and symfony, but they are made with the goal of managins static pages content inside wordpress and symfony acting as the controller.

Wordpress plugin development api seems really basic and primitive and you have no way o code with the MVC pattern out of the box. So the big question is, what would be an starting point to create plugins in wordpress, and create admin sections in it, but using Symfony power to manage database access, form creation and validation, etc .....

like image 642
Mauricio Lopez Avatar asked Sep 15 '11 21:09

Mauricio Lopez


1 Answers

I had briefly considered a similar approach for integrating Lithium with WordPress, but ran into a great deal of hurdles that made another approach seem more worthwhile: create an MVC framework that was specifically designed to work inside of WordPress.

It's not yet as full-featured as Symfony, Rails, etc, but WP MVC has similar architecture to the major MVC frameworks and should be easy to pick up if you're familiar with them. It ties in directly with existing WordPress functionality. When you create scaffolding for a resource, for example, the code that's created includes an admin controller and admin views (which look similar to WordPress's native index/add/edit views for posts), as well as the appropriate WordPress routing and a public controller and public index/show views to display the resource on the public side, within the active theme.

There's more info on it on its WordPress Plugins page, and its brief tutorial may make it seem less abstract.

like image 124
Tom Avatar answered Nov 03 '22 22:11

Tom