Available online at www.sciencedirect.
com
ScienceDirect
Available online at www.sciencedirect.com
Procedia Computer Science 00 (2019) 000–000
www.elsevier.com/locate/procedia
ScienceDirect
Procedia Computer Science 157 (2019) 134–141
4th International Conference on Computer Science and Computational Intelligence 2019
(ICCSCI), 12–13 September 2019
MVC Architecture: A Comparative Study Between Laravel
Framework and Slim Framework in Freelancer Project Monitoring
System Web Based
Andri Sunardia, Suharjitoa,*
a
Computer Science Department, Binus Graduate Program – Master of Computer Science, Bina Nusantara University, Jakarta, Indonesia 11480
Abstract
Currently, the work of freelancers is very much in demand. Because freelancers can work anywhere and anytime without being
bound by a contract with a company or person. But freelancers have difficulty managing their tasks and projects because there is
no system to monitor and manage the project. Therefore, the solution is to make the project freelancer monitoring system by
implementing the MVC (Model View Controller) architecture model with the PHP Laravel and Slim framework. MVC design
patterns are well-known patterns and are used for interactive software system architectures. The way the MVC method works is
to separate the main components such as data manipulation (model), display/interface (View) and the process (Controller) so that
it is more neat, structured and easily developed. The purpose of this study also compares the MVC Laravel and Slim framework
architecture with a performance comparison method on load/stress testing on the dashboard page using Apache JMeter tools with
3 scenarios from samples 1, 100, and 500. Tests are done offline and report format results of performance tests is a Summary
Report. The results obtained from performance comparisons using Apache JMeter are that the Slim framework is faster and better
than Laravel's framework.
© 2019 The Authors. Published by Elsevier B.V.
© 2019 The Authors. Published by Elsevier B.V.
This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/)
This is an open
Peer-review access
under article underof
responsibility thethe
CCscientific
BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/)
committee of the 4th International Conference on Computer Science and
Peer-review
Computationalunder responsibility
Intelligence 2019. of the scientific committee of the 4th International Conference on Computer Science and
Computational Intelligence 2019
Keywords: Web Application; Mvc Architecture; Laravel Framework; Slim Framework; Compare Apache Jmeter; Project Monitoring System;
* Corresponding author. Tel.: 08128400536.
E-mail address:
[email protected]1877-0509© 2019 The Authors. Published by Elsevier B.V.
This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/)
Peer-review under responsibility of the scientific committee of the 4th International Conference on Computer Science and Computational
Intelligence 2019
1877-0509 © 2019 The Authors. Published by Elsevier B.V.
This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/)
Peer-review under responsibility of the scientific committee of the 4th International Conference on Computer Science and Computational
Intelligence 2019.
10.1016/j.procs.2019.08.150
Andri Sunardi et al. / Procedia Computer Science 157 (2019) 134–141 135
2 Andri Sunardi and Suharjito / Procedia Computer Science 00 (2019) 000–000
1. Introduction
Freelancers or freelance workers, is a term commonly used for people who work alone and are not always
committed to leadership or in an office in the long term. Freelancer is sometimes represented by a company or
temporary agent who resells freelancers to clients, some work independently or use professional associations or
websites to get jobs. Freelancers are freelancers ready to do a project according to the budget and time set by those
who provide projects to freelancers 1. There are millions of freelancers available around the world to work on small
projects without having to sign a contract to hire freelancers2. The most dominant or many fields, professions,
industries or job freelancers include: Music, Writing, Acting, Computer Programming, Web Design, Graphic
Design, Translator, Illustration, Film and video production, and much more.
There are many Frameworks that are popular and widely used for development written in different languages that
are built around the same structuring facilitates the learning and understanding of a Frameworks, among them the
PHP frameworks, including Laravel and Slim which are the most used by the developers. Each of these two
frameworks has advantages and provides a specific implementation that should be taken into account to make its
choice3. The author4 claims that the Laravel framework is the best for complex enterprise-level applications, and to
quickly and efficiently enrich the institution's information system. This is why author choose Laravel for the
development project. The author in their study of PHP frameworks declare that the Laravel framework makes it
possible to develop the PHP code in an elegant and simple way, avoiding the "spaghetti code." And that Slim
frameworks is a complete framework designed to optimize the PHP code, development of Web applications based
on the Model View Controller pattern (MVC).
Slim is a PHP micro-framework that is used to write web services (API's). Slim Framework is used today to
connect multiple applications that cannot share the same resource5. The Laravel Framework and Slim framework are
well-known and updated frameworks to date in 2019. Because no one has compared performance in load/stress
testing in these 2 frameworks. So the contribution of this research is to compare which framework is more in terms
of performance that will be measured load/stress testing in the Laravel and Slim framework. Therefore, we need to
understand the MVC architecture in the Laravel and Slim framework first and the similarities or differences in the
two frameworks.
2. Related Works
Fig. 1. MVC Architecture
As shown at Figure 1, The MVC architecture was originally introduced for user interfaces in applications that
were implemented with Small Talk (Programming Language). In this approach, the system is divided into three
components, namely the Model that reveals the Logic area, the View presents the user interface, and the control that
manages changes to View6.
MVC can develop IR (Institutional Repositories) to share information and knowledge on documentation and
publication of research or scientific work7.
136 Andri Sunardi et al. / Procedia Computer Science 157 (2019) 134–141
Andri Sunardi and Suharjito / Procedia Computer Science 00 (2019) 000–000 3
MVC can develop an online examination system based on the MVC model that can be accessed at home and
abroad for students and teachers aimed at reducing the cost of conducting inspection activities and increasing
examination efficiency8.
9
designed and implemented the Laravel framework model in a simple manner that achieved automatic processing
for part of the design. 9proved that web design based on Laravel's framework has strong scalability, so it can improve
development efficiency.
Fig. 2. Comparison Laravel and CodeIgniter
Figure 2 shows the efficiency of web design development based on the Laravel framework is higher than the CI
(Code Igniter) framework. Not all frameworks meet the same needs, and several frameworks can be used together in
some situations. There are also frameworks specifically addressing certain development issues, if you want to
develop big project then use Laravel framework, but if you want to develop small project, then use Slim framework.
Distinguishing the Laravel and Slim frameworks, which are actively maintained, popular with the developer
community, promote modern web development practices and build web sites and web applications of all sizes and
complexities. Choosing the right framework between different frameworks, however, can sometimes be difficult. In
order to make the selection process a little easier, we have proposed a model of analysis are the most used and
popular.
3. Research Method
As shown at Figure 3, the steps of this research process start from problem analysis. Researchers found problems
with freelancers who had difficulty managing the project until the project was completed smoothly and well. After
the researcher has found the problem and defines the problem statement, the researcher sets the objective of the
research to stay focused on the problem statement. The purpose of this research is to create a project monitoring
system for freelancers so that freelancers remain focused on projects that are completed and smoothly using the
MVC (View Controller Model) method. MVC summarizes the data along with processing and isolates it from the
controller and presentation process (view) to be represented on the User Interface.
Fig. 3. The Steps of Research
Andri Sunardi et al. / Procedia Computer Science 157 (2019) 134–141 137
4 Andri Sunardi and Suharjito / Procedia Computer Science 00 (2019) 000–000
The next step is research 2 framework. This step examines two well-known MVC frameworks, namely Laravel
framework and Slim framework. Like how Laravel and Slim architecture for website development. Laravel is a fully
MVC framework chosen because of the many features it supports, which are a series of valuable characteristics that
will accelerate web development and create a strong interactive layout with content4. Laravel makes the
standardized development process, processes several non-business logical relationships automatically that allow
programmers to focus on implementing business logic. Web design uses the Laravel framework, has strong
scalability, thus increasing development efficiency9. Slim is a PHP micro framework used to write little web
services (API’s). This is used nowadays to connect some applications that can’t share the same resources, and in this
project it was used to connect the mobile application to the web application.
The third step is to create a Laravel and slim architecture of the system that you want to create using the MVC
method. Laravel and Slim's architecture is almost the same, only that distinguishes if Laravel uses engine blade
templates, then Slim uses the Twig template engine. Everything still uses the Model View Controller.
The fourth step is to develop a website with the MVC method using Laravel framework and Slim framework to
create a project monitoring system application for freelancers. The fifth step is that after developing a website using
Laravel framework and Slim framework, the performance testing will be done using Apache JMeter tools. The
comparison seen is the load / stress testing on the HTTP Request. The sixth and final step is after getting the
comparison results from Apache JMeter, a report is made.
4. Results and Discussion
The author describes the results of the comparison of Laravel and Slim framework with the criteria that have
been studied from previous research and related journals.
Table 1 Framework Comparison
PHP Laravel Framework PHP Slim Framework
Category Full Stack framework Micro framework
Author Taylor Otwell Josh Lockhart
Newest version 5.8.10 3.12.1
Release Date 2019 February 26th 2019 Apr 16
License MIT License MIT License
Requirements >= PHP 7.1.3 >= PHP 5.6
ORM Eloquent Eloquent
Code Generation CLI CLI
Security framework Yes Yes
Template framework Yes Yes
Template Engine Blade Twig, PHP View
CRUD generation CRUD Booster Scaffold
Website www.laravel.com www.slimframework.com
Language PHP 7 PHP 7
MVC framework Yes Yes
Testing framework PHP Unit PHP Unit
Validate Yes No
Upload Yes Yes
Database Yes Yes
Auth Yes No
DB Migration Yes No
Form Validation Yes No
RAD Yes Yes
File Count 7.958 2185
Folder Count 1.377 390
Pingback Yes Yes
138 Andri Sunardi et al. / Procedia Computer Science 157 (2019) 134–141
Andri Sunardi and Suharjito / Procedia Computer Science 00 (2019) 000–000 5
Mobility Yes Yes
Trackback Yes Yes
Autofocus No Yes
Installation via the composer Yes Yes
Form Objects Objects
Full text search Yes (Elastic Search) Yes (Elastic Search)
Target Audience Large Project Small Project
The Table 1 presents the Laravel and Slim frameworks are recently updated and require at least version 5.6 of
PHP Language. They provide ORM implementations however template engine Blade. Laravel and Slim framework
are based on the MVC architecture style. MVC concept. Laravel and Slim framework were selected for deeper
analysis. Both frameworks use the PHP language, and installed via Composer. Laravel and Slim also is easy to
install using Composer create-project or via Laravel Installer. Both frameworks access the database in a same way,
uses ORM Eloquent. Laravel comes with a template engine called Blade and Slim bundled with Twig. Both
template engines implement two main features: a). Model inheritance, b). Blocks or sections. Laravel template
engine “Blade” allows for better template structure organization as it supports nested template section. Very large
choice of filters also helps to maintain the code clean and maintainable.
The author provides empirical questionnaires to 10 PHP developers who use the Laravel and Slim framework
randomly using the Google Form application online.
Table 2 Empirical Questionnaire
Very Very
No Question Best Normal Worst
Best Worst
1 Is the Laravel framework easy to use? 0 3 5 1 2
2 Is the Slim framework easy to use? 1 5 4 0 0
3 Does Laravel framework have a good documentation? 6 3 1 0 0
4 Does Slim framework have a good documentation? 5 4 1 0 0
5 Can Laravel framework be used in large scale projects? 7 3 0 0 0
6 Can Slim framework be used in large scale projects? 0 1 5 2 2
7 Does Laravel framework have a high security? 4 3 2 0 0
8 Does Slim framework have a high security? 0 0 5 4 1
9 Is Laravel framework very fast and light? 0 2 5 3 0
10 Is Slim framework very fast and light? 2 3 5 0 0
Table 2 shows the results of respondents in 10 PHP developers who have tried using the Laravel and Slim
framework. It is known that Laravel framework is more difficult to use than Slim framework. For the
documentation, Laravel and Slim are both good. For large scale projects it is recommended to use Laravel
framework because Slim is only for small scale projects. Laravel's security is very good and strong compared to
Slim because Slim's library is very small. At speed and lightness, the Slim framework is very good compared to the
Laravel framework. In conclusion, the difference between Laravel and Slim lies in its use, because Laravel's
framework is more complex and its features are more than Slim's, which emphasizes speed versus security and
scale.
Performance testing on Load / Stress Testing is done offline, namely with the address localhost: 8080 / laravel /
public for the Laravel framework and the address localhost: 8080 / slim for the Slim framework. In Apache JMeter,
there are two variables, namely the host and port. The Server Name or IP (Host) is localhost and the Port is 8080.
Then adding Thread Group (Users) is 1 user, 100 users, and 500 users with every 1 second. The report format used
to display the results of the performance test is the Summary Report.
Analysis of the results in this study was based on the results of the Summary Report produced by Apache JMeter
based on several testing scenarios.
1. First Scenario
a. Number of Users: 1
b. Delay in second 1 (Ramp-Up period/number of users)
Andri Sunardi et al. / Procedia Computer Science 157 (2019) 134–141 139
6 Andri Sunardi and Suharjito / Procedia Computer Science 00 (2019) 000–000
So based on the first scenario, Apache JMeter takes about 1 second to create and run all existing threads,
where pauses between threads will start 1 second after the previous thread starts.
2. Second Scenario
a. Number of Users: 100
b. Delay in second 1 (Ramp-Up period/number of users)
So based on the first scenario, Apache JMeter takes about 100 seconds to create and run all existing
threads, where pauses between threads will start 1 second after the previous thread starts.
3. Third Scenario
a. Number of Users: 500
b. Delay in second 1 (Ramp-Up period/number of users)
So based on the first scenario, Apache JMeter takes about 500 seconds to create and run all existing
threads, where pauses between threads will start 1 second after the previous thread starts.
Then from the overall test results of the first, second, and third scenarios on the project freelancer monitoring
system performance, the researcher summarizes the results as shown in Table 1.
Table 3 Summary Report Load/Stress Testing
Apache JMeter Testing Performance Load / Stress Testing on the Dashboard Page
Framework Received Send Avg.
Samples Average Min Max Std. Dev. Error % Throughput
KB/sec KB/sec Bytes
1 197 197 197 0 0.00% 5.1/sec 384.11 0.66 77485.0
Laravel 100 1841 533 2923 724.26 0.00% 27.8/sec 2100.15 3.60 77484.6
500 11622 4279 19082 4478.75 0.00% 25.3/sec 1917.50 3.29 77484.6
1 67 67 67 0 0.00% 14.9/sec 1151.03 1.79 78970.0
Slim 100 368 145 502 79.83 0.00% 71.2/sec 5492.82 8.56 78970.0
500 2812 294 5301 1430.42 0.00% 77.9/sec 6009.91 9.36 78970.0
Average Load/Stress Testing
14000
11622
12000
10000
8000
6000
4000 2812
1841
2000 197 368
67
0
Samples 1 Samples 100 Samples 500
Framework Slim Framework Laravel
Fig. 4. Average Load/Stress Testing
Figure 6 shows for the average result the smaller the value the better. Slim Framework is better on samples 1 for
(67) while Laravel framework is equal to (197). Likewise, in the second scenario at samples 100 is (368) in a slim
framework better than Laravel framework of (1841). And the third scenario on the 500 sample is (2812) by slim
framework better than Laravel's framework of (11622).
Table 3 shows For Min's results, the smaller the value the better. Slim Framework is better on samples 1 for (67)
while Laravel framework is equal to (197). Likewise in the second scenario the samples 100 are equal to (145) in a
slim framework better than Laravel's framework of (533). And the 3rd scenario on the 500 samples for (294) by
framework is slim better than Laravel's framework of (4279).
140 Andri Sunardi et al. / Procedia Computer Science 157 (2019) 134–141
Andri Sunardi and Suharjito / Procedia Computer Science 00 (2019) 000–000 7
For Max results the smaller the value the better. Slim Framework is better on samples 1 for (67) while Laravel
framework is equal to (197). Likewise, in the second scenario on samples 100 is equal to (502) in a slim framework
better than Laravel framework of (2923). And the third scenario on the 500 sample is (5301) by framework slim
better than Laravel's framework of (19082).
For the results of Std Dev. the smaller the value the better. In samples 1, the Slim framework and Laravel
framework are the same as (0). In the second scenario 100 samples are (79.83) in a slim framework better than
Laravel framework of (724.26). And the 3rd scenario on the 500 samples of (1430.42) by framework is slim better
than Laravel's framework of (4478.75).
For the results of Error% the smaller the value the better. From testing scenarios 1, 2 and 3, or with samples 1,
100, and 500, the Slim framework and Laravel framework are equal to (0.00%). This means that these 2 frameworks
have no problems with errors.
For the results of the Throughput the greater the value the better. Slim Framework is better on samples 1 for (14.9
/ sec) while Laravel framework is equal to (5.1 / sec). Likewise, in the second scenario on samples 100 is equal to
(71.2 / sec) in a slim framework better than Laravel's framework of (27.8 / sec). And the third scenario on the 500
samples of (77.9 / sec) by framework is slim better than the Laravel framework only (25.3 / sec).
For the Received KB / sec results the smaller the value the better. The Laravel Framework is better at samples 1
for (384.11) while the Slim framework is equal to (1151.03). Likewise in the second scenario at samples 100 of
(2100.15) in the Laravel framework is better than the Slim framework of (5492.82). And the third scenario on the
500 samples of (1917.50) by the Laravel framework is better than the Slim framework of (60009.91).
For the Send KB / sec result the smaller the value the better. The Laravel Framework is better at samples 1 for
(0.66) while the Slim framework is (1.79). Likewise in the second scenario at samples 100 of (3.60) in the Laravel
framework is better than the Slim framework of (8.56). And the third scenario on the 500 sample of (3.29) by the
Laravel framework is better than the Slim framework of (9.36).
For the Average Bytes results the greater the value the better. The Slim Framework is better on samples 1 for
(78970.0) while the Laravel framework is equal to (77485.0). Likewise in the second scenario on samples 100 of
(78970.0) in framework slim is better than Laravel framework of (77484.6). And the third scenario on the 500
sample is (78970.0) by framework slim is better than the Laravel framework of (77484.6).
5. Conclusion
After testing performance Load / Stress Testing on the Dashboard page with Samples 1, 100, 500, using Apache
JMeter, it can be concluded that the slim framework Load / Stress Testing is faster and better than the Laravel
framework even though Received KB / sec and Send KB / sec Laravel framework is better than Slim framework
because Slim framework is intended for small projects that don't really need libraries or functions that are too large.
But if the project is large and has many functions and libraries, it is recommended to use the Laravel framework
because Laravel is better than the Slim framework.
Slim is basically not like traditional MVC that has a model, controller, and view. The Slim Framework only has a
View but the MVC method can be added by adding it in the App folder with Controllers and Models. It is helped by
routes to add their controllers. And also basically the Slim framework doesn't use the template engine. Because the
use of template engines weighs on the server because the PHP syntax must be parsed before being processed again.
If the Slim framework is not added by the MVC method, it will be even faster compared to the Laravel framework
but in this paper both use the MVC method on the results of the study. To continue the research, it is necessary to
expand the developed Web system capabilities using other framework such as Silex, Kohana, Nette, FatFree, and
Popphp.
References
1. D. Hesmondhalgh and S. Baker, "A very complicated version of freedom’: Conditions and experiences of creative labour in three cultural
industries," Poetics, vol. 38, no. 1, pp. 4-20, 2010.
2. A. Bhadauria, "A Global Software Engineering Approach for Small Projects," In 2012 IEEE Seventh International Conference on Global
Software Engineering, vol. 13(Feb), pp. 201-201, August 2012.
3. B. Ajzele, Modular Programming with PHP 7, Packt Publishing Ltd, 2016, pp. 3-42.
Andri Sunardi et al. / Procedia Computer Science 157 (2019) 134–141 141
8 Andri Sunardi and Suharjito / Procedia Computer Science 00 (2019) 000–000
4. A. F. Ibrahim, "Internship Application System (IAS) for University Students using Laravel," Journal of Computing Research and
Innovation, vol. 3, no. 4, pp. 12-18, 2018.
5. M. Martin, F. Almeida and J. Monteiro, "An application for the management movements of Via Verde," International Journal of Advanced
Studies in Computers, Science and Engineering, vol. 3, no. 4, p. 1, 2014.
6. D. M. Selfa, M. Carrillo and B. M. D. R., "A database and web application based on mvc architecture," In 16th International Conference on
Electronics, Communications and Computers (CONIELECOMP'06), pp. 48-48, February 2006.
7. V. Kumar, A. Kumar, A. K. Sharma and D. Singh, "Implementation of MVC (Model-View-Controller) design architecture to develop web
based Institutional repositories: A tool for Information and knowledge sharing," Indian Research Journal of Extension Education, vol. 16,
no. 3, pp. 1-9, 2016.
8. Z. Wang, "The Design and Implementation of an Online English Testing System Based on MVC Model.," In First International Conference
on Real Time Intelligent Systems, pp. 432-439, September 2016.
9. R. Y. HE, "Design and implementation of web based on Laravel framework," In: 2014 International Conference on Computer Science and
Electronic Technology (ICCSET 2014). Atlantis Press, 2015.