I've begun using Laravel 5.4 instead of Spring boot for a web application I'm currently developing and it's going great. I'm really enjoying the lack of verbose boilerplate that Java/Spring has. However, one of my requirements is that the API must be HATEOAS.
I've literally searched for days for research material and only come up with a couple of not-so-popular libraries. Is there a reason for this complete lack of exposure of HATEOAS for Laravel when for other web application frameworks there's at least some material?
Edit: I'm not trying to talk down on Laravel, I just want to know why there's no resource on HATEOAS implementations with Laravel as the framework, or if I've missed it, where I can read up on some HATEOAS Laravel goodness.
Since Laravel uses the Symfony underneath, I think this repo would work: https://github.com/willdurand/Hateoas
Related
This may silly question. But I am going to start new project. I am quite confused which framework is best out of Codegniter 3 and Laravel 5.
What is the main difference between them.
Thanks in Advance
Right now, I personally prefer Laravel since it supports PHP7 unlike CodeIgniter (I still haven't read if CodeIgniter 3 supports PHP7). And based on personal experience, Laravel (through Eloquent) has "beautifully-written-codes".
Here are some references for you to check out: (I made sure to post both sides to not be bias)
https://www.codeclouds.com/blog/laravel-vs-codeigniter-a-difficult-choice/
https://www.clickittech.com/developer/laravel-vs-codeigniter-which-one-is-the-best-to-use
http://www.codeigniterhands.com/codeigniter-or-laravel
http://laravel.io/forum/07-08-2014-laravel-vs-codeigniter-a-difficult-choice
https://therightsw.com/codeigniter-vs-laravel-vs-yii-vs-cakephp/ (with grades for usability)
Each framework have their own features and capabilities, used during the development of application. Laravel is one of the highly used, open-source modern web application framework that designs customized web applications quickly and easily.Laravel is used not only for big project but also best to use for small project.
Best framework in 2018
If you want a framework with exceptional performance, with nearly no configuration, not using cmd and not interested with large scale libraries and also your project is in small scale it's better to use codeIgniter.
CodeIgniter3 vs Laravel5
Both framework are good in there place.
Laravel made from multiple open source project which make laravel more efficient , reliable and secure.
Where, laravel used blade engine.
It used composer for package manager.
It provide unit testing.
It provide more security.
It provide beautiful redis queue front portal called laravel horizon.
Disadvantage : laravel used predis which is slower, because it is written in php.where phpredis is more faster, but laravel 5.* Don't support it.
I will recommend you to use Laravel beacuse of:
Built in authentication
Awesome migrations
Artisan commands to do anything in your project
Built in pagination (It's took long in Codeigniter)
Eloquent (Very easy way to interact with your database)
Relationships
Routes
Easy API building
Easy debugging
Huge number of packages and libraries etc.
I have a huge project written on a Yii1 framework. Now I have the task to port the whole project to Yii2. I know it's impossible to simply update the code and I have to do a lot of copy-paste-edit job.
But the Yii1 code is pretty proper and standardized, no spaghetti or something, and I wonder if people have some helpful tools to translate models, views and controllers from Yii1 to Yii2. How can I help myself to do it faster and automatize the process?
Yii1 and Yii2 have many things in common, but at the same time they are very different. There are no tools, converters, etc. to automate this process. You have to do it manually.
Please refer to official docs links mentioned in the comments:
Upgrading from version 1.1
Using Yii2 with Yii1
So, as an alternative you can try to do partial migration from Yii1 to Yii2.
Even Yii1 project code quality can be pretty high, it's not actively supported as Yii2, and its support will end at the end of 2016 year (as far as I remember).
Yii2 is so much better, so if you have possibility and time, it's better to migrate to Yii2. But if you have no plans to improve your project much (only implement small features, fix bugs, etc.), leaving it on first version seems like normal solution.
I am in the process of integrating some sort of background service executor. I am thinking to use Beanstalkd for it. I Googled it everywhere but I could not find a decent bundle to do the job with nice documentation. Few I found were
LeezyPheanstalkBundle
drymek/pheanstalk-bundle
But these bundles do not describe everything from start to end like this one from Laravel. Like listening for the job, sending arguments and so forth.
Is there any bundle for this or perhaps documentation? I found one nice one for Laravel with proper documentation and everything.
So, I am thinking if I chose to Laravel container for this job are there any tutorials regarding how to use Symfony bundles in Laravel. I found many for using Symfony bundles in Laravel but not the vice versa.
Can someone please give me any insight in this matter.
Working with Beanstalkd is framework agnostic. You should be better and more easy for anyone if you would learn Pheanstalkd library. You can install quickly with Composer.
Working with Beanstalkd is so simple that the two examples from the linked page covers most of the parts, the other more advanced stuff is also easy and at hand with a couple of function calls. You need to be clear with the procotol
I've got a huge site that has been written (in a very bad way) in symfony 1.4
now, I've been asked to make some substantial changes to the navigation flow, add some features and so on..
considering the effort, I was wondering if it would be better to take the radical decision to port the entire website to symfony 2.0, but I'm not sure how hard that it could be.
Has anybody ever done this before?
Do you have any suggestion to make for patterns to follow, or tutorials or doc or whatever?
You may wrap your legacy project in a brand new sf2 project, by using this bundle. This way, you'll be able to migrate your project one piece at a time, and new functionalities may be developed with sf2 as soon as you get the wrapper to work.
You may be interested by this post about migrating
Here's how I would go about it:
You need to learn and study some things first:
HTTP fundamentals
PHP namespaces, which are heavily used
Symfony2 documentation
Symfony2 documentation
Symfony2 documentation
PHPUnit documentation
Then when you get the hang of Symfony2, you need to find out what to reuse from your old project:
Models, business logic?
Did you use Doctrine in symfony? If yes, look at how to port your entities to Doctrine2, and learn about the differences. If you used Propel, I would look at switching to Doctrine2 and not use the PropelBundle, atleast until you get used to Symfony2. You can find better documentation and sample code out there for Doctrine2.
You also need to convert your old helpers classes to Symfony2 services.
Views?
Symfony2 uses Twig as templating engine, but you could go with pure PHP.
Controllers?
This should feel somewhat similar to symfony. The flow of Symfony2 matches the HTTP flow, meaning you get a Request object and must reurn a Response object.
It really depends on how well structured our old project is. Symfony2 is an entirely different beast than 1.0-1.4. I would probably not call it a port, but a rewrite - however, if your old project is well structured you could probably reuse quite a bit.
Without actually seeing your code, it's impossible to give a good answer on how hard it would be. It's very much doable, but there is no easy route. Symfony2 is, IMHO, the way of the future for PHP projects and in the end you will get a project that is much easier to maintain and support.
I have never used a PHP framework before and am considering using Symfony for my next one. However, I have already built an API which has all my main classes. I will therefore connect to this API using CURL. Can anyone advise on where to start with such a project. I am working through a Symfony tutorial but none of it seems to apply to what I need to do as I do not need to create database connections or classes as I will be building this project on my existing API.
If you don't need a lot of what you see in the Symfony tutorials you might be able to get away with Silex. Silex is a mini-framework with alot of the core aspects of Symfony, but without the extra stuff.
http://silex.sensiolabs.org/