SOAP vs REST

SOAP vs REST, Basic and difference

Before we make the comparison between SOAP vs REST, we should know what they are. SOAP and REST are Web Services – Method of communication between two electronic devices over a network, in this scenario is World Wide Web. Web service is a software function provided at a network address over the web with the service always on as in the concept of Utility computing.

Web API is the very common terminology in web development. A Web API is a development in Web Services where emphasis has been moving to simpler REST (Representational state transfer) based communications. REST API do not require XML-based Web service protocol as SOAP (Simple Object Access Protocol) or WSDL (Web Services Description Language). Continue Reading

Install Laravel Homestead

Install Laravel Homestead

Introduction

Laravel is one of the most powerful PHP Framework nowadays, it will save your time and effort to make a web application. Laravel has shaken up the PHP community in a big way – especially when you consider that version 5.2 of Laravel. Using Laravel, you can build and maintain high quality web applications with minimal fuss. Of course Laravel offical has its own document to guide you how to install, but it seems not really easy to follow due to lack of some steps, maybe because you must collect from 4.2 to 5.2, so this article will help you focus on the latest version 5.2

Laravel Homestead is an official, pre-packaged Vagrant box that provides you a wonderful development environment without requiring you to install PHP, HHVM, a web server or any other server software on your local machine. No more worrying about messing up your operating system. Vagrant boxes are completely disposable if something goes wrong, you can destroy and re-create the box in minutes!

Homestead runs on any Windows, Mac, or Linux system, and includes the Nginx web server, PHP 7.0, MySQL, Postgres, Redis, Memcached, Node, and all of the other goodies you need to develop amazing Laravel applications.

If you are using Windows, you may need to enable hardware virtualization (VT-x). It can usually be enabled via your BIOS.

Included Software

  • Ubuntu 14.04
  • Git
  • PHP 7.0
  • HHVM
  • Nginx
  • MySQL
  • Sqlite3
  • Postgres
  • Composer
  • Node (With PM2, Bower, Grunt, and Gulp)
  • Redis
  • Memcached
  • Beanstalkd

Continue Reading

Factory business logic

Factory Design Pattern Example

Factory Design Pattern are examples of creational patterns which abstract the object instantiation process. They hide how the objects are created and help make the overall system independent of how its object are created and composed.

When we use Factory Design Pattern

The Factory pattern is a good solution for the cases that the main part of the app needs to manage the objects and not create them.

  • If a class manages a shopping cart, it should deal only with shopping cart management (e.g., adding or removing products from the cart) and not be concerned with the manufacturing of those products.
  • A warehouse management class follows the quantities of items entering and leaving the warehouse but has no interest in making those items
  • A car buying agency should simply track orders and not have to also deal with the details of how the cars are made.

Continue Reading

Design patterns

Design Patterns Overview

Design Patterns: Elements of Reusable Object-Oriented Software as we know “the Gang Of Four” are the four authors of the book. They are:

described twenty three design pattern for object-oriented programming that categorized in this article. In this Design patterns series, we will provide

What are Design Patterns?

Design patterns provide solutions to common software design problems. In the case of object-oriented programming, design patterns are generally aimed at solving the problems of object generation and interaction, rather than the larger scale problems of overall software architecture. They give generalized solutions in the form of templates that may be applied to real-world problems.
The most important thing when we learn about design patterns is to understand the concepts that design patterns describe, rather than memorizing their exact class, methods and properties. Then we can apply patterns appropriately. Continue Reading

Sublime Text Keyboard Shortcuts

Sublime Text Keyboard Shortcuts

Sublime text is one of the best IDE nowadays as we mentioned in Top IDEs, today we will show you  some Sublime Text Keyboard Shortcuts

Basic

Command Description
F11 Full Screen
shift + F11 Distraction Free Mode
ctrl + shift + p Command Palette
ctrl + ` Show Console
ctrl + k + b Show/Hide Sidebar
ctrl + k + u Uppercase
ctrl + k + l Lowercase

Continue Reading

Date format in Shell script

When we need date format?

You of course sometime will need date time output for such as backup file, this article will show you the standard date format in shell script.

1. Syntax

date +FORMAT
OR
date +"%FORMAT"
OR
date +"%FORMAT-%FORMAT"
Example: In your terminal screen, type the following date command

date +"%d-%b-%Y:%l-%M-%S"

The output of date format will have the follow format 30-Dec-2015:11-49-05 The full explanation of all format will be listed at the bottom of this article Continue Reading

Linux and Unix alias command

Introduction

Linux and Unix alias command is very useful. With alias you can make a shortcut to commands or a new friendly bash shell command that you like to run a different, preferred term and complex bash shell command. For example: instead of “cd ..” command, you can type only “..” Aliases persist for the current session. They can be loaded at login time by modifying the shell’s .rc file. This article will show you how to create new alias command, remove alias command and more familiar with it. Continue Reading

Fix Structured data errors wordpress

As we all know Google Webmaster Tools is a great free tool for your website SEO. It helps your see your website as Google sees it. The tool set gives your insights into what pages have been indexed on your site, what likes are pointing to it, what need to be improved in your site and much more.

If you’re using WordPress as your website CMS, and you got Google crawl errors pertaining to structured data (E.g: hentry or hcard errors showing missing author, updated or entry-title). This article will show you how to fix structured data errors WordPress. Continue Reading

php session vs cookie

PHP SESSION vs COOKIE

Passing data from one page to the others is one of the most common feature in web programming such as: user logins, passing error messages, shopping carts…

Storing data across pages using PHP is done with two variables in the global scope, called $_SESSION and $_COOKIE, and although accomplishing the same end goal, the both go about it in very different ways. This article is to give a brief look into PHP SESSION vs COOKIE Continue Reading

PHP Coding Standard

PHP Coding Standard

Before we start coding with PHP, we should take a look on the coding standard elements that are required to ensure a high level of technical.

The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 2119.

PSR stands for PHP a Standard Recommendation. This article will show you a set of rules and expectations about how to format PHP code follow PHP Coding Standard. Continue Reading