Drupal 與 Laravel

Laravel Drupal
Laravel Logo 圖片來源:https://github.com/laravel/art/blob/master/laravel-l-slant.png Drupal Logo 圖片來源:https://www.drupal.org/about/media-kit/logos

在爬文章的時候看到一則是討論 Drupal 8 與 Laravel-Drupal Vs. Laravel,看到當天晚上就把一些想法發表回應到文章下面,可是作者遲遲還沒有允許張貼,這幾天一樣跑去看那篇文章看,還是沒被公開發佈,就先把回應寫在自己的部落格上。(現在,作者已經公布了)


Berfore starting to build and develop Drupal sites for over 1 year, I use Laravel framework. I think in some website types, eg. media and content, Drupal is more suitable. Because, in Drupal 7/8, the ImageStyle is powerful, it can process different image size for different device screens. Especially, in Drupal 8, the cache system allows to control the cache of page easily and flexible.

In the beginning of developing Drupal 7, I cannot accept and realize the configurations are in database. Although, the features module can help export the configs into code. Sometimes, when deploying into production or stage site, the exported features may break or encounter the different tid. In Laravel, all configs are in code. When deploying, developers only pull the branch and set the config values into environment variables.

Sometimes, I hate to take much time to work on the customized displays or modifying forms in Drupal, since in Laravel or others development, I only need to change HTML or blade. In Drupal, I should implement hook functions to alter rener array or Form API.

BTW, I prefer Drupal 8, due to OO design, new config management, service container, plugins system, event listener, routing and so on. They provides more structural ways to maintain and develop.

繼續閱讀 “Drupal 與 Laravel”