7

Why Laravel is Awesome: Keeping Software Development Productive

 3 years ago
source link: https://clevyr.com/post/why-laravel-is-awesome-keeping-software-development-productive
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Where Ideas and Development Tie Together

As a custom software consulting company, we specialize in making your wildest dreams come true - at least as they pertain to the software. In order to do that, we don’t sacrifice any of our capabilities in favor of taking a simple way out. You’ll never hear us say “that’s just something we can’t do,” and trust me - we get plenty of unique requests. We don’t believe in a one-size-fits-all approach because your business needs are one of a kind. Software isn’t like a house or a car, whereas long as you have the basic amenities (e.g. shelter, utilities, water, etc. for a house), then you’re good to go; software is completely unique from one business to the next, just think about comparing the International Space Station’s operational software with the point-of-sale system at your local bagel shop.

We build custom applications to fit 100% of what you need - and we use plenty of development tools to do that. We also know that certain clients may not have the timeline available to wait for long term “built-from-scratch” applications, that’s why we provide options for pre-built software solutions like Great LMS, a learning management system for enterprises to deploy within a short timeframe. Pre-built software can be limiting, yes! This is why working with a custom dev studio like Clevyr, we can sometimes start the development work with anywhere from 50-80% of what you need already built. Our experienced team will determine what to include based on normal industry standards and emerging technology trends. The remaining portion of the solution development can be customized for specific business needs, unique internal/external usage expectations, and bespoke scalability strategies. One of those tools we’re proud to have in our wheelhouse is the Laravel PHP framework, and today you’ll learn why it’s so awesome.

Laravel Basics 

Laravel is a PHP web application framework that follows the MVC pattern and has been around since mid-2011, making it nearly a decade old. That puts it into the category of tech that’s still considered moderately recent but has been battle-tested for several years by developers building all kinds of projects. At the time of this post, Laravel is on version 7, and we’ve been using it for over a year on several projects:

  1. Facilitating Secure TeleHealth Services 

  2. Energy Analytics Dashboard

  3. Research Laboratory Workflow Portal 

  4. Intra-Enterprise Event Management Platform

  5. National Sports League Management Platform

  6. Cleyvr.com Website Development 

Free and Open-Source

Going in order of importance, Laravel is completely free to use and free for you to make money off of without worrying about attribution or royalties. Laravel’s software license is the MIT license, which in a nutshell says “use our product for free however you want, but there’s no warranty and we’re not held liable for anything.” It’s as simple and user-friendly as you can get. On top of that, Laravel is an open-source project and can be found on GitHub. Not only does that mean that the project is 100% transparent in how everything is built, but if there’s a feature you want to add or a bug you’d like to fix, then you can do that yourself and contribute to the project! Bam - there’s nothing like giving back to a community that’s helped you out.

Developer Speed

This is where Laravel really shines. Laravel is an opinionated framework, and if you do things the Laravel way, then you’ll be up and running in no time with your application. If you try to bend the rules without understanding them or try to ignore Laravel’s design patterns, then you’ll be in for a rude awakening. A lot of developers enjoy a guiding hand from their framework with how to build things, and if that describes you, then you’ll love Laravel. If you value complete and unobstructed flexibility in how you build your application, then you might not jive with how Laravel does things.

Laravel is built in a very “Ruby on Rails-y” architecture, which if you’ve ever used that tool or Python’s Django, .NET MVC, Elixir’s Phoenix, etc. then you’ll feel right at home. Laravel has easy command line scaffolding tools for generating migrations, models, controllers, views, tests, and more. The way that all of these concepts interact with each other is seamless, and that, combined with how easy it is to build relationships among data within your application (more on this in the next section), makes Laravel a “hit the ground running” kind of tool.

Read: "Why You Should Build Custom Software"

Relationships

As much as we hate to admit it, data can get complex. You can’t fit all of a business’ data into a single spreadsheet, and if you’re trying to, then you’re probably doing it wrong. That’s why it’s necessary to have relationships within your data, in which those relationships can get complex. Laravel handles this with ease, making it drop-dead simple to have “belongs to” and “has many” relationships via foreign keys on your database tables. This, though, isn’t revolutionary; many frameworks do this, and it’s pretty core to the “Rails-like” nature of Laravel. Where Laravel really goes the extra mile is through what it calls “pivot” tables.

Pivot tables are the tables that are often called associative entities or join tables, and they’re in the middle of a “many to many” relationship. Usually, the purpose of these tables is to aid in relating two different sets of data, but occasionally they will include some important data attributes as well. Laravel knows that usually you only care about these tables as an abstract idea to help join data, so when you define relationships via these pivot tables, Laravel automatically uses them to join data without you needing to be explicit about it every time. As long as the table’s name matches up to Laravel’s naming pattern, then you don’t even need a model for these tables - Laravel will automatically know what to do!

There’s plenty of ways that Laravel helps make relationships easier in your application, but it’s the things like this that really make it stand out from the crowd of other web application frameworks.

Default Support for Vue and React

As of the writing of this post, three front-end Single Page App (SPA) JavaScript frameworks have led the market over the past several years: Angular, React, and Vue. Laravel applications ship with Vue as the default front-end framework, and although it’s the most recent of the big 3, it appears to have the most active community support behind it (again, that’s at the writing of this post. JavaScript tooling changes daily it seems like). However, it’s incredibly easy to swap to React, which is right up there in popularity with Vue, and has been around for a bit longer as well. Both are phenomenal choices, and Laravel projects are built with incredibly easy tooling to include either of these frameworks right from the get-go, including full functioning Webpack processes to do everything that these frameworks need in order to build. That means less messy set up for you and more clean coding.

Extra Built-In Concepts

Beyond everything mentioned above, Laravel has incredible support for common workflows that many applications have. This isn’t meant to be an exhaustive list, but I wanted to review some of these built-in concepts that you typically build and write code for that Laravel supports out of the box:

  • Jobs - Laravel ships with the ability to run processes alongside your application for the sake of executing background behavior. You can run anything as a job, and you have plenty of choices for how to queue up your jobs (i.e. database, redis, etc.).

  • Notifications - Notifications are pipelines for easily handling email, SMS, etc., and they can easily hook up to a background worker.

  • Console Commands - Need to run a process via a CLI command? Don’t write a batch or shell script, write a Laravel Command. You get access to everything that your application does, including configuration, environment variables, and any PHP libraries, so you can build whatever you need in a simple manner.

  • Scheduler - Laravel makes it drop dead simple to run any sort of scheduled task without needing any libraries.

  • Policies - Easily handle access to any type of data in a nice segmented-out portion of your application. No need to muddy up your controllers or models.

  • Web Socket Support - If you need to publish messages via Web Sockets, Laravel has you covered. You trigger “Events” in Laravel, and can hook them up to multiple types of queues that your Web Socket client is listening on.

  • Request Validation - Easily authorize users and validate incoming request payloads. Similar to Policies, this helps keep your controllers and models clean.

  • Mass Assignment Protection - Want to only allow certain fields to be inserted into a model, even if you pass in more? Or the flip-side, want to insert anything, but always block a few sensitive fields? Laravel models support either option with ease.

  • Serialization - No need to have 3rd party plugins help you transform your JSON or XML response from your API, Laravel models support this by default. Add computed properties, hide existing attributes, and more.

Again, this isn’t meant to be a complete feature list. It’s just some of the things that I’ve run into with Laravel that made me think “huh, you know, this is really nice to have by default.”

Developer Community & Plugins

Lastly, no matter how good a core framework is, it needs to have support from the community. That means both through developer plugins as well as online forums like Stack Overflow, and building this community requires popularity and time. Luckily, Laravel has both of these, and for the most part, anything reasonable that you would need to do with Laravel has probably been done before and will be documented somewhere on the Internet. If you need a random plugin, chances are that something already exists for it - and, it’s probably free. There’s not much else to say here other than you won’t be “gambling” with Laravel as far as support goes. There have been technologies I’ve used in the past where I was worried I would run into impassable walls that deemed the framework or tool not usable for my use case; which will not happen with Laravel (unless using PHP isn’t an option).

Choosing The Best Fit

In the end, you have to choose the technology that best fits the needs of what you’re trying to build. That won’t always be Laravel, but if you’re building a custom web application at a rapid pace, then you should really check it out. If I haven’t convinced you here, then check out the docs and give it a whirl yourself. You won’t know how you feel about it until you give it an honest shot. If you still have questions, hit us up at Clevyr. We’d be happy to talk through any bigger picture concepts, as well as help you take your application to the next level.

CONTACT US


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK