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”


開源的 IndicatorBarView-Android UI 元件


授權:Apache License Version 2.0


這是自己的第一個 Android 開源專案,會建立這一個專案是因為自己的另外一個開源專案要用到數值指針的 UI component (謎之音:那個專案還躺在電腦中…),簡單說有點像溫度計,但是,沒有找到合適的 component。想了之後,先把這個 UI component 先開源出來好了,不過,還有蠻多事情還沒完成的 (請看 TODO),只是開源出來,能逼自己快點把這個專案弄得更成熟,或許也有更厲害的人能貢獻,這樣就自己不用寫太多了 (誤)


如果去看 commit log 的話,會發現從 2016 年 08 月底就在動了,過了半年才有個雛形 (都已經從 Android 7.0 到 7.1.1 了)。

記得大學時候的專題,還一度想自己寫 Android 的 custom view,但是當初對 Android、Java 的熟捻程度還不夠,一直沒踏出第一步。寫 custom view 自己覺得還蠻苦的 XDD,尤其是 debug 的時候,經常遇到 Canvas, Paint 有執行,但是在 App 中就是沒出現,後來才發現,經常是 Canvas 指定的 x, y 值超出螢幕視線外,還有是 Paint 的顏色是白色 (因為背景是白的呀… 倒)。

BTW,如果有興趣開發 Android custom view 的開發者,推薦可以去觀看 Droidcon NYC 2016 – Measure, Layout, Draw, Repeat: Custom Views and ViewGroups,影片中提到蠻多開發 custom view 需要注意到的事項,會讓自己對 custom view 有更多的認識。

開源的 IndicatorBarView-Android UI 元件