I am a programmer who familiar with Java and .NET.
Now for some personal project, I want to host it to my shared hosting using PHP. I just learn PHP, and I select Laravel because I saw it very look like Spring MVC and ASP.NET I used already.
But I have a concern is that, each project will INCLUDE the laravel framework folder (in /vendor). So if I have multiple laravel projects (create by composer), I will have multiple laravel framework core file for each project. This is a kind of duplicated resources, reduce my disk space a lot.
Are there any solution for that? Example use one laravel framework core for multiple project. I mean the folder /vendor/laravel. I used Java Spring and ASP.NET and for these framework, we can store libraries of framework (.jar or .dll) in a folder, then reference it from projects.
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 experience with Joomla and have modified and wrote some simple Joomla extensions. I don't have experience using one of the popular PHP frameworks (such as CakePHP), but I was thinking about using the Joomla framework because I'm familiar with Joomla. How would I use the Joomla framework for a software project instead of using regular Joomla and writing the extensions needed for it to extend it's capabilities? Thanks!
The basic idea is that you:
Get a copy of either the whole framework or just the packages you need+dependencies (from github or composer) or use the older copy that is shipped with the CMS,
Bootstrap your application (JApplicationWeb or JApplicationCli).
Write your code using the MVC structure provided.
The big difference with writing a totally independent application is that you are doing just that, you need to build everything in the application whereas in the CMS there are already a lot of things in place. (The good part of that is that you can make new code with no legacy concerns.) For example, if you look at the JIssues project you'll see that they had to think about things like authentication. So as you would expect writing a simple application is simple, writing a complex one is complex.
You can see many examples of framework applications around, ranging from the ones found in the CLI folder of your CMS installation to JIssues, and of course the three web applications in the CMS are all examples of applications on the framework.
The Joomla Framework is intended (among other things) to be the platform upon which you can build a web-application. The framework is like the frame of one of those motorcycles they build on "American Choppers." It provides the backdrop so that you can hit the ground thinking about your app without worrying about User Authentication, database connection, and a thousand other things like those that get in the way of bringing your app to its potential audience.
If you're trying to extend Joomla, the current edition is what you should be using.
My website already have MVC architecture. I want to expand his capabilities by installing Laravel framework.
Can I just copy unzipped Laravel framework, so all folders and libraries are just copy/pasted. ?
I have VPS Ubuntu 12.04 and PHP 5.4.4
In which form your website has MVC architecture implemented ?
Is that through your plain PHP code or through some other framework ?
Laravel is implementing MVC architecture on its own way. In order to use that Laravel MVC capabilities, you will have to move all your logic inside Laravel.
UPDATE WITH SOME RESOURCES:
Official Laravel documentation
Laracasts - video lessons
Laravel IRC channel.
Good luck
The fact that you have used MVC does not mean that it will fit laravel's structure unfortunatelly. With different file structure, routing, controllers and models it wont work that way.
I dont know how advanced and expanded your page is, but you will probably re-write it laravel way.
Steps that you will need (assuming that you have some knowlege about laravel):
Prepare models for your existing database
Add routes for pages that you will need, create controllers for them using models
If you have used smarty templates, you can install smarty bundle for laravel, otherwise you will have re-write you templaets to blade (default laravel's templating engine)
I am starting a small project that I think might be well suited for Laravel 4. However, the project would have to coexist with a much larger existing legacy project, one that has its own bootstrapping system and routing (via htaccess). Is there a good way to have Laravel 4 coexist with an existing project in this way?
The way you normally start a Laravel 4 project basically takes over the entire project directory. That wouldn't be suitable for our current legacy project, which has many of the php scripts right in the public_html directory. Perhaps the entire Laravel project could be installed in a subdirectory of the main project, but that seems like a fairly messy solution. Is there a better way?
Yes, Laravel 4 components can be used without installing or using the full Laravel 4 framework - it's really flexible and pieces can be swapped out.
I would use Namespaced Controllers and Models, map your legacy code to them and slowly migrate over as alot of Laravel 4 can be used individually in external projects.
Eventually you can move over the routing to the Laravel 4 or any other Router you choose.
I've used the Database Layer in a Codeigniter project without any problems.
The only thing you need to be careful of is the PHP version as it relies on mcrypt, but if your're not using any of the password features I think you'll be okay.
I've seen lots of videos and instructions on how to install zend framework on wamp and other similiar local host environments. I've also seen lots of references, including here, that mention you don't need to 'install' zend, it just needs to be included in the php files to work.
As I think I understand it, installing zend on localhost environments will allow you to utilize certain tools that for example automate the creation of projects and gets the most out of the framework. I'm assuming that to then use these projects in a web host environment, you simply need to upload a specific project's files and ensure the zend files are in place and included in the directories.
Are my assumptions correct? I'm still trying to grasp the basics of this one and haven't found clarifications in my google searches.
Everything you wrote is correct. It helped me to think of Zend Framework as a library of components rather than as a program you need to install. As long as your application has access to that library of components, Zend Framework is installed. This doesn't address any of the configuration tasks you'll need in Bootstrap and/or application.ini, but should clear up installation.
Regarding the automated creation of projects and project elements (controllers, actions, etc.) this feature is available via Zend_Tool and is typically used only during development, so it shouldn't come into play once you've ported from your localhost.
Automated creation of the projects is far not the main feature of Zend.
The majority of the php frameworks are about providing the best infrastructure for complying to MVC design pattern, about object relational mapping, security enhancements etc.
And yes, the whole project tree is what you'd need to carry around for deployments.