• About
  • Contact
  • Books

Sanjib Sinha

~ On Computer Science, PHP, Python, Ethical Hacking and more…

Sanjib Sinha

Tag Archives: application

Single Responsibility Principle in PHP

12 Sunday Aug 2018

Posted by Sanjib Sinha in Classes and Object, PHP, Software

≈ Leave a comment

Tags

application, PHP, single responsibility principle, software designing

“Single Responsibility Principle” or SRP is one of the most important concepts in object-oriented design. Whether you are a novice or an experienced designer, you must know and follow this principle if you want to make your objects loosely coupled; in software designing it is important to understand. Most often the inexperienced designers do not understand this core concept. And, it makes a real big difference in the time of making an application.
I have written a long article on the same topic in Medium

Share this:

  • Facebook
  • WhatsApp
  • Twitter

Like this:

Like Loading...

Horizontal reuse of code in php

17 Tuesday Jul 2018

Posted by Sanjib Sinha in Classes and Object, PHP, PHP Developers, Software

≈ Leave a comment

Tags

application, design patterns in php, horizontal reuse of code, interface, PHP, php 7, trait

The object-oriented programming is all about effective planning and design and interface plays the role of a blueprint; traits help objects to implement that blueprint. Going overboard with traits break that effectiveness.
Let us try to understand that point in the light of our selling application. Consider this code.

//iDeliveryParty.php
namespace MyInterface;

interface iDeliveryParty {
function get($product);
function post($review);
}

However, not every user may want to post a review. In that case, the traits will come to our help for not only implementing the interface but also enhance the re-usability of the code.
Continue reading →

Share this:

  • Facebook
  • WhatsApp
  • Twitter

Like this:

Like Loading...

Subscribe

  • Entries (RSS)
  • Comments (RSS)

Archives

  • August 2019
  • July 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • May 2018
  • April 2018
  • March 2018
  • January 2018
  • December 2017
  • November 2017
  • August 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • February 2017
  • January 2017
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • June 2016
  • May 2016
  • April 2016
  • March 2016
  • February 2016

Categories

  • Android
  • Classes and Object
  • CSS
  • Dart
  • Data Journalism
  • Data-Journalism
  • Ethical hacking
    • kali linux
  • Ethical Hacking for Brginners
  • Exceptions
  • Flutter
  • General
  • git
  • HTML
  • iOS
  • JavaScript
  • Laravel 5
  • Laravel 5.2.4: Be A Laravel Expert
  • laravel 5.7
  • laravel 5.7 all model relations explained
  • Laravel 5.8
  • laravel 5: learn easy
  • life
  • metasploitable
  • Mobile Device
  • MySQL
  • NASA
  • Native iOS
  • Object Oriented Programming
  • operating systems
  • PHP
  • php 7
  • PHP 7 in 7 Days
  • PHP Developers
  • Programming Language
  • Python
    • General Syntax
    • Variables, Objects annd Values
  • Software
  • tehelka
  • wordpress

Meta

  • Register
  • Log in

Create a free website or blog at WordPress.com.

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
%d bloggers like this: