Categories
PHP Web Development

PHP Dependency Management Tool – Composer and Packagist

Composer is an application-level PHP dependency management tool. It will seamlessly install and update the packages that you declare as your PHP project’s dependencies. Composer pulls the latest packages from the PHP package repository, Packagist. However, it is not a package manager. 

Nils Adermann and Jordi Boggiano have developed the tool and first released it in March 2012. Composer manages the packages within a specific directory by default, not globally. It does have a global command and support for the global project as well. In general, the composer handles package dependencies per-project basis. The idea behind Composer is based on the node‘s npm concept.

What is a library or a package?

As a PHP programmer, you must know that everyone searches on the internet for a readily available class file to achieve certain functionality. So, that way we don’t have to code some functionality on our own. Therefore, we could save some time.

Remember the early age techniques of including a third party class file in your PHP project for handling different requirements like the file upload or to export a data grid into an excel file format or send an email using third party SMTP! Things are not that simple anymore. Now you have to handle User Authentication with social media login support, Request Routing with custom routing pattern matching, File Uploading with extension restriction and remote storage support, etc. It is good that the functionalities are still readily available on the internet, however, the fact is, the single class files have now become packages including multiple class files and directories.

Categories
Web Design Web Development

Bootstrap 4 Introduction – What’s New

Bootstrap is a well-known and essential platform for web developers and front-end developers. Currently, the latest version of Bootstrap is v3.3.6. The Bootstrap project has stepped into their fourth birthday on 19th August 2015 and on the same day they have announced the upcoming version of Bootstrap 4.

Currently, it’s in the alpha stage and the source code is available in a GIT branch for forks. They have not declared the final release date of Bootstrap 4 yet. However, there is a predeclared development plan of having a few “alpha” releases, then two “beta” and two “RCs” (release candidates), and then the final version will be released.

Importantly, they have also announced that, unlike withdrawing further support for v2.x after the release of v3.0, which was a mistake, they will continue the support for v3.x after the release of Bootstrap 4.

Update 12th May 2020:

The team has released the latest stable version Bootstrap 4 (v4.5.0) today.

There are major changes that have been made in Bootstrap 4 and it is a rewrite of almost the entire project. Very old browser support has been dropped, moved from LESS to SCSS, switched from the px unit system to the em based unit system, some components have been dropped, and some new components have been added. Let’s see what are the changes and new features in Bootstrap 4.

Categories
Technology Web Development

HTTP Status Codes for RESTful APIs

HTTP status codes are the response codes supplied by the web servers against any HTTP request. These codes are 3-digit integer values where the first digit of the code specifies one of five classes of response. There are different series of HTTP status codes. Each status code series have their own status category and each status code has a specific meaning.

1xx = Informational – It means the request has been received and the process is continuing.
2xx = Success – It means the action was successfully received, understood, and accepted.
3xx = Redirection – It means further action must be taken in order to complete the request.
4xx = Client Error – It means the request contains incorrect syntax or cannot be fulfilled.
5xx = Server Error – It means the server failed to fulfill an apparently valid request.

All the HTTP status codes are a part of the HTTP/1.1 standard. The Internet Assigned Numbers Authority (IANA) maintains the official registry of the HTTP status codes.

Categories
Software Technology Web Development

How to create a jQuery plugin – basic concepts

jQuery is a popular term known to the web developers and web designers. We use various jQuery plugins to serve different purpose and functionality of a website. Nowadays, lots of jQuery plugins are available on the internet for almost every functionality needed. You can easily find a required plugin here “http://plugins.jquery.com/“. Web developers and designers tend to just download the plugin from the internet and use it in the web page to achieve the functionality. Very few of us need to write custom jQuery script blocks to do some special or customized functionality. Rather than writing scattered jQuery script blocks, it is always a better idea to create jQuery plugin to wrap them up in a method and use the custom jQuery plugin when needed! That keeps the web page clean and the script is more manageable. So let’s learn the basic concepts and anatomy of a jQuery plugin and how to write your own plugin.

Categories
Software Technology Web Development

PHP 7 – what’s new and feature spotlight

You might already know that PHP 7 is now a stable release. PHP 7 is a new major version, still it has very few backward incompatible changes. However, lots of functions have been deprecated. This is the most important version update for PHP since the release of PHP 5 in the year of 2004. Drastic performance improvements along with reduced memory consumption will supercharge your web application. The new Zend Engine 3.0 enables your website with 2x faster performance and 50% better memory consumption than PHP 5.6 which allows you to serve more concurrent visitors without adding a new hardware. PHP 7 is based on the PHPNG AKA PHP Next-Gen project, that was led by Zend. Also, PHP 7 now has support for 64-bit Windows system which was lacking in 5.x version. However, it was already supported in the Linux 64-bit platforms and local LAMP stacks. Besides the performance enhancements, PHP 7 has introduced many new features, like new operators, type declarations, anonymous classes, namespace imports, etc.

Categories
Internet Software Technology Web Design Web Development

Why you should try Google Chrome Canary

Google Chrome Canary – Get on the bleeding edge of the web

Google Chrome Canary is a likewise early dev channel of Google’s flagship browser Chrome. It is a frequently updated experimental build and has the newest of the new Chrome features.

You may know that many software has multiple dev and beta releases before a stable version release. This is to have it tested by the early adopters. They provide feedback and test reports after using it. Then after eliminating almost all the bugs, the stable version is released.

Google Chrome Canary is the most early one of the four versions of Google Chrome: Canary, dev, beta, and stable. Google Chrome Canary is purely meant for the developers and designers and the early adopters. The most attractive part is you can have both the Canary and Stable Chrome version installed on your system side-by-side. That opens the option for many users to use both the dev and stable channels.

You can download it from its official page.

Categories
Software Technology Web Development

How to setup and configure phpMyAdmin on Ubuntu

If you are a web-developer on LAMP platform, then it would always be a requirement for you to install and configure phpMyAdmin on your Linux environment. If you work mostly in a local LAMP environment, like XAMPP, MAMP, WAMP (you can check out the article on XAMPP vs WAMP vs MAMP to decide which platform suits your need better) then you will have it installed and configured already. If you have installed Apache, PHP, and MySQL separately in your local Linux/Windows/Mac system, then you can download the latest phpMyAdmin package from their official website.

Categories
Technology Web Development

Top 50 Most Useful and Frequently Used SSH Commands

Secure Shell or SSH is a well-known term to whom that manages UNIX/Linux based servers. It provides safe and secure remote login to the servers and allows running numerous useful SSH commands. It is basically a command line tool in UNIX type of system, e.g. command prompt in windows. You can use Terminal in Mac and PuTTY in Windows to access servers via SSH. Here is a list of most frequently used SSH commands that may become useful when you need.

Categories
Internet Technology Web Development

PHP MVC Frameworks Comparison 2015

I’m in the IT industry for over 10 years now and doing PHP programming for a long time. I’ve started my career with PHP 4 and obviously reached up to a point of doing Spaghetti Code. I bet, 80% of the PHP developers gone through this phase. However, when we learned using structured coding with a fragile OOP concept it becomes harder to write the codes but easier to manage it.

There were PHP frameworks as well. With the release of PHP 5.x, many good PHP frameworks emerged and many got upgraded. PHP frameworks are great for rapid development as they include lots of prewritten class methods and helper functions that significantly reduces the amount of code you have to write your own. So obviously this saves the development time altogether.

But as said earlier, there are many PHP frameworks available online among which, 90% are open source. Before you choose for a framework, you need to check at least three aspects, one – performance (the most important part), two – purpose (do not use over featured frameworks that your project does not need), and three – ease of use and inbuilt utilities. And the common is obviously you have to learn that framework syntaxes.

I’ve used CakePHP, Codeigniter, and Laravel myself. So I thought to put together a comparison (obviously did some research from the online sources) of the frameworks for the sake of making a decision faster. Here is a survey result available from Sitepoint as well. Another good framework introduction available online (a bit old though) by Mashable.

Categories
Hardware Internet Software Technology Web Development

XAMPP vs WAMP vs MAMP

Why I’m writing this? Obviously, because I’m a PHP programmer 🙂 and I felt how hard it is to decide which bundle (LAMP stack) should be used. I’ve worked on Linux back in 4-5 years ago, then Windows for a long time, and currently working on Mac platform. I’ve used all these three bundles over a different time period. I’m in the development industry for over 10 years and I think now I’m in a position to do a side-by-side comparison of these tools so that the newcomers seek some help from this article.

What is LAMP stack

Don’t assume something with those software’s original names, i.e. XAMPP, WAMP, or MAMP. These are merely bundled packages with Apache, MySQL, and PHP. Actually, if you know how to configure Apache, MySQL, and PHP (i.e. many of you may have configured unmanaged dedicated servers in Linode/Rackspace etc.), then you do not need to use these bundles. It’s an ease of use as it includes the automatic configurations, many utilities, phpMyAdmin, servers start/stop/restart interface (i.e. you do not need to do it via shell commands).

There are misconceptions as well like these are for different platforms. Actually, it’s not. XAMPP supports Windows, Linux, and Mac OS X. WAMP only supports Windows platform. MAMP supports both Windows and Mac OS X. But here is the trick, that which one is better for a specific platform?