Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Presents By : Sayed-Farshad Kazemi
For : Software Free Day
Fall 2016
Introduction of Laravel and creating a
customized fra...
Headlines
 Why should we use frameworks?
 Why Laravel?
 How to install
A. FIRST THING FIRST: XAMPP
B. WHAT IS DEPENDENC...
Headlines
 Why should we use frameworks?
 Why Laravel?
 How to install
A. FIRST THING FIRST: XAMPP
B. WHAT IS DEPENDENC...
Why should we use frameworks?
 Reinventing the wheel?
 Can get a great wheel, for free!
 No time will be put on inventi...
Headlines
 Why should we use frameworks?
 Why Laravel?
 How to install
A. FIRST THING FIRST: XAMPP
B. WHAT IS DEPENDENC...
Why Laravel?
 Ease of Use
 Great community
 So many tutorials out there in the web
 Easy to install
 MVC based framew...
Headlines
 Why should we use frameworks?
 Why Laravel?
 How to install
A. FIRST THING FIRST: XAMPP
B. WHAT IS DEPENDENC...
First thing first: Xampp
 Couple of things you need to have:
1. Php : As a server side scripting language
2. Mysql (or an...
First thing first: Xampp
 Proper download link can be found:
 https://www.apachefriends.org/download.h
tml
 Hit “Next” ...
What is dependency manager?
 As a easy-to-understand explanation is that it refers to a tool gathers
proper packages per ...
Install Composer
 To install this magical tools we
have couple of ways, you can
use binary version for windows
or use com...
Install Laravel
 Laravel is easy to install and it can be installed using several methods
 Preferred method is using com...
Headlines
 Why should we use frameworks?
 Why Laravel?
 HOW TO INSTALL
A. FIRST THING FIRST: XAMPP
B. WHAT IS DEPENDENC...
HOW TO KEEP WHAT WE NEED?
 Remember when we said, Laravel is built using ready? It help us now!
 Fetch necessary package...
WHAT MAY WE REALLY NEED?
 Recommended:
1. illuminate/support : This package offer us many great
features such as helper f...
WHAT MAY WE REALLY NEED?
3. illuminate/database : The Illuminate Database
component is a full database toolkit for PHP, pr...
WHAT MAY WE REALLY NEED?
5. illuminate/events : We add this package because
Laravel route needs this package but does not ...
Let’s try it out!
It is time to get our feet wet! Let check what we talked about
18
Discussion : is it better to write a
framework from scratch
o Some may say create your own framework for your projects. Th...
Discussion : is it better to write a
framework from scratch
o Some may say use existing frameworks such as Laravel or symp...
Headlines
 Why should we use frameworks?
 Why Laravel?
 HOW TO INSTALL
A. FIRST THING FIRST: XAMPP
B. WHAT IS DEPENDENC...
22
CONCLUSION
 Laravel shows a great flexibility because of packages it uses. You can use them with
the default binding o...
TO READ MORE:
1. http://www.richardbagshaw.co.uk/using-illuminate-components/
2. http://www.gufran.me/tag/Laravel/
23
QUESTIONS?
Thanks for being patience :)
24
Upcoming SlideShare
Loading in …5
×

معرفی و ساخت یک فریم‌ورک شخصی به کمک لاراول

106 views

Published on

امروزه فریم‌ورک لاراول به طور قطع از جهت کارایی دارای محبوبیت بسیار در بین استارت‌آپ‌ها است، اما گاهی پیش می‌آید که ما تمام امکاناتی که لاراول در اختیارمان می‌گذارد را لازم نداریم و از طرف دیگر مایل نیستیم هزینه یک سرور مجازی را به مشتری تحمیل کنیم. کدنویسی در لاراول به دلیل آسانی در عین حال سادگی کارکرد لذت‌بخش بوده است، و نمی‌توان به سادگی از کنار آن گذشت.
در این کارگاه ما با جمع آوری چند پکیج اصلی لاراول به کمک composer این امکان را برای همه لاراول نویس‌ها فراهم می‌کنیم که از تمام آنچه لاراول در اختیارشان می‌گذارد، بهره‌مند شوند.

Published in: Software
  • Be the first to comment

معرفی و ساخت یک فریم‌ورک شخصی به کمک لاراول

  1. 1. Presents By : Sayed-Farshad Kazemi For : Software Free Day Fall 2016 Introduction of Laravel and creating a customized framework out of its packages @farshadfeli x @s.farshad.k @farshad92 s.farshad.k@gmail.co m
  2. 2. Headlines  Why should we use frameworks?  Why Laravel?  How to install A. FIRST THING FIRST: XAMPP B. WHAT IS DEPENDENCY MANAGER? C. INSTALL COMPOSER D. INSTALL LARAVEL  HOW TO KEEP WHAT WE NEED? A. HOW TO USE WHAT WE NEED? B. WHAT MAY WE REALLY NEED? C. LET’S TRY IT OUT! D. DISCUSSION : IS IT BETTER TO WRITE A FRAMEWORK FROM SCRATCH  CONCLUSION 2
  3. 3. Headlines  Why should we use frameworks?  Why Laravel?  How to install A. FIRST THING FIRST: XAMPP B. WHAT IS DEPENDENCY MANAGER? C. INSTALL COMPOSER D. INSTALL LARAVEL  HOW TO KEEP WHAT WE NEED? A. HOW TO USE WHAT WE NEED? B. WHAT MAY WE REALLY NEED? C. LET’S TRY IT OUT! D. DISCUSSION : IS IT BETTER TO WRITE A FRAMEWORK FROM SCRATCH  CONCLUSION 3
  4. 4. Why should we use frameworks?  Reinventing the wheel?  Can get a great wheel, for free!  No time will be put on inventing wheel  You get a reliable wheel, in terms of privacy, security, performance and etc.  Security matters  Time is Gold  Performance Talks  Standard coding style 4
  5. 5. Headlines  Why should we use frameworks?  Why Laravel?  How to install A. FIRST THING FIRST: XAMPP B. WHAT IS DEPENDENCY MANAGER? C. INSTALL COMPOSER D. INSTALL LARAVEL  HOW TO KEEP WHAT WE NEED? A. HOW TO USE WHAT WE NEED? B. WHAT MAY WE REALLY NEED? C. LET’S TRY IT OUT! D. DISCUSSION : IS IT BETTER TO WRITE A FRAMEWORK FROM SCRATCH  CONCLUSION 5
  6. 6. Why Laravel?  Ease of Use  Great community  So many tutorials out there in the web  Easy to install  MVC based framework, yet easy to understand  Uses separable packages to form a framework  Can use whatever you wanted, wherever you wanted  Very good performance  REST routing  … 6
  7. 7. Headlines  Why should we use frameworks?  Why Laravel?  How to install A. FIRST THING FIRST: XAMPP B. WHAT IS DEPENDENCY MANAGER? C. INSTALL COMPOSER D. INSTALL LARAVEL  HOW TO KEEP WHAT WE NEED? A. HOW TO USE WHAT WE NEED? B. WHAT MAY WE REALLY NEED? C. LET’S TRY IT OUT! D. DISCUSSION : IS IT BETTER TO WRITE A FRAMEWORK FROM SCRATCH  CONCLUSION 7
  8. 8. First thing first: Xampp  Couple of things you need to have: 1. Php : As a server side scripting language 2. Mysql (or any other preferred DB) : As a database  Can find both of them wrapped up in a nice package with other in Xampp 8
  9. 9. First thing first: Xampp  Proper download link can be found:  https://www.apachefriends.org/download.h tml  Hit “Next” several times, till it says finished you are done installing  Open control panel, will end up seeing something like this: 9 Figure 1 – xampp, up and running
  10. 10. What is dependency manager?  As a easy-to-understand explanation is that it refers to a tool gathers proper packages per project.  In PHP world, it is composer who does that!  How to use:  Initial composer.json  Insert dependencies (namespace and version)  Run composer update/install  Have a coffee till it gets ready (personally prefer chocolate milk)  Include vendor/autoload.php and that it! 10
  11. 11. Install Composer  To install this magical tools we have couple of ways, you can use binary version for windows or use command in figure 2 in PHP folder and install it using command line: 11 Figure 2 – install composer using command line
  12. 12. Install Laravel  Laravel is easy to install and it can be installed using several methods  Preferred method is using composer dependency manager  Installation may take 1 up to 20 minutes depending on your internet speed!  Install Laravel with composer :  composer create-project --prefer-dist laravel/laravel folderName  Notes:  If you get any error regarding turning on SSL in any of these step, go to php.ini file where you installed xampp and omit the “;” at the beginning of “extension=php_openssl.dll”  Creating a Laravel project must be accomplished in htdocs folder, if you want to see the result in you localhost 12
  13. 13. Headlines  Why should we use frameworks?  Why Laravel?  HOW TO INSTALL A. FIRST THING FIRST: XAMPP B. WHAT IS DEPENDENCY MANAGER? C. INSTALL COMPOSER D. INSTALL LARAVEL  HOW TO KEEP WHAT WE NEED? A. HOW TO USE WHAT WE NEED? B. WHAT MAY WE REALLY NEED? C. LET’S TRY IT OUT! D. DISCUSSION : IS IT BETTER TO WRITE A FRAMEWORK FROM SCRATCH  CONCLUSION 13
  14. 14. HOW TO KEEP WHAT WE NEED?  Remember when we said, Laravel is built using ready? It help us now!  Fetch necessary packages and put them together to create your own custom made framework  All packages can be found in https://packagist.org/ under illuminate/* 14
  15. 15. WHAT MAY WE REALLY NEED?  Recommended: 1. illuminate/support : This package offer us many great features such as helper functions, ClassLoader, Collections and more 2. illuminate/container : Contain the application class, which is used to connect components 15 Figure 3 –reference for more information about support package
  16. 16. WHAT MAY WE REALLY NEED? 3. illuminate/database : The Illuminate Database component is a full database toolkit for PHP, providing an expressive query builder, ActiveRecord style ORM, and schema builder. It currently supports MySQL, Postgres, SQL Server, and SQLite. 4. illuminate/routing : This package helps us to have a REST routing system without having so much trouble. It needs a proper .htaccess file (copy it from Laravel). 16 Figure 4 –reference for more information about database package
  17. 17. WHAT MAY WE REALLY NEED? 5. illuminate/events : We add this package because Laravel route needs this package but does not state it directly as a dependency. 6. philo/laravel-blade : Instead of view package I prefer this one because it is easier to deal with as a standalone package. However, if you do not like it, feel free to use any other package you want for template engine. 17 Figure 5 – reference for more information about Laravel-blade package
  18. 18. Let’s try it out! It is time to get our feet wet! Let check what we talked about 18
  19. 19. Discussion : is it better to write a framework from scratch o Some may say create your own framework for your projects. They claim: 1. You do not have to worry about the updates and you and your team members update it every once in a while when you need 2. They say you know what’s going on inside your framework so you have absolute control over your application 19
  20. 20. Discussion : is it better to write a framework from scratch o Some may say use existing frameworks such as Laravel or symphony for big projects and Lumen and codeIgniter for smaller projects. They claim: o Creating a framework is like reinventing the wheel, it is so probable that you do not end up with a good wheel! o Popular frameworks has showed their reliability in action. They are more secure and so can be more trusted with more sensitive works 20
  21. 21. Headlines  Why should we use frameworks?  Why Laravel?  HOW TO INSTALL A. FIRST THING FIRST: XAMPP B. WHAT IS DEPENDENCY MANAGER? C. INSTALL COMPOSER D. INSTALL LARAVEL  HOW TO KEEP WHAT WE NEED? A. HOW TO USE WHAT WE NEED? B. WHAT MAY WE REALLY NEED? C. LET’S TRY IT OUT! D. DISCUSSION : IS IT BETTER TO WRITE A FRAMEWORK FROM SCRATCH  CONCLUSION 21
  22. 22. 22 CONCLUSION  Laravel shows a great flexibility because of packages it uses. You can use them with the default binding of Laravel or you can choose you favorable packages and create your own personal framework in less than an hour!
  23. 23. TO READ MORE: 1. http://www.richardbagshaw.co.uk/using-illuminate-components/ 2. http://www.gufran.me/tag/Laravel/ 23
  24. 24. QUESTIONS? Thanks for being patience :) 24

×