Laravel (Basics) – 01

Framework and Laravel

Once upon a time, core php code was used to develop a web application including features like user authentication, input validation, database access and templating and more. Nowadays, developers always prefer to use a framework for application development. There is a common refrain among developers that when you learn a framework that time new frameworks are competing with that framework intending to replace it. To learn each and every framework is a bit of a tough ask for any developer, that’s why it is better to focus on one framework for application development. As a reader, it is worth asking the question “why frameworks?” “Why Laravel among frameworks?”

 

Benefits of a framework:

The benefit of using a framework is that someone has made decisions about individual components and about how those components should fit together. With packages or components, someone else is responsible for developing an isolated piece of code that has a well-defined task(you can consider it as a built-in library function from C/C++) and you just need to use it by proper calling into your program. 

 

Laravel framework includes a set of external components along with specific configuration files, directory structures, service providers and bootstrapping mechanisms that are integrated together as a unified entity. That’s why this framework is easy to operate in MVC pattern.

 

Few questions when we are not using framework for development:

Suppose, you do not want to use a framework. Then how will you begin to develop an application framework?

If i am not wrong, you should probably route HTTP requests, so you have to evaluate all of the HTTP request and response libraries available and pick one. Then a router and most probably, you need to set up some forms of route configurations file. How will you write those code syntax? What about controllers? Where do they stay and how are they loaded? That means you need a dependency injection container to resolve the issues of the controller and their dependencies. But which one?

Let’s consider you have successfully created the application with proper answers that we questioned earlier but what will be the impact on the next developer? What about when you have more than one such custom-framework-based application and it is a hazy and difficult task to remember where the controllers are situated or what the routing syntax is?

 

Flexibility and Consistency:

  1. Frameworks help us to choose the right component to use for the proper purpose.
  2. If a laravel developer knows about how routing works in all laravel projects, it is easier to cope up with new laravel projects for the person.
  3. A best framework always provides you the ability to control what does and what doesn’t include into your application foundation. That means the best frameworks always provide you solid foundation and a freedom to customize your own content freely.
Share

Leave a Reply

Your email address will not be published. Required fields are marked *

Proudly powered by WordPress | Theme: Lean Blog by Crimson Themes.