Learn about PHP

BOOKC, this time share about Learn about PHP

PHP is one of the most popular programming languages ​​in the world. The popularity of PHP is largely due to its Open Source license and ease of learning. However, to learn web programming with PHP, we also have to learn HTML, Javascript and CSS. And now, there are also several Javascript and CSS frameworks that are very helpful in making PHP programs, such as AngularJS, jQuery, Twitter Bootstrap and Modernizr.

How to Learn PHP

In this tutorial, we will explain how to create a web, starting from basic concepts to advanced concepts. And sometimes you will be redirected to another page to learn HTML, Javascript, CSS or other concepts needed in the material. This series of tutorials will only discuss pure PHP, without a framework.

Web Technology around PHP

To be able to use PHP properly, knowledge and skills in web technologies are required, especially HTML, javascript and CSS. Below are some of these technologies along with a brief explanation.

HTML ( Hypertext Markup Language )

Used to define a web view. Everything that appears on the web, ranging from images, text, text thickness, text position, buttons, forms and so on, is written in HTML. The latest version of HTML called HTML 5 is a development of previous versions such as HTML 4 and XHTML. If you're learning HTML, make sure you're learning the latest version of HTML.

CSS ( Cascading Style Sheets )

Also used to define web views. But more towards "decorate" the web display. CSS points to certain elements in HTML, and modifies its appearance, it can be in the form of shape, text thickness, text color, text position, and so on.

Javascript

In javascript, the term DOM ( Document Object Model ) is often used, which is a program object that represents elements in HTML. Javascript gives commands to HTML objects via the DOM. Apart from javascript, there are also Java and Flash which are still frequently used on the Client Side  .

Also note that javascript code cannot be hidden. Everyone will be able to see the code. Javascript at best can only be obfuscated ( obfuscated ). When compared to Java and Flash, Java and Flash source code is more difficult to open. So when you make a program in Javascript, make sure that there will be no problems if the code is seen by other people ( hackers ).

jQuery

It is a javascript library . Some web programming experts have recently advised against relying too much on jQuery , and using only built-in javascript (later called vanillajs), as the process becomes slower. However, I still recommend jQuery, because the convenience that jQuery provides is very helpful. While the disadvantages of jQuery are only a few additional KB that the browser must call and it is not too slow compared to regular javascript.

Also note, jQuery library is not the same as jQuery UI . jQuery is used to quickly manipulate the DOM. While jQuery UI is used to display a UI ( User Interface / interface) that is sweeter and interactive compared to the usual HTML UI. jQuery UI has a fairly heavy size and a few drawbacks. For now, I recommend using jQuery alone, and combining it with another UI Framework like Bootstrap or Modernizr .

-- Stop and move on to the next topic if you want to go fast --

Why choose PHP

PHP is considered easy to learn because:

  1. Easy to install. There are many installation packages on the internet, such as XAMPP, Appserv, and WAMP.
  2. Does not require complex variable and library declarations.
  3. When installed, usually can be directly connected to various database servers.
  4. There are already many tutorials and discussions of PHP tricks on the internet.
  5. You can even try to get your site online on various free hostings available on the Internet.

Web programming languages ​​other than PHP:

  1. ASP .NET family. There are several technologies related to ASP, such as ASP .NET itself, and several versions of ASP .NET MVC. Finally, we have reached MVC 5. Please note that ASP .NET MVC is a web programming framework. So it's a bit different from pure PHP. However, it can be equated with PHP if PHP uses a library framework such as Code Igniter, Yii, or Laravel.
  2. Java Enterprise Edition. Using the Java programming language. The author himself has not succeeded in trying to run hello world on this platform.
  3. Code Fusion. This technology is a bit old, and it looks like almost no one is using it anymore.
  4. Ruby On Rails. It's been pretty booming for a few years, but the future seems a bit bleak.
  5. NodeJS. Is a new technology, but recently started to boom. But this technology is still immature. So the authors suggest this technology is enough to be studied as a hobby and anticipation.

ASP.NET using either VB.NET or C# is a skillset that is quite sought after, but according to the author, it is not easy to learn ASP.NET. However, if you have a .NET programming background, for example for the desktop, maybe ASP can be a consideration.

As for NodeJS, as explained above, it is still not fully mature, and requires extensive knowledge of programming, especially about OOP and Javascript.

When compared to PHP, PHP has several advantages over others:

  1. Hurry up . There are many sites comparing the speed of PHP, ASP and NodeJS with varying opinions. I'm not here to take sides, but PHP 7 is planned to be released and the speed of PHP 7 has increased significantly compared to PHP 5. So for the future, PHP will not lose in terms of speed.
  2. Cheap . We can easily find free, cheap or expensive PHP hosting. Not so with ASP.NET. Quite a lot of hosting for ASP.NET, but rarely free. As for NodeJS, there are not many NodeJS hosting services.
  3. Multi-platform . PHP can be run either on Linux or Windows. Just note that on Linux servers, URLs are case sensitive, so it's important to pay attention to URLs. For example "../images/Questionmarks.png" is not the same as "../images/assignments.png".

PHP Framework

The author is more likely to be pure without a framework. Because new frameworks will continue to emerge, whereas if we have a good code structure, our code will still be very maintainable. But even if you choose to use a framework, this tutorial will still be very useful because pure PHP can be used in any PHP framework.

If you want to use the PHP Framework, I really suggest rethinking. If you really want to, go for Code Igniter, because it is one of the oldest and most widely used frameworks. Gambling with Yii, Laravel or the like will only get you 1 or 2 years of success. The rest of you will be busy learning new frameworks.

 

Bookc
Admin

Hopefully the information we provide can be useful.

Press ESC to close