samedi 17 octobre 2015

Totally New Beginer with Laravel : Start faster

First of all, as my usual posts are mostly about Java EE and JSF, this one points to a complete another technology and frameworks which are PHP and Laravel. The fact that I finally moved from J2E to PHP for my public applications will be  discussed later in another post, for now, let's stick with explaining how to start with Laravel and what exactly to do with it.


Laravel is a PHP framework which aims to make your ideas become projects in an easy and very fast way. After all, as every other framework, it is the main purpose. But why to choose Laravel beside all other frameworks is another question for which you should perform a simple Google query and find out by yourself depending on your exact needs. For my part of the story, some surveys results having Laravel on top and some good lessons in Laracast.com fully convince me.

Choosing the IDE  

 

I maybe wrong, but for me, PHPStorm 9 was the best but not yet enough convicing. PHPStorm is the best PHP editor out there. But the thing with these bells and whistles IDEs is that once you start using them you start to forget how to do simple tasks such as pushing to a git repo or tracing down a simple bug. My opinion is use a simple vanilla text editor, you just need to be able to edit the code somehow not wait for the PHP files to open up on the IDE.

Get rid of all those unuseful tutorials on how to make it work !


While starting to know more about it, I found about 10 tutorials performing a step-by-step guide on how to get it work in your machine, some of them talk about WAMP, MAMP, XAMP, some others about the Laravel Homestead, and other about setting it up all by your self (installing Apache, PHP, editing PHP.ini, enabling SSL ...). But why that much of headaches ? Use Laragon software, a kind-of WAMP specially created for Laravel framework, it generates Laravel 5 and 4 versions in your computer, setup every other needed ressource (PHP, Apache, MySQL) and gives you some good looking URLs ({ProjectName}.dev will now point to your localhost/{ProjectName}/public folder in your local browser).

More about Laragon is here : http://laragon.org/ 

Too many folders .. What are all those !

 

Yes, you are totally right, that was also my first impression when I started using it, specially as I was coming from a J2E development environment, PHP seems to become some kind of another alien spicy with all folders I've seen there.. Where to start, how to do .. Yes, it is not that much easy for a head-start. For our good chance, they have a real AMAZING free lessons, some short 3 minutes videos explaining EVERYTHING with no time loosing and in a very straight way to make you learn ALL about basics and how to do everything in Larvael in just about 1 to 2 hours :

Laravel is also as simple as an MVC architecture. It has it's models, views and controllers. My advice for you would be to start, I mean really, start everything from scratch if you are new to Laravel. You'll find some amazing packages ready to work with your Laravel framework (Admin Panels, Authentication managers, Forums ..) but keep in mind :
- You don't even know how to show your own name in Laravel yet ..
- The code of those packages, isn't your's to understand it and perform the main framework task : GAIN TIME


Aucun commentaire:

Enregistrer un commentaire