Wednesday 10 February 2016

Let’s take gleams of latest Laravel 5.2.





‘Those who cannot change their minds cannot change anything.’ – George Bernard Shaw.

If you are businessman, or inventor of anything your own ideas into reality you just need to ‘Pin’ the above line in your mind as well in your heart for long term perspective. It will be better for your business niche.

TheLaravel!

Almost, everyone knows about it. Especially, who required to deals with software programming.

The Laravel is a framework, developing in PHP language. Is it comes into picture with aim of to present cool, sophisticated web-apps to the users / customers.

Recently, the Laravel announced their latest version that is ‘Laravel 5.2’.

Let me come directly to the point. 1) What is new in Laravel 5.2? Or what new things provided by Laravel 5.2? 2) How it is better than older version? Or what is the reason behind updating? 3) How it will be advantages? 4) Whom it will be advantages? 5) What are the general features of Laravel?

1)    What is new in Laravel 5.2? Or what new things provided by Laravel 5.2?

1.   Artisan Scheduler:

The ‘artisan scheduler’ is an interface; build in PHP included with Laravel. The scheduler is help to append output from scheduled tasks to a file.
For e.g.:

$schedule->command (‘emails: send’)

      -> hourly ()
      -> appendOutputTo ($filePath); 
 
Note: If you want know further more about the artisan scheduler visit this link: https://laravel.com/docs/master/artisan#scheduling-artisan-commands

2.   Collections wildcards:

The collections of wildcards are amazing feature during routing sub-domains. It will route and assigned to the specific parameters. 
 
But, the array of routed wildcards is running out till not get the match with the external URIs. 
 
For e.g.:
                $route [‘item: /num’] = ‘category/item_lookup’;

Note: above example will return all items for specific category.
The noticeable update is to collect the data from sub-domain routers, the ‘*’ sign is able to use as wildcard so now in Laravel 5.2 no requirement to defining the wildcard function.
3.   Database session driver:

Simply,just the main task of database session driver is that clear all sessions of specific users. 
 
Generally, the sessions are store as temporary cached files or in temporary database, which is basically store users information that is user_id and ip_address.
 
Once the agenda should be fulfilling, the session will automatic destroyed. And another reason of destroying is either hardware or software failure by any hurdles. 
 
Here, the Laravel have a variety of session back-ends available to clean and unified APIs. 
 
For e.g.: Memcached & Redis. 
 
4.   Eloquent global scope:

In Laravel 5.2 just need to use ‘apply’ method globally as query scopes only when require you to implement a single and simple method. 
 

5.   Form array validation:

Laravel 5.2 comes with strong form validations, it will take cares from the form creation request to adjust authentication, apply custom validations, specify the validate messages etc…

For deep understanding click here; you will get wonderfully explanation of form array validation. 

6.   Implicit model binding:

The implicit model binding will work with automotive binds a model to the route.
For e.g.:
                route::get (‘/api/posts/ {post}’, function (Post $post))
                {return $post ;});

Whatever the function ‘Post’ results either ‘find route’ or ‘fail to find route’ it will return automatically to the $post variable.

This is the most new feature comes from Laravel 5.2 with the aim of help to remove manually route binding.

7.   Middleware groups:

Actually, the ‘middleware groups’ are works sometime harmfully while routing the data. 

Laravel provide ‘CSRF token’ while the data is being work with the ‘Middleware groups’ to share APIs resources. The CSRF is provide protection layer to your authenticate and confidential data.

So, ultimately the CSRF will rescue your data from the unauthenticated users while you are knowingly or unknowingly working with the ‘middleware groups’ like web UI and API within the same application.

8.   Multiple authentication drivers:

‘Multiple authentication drivers’ tag is just enough to justify the meaning of its existence. 

Laravel 5.2 defines multiple authentic table models or authenticates user tables which control user’s authentication process separately from each other.

For e.g.: 

 You have a single database with multiple tables; from all one is assign to ‘admin users’ and another is assign to ‘common users’. 

Now in Laravel 5.2 you can apply ‘Auth’ methods to authenticate each table separately, by giving unique identification key.

9.   Authentication scaffolding:

It may happen that some of you know that this feature is derives from Laravel 5.1. But, in the Laravel 5.2 this feature is upgraded. 

The upgraded ‘authentication scaffolding’ is now work with the bootstrap supporting front-end framework.

‘php artisan make: auth’ command is work when the need of check authentication, new registration and reset passwords request. It will auto create a base set of view files for these task.

Note: as I said this is the upgraded feature, so it will work successively with new applications only, not well working with the already exists applications. You may not be able to upgrade this feature in old version supported applications.

10.       Rate limiting middleware:

The rate limiting middleware is a tool which is used in some APIs to check the limits of individual requester’s request rate to access APIs.

For e.g.: AppLock for Android APIs.

Your smart phone is full of APIs; some APIs need to be confidential like your social account and personal mailing account. To secure this type of APIs you may try to set password to lock and giving n authentication rights.

If someone else who doesn’t know your pin or password and try to access your locked APIs by entering random pins, after 3 tries the APIs is block for that stranger for some couple of time. Only you can open it by entering true password.

Thus, the rate limiting middleware is also giving a security to your APIs.  

And, the most beautiful thing is that now onwards from Laravel 5.2 the rate limiter middleware is embedded. 

Click here, for further deep information about it.

2)   How it is better than older version? Or what are the reasons behind updating?

The above line is perfectly matched its concern over here, we all know that the Laravel 5.2 is most upgraded version. But, you should know about the reason of upgrading. 

The earlier version Laravel 5.1 is good but, need of improvement is require to give better services to the users.

Let me define comparison of Laravel 5.1 and Laravel 5.2:

No:
Reason:
Laravel 5.1:
Laravel 5.2:
1
Auth Method:
Single Authentication.
Multiple Authentications.
2
Authentication Scaffolding:
Manage back-end authentication.
Manage front-end authentication.
3
Array Validation:
Bit difficult.
Much easier.
4
Global Eloquent Scopes:
Implementation is Complicated and derives errors.
Easy to implement by method: apply and error free results.
5
Supports:
To new creation of APIs and project as well can upgraded already exists with earlier versions.
Only new created APIs or projects with Laravel 5.2. Not support to upgrade Laravel 5.1 and earlier versions.

Thus, these are the reasons why requirement is arise of Laravel 5.2. The Laravel 5.2 is provided some latest and useful features except the supportive matter. Other than this, the Laravel 5.2 is far better for delivering speed of service almost 25% faster than Laravel 5.1. Such, this is the coolest feature of Laravel 5.2.


3)   How it will be advantages? Or How it preferable to use? Or what are the reasons to use the Laravel 5.2?

The Laravel 5.2 features itself known as advantages of Laravel 5.2 which I already elaborate in first question there is some advantages are going to be crazy to use Laravel 5.2 framework. 

The most useful advantage is that is now multiple authentications will drive smoothly within a single application. 

With that another great advantage is that the Laravel 5.2 is supports native MySQL JSON column types. Isn’t it cool? Offcourse it is, because; every developer can easy going through the MySQL and JSON queries since long term as they are basic form of any damn APIs.

Thus, these are the advantages serves by Laravel 5.2.

4)   Whom it will be advantages / useful?

Definitely, any invention is useful to both developers and users as well. And, especially the programming stuffs. 

The Laravel 5.2 is also good for both developers and users. But, moreover is better for the developers. 

Qualities with developer’s perspective:
  • Developer friendly environment.
  • Easy to explain and implement methods, functions, classes etc…
  • Easy to deal with objects.
  • Consistent coding style.
  • Database seeding is helpful to test dummy data.
Qualities with user’s perspective:
  • Easy to access.
  • Secure access.
  • Easy to understand.
  • Easy to follow.
  • Easy to use.

5)   What are the general features of Laravel? Or what are the fundamental qualities provided by Laravel?


General Features: 
  • Authentication: Basic authentication system is pre-defined in every new installation of Laravel.
  • Auto-Pagination: One of the most useful features when building new web-services or APIs.
  • Blade: Rich template engine.
  • Elixir: Wrapper for automotive class.
  • Laracasts: Laravel video tutorials.
  • Migration: Useful for database schema.
  • ORM: Object relational mapping.

Conclusion:

So, at the end I just hope that you will get the deep ideology about the Laravel 5.2, that the features what they provides are much better than older version. 

The killer features are only the reasons for developer’s first choice of PHP framework that is Laravel.

But, this is not the end of improvement process by Laravel 5.2, infect; the Laravel team still working on your dreams.

No comments:

Post a Comment