Cybercraft Blog – Write something different

Team CyberCraft আপনাদের দিচ্ছে ফ্রী ইকমার্স সাইট সীমিত সময়ের জন্য

কেমন আছেন সবাই ? সবার সাথে আজ একটি ইন্টারেস্টিং নিউজ শেয়ার করতে চাই।

আমাদের মাঝে অনেকেই আছেন যারা অনলাইন বিজনেস করছেন বা করার চেষ্টা করছেন। যেকোনো বিজনেস শুরু করা এবং তাতে সফলতা লাভ করা আসলেই অনেক কঠিন, অনেক সাধনা, ধৈর্য্য আর কাঠখড় পুড়িয়ে তবেই সফলতা লাভ করা যায়। যদিও অনেক সময় প্রত্যাশিত সময়ে প্রত্যাশিত ফলাফল পাওয়া যায় না। তবুও লেগে থাকতে হয়। আপনাদের সকলকে তাই সশ্রদ্ধ সালাম।

ছেলেদের পাশাপাশি আমাদের নারীদেরও অনেক চ্যালেঞ্জের মুখোমুখি হতে হয়। আমরা জানি, সংসারের পাশাপাশি এই বিজনেসে সময় দেয়া খুব একটা সহজ না। আপনাদের জন্য শুভকামনা।

আপনাদের এই অক্লান্ত চেষ্টাকে সম্মান জানিয়ে Team CyberCraft হাতে নিয়েছে একটি চমতকার উদ্যোগ – স্বপ্নচূড়াঃFree Ecommerce site। এ প্রজেক্টের আওতায় গ্রুপের সকল নারী সেলারগণ তাদের নিজেদের জন্য একটি ইকমার্স ওয়েবসাইট করার সুযোগ পাবেন। এবং সাইটটি হবে সম্পূর্ণ ফ্রি। হ্যাঁ, ঠিকই শুনেছেন, সম্পূর্ণ ফ্রি !

যেকারণে ইকমার্স সাইট প্রয়োজনঃ

দেখুন, আমরা যারা কমবেশি অনলাইনে/ফেসবুকে বিজনেসে আমাদের সকলেরই কিন্তু একটা স্বপ্ন থাকে, আর তা হল নিজের বিজনেসকে একটি ব্র্যান্ড হিসেবে প্রতিষ্ঠিতি যেনো সবাই এক নামে আমাদের বিজনেসকে চিনতে পারে। অনলাইন বা ফেসবুক বিজনেসের ক্ষেত্রে প্রধাণ সমস্যাটি হল, এর মাধ্যমে আপনার ভালো সেল হলেও আপনি আপনার বিজনেসকে একটা আলাদা আইডেন্টিটি হিসেবে, আলাদা ভালো একটি ব্র্যান্ড হিসেবে পরিচিত করতে পারছেন না। আজ পর্যন্ত সফল ব্র্যান্ড ভ্যালু তৈরি করা কোনো বিজনেসই শুধু ফেসবুক বা অনলাইন সোশ্যাল প্লাটফর্ম ভিত্তিক বিজনেসকেই মূল প্লাটফর্ম হিসেবে ধরেনি। তাদের প্রত্যেকেরই একটা নিজস্ব ইকমার্স সাইট আছে।

আরেকটি বড় সমস্যা যেটি তা হল, ফেসবুকের মাধ্যমে অনলাইন বিজনেসে ক্ষেত্রে কাস্টমার ম্যানেজমেন্ট, সেলস রিপোর্ট, অর্ডার ম্যানেজমেন্ট ইত্যাদি করাটা দুঃসাধ্য। হাতে লিখে বা এক্সেল শিটে রেকর্ড করা সময়ের অপচয় আর বিরক্তিকরও বটে। ইকমার্স সাইটের মাধ্যমে সব কিছুই সফটওয়্যার বেইজড হওয়ায় সেই সমস্যাটি আর থাকছে না।

সাইটে যা যা থাকছেঃ

  • একটি পরিপূর্ণ এডমিন প্যানেল
  • মাসিক, বাৎসরিক, দৈনিক আয়ের হিসেব, সেলস রিপোর্ট, ভিজ্যুয়াল গ্রাফ
  • অর্ডার ম্যানেজ করতে পারবেন।
  • বিজনেস গ্রোথ রেকর্ড প্যানেল, যেখান থেকে আপনি আপনার বিজনেসের উন্নতি বা প্রগ্রেস দেখতে পারবেন।
  • আনলিমিটেড প্রোডাক্ট ও ক্যাটাগরি ম্যানেজ করতে পারবেন।
  • এনালাইটিকস, কুপন ইত্যাদি ম্যানেজ করতে পারবেন।
  • রিয়েলটাইম চ্যাটিং সিস্টেম।

এক্সট্রা ফিচার যা যা দেয়া হবে

  • সাইট সিকিউরিটি
  • পারফর্ম্যান্স অপ্টিমাইজেশন
  • এসইও ( SEO )
  • Free SSL certificate
  • রেগুলার সাপোর্ট

A huge thanks to team CyberCraft for this initiative !

যা যা করতে হবে

  • এই লেখাটি শেয়ার করতে হবে ফেসবুকে। ক্যাপশনে লিখতে হবে, “Happy to get #freeEcommerceWebsite. 🙂 Get yours ASAP !”
  • ফ্রী ইকমার্স সাইটের জন্য এই এপ্লিকেশন ফর্মটি পূরণ করতে হবে।
    ফর্ম লিঙ্কঃ https://forms.gle/j9NrDVP1p6xdoEmd7

ব্যস ! নির্ধারিত সময়ে আপনাদের সাথে যোগাযোগ করা হবে আপনার রিকোয়ারমেন্ট কালেক্ট করার জন্য। 🙂

CyberCraft: Announcing 3rd Party Plugins, Features and Extension Development Team Dedicated for WordPress

The leading CMS in web world in WordPress. Most of its users around the world are using it to have their solutions from easy to complex one. Multivendor e Commerce, social platform, LMS, erp, forum and what not ! But sometimes , many of us face difficulties to add custom functionalities and features and extend it as how we want.And there’s the GOOD NEWS.

We, Team CyberCraft work to fix this problem. Our WP heroes here are dedicatedly working to provide the solutions to make it exactly the way you want.GOOD THING IS, We are here to help you with popular WP plugins as well which includes
WooCommerce
WPUF
WP ERP
ACF
BuddyPress
bbPress
Elementor and all its extensions

And the list is growing. Feel free to contact us to customize, extend and/or add features and functionalities to the popular WP Plugins to make it work your way.Our Page to contact: https://www.facebook.com/cybercraftithttps://www.facebook.com/cybercraftit

Elementor’s Big Deal is Here. Grab it to Make Your Site in Effortless Way !

It’s black friday, the festive time when all the big companies let the customers have the dream come true announcing big discounts on their top products to bring them to their customer’s affordability.

Elementor – the number one pagebuilder in WordPress is also one of them. They have introduced a huge discount of upto 25% for their pro extension to let you have their exclusive features unlocked.

What are the features that you can have in Elementor Pro ?

Well, there are 50+ more widgets that are only in pro version. Some of them are

  • Portfolio
  • Slides
  • Product rating
  • Product price
  • Product image
  • Price table
  • Login
  • Nav menu
  • Countdown
  • Animated headline
  • Pricelist
  • Flipbox
  • And more

Moreover there are some cool features that free version does not have but pro version does

  • You can easily build Industry-leading theme with their theme builder which only available in pro version
  • Pro version provides Design-oriented Popup Builder, which means you can build popup as well with no coding required.
  • Visual Form Builder + Popular Marketing Integrations
  • WooCommerce pages can be built with the free version’s pagebuilder, but it’s pro version unlocks this ability, also it unlock 15+ WooCommerce widgets for you.
  • Dynamic Content & Custom Fields Capabilities
  • Awesome mouse effects and motion effects including parallax are included in pro extension.​
  • Premium Support
  • Beautiful and stunning templates and blocks are there for you to lessen the hassle of building the whole page from scratch.

And all of these features you are getting at a price starting from $49 ONLY including 30-Day Money Back Guarantee. you can visit their site to know more in details from here

So, why wait ! Grab your copy in this black friday from here with the WOW discount and build your site like a real PRO !

Database Storage Engine : What is it and its types in MySQL

Hi, it’s long time I started writing about something. In fact , the busy life could not let me make the time for it. Now, when I got time, I was thinking what the topic I can cover. Thus found the topic and it is about database engine.

What is it ?

There are many types of database management systems out there. But every system needs a something that does the operations like creating, reading, updating and deleting that data from the system. Database engine is that component of software module that does these staffs.

Types

There are different types of engines , all types are not supported in all db management systems. In this article I will discussed about the ones supported by MySQL database.

InnoDB:

This engine is the default one set in MySQL 5.5 or later versions. It is ACID compliant engines. It supports transactions, row-level locking, crash recovery, multi-version concurrency control. It provides foreign key referential integrity.

MyISAM:

This engine was default engine in the version prior to MySQL 5.5 . It does not support transactions. It provides table-level locking.

Memory:

This storate engine creates tables in memory. It is the fastest engine, but it is non transactional. Data is deleted when the database is restarted.

CSV:

It stores data in csv file. It plus point is that data in it can be integrate to any other application.

Merge:

To manage large volume of data it is a good one. It is actually operates on underlying MyISAM table.

Archive:

It is optimized engine for high speed insertion. It compress the data when it is inserted. It also does not support transactions.

Other than these, there are two more types of engines Federated and Blackholes storage engine.

বিজনেসে কোনো লস নাই

কথাটা শুনে নিশ্চয় একটা ধাক্কা খেলেন। ভাবছেন, এ আবার কেমন বিজনেস ? নিশ্চয়ই এর মাথা খারাপ হয়ে গেসে, অথবা বিজনেসটাই হয়তো অবৈধ। হয়তো স্মাগলিং টাইপ কিছু। না ভাই, একদমই না। যা পড়োছেন, ঠিকই। কোনো বিজনেসে কোনো লসই নেই, এবং বিজনেসটাও অবৈধ হওয়ার প্রয়োজন নেই। বৈধ যেকোনো বিজনেসের ক্ষেত্রে এই কথা সত্য।

এখন ভাবছেন , “ভাই, এত কথা শুনতে তো আসি নাই। কিভাবে লসলেস বিজনেস করা যায়, এইটা আগে বলেন”। হ্যা, এটা বলব। তবে তার আগে আপনিই আমাকে বলুন, লাভ বলতে আসলে আমরা আসলে কি বুঝি। ১০ টাকার প্রোডাক্ট ১২-১৫ টাকা দামে সেল করলে, ২-৫ টাকা বেশি যে পাচ্ছি, এটাই আমার লাভ, তাইতো ? যদি এমনটা ভেবে থাকেন, তবে ভুলটা এখানেই। আসলে , বিজনেসে লাভ শুধু টাকা দিয়ে পরিমাপ করলে ভুল হবে।

আপনি আপনার প্রোডাক্ট যে সবসময় যে প্রোডাকশন কস্ট এর চেয়ে বেশি দামে বিক্রি করতে পারবেন, এমনটা নাও হতে পারে। ১০ টাকার প্রোডাক্ট যদি ৮টাকায় সেল হয়, সেক্ষেত্রে কেন ২ টাকা কমে সেল করতে হল, ঘাটতিটা কোথায়, কাস্টমারের চাহিদার সাথে কোন পয়েন্টে প্রোডাক্টের ঘাটতি আছে যে কারণে কাস্টমার ১০টাকায় কিনতে আগ্রহী হচ্ছে না এগুলা নিয়ে আপনার তখন স্টাডি করা লাগবে। এই স্টাডি করে যা পাবেন তাইই  হল আপনার অভিজ্ঞতা।

এখন পরবর্তী বার যখন এই প্রোডাক্ট নিয়ে আবার ব্যবসা করতে যাবেন, তখন ঐ অভিজ্ঞতা কাজে লাগিয়ে ঐ প্রোডাক্টটিকে কাস্টমারে চাহিদার উপযোগী করে তবেই তো ব্যবসা শুরু করবেন, তাই  না ? সুতরাং এক্ষেত্রে অভিজ্ঞতা হল একটা ইনভেস্টমেন্ট, প্রথমবার যেটির অভাব ছিল। আর প্রথমবারের বিজনেসে আপনি ২ টাকা দিয়ে ঐ অভিজ্ঞতাটাকেই কিনে নিয়েছেন বলতে পারেন। সুতরাং প্রথমবারও আপনারও ওভারঅল লস হয়নি, আপনি ইন রিটার্ন কিছু পেয়েছেন, আর তা হল অভিজ্ঞতা।

এই অভিজ্ঞতাই অনেক বড় একটা এসেট, যেটা আমরা অনেক সময় আমলে নেই না। অনেকেই আছেন, যাদের কাড়ি কাড়ি টাকা আছে, কিন্তু  অভিজ্ঞতা নেই। শুধু এই টাকার জন্যই তারা বিজনেসে নামতে অত্যুৎসাহী হয়ে যান। পরবর্তীতে যখন আর্থিক লস খান, তখন ভেংগে পড়েন বা রণে ভংগ দেন। অথচ উনি যে অভিজ্ঞতাটা অর্জন করলেন, তা দিয়ে তিনি  আবার শুরু করতে পারতেন।

বিজনেস করতে গেলে অভিজ্ঞতার প্রয়োজন আছে, এবং তা mandatory । আমার বর্তমান আইটি  বিজনেসের পাশাপাশি রেস্টুরেন্ট বিজনেসেরও আগ্রহ একসময় ছিল, এবং সেই আগ্রহ থেকে একটা মাস সরাসরি ফিল্ডওয়ার্কও করি। হুম, অবশ্যই আর্থিক লসের সম্মুখীন হই, কিন্তু ওই এক মাসে যে শিক্ষা/অভিজ্ঞতাটা আমি অর্জন করেছি, তা হাজার বই পড়েও পাওয়া সম্ভব হত না। যা হোক, সে ঘটনা আরেকদিন বলা যাবে। J

পরিশেষে একটি সমীকরণ দিয়ে এই  লেখাটা শেষ করি।

ধরি, রুটি একটি  প্রোডাক্ট, যার বিক্রয়মূল্য ৬ টাকা। এই সমীকরণ দেখে একটু খটকা লাগলেও  লাগতে পারে। তবে তা অন্য কোনো লেখায় আলোচনা করব। J

কাঁচামাল + শ্রম + সময় + অভিজ্ঞতা = ৬ টাকা।

Mithu A Quayium
CEO & Founder
CyberCraft

(We are a software company in Bangladesh working as distributed one to provide softwares, ecommerce, management systems, websites as solutions around the world)

বিজনেস বেসিক Chitchat

কি বিজনেস করা যায় ?

জ্বী এটা একটা কমন প্রশ্ন , যারা নিজের একটা ব্যবসা শুরু করবেন বলে মনস্থিr করেন, বা বিজনেস জগতে যারা নতুন, তাদের। প্রশ্নটা খুবই লজিক্যাল এবং নিরীহ। কিন্তু এই প্রশ্নের আগে, আরো একটি প্রশ্ন যেটা সাধারণত আমরা যারা নতুন বিজনেস করতে চাই, তাদের মনে আসে না। প্রশ্নটা হলঃ

বিজনেস কি ?

হয়ত হাসছেন, হাহ ! ভাবছেন, এটা আবার কি প্রশ্ন ? বিজনেস তো বিজনেসই, মানে ব্যবসা। আর সবাই করছে না ? এটা তো মংগল গ্রহ থেকে আসা কিছু নয় যে, নতুন করে এই প্রশ্ন করতে হবে বা এর উত্তর চিন্তা করে দিতে হবে।

আছে, চিন্তা করার আছে। আর এই জন্যই এই প্রশ্নটা করা। আমরা যারা বিজনেসে নামতে চাই, তারা আসলে বিজনেসটাকে যেভাবে  ভাবি তা হল, “আমার নিজের এক বা একাধিক প্রোডাক্ট বা সার্ভিস থাকবে, আমি  সেই প্রোডাক্ট বা সার্ভিস আমার কাস্টমারের কাছে  সেল করব”। হুম, মোটামুটি স্ঠিক উত্তর।

আচ্ছা, এবার চলুন নিজেকে আরেকটি  প্রশ্ন করি,

বিজনেস কেন করতে চান ?

এবার এটাই হল পয়েন্ট । কেন বিজনেস করতে চাই ? এক্ষেত্রে বিজনেস করতে চাওয়া অনেক বড় একটা অংশের উত্তর হবে খুবই কমন,

“ভাই, জব ভাল্লাগে না। জবে  কোনো বরকত আছে ? আছে খালি একঘেয়েমী । জবের এই স্বল্প জীবিকায়  কি জীবন চলে ? বিজনেস হল বরকত, এখানে একবার দাঁড়াতে পারলে আর লেগে থাকতে পারলে লাভ একসময় আসবেই ইন শা আল্লাহ”।

মোটামুটি উত্তরটা এরকমই  হবে অনেকেরই। যারা এভাবে চিন্তা করছেন, তারা মূলত বিজনেস করতে চাওয়ার কারণ ব্যাখ্যা করতে অনেক বড় একটা ভুল নিজের অজান্তে expose করে ফেলেছেন, আর তা হল

“জবকে বিজনেসের থেকে আলাদা করে দেখা”

ভাবছেন জব তো বিজনেসের থেকে আলাদাই। না। যদি তা ভেবে থাকেন, তার মানে হল, আগের প্রশ্নটার (বিজনেস কি ?) উত্তরও আপনার পরিপূর্ণভাবে জানা নেই।

কেন ? কারণ হল, বাস্তবে জব বিজনেসের চেয়ে আলাদা নয়, বরং

“জব হল এক প্রকারের বিজনেস”

ভাবছেন কিভাবে ? দেখুন, বিজনেস হচ্ছে, আপনি আপনার প্রোডাক্ট বা সার্ভিস আপনার কাস্টমারের কাছে সেল করবেন। জবের ক্ষেত্রে আপনার শ্রমই  হল আপনার সার্ভিস, যা আপনি  দিচ্ছেন আপনার কোম্পানীকে, যেখানে আপনি জব করছেন। এখানে আপনার কোম্পানী হল আপনার কাস্টমার। সুতরাং, জবকে ব্যবসার থেকে আলাদা করে দেখার সুযোগ নেই। আপনি যদি এতদিন জব করে থাকেন, তাহলে অলরেডী আপনি বিজনেস করেই আসছেন। J

আচ্ছা, এবার তাহলে নিজেকে আরেকটি প্রশ্ন করা যাক , এতদিন ধরে যেই বিজনেস (জব) করে আসছিলাম তাতেই একঘেয়েমী  এসে গেসে, তাহলে এখন যেই বিজনেস করতে চাচ্ছি, তাতেও যে ভবিষ্যতে একঘেয়েমী আসবে না, তার নিশ্চয়তা কি ? আমি কি আসলেই আমার কাজে determined ? যদি determined হই, তবে আমার এতদিনের করা কাজে একঘেয়েমী কেন আসল ?

একটা কাজ করতে আপনি আসলেই কতটা স্বাচ্ছন্দ্যবোধ করেন, কতটা আনন্দ পান, ঐ কাজ করায় আপনার প্যাশন কতটা তার উপরই নির্ভর করে, ঐ কাজটা আপনার মধ্যে একঘেয়েমী সৃষ্টি করবে নাকি করবে না। ছাত্রাবস্থায় সব  ছাত্রেরই দেখবেন লেখাপড়া করতে ভাল্লাগে না, ২/১ ঘন্টা পড়লেই তার মধ্যে একঘেয়েমী চলে আসে, কিন্তু তাকে যদি খেলতে দেন পিসিতে, মোবাইলে , বা বাইরে মাঠে। দেখবেন, সে সারাদিন খেললেও একঘেয়েমীর অভিযোগ করবে  না। এর কারণও সেই একই। পড়ালেখা সবার কাছে  ঐ বয়সে বিষের মত লাগে, কিন্তু খেলাধুলা ! আহ, মধু ।

বিজনেস বা ব্যবসার ক্ষেত্রেও একই কথা প্রযোজ্য। আপনি ব্যবসায় বরকত আছে, এটা ভেবেই ব্যবসা করতে চাচ্ছেন, কিন্তু আসলেই কি ব্যবসা করার জন্য passionate কিনা, তা আপনার নিজেকেই নিজে জিজ্ঞেস করতে হবে, ভাবতে হবে সময় নিয়ে। যদি ব্যবসা করতে চাওয়ার কারণটা এমন হয় যে, আপনার জব করতে ভাল্লাগে না, একঘেয়েমী চলে এসেছে জবে, ব্যবসায় অনেক লাভ – তাহলে বোধ করি, নিজেকে আরেকটু সময় দেয়া উচিত হবে। কারণ, আগের ব্যবসা যেটা আপনি করতেন (জব) , তাতে যেমন একঘেয়েমী আপনাকে পেয়ে বসেছিল, হতে পারে, ফিউচার ব্যবসাও আপনার একঘেয়েমীর কারণ হতে পারে। তাই নিজেকে সময় দিন, মানসিক প্রস্তুতি নিন আরো সময় নিয়ে।

কিন্তু যদি উত্তর এমন হয় যে, যেই context বা পরিসরে আপনি কাজ করছিলেন, সেই context বা পরিসরে কাজ করাটা আপনি উপভোগ করতে পারছেন না, আপনার নিজেরই পছন্দের context/পরিসর আছে, এবং তাতে আপনি যথেষ্ট অভিজ্ঞ , এবং একঘেয়েমীর জন্য নয়, বরং  আপনি আপনার সেই পছন্দের পরিসর নিয়ে কাজ করার জন্য ব্যবসার করতে চান তবে আপনাকে অভিনন্দন।

এখন ভাবতে পারেন, আপনার পছন্দের পরিসর কোনটা, কিসে এবং কি নিয়ে কাজ করতে আপনি পছন্দ করেন ?  That is the question ! J

Mithu A Quayium
CEO & Founder
CyberCraft

(We are a software company in Bangladesh working as distributed one to provide softwares, ecommerce, management systems, websites as solutions around the world)

Design Pattern: Adapter Pattern

Are you a developer ? Do you develop softwares ? If the answers of both is yes, most probably you know the term “design pattern”. Yeah, it is something then let one use an already proven solution to a common problem in a structured way so that it would be helpful for other developers to collaborate with the code, even if the project is big enough. There are many design patterns for different problems. Adapter is useful one them. Let’s talk about it in this article.

In general, what is adapter ? It is something that translate an object to make it suitable to fit with another object. You have a memory card, but your laptop has no port to insert it. In that case, you will use a card reader. You insert that memory card in that card reader and then the card reader will be plugged with the laptop with an USB. Here card reader is playing role like an adapter to fit/link the memory card with the laptop. So simple, not that ? Same thing/rule applies for the adapter design pattern.

Consider, we have a car class, which has two methods, start() and run()

class Car {

public function start() {
var_dump( 'The car is starting' );
echo '<br>';
}

public function run() {
var_dump('The car is running' );
echo '<br>';
}
}

Consider another class Man which can operate the Car object

class Man {

    public function operate(Car $car)
    {
        $car->start();
        $car->run();
    }
}

You can initiate this like below

(new Man()) -> operate( new Car() );

No, issues with it

string(19) “The car is starting”
string(18) “The car is running”

Now, let’s consider a class Plane having start() and fly() methods

class Plane {
public function start() {
var_dump( 'The plane is starting' );
echo '<br>';
}

public function fly() {
var_dump('The plane is flying' );
echo '<br>';
}
}

If we want to pass this class’s object to man class like below

(new Man()) -> operate( new Plane() );

It will show error because the operate() method runs start() and run() method which a class has, but the plane class doesn’t have the run() method, insteas it has fly() method.

So, what to do ? We have to have an adapter that makes the plane class to suitable to pass to Man’s operate() method so that it will run smoothly.

Let’s do that.

First, let’s get back to Car class, and extract the interface from it.

interface CarInterface {
public function start();
public function run();
}

Implement this interface to Car class

class Car implements CarInterface {

public function start() {
var_dump( 'The car is starting' );
echo '<br>';
}

public function run() {
var_dump('The car is running' );
echo '<br>';
}
}

Now let’s modify the Man class a bit. Pass CarInterface to operate() method instead of Car class itself

class Man {

public function operate(CarInterface $car)
{
$car->start();
$car->run();
}
}

Now, let’s make an adapter class named PlaneAdapter and implement CarInterface on it.

class PlaneAdapter implements CarInterface {

private $plane;

public function __construct(Plane $plane)
{
$this->plane = $plane;
}

public function start()
{
$this->plane->start();
}

public function run()
{
$this->plane->fly();
}
}

Look at the construct method of it. We have passed Plane class instance there. Then we have defined start() method which actually runs the start() method of plane, and run() method which actually runs the fly() method of it.

Now, we can pass the Plan instance wrapping it with PlanceAdapter class to make it suitable for the operate() method of Man instance.

(new Man()) -> operate( new PlaneAdapter( new Plane() ) );

Perfect !

string(21) “The plane is starting”
string(19) “The plane is flying”

This is what actually adapter class does ! 🙂

Happy coding.

Are You SOLID ? Part – S: Single Responsibility Principle

Hello all ? How is going with the lockdown and/or lockdown situtation ? Hardly the answer would be positive, I know though. 😉 But whatever it is , all the things happened are not in our control. So , what to do ? Many things, but one of them must be leveling up the skill since we are getting time enough to do so, not that ?

Okay, talked enough, let’s come to what I am writing this article for. All we love to code, but how many of us can maintain the quality of code always ? Maybe always or maybe not when it comes to the point when code/project delivery time is about to know the end line. Whatever it is, thing is the more we keep practicing to maintain the quality, the less we have to compromise it.

When it comes about quality, one question might arise, how can we maintain the quality, what does it actually mean. Yes, this is what this article for. Quality refers to maintain some principles when coding so that it would be easier to read, to refactor, to modify no matter how long you make a pause on working on it. Even after a long period of time you, or your other collaborator won’t find it hard to work with it.

Well, now let’s about SOLID. What is it ? It is actually the combination of 5 principles in object oriented programming, nowadays followed in general in almost all companies. These 5 principles are

S: Single-responsibility principle
A class or method or function should have only one responsibility. Your system might do thousands of tasks, processes, but a single class in there should to only ONE of them.

O: Open closed principle
Software entities should be open for extension, but closed for modification. You want to extend an existing class or method, you are most welcome to do that. BUT, if you want to modify it, NOPE, you are not allowed. -_-

L: Liskov substitution principle
Objects in an application should be replaceable with the instances of their subtypes without affecting the program’s functionality.

I: Interface segregation principle
It’s better to have many client-specific interfaces than one general purpose interface.

D: Dependency inversion principle
One should depend on abstractions, NOT concretions.

Single responsibility principle:

The title explains it enough. There might be many classes and methods in your program which are responsible to do different tasks , BUT each one of those class should be responsible to do one task.

Think of a User management module for example. This module is responsible to register users, let them login, authenticate them etc. We can think the structure of that program like the one below

class User_Module {

   function register() {
       //code to validate user
       //code to save use in database
    }

    function login() {
       //code to validate user
       //database query to check for the user
      //code to login
     }
}

Look at the code above, here a class is doing multiple tasks like validation, registration, logging in, databse query etc. These all are placed in one places which actually violated the S principle. Instead if we made this code separating the code into 3 classes where one would be responsible for registering user, another one is responsible for authenticating them, and another one for validation, it would be nicer.

//This class is responsible for registration
class Registration {
   function register($data) {
       //code to register
   }
}

//This class is responsible for validation
class Validation {
    function validation($request) {
        //code to validate 
    }
}

//This class is responsible for authentication
class Authenticate {
    function authenticate($request) {
        //code to authenticate
    }
}

Don’t Miss the Black Friday Deal

Black friday is coming and many of you like others must be making a list of products that you are planning to make you own. Then, this is the time to add another one (or more maybe 😉 ) to add in you list. Guess why ?

Yes, CyberCraft team is announcing the biggest deal ever made by it for the black friday. All of our products are not at 50% off for you all. 

We value our customers like you and every one of you are not only a client to us, rather a relation. We are always very keen to build a new relation and make it ever lasting. Since, a relation deserves care, we care about you. And as a part of it, we are announcing this super excited deal for you.

It has been 6 years we have made our journey from. And we are willing to make it longer with you. So far, the products we have bring into life for you are,

  1. Shortcode Maker
  2. Woo Auction
  3. neoForms
  4. WP Front
  5. Woo Product Options
  6. Woo Voucher and Topup

And all of these you can make your own by 50% off. Incredible, right ? To have these, you have to do not so much, just apply this coupon when purchasing and all is okay.

BlackFridayDeal2018

Enjoy your experience with our cool and exciting product and make you project super smart.