Skip to main content
1 of 2
junedkazi
  • 2.5k
  • 17
  • 26

Here is my take on it

Views

  1. First and most basic advantage is it has a UI which makes it easier for beginners and people with not much knowledge php of to fetch data and display it just with a few clicks.
  2. You can apply filters and relationships to make any kind of joins and filtration of data just with a few clicks.
  3. It provides easy access to exposed filters which allows you do do sorting of data.
  4. It has ajax support.
  5. It has a built in cache mechanism to cache data.
  6. You can AND or OR your data just by drag and drop.
  7. It has support to display the data in various formats like grid, table etc which are available just at a click.

These are just a few points. Now if you try and compare these points to writing a PDO query then yes PDO is definitely fast but you forget after getting the data you also have to do the processing to display the data. Now if you try and do the above mentioned points in a custom module I am pretty sure you will run over a 500 lines of code to implement most of the features.Also don't forget the custom code which needs to be maintained.

If you want to compare views to a PDO check the views query time and the PDO query time it will not be a major difference. Views takes time to do all the rest of the fancy stuff you need to process sanitize your data and display your data in the format of your choice which takes time.

If you are comfortable with PDO I would definitely recommend you to go ahead and use it. The adv are you are using a core feature, 1 less module to me loaded so less http request to load the js and css files.

junedkazi
  • 2.5k
  • 17
  • 26