Sunday, 23 October 2016

Laravel Interview Questions and Answers

Laravel is the PHP framework created by Taylor Otwell. Here are some important interview questions and answers on Laravel for experienced.


1. What is Laravel

Laravel is the PHP web framework developed for the purpose of developing web application on MVC (Model-View-Controller) design pattern.


2. Brief few features of Laravel

Here are some few features:

  • Bundles
  • Query Builder
  • Reverse Routing
  • IOC Container feature
  • Database Seeding
  • Automatic pagination

3. What are the official packages provided by Laravel

The following are the official packages provided by Laravel
  • Cashier
  • Envoy
  • Passport
  • Scout
  • Socialite

4. Explain Laravel Service Container

Laravel Service Container is used to perform dependency injection, wherein the dependencies of a class is injected via constructor or other method.

5. What is Service Providers

Laravel Service providers are used for all Laravel applications including Laravel core service applications.
Also, most of the service container bindings are registered inside service providers. 

6. What are Laravel's Contracts

The core services provided by Laravel framework is defined by the set of interfaces which is called contracts. For example, Illuminate\Contracts\Auth\Authenticatable contract defines the methods needed for authentication. Similarly, Illuminate\Contracts\Routing\Registrar contract defines the method for registering the route with the router.

7. Explain Laravel's Facades

Laravel's Facade provides a static-level interface for application's service container classes. It is defined inside Illunminate\support\Facades namespace. 
For eg: Illuminate\Support\Facades\Cache
Illuminate\Support\Facades\Queue and others Facades

That's all for interview questions and answers on Laravel.


Jenkins Interview Questions

Jenkins is one of the tools for continuous integration and these days more applications are using Jenkins for automated integration. Here are few important questions and answers on Jenkins.

1. What is Jenkins?

Jenkins is an open source application for continuous integration and continuous delivery of application software.

2. What is Continuous Integration?

Typically, there are multiple developers writing code for a single application, so we need to perform integration test by integrating each new piece of code via testing it through as many tests as possible. This practice is called continuous Integration. Jenkins besides Hudson, Bamboo etc provides tools for continuous integration.

3. Tell me few advantages of Jenkins?

Here are some advantages of using Jenkins (or by any matter any integration tools) :-

(a) It saves developer time: 

The foremost advantage of using Jenkins is that since most of the integration task is being handled by Jenkins (via automatic integration), the developer time is focused on development activities mostly.

(b) Improved software quality

Since the software is being tested immediately after any code check-in, it keeps the quality check frequently, thus improving overall software quality.

(c) Faster Delivery

Jenkins automatically does continuous integration, which leads to very early detection of bugs / defects and hence it leads to faster delivery of software.

(d) Decreased development time

Since most of the integration work is automated by Jenkins, it leads to the faster development of application.

(e) Easily portable: 

Since Jenkins is developed using Java, it can be easily portable to other platforms.

(f) Early tracking of defects: 

Jenkins helps tacking of defects at very early stage in development environment only rather than production environment.

(g) Email Notification to developers: 

Jenkins can be easily integrated with LDAP server, so developer are notified about build success / failure via mail.

4. What are the commands to start Jenkins manually?

Commands:
<jenkins_url>/restart :  Force restart (will not wait for ongoing build to complete)
<jenkins_url>/safeRestart : Wait for all builds to complete before restarting.

5. Mention few plugins of Jenkins?

Here are some plugins that can be used with Jenkins:

  • Delivery Pipeline
  • Join Plugin
  • Copy Artifact 
  • Git 
  • Android Emulator 
  • Cobertura 
  • Email-ext 
  • Docker 
  • Amazon EC2
  • Openstack Cloud
  • CloudBees Folders

6. What are the two most important components Jenkins is integrated with?

Jenkins is integrated with these two components mainly:
(a) Version Control System like SVN, GIT
(b) Build tools like Maven



That's all for some important questions and answers on Jenkins. I will add more questions and answers later.