Integrate an existing Symfony2 application with Drupal 7? - drupal

The future development of my symfony2 project
( which is actually more or less a static website with an authentification system )
would be to provide authentified users a CMS to easily edit text and images / import files / create pages / give acces to their pages as the website grows and evolves.
I have been thinking implementing my project with Drupal would be way forward .
how can i proceed ?
Is doing the reverse better?
what are other options?

I am not sure what you mean by 'the reverse', but there is a Symfony module available for D7. I would suggest setting up a Drupal test bed and seeing about integrating your site into drupal.
It is my understanding that Symfony2 has gone into core in D8, but D8 is probably a long way from initial release.

Related

How does static site generator work with a CMS like wordpress

I have been exploring using Vue for wordpress frontend, and I came across so many different technologies, like Nuxt.js, Gridsome, VuePress, and they help to create sites into SPA, SSR, or static sites. I really like these ideas, because I want to move into modern frontends instead of using the WordPress default. So I am looking into headless WordPress.
After some research, I think I kind of like Gridsome with Wordpress, as Gridsome helps to build static site by compiling content from CMS and templates at build time.
So I have a very newbie question, CMS like wordpress gets updated everyday by users, to update pages, add new posts etc, does that mean you need to build the site every time people add some content to the CMS?
I'm going to build a sort of internal portal, with WordPress and I want to try out Vue, so with all these technologies out there, I am lost at what framework best suit my project with dynamic content.
Any suggestions or insights? Thanks.
So I have a very newbie question, CMS like wordpress gets updated everyday by > users, to update pages, add new posts etc, does that mean you need to build the > site every time people add some content to the CMS?
Yes that's the concept of a statically generated site.
Still it's a choice of how you design your application.
Normally when a new post is created there can be an event / webhook triggering a build job which would automatically build and deploy the page with the latest post.
Still you can have in your deployed application client side Vue components which call the API directly to retrieve data and display it. For example for the comments it could make sense to do this.
Netlify is a good example which has the whole static site generation eased up with a nice CI / CD which can be triggered automatically as soon as your site. They also have a CMS which works on top of markdown files. As soon as a changed / new markdown file is commited to the repository it triggers a build to deploy the latest version of the page.
I hope this helps.
Thanks and best regards,
ewatch

Integrate Drupal in Yii

I'm developing a web application in Yii (1.1 & 2.0), now the client wants to integrate WordPress in it so he can manage contents on his own.
So how can I integrate Drupal in Yii and how advanced they are?
Both Drupal and Wordpress are CMS, while Yii is a generic web application framework. You can't integrate Drupal or Wordpress in Yii, that does not make much sense and will probably cause issues. Yii likely expect your application to be structured in a particular way, and neither Drupal or Wordpress will comply with that. What is doable, is to have a Wordpress or Drupal site used for content management but not actually used to display the content to the end user. And Have a Yii application query them via an HTTP based API.
For Drupal, this is doable using the Services module.
It actually depends on what your client exactly needs.
Yii and Wordpress can be integrated in two ways (workflows) :
Wordpress under Yii (as an application).
This comprehensive guide goes through it.
Yii to power a plugin under wordpress.
You have no constraints here as wordpress is pretty flexible, you will just need to properly include Yii as you would include any other script when coding a Wordpress plugin.
As far as I understood, your are in the first scenario.

Migrate wordpress to drupal

I want to migrate my wordpress site to drupal. With my broken wordpress site, I only have access to the mysql database. i.e, no wp-admin backend access. Is there any way to migrate the site just by using the db dump?
It is possible to migrate WordPress to Drupal 8 with the WordPress database.
You need to install Wp Migrate module
For that, and You need migration tools module and migrate plus module along with the core migration module.
For more information refer the below links.
https://dev.acquia.com/blog/wordpress-drupal-8-migration
https://github.com/amitgoyal/d8_migrate_wordpress
If you have access to exporting the wordpress site, there is a module for the migration called WordPress Migrate.
wordpress_migrate supports migrating WordPress blog exports (WXR format) into Drupal using the Migrate module. Import of posts, pages, comments, attachments, tags and categories is supported. Imports can be rolled back completely.
But, as you say that you don't have access to export, then probably you'll have to put in some (coding) effort in implementing it via the Migrate module itself.
The migrate module provides a flexible framework for migrating content into Drupal from other sources (e.g., when converting a web site from another CMS to Drupal). Out-of-the-box, support for creating core Drupal objects such as nodes, users, files, terms, and comments are included - it can easily be extended for migrating other kinds of content. Content is imported and rolled back using a bundled web interface (Migrate UI module) or included Drush commands (strongly recommended).
It seems difficult in the beginning, however there is an extensive documentation which guides you through the process.

Dynamic linking to Wordpress database

I intend to use WP to setup a freelancers website (similar to oDesk) to connect service providers with service seekers in a WEB 2.0 dynamic environment. This site requires multiple forms to enter and retrieve information using database and show them in filtered or non-filtered views in separate pages.
Please advise if there are available plugins to expedite developing this site, or otherwise any guidance would be appreciated. I specifically would like to know how to connect forms to database and then how to retrieve this information from the DB.
Regards,
You are likely going to have to create your own custom WordPress theme, using various custom PHP pages to connect your web forms to your database. I think your project is well beyond the scope of a simple WP plugin.
If this was my project, I'd ditch WordPress and go for something custom built in Rails. WordPress is a good enough CMS, but it isn't really a good fit for what you are looking to accomplish.

Integrate Symfony2 to a Drupal 5 system

We have a 5 years old system built by Drupal 5. It is not a small system (about 50K lines of code), and most of the functionality has nothing to do with 'content management'.
For this reason, we're thinking about integrating Symfony2 to our current system. The ideal is to keep using the current code for current functionality while developing new features with Symfony2. Slowly we'll move more and more pieces of code from Drupal to Symfony.
My question is how do you suggest implementing this? I though about the following approaches:
Create a module in Drupal. This module will contain the Symfony files and will load the class loader of Symfony. Someone has done this before? are there some critical things I should be aware of?
Create a separate installation of Symfony and hopefully create a different vhost record which point to certain pages in the website. As far as I know I can configure vhost to be a sub-host of my current host (e.g. mysymfony.mydrupal.com). But I can't configure it to point to a specific path in the same domain (mydrupal.com/mysymfony.php). is this true? In this approach the performance would be better for those pages that use Symfony, since it won't need the Drupal bootstrap.
Any other suggestions?
Thanks!
Be aware that you'll likely have to upgrade your PHP version on the machine running Drupal if you'd like to run Symfony2 on the same machine (anything under 5.3.8 and the configurator will object). You may also want to hold out for a bit if you want to stick with Drupal - Drupal 8 is integrating Symfony2 components. Also, there exists (in beta form anyhow), a content management framework for Symfony2.
Regarding vhosts, you are correct - you point a vhost to a directory, not a file. You could however create a rewrite rule to redirect to a specific page, if you wanted (check out the .htaccess file included in the web/ directory in a Symfony distribution - by default it redirects requests to app.php).
Because I'm new here I can't have more than two links in a post. I was also going to say:
I would start rewriting core functionality (users, permissions, etc) if none of the existing bundles meet your needs. As well as searching github, you could try knpbundles.com to find bundles that solve similar problems.

Resources