Be ready to study forever - 개발자 꿈나무

[대학교 자료정리]Laravel Framework features, structure and installation 본문

Programming/PHP

[대학교 자료정리]Laravel Framework features, structure and installation

루눌룹 2020. 7. 21. 11:58

1. Feature of Laravel

1.1 MVC(Model, View, Controller) pattern

Laravel adapted MVC pattern

MVC pattern is a design pattern of modern web development that splits the components Model, View, Controller

Model – is called by Controller to Save or read data from Database and returns the data into the forms that view can use

View - is called by Controller to generate templates (HTML, XML, JSON) to serve to the client and return it to the Controller

Controller – deals with requests from the clients/users and returns the results. Logically, it is in between View and Model . Controller receive requests from users/clients and pass the request to Model. Model fetches the data from database and returns it to controller. Again, controller passes it to View and view renders the results to the clients with template (HTML, XML, JSON).

1.2 Laravel framework Supporting Database

Laravel 5 officially supports 4DBMS:

MySQL

PostgreSQL

SQLite

MS-SQL

However, if in needs, there are some ways to extend DBMS

 

Laravel doesn’t use queries, but instead, it uses PDO(PHP Database Object) to use multiple DBMS.

PDO - binds variables NOT deal with Strings to prevent SQL injections etc. PDO uses Query Builder and Eloquent ORM(Object Relational Mapping)

 

1.3 Blade Template Engine

Blade Template – helps to code View. Including Jquery, Blade Template let user manage <script>Phrases easily using inheritance.

1.4 Pretty URLs based web service

Laravel provides separates File system and URLs for easier URLs

Ex)

http://example.com/aa/index.php?cc=10&id=11 <- ordinary URL

http://example.com/aa/10/11 <- pretty URL

1.5 Component based expandability

Laravel can easily expand component with Composer. Plus, you can rewrite existing codes as Laravel Packages.

 

1.6 DI(Dependency Injection ) and IoC(Inversion of Control)

The feature of Laravel reduces dependency between modules and enables to develop flexible software without source code changes.

 

2. Laravel Installation and setting up the environments

2.1

Download Bitnami

2.2

Control Panel -> System -> Advanced System Settings -> Environment Variables -> System Variable -> Edit -> New -> Add directory of PHP and MySQL

2.3

(1)Go to https://www. getcomposer.org/Compser_Setup.exe and download composer

(2) Use directory where PHP installed

(3)Downloading and creating new laravel project using command line

composer create-project laravel/laravel [NAME] –prefer-dist --verbose

 

3. Structure of Laravel

 

'Programming > PHP' 카테고리의 다른 글

[대학교 자료정리]Fundamental PHP  (0) 2020.07.21
Comments