Laravel framework and native PHP: Comparison in the crea-tion of rest API

https://doi.org/10.31940/matrix.v14i2.66-73

Authors

  • Yuri Ariyanto Department Information Technology, Politeknik Negeri Malang, Indonesia
  • Mochamad Farhan Fitrahtur Rachmad Department Information Technology, Politeknik Negeri Malang, Indonesia
  • Dwi Puspitasari Department Information Technology, Politeknik Negeri Malang, Indonesia

Keywords:

Code Efficiency, Laravel Framework, MVC Architecture, PHP Native, RestAPI

Abstract

As technology evolves, the need for data communication grows. One technology facilitating this communication between applications and databases is the REST API, widely used by companies to provide access to their data and services. REST APIs can be developed using PHP, known as PHP Native. However, PHP Native faces performance issues and a monotonous, repetitive code structure, making maintenance and scalability challenging. Consequently, developers have created PHP frameworks like Laravel. This research compares the Laravel framework with PHP Native in REST API development, evaluating aspects such as processing speed, code efficiency, URL routing structure, and architectural models. The analysis reveals four key points: REST API processing speed, code efficiency, URL routing structure, and project architectural models. In terms of processing speed, PHP Native is slightly superior to Laravel, with speeds of 18.3 ms compared to 344.52 ms, due to additional processes in Laravel like routes, controllers, and models. For code efficiency, Laravel excels due to its ORM feature, unlike PHP Native, which requires manual SQL query writing. In URL routing, Laravel is superior with a structured routing feature, whereas PHP Native requires process file inclusion in route calls. Lastly, Laravel’s architectural model, which implements MVC, is superior to PHP Native, which lacks a standardized architectural model, leading developers to create their own.

Downloads

Download data is not yet available.

Published

2024-07-31

How to Cite

Ariyanto, Y., Rachmad, M. F. F., & Puspitasari , D. . (2024). Laravel framework and native PHP: Comparison in the crea-tion of rest API. Matrix : Jurnal Manajemen Teknologi Dan Informatika, 14(2), 66–73. https://doi.org/10.31940/matrix.v14i2.66-73