Not sure what you mean by a "Java Bean", but if you mean code that you can pull in to cover a certain functionality like handling zip files, or excel files, there there is and it's called packages, and it is not only for Laravel, you can use it in any php project.
Java Beans.
I want to know if something like java beans is made available in laravel, the laravel way (not too complicated, easy to use). Will this idea get adoption, traction, or popularity. Will you as a laravel dev use it.
@Tray2 I'm referring to a specific concept from Spring Boot. You often hear people say that Laravel/PHP isn't well-suited for large enterprise-level development. One reason for that is because Laravel doesn't have certain features like Spring Boot. One of the core concepts in Spring Boot is the Java Bean. A bean is an object that is instantiated, assembled, and managed by the Spring container, typically used for managing dependencies, encapsulation, and configuration within an application. It's heavily used in enterprise environments to maintain structured, scalable, and modular code, something Laravel could benefit from in larger projects.
I want to build something like this for Laravel, will it be beneficial for the Laravel development community.
@Daud Murtaza Rind So in short serverless, there is a first party service for that already, it's called Vapor. https://vapor.laravel.com/
This is utter bullshit
You often hear people say that Laravel/PHP isn't well-suited for large enterprise-level development.
Laravel and PHP scales just fine, and there are options like FrankenPHP, Octane and other tools.
However if you want to build some like springboot for PHP and Laravel you should, if not just only to shut some ppl up.
"One of the core concepts in Spring Boot is the Java Bean. A bean is an object that is instantiated, assembled, and managed by the Spring container, typically used for managing dependencies, encapsulation, and configuration within an application."
This sounds like Service Providers + Service Container. You can check out the course "Modular Laravel" by Mateus Guimarães. If the annotations and configuring DI in XML are your thing, go check Symfony and their Service Container.
A bean is just a class. I programmed java, servlets, beans for years. Mostly used to return a connection in my case or a getter setter class. I did most work through the servlet and passed to view for display. I.e.
RequestDispatcher dispatcher = request.getRequestDispatcher(displaypage);
if (dispatcher != null) {
dispatcher.forward(request, response);
}
No different than loading a view in laravel.
Laravel (php), .net core, are similar.
Edit:
At times I would return a list from a bean.
if you want to use beans, run Java
Please or to participate in this conversation.