rappasoft / laravel-boilerplate

The Laravel Boilerplate Project - https://laravel-boilerplate.com
https://rappasoft.com
5.58k stars 1.58k forks source link

AngularJS #263

Closed miladr0 closed 8 years ago

miladr0 commented 8 years ago

hi i am new to laravel and angular; can I use angular for forntend and this boilerplate as backend? if so, how can i do that

digitalit commented 8 years ago

Also very interested in an framework for frontend in this project but after reading Jeffreys on Laracast i would like to use Vue:

"Mark my words: Vue.js will sky-rocket in popularity in 2016. It's that good. Want to get ahead of the pack? Let me show you the building blocks of Vue."

https://laracasts.com/series/learning-vue-step-by-step

blomdahldaniel commented 8 years ago

I can also recommend vue, it is very intuitive in my opinion.

But back to your question @Blackops404 sure you can use this boilerplate for your backend. But you would have to build up everything in Angular for your frontend. I dont think anyone could answer that question quickly and only within a github issue. You will have too google around for tutorials and stuff. Google is your friend, start digging.

But if you'r willing to try out Vue, Jeffrey Way att laracasts.com has a great and thorough tutorial there. Just as @petergit67 suggested.

digitalit commented 8 years ago

What is your opinion about an separate framwork like Vue for frontend @blomdahldaniel ?

blomdahldaniel commented 8 years ago

I do not quite see it like that. For me, Laravel is so much bigger and the way I and Jeffrey uses Vue is to make some partials of the views come alive with Vue. The entire front-end dont have to be, and in my opinion with laravel, shouldnt be purely vue. It is so easy to just let Vue put in partials/components. So therefore I see it more like a framework that takes care of some of my frontend.

So the feeling for me is almost the same as if i wrote my own little functions in javascript for the stuff that needs to be done. There is of course examples where you might want to do it all in javascript though and that's a different story.

digitalit commented 8 years ago

Great to hear, this is exactly how i see it. Laravel as foundation and then Vue in some pages where special functions are needed.

rappasoft commented 8 years ago

What would be a good use case for integrating Vue into this boilerplate?

miladr0 commented 8 years ago

thanks every body

rappasoft commented 8 years ago

I don't know enough about Vue to say whether or not it's useful in this project.

blomdahldaniel commented 8 years ago

@rappasoft

Maybe some ordering or shop system that should work with js. Or just some form that needs to have that bit of logic on the front end which gives the best UX.

Or the obligatory task manager that should be done in javascript for best UX. In my opinion, JS is often the answer to how to creat the most fluent and perfect user experience. And this is then applied to interactive environments.

rappasoft commented 8 years ago

I agree, I'm just not sure what it could be used for in this project currently. I'd love to addit in since it would be a good learning tool, but there's not much frontend functionality.

blomdahldaniel commented 8 years ago

No I agree and I strongly dont think that the boilerplate should ship with any js framework. There are so many and if you add 1 you have to add the others. It would be weird to force frontend stuff to the users of this boilerplate.

Everypne can learn and use the js frameworks on their own.

ninjaparade commented 8 years ago

@blomdahldaniel @rappasoft I think the only really good spot to add a js framework or js in general would be in the admin. Its FAR too difficult to do something generic enough that won't get in someones way on the front end. Some handy js stuff would solve your issue #229 for example :dancer:

nasirkhan commented 8 years ago

It is true that the boilerplate should not push the users to some specific frontend JS framework. But i think it should have the functionality so that this boilerplate can be used for a full REST based application (#266). I will build API with this boilerplate and use any JS in the frontend or use the laravel default. What is your opinion on this?

blomdahldaniel commented 8 years ago

@ninjaparade I dont think we should add a JS-framework just because of #299. I rather see a plain javascript solution on that page, just to make it work. Sure the entire admin-interface could be improved with a JS-framework but then you force the user to dig down into a JS-framework just to try to understand or modify what is going on.

ninjaparade commented 8 years ago

@blomdahldaniel not suggesting we do for your issue, I am merely suggesting that one could solve a lot of issues in the admin by adding in something like vue.js etc.

currently the user is still forced to dig in an figure out what is going on should they choose to alter/change anything in the admin, nothing changes there.

There are defiantly cons to being more opinionated in providing a complete solution but I would counter that most users would welcome something opinionated that's started/complete for them to add upon and modify etc.

:dancer:

blomdahldaniel commented 8 years ago

Yes the user is still forced to dig down in the php and blade to understand and modify the backend. But it would add one more very big layer if we would add a JS framework to that as well. First understand the php, then the views and then learn the JS framework.

I dont think that this boilerplate should expect that knowledge of any specific JS framework. And therefore it has to stay clean from JS frameworks. Unless this boilerplate would grow into becoming "Laravel boilerplate with vue js". What I know about this boilerplate is that it gives a head start of getting a front-end and backend that handles auth. It is then fully customizable to fit your needs. And by that it does not need any JS framework.

If you think that we can add vue to this. Someone else would come and say that we have to add Angular for compability. Then the React boys comes along and quickly it is not a lightweight boilerplate any more, it will turn into a mess of multiple JS frameworks.

So I guess this is up to @rappasoft to decide but in my head. Choosing no JS framework will make it more clean so that the specific user can add their own JS framework of choice. You cannot fit everyones needs. But prepare so they can use this as a boilerplate, a starting point and add their own stuff.

blomdahldaniel commented 8 years ago

To answer the origional question

Yes, this boilerplate will work just fine together with VueJS and AngularJS or any other frontend JS framework. In this aspect, this boilerplate is no different from a bare Laravel installation.


Conclusion to the discussion

We will not look to add any JavaScript framework in a near feature. It does not seem to fit the cause of the project right now. Read the discussion above to understand more of the details for this decision.