Support of VueJS in CakePHP 3

Hello,

do you think, like Laravel, add the possibility to support creation of VueJS components ?

example :
https://laravel.com/docs/5.4/frontend#writing-vue-components

Best regards

1 Like

As i know, you can use VueJS or any javascript module with cake. CakePHP don’t have the vue scaffolding like laravel, but it’s easy to integrate into your code.

@ricardovigatti, thanks for your response.

I know already how to use VueJS with cake. I was talking about official support or something similar.

Best regards

Sulian

1 Like

Well, we need the opinion of some cakephp contributor but i don’t think it’s really necessary, even at laravel.

There are plugins that could help you with connecting the model with Vue (or any other framework) using this two plugins


Altough writing components or something I think it will have to be in another plugin, I don’t know if there is anyone yet.

I would also like official support of modern frontend js frameworks in cake.
Managers are recommending laravel because it support js frontend framework officially. They want to save every minutes of their developer.
Now a days frameworks providing everything, so developers just need to write business logic.

JS frameworks go out fashion pretty soon. We won’t repeat the mistake of integrating / providing official support for a JS framework with CakePHP.

Back in 1.x we had inbuilt support for “Prototype” which was the most popular JS lib at that time. Some of you might have not even heard of it :slight_smile: . Soon it was replaced by Jquery as the most popular one so in 2.x we had maintain two adapters for protype and jquery for the JsHelper. Today the likes of React, Vue are the hot, tomorrow it might be something else.

Hence considering the volatility of javascript landscape we decided not to not officially support any JS lib and rather spend our effort on just the PHP code. We are a small group of volunteer developers contributing to the framework for free in our spare time, there’s only so much we can do.

10 Likes

This is a really interesting conversation. I’ve been interviewing a few developers and they have a pretty good impression of Vue.js. Moreover, this framework has such a great satisfaction rate among developers that have used it - source. On the other hand, @ADmad is completely right, there’s no way one can be %100 sure that the most popular framework won’t become forgotten in a year or even sooner.

We are a small group of volunteer developers contributing to the framework for free in our spare time, there’s only so much we can do.

This has to change, the “there’s only so much we can do” part.
Following things need to happen:

  • Rewrite the entire documentation to allow faster learning/implementation (remember, 90% of the fresh audience of CakePHP would leave the framework if the documentation is either too less, too tricky, too detailed and, in case of CakePHP, too much “advanced-focused” - compare with “setup and basic-setup” with Laravel)
  • Community leaders (like yourself, Mark Story and other awesome people out there) have to take the ownership of owning CakePHP (count me in)
  • Go to youtube and search for “CakePHP tutorials” and then “Laravel tutorials” (the single reason why almost cent percent of new developers are choosing to go the Laravel way).
  • Official (as in as a separate GitHub repo under the “cakephp” org.) support of some of the modern UI frameworks (Vue.js included) : clearly understanding that this has scope of change in a few years, but then, if we do not support these constantly-evolving frameworks now, even CakePHP has a scope of eventually be "“most-popular-framework-of-a-time” that down the line 5-7 years people “might not even heard of it” (Vue.js would be a good starting point, or rather “Alpine.js”)
  • Official support of some kind of CSS/front-end framework (I am thinking Tailwindcss), considering the Author is a major contributor to Laravel, so supporting Tailwindcss (officially and/or, by default) would encourage a lot of people (new and old both) to see CakePHP as a viable option (see - “community-focused” and “open” have entirely different meanings when “frameworks” support common technologies - easier transition, less-steep learning curve, very-open culture of development etc)

Those all seem like things that might help Cake. What’s your proposal for changing that fact that it’s a small group of volunteers that can only do so much?

https://github.com/cakephp > 37 people part of organisation
https://github.com/laravel > 7 people part of organisation

Apparently, 7 are turning out to be much more efficient and productive (and for good) than 37.

Small(er) group of people is making big(ger) impact.
The alignment of ideas, the syncing of thought-processes and initiatives is definitely better.

I am following Laracasts to learn Laravel, and I find nothing like that (remember - it is a paid service, not the product “Laravel”, but the lessons) even for a payment.

Personally, I am trying to re-create all the tutorials in CakePHP to:

  1. Understand how and what is different in Laravel than CakePHP
  2. Create a curated list of video-tutorials akin to the ones on the mentioned site and put these out there - I do not intend to make a profit out of that, but a small fee might not hurt really - adds value to a product

Just 1 small thing (now that I think about it, it’s not that small actually) : We have to “support” everyone using, learning, teaching CakePHP - as a community.
Be a good critic while sharing feedback, and even better at receiving it - encourage, support and contribute via CakePHP packages (Auth, Rest API, latest-version-support of popular packages, IDE plugins (VScode, PhpStorm, Netbeans etc), Twitter activity (share more, tag more, educate more - 1 awesome tip a day by 30 people would make a huge impact) - and a few more stuff like that.

Some members (you and I can start) connect weekly/bi-weekly/monthly and just “talk” about the things that we are doing and intend to do, share ideas, initiates, be more vocal and available to people (new-and-old developers) who need help/inputs - actively on Twitter/Stackoverflow/GitHub-issues etc.

Now that almost entire developer community is in a “work-from-home” (or a virtual lock-down mode) let’s arrange for some online meetups to identify challenges of developers and support them in whatever way possible - even if it needs us to support Laravel as a framework or developers - it’s not going away, and is definitely keeping PHP from dying, better we team-up and learn from each other (as frameworks, as developers).
There shouldn’t be any “rivalry” of sort, rather “opportunity-to-learn-and-grow”.

Well said @jdecode as a newbie to CakePHP I’m trying to create a project using CakePHP and learn at the same time, trying to follow the documentation is sometimes very confusing at times even after reading it several times, I also find in some cases depending on which part you bounce in to in the documentation, the way to do something is different.

In one example I’ve been working around the Authentication / Authorization one set of documentation tells you to put a certain bit of code in /src/Application.php then on another section of the documentation it is telling you to put the same code in src/Controller/AppController.php

As I’m trying to learn, this is becoming very confusing to the point I started to look a Laravel tutorials and abandon my CakePHP application development, because of the way the tutorials are structured,
I’m the type of person who can learn very quickly from been shown to do something one way, rather than the way the documentation is laid out in Cake giving you several options, but no real solution, so something like Laravel it actually made sense, needless to say I shall carry on with trying to learn Cake but I think there might be a point, where I look at it and think hmmm.

Check out this plugin which will help you integrate Vue.js with CakePHP.

1 Like