CodeNinja
CodeNinja

Reputation: 847

Laravel and Angular(JS), where to start with Angular?

I'm a software engineer and want to learn developing web applications with PHP and JavaScript. I'm familliar with C#, object oriented programming and working with frameworks.

So i decided to learn directly creating an web application based on a framework (Laravel, as we work with this framework on my work also). I start understanding how the framework works and as programming is not new for me i also understand the basics of PHP.

For the front-end i want to use Angular JS as i heard a lot of positive things about it. During my research on Google about Angular and Angular in combination with Laravel i read that we already have Angular V2 and V4.

I have a few questions about this:

  1. What is the best version to start with? This because i heared the good things about V1 (and the combi with Laravel), but V2 and V4 has a complete other concept? I'm a bit confused if it has the same purpose and if it is still a good approach to combine the newer versions with Laravel?
  2. I can find how to combine Laravel with AngularJS(1) and how to structure the project, but cant find a good tutorial or explaination how to combine/structure Laravel with Angular 2 or 4. This also confuses me.... Are the newer versions not a good combination with Laravel anymore?, Angular just uses Json API's so why not? or are i'm wrong.
  3. What i found about Laravel and the newer Angular versions is that it is a no-go to use both in 1 project. The advice is to use 2 different projects? I do not understand why as i can still make them independed from eachtoher in 1 project by a nice folder structure. So if this is true, what is the reason behind?
  4. If it is no problem to combine both in 1 project, i prefer to do this. But what is the best practice to add Angular into the Laravel project? especially for the folder structure? Is there a tutorial which describes how to use these 2 frameworks in 1 project?

I hope that someone can give me a "kickstart" how to start with increasing my skills.

Upvotes: 0

Views: 375

Answers (1)

serdar.sanri
serdar.sanri

Reputation: 2228

I would suggest using Vue.js instead if you are familiar with new Laravel 5.x. It is supported by default and plays together pretty good.

https://learninglaravel.net/topics/vuejs

In my previous projects I used Laravel 3/4 + Backbone.js. Backbone, to me, is much better then diving into a full framework that your entire structure ( html + js ) depends on multiple custom tags etc. Backbone gives you a better approach on that case that you can use it partially in some modules etc or you can build your entire layout with it.

Upvotes: 1

Related Questions