Is AJAX Enough? Should I learn the PHP framework?

I started learning programming 4 months ago. So far I already know some javascript (and jquery), php, ajax html and CSS. Yesterday, for the first time, I saw a question about PHP frames (zend, codeigniter ... etc.) in one of the stack forums.

I hope that these questions are not very stupid, because I am a beginner, so I still do not know much about this world, but my questions are: 1. Do I need to learn how to use the php structure if I am the only one to create the ONE site ? 2- Do websites currently rely more on AJAX + some php or just PHP + some javascript? 3- How long does it take to learn and master a frame structure, such as zend?

+4
source share
5 answers

1) You do not need to learn the PHP framework, and in fact, if this is the first website that you have ever built, I would suggest creating it without a framework to understand how PHP works when creating a website. This way you understand things like database connections, session management, etc., which are often done behind the scenes using frameworks. Then later try creating it using the framework to get an idea of ​​the design patterns and other functions that the built-in environment has in order to avoid repeating code, security holes, etc.

2) I do not know what the difference is between AJAX + some PHP and just PHP + some javascript. AJAX is part of Javascript, it is not a separate technology in itself.

Some websites use a lot of AJAX, some do not. It really depends on what you want to do on the website and your particular design: AJAX can provide a smoother experience, but it can be difficult when it comes to things like back buttons and bookmarks.

3) Depends on what you do with the framework: if you use only 10% of the functions, you certainly will not become a master at any time. It also depends on the complexity of the structure: I did not use Zend, but I know that the more complex the structure, the longer you will need to study it.

+2
source

Find out as many things as possible. PHP is a good start because it is very popular and easy to learn and use. There are many great frameworks written in PHP (Symfony, Zend, Kohana, etc.). However, this is not a good, well-designed language in general. Keep this in mind, don't stop at php, learn it, then make progress.

b) You can create a large number of sites with PHP + JS + HTML

ps .: AJAX is a technology, and as you know, it does not cost as much as it is.

+2
source
  • Ajax is just a technology for invoking server side scripts from Javascript. The server side of the script is PHP. So, if you are going to use Ajax, you need to know PHP.

  • As with the PHP frameworks, it’s useful to create several websites from scratch using PHP to better understand, but ultimately it’s better to accept the framework. Frameworks implements many of the features and methods that you need. It makes no sense to reinvent the wheel.

+2
source

The answers to your questions are very subjective, but I suggest:

  • No, you should not study the structure for creating a single website. Just go and build it in any way. Typically, structures have many additional concepts and methodologies. You will need to spend enough time to understand how they work, but it will be very difficult to understand why they work this way. Running a website is a great experience, so just go and create something.

  • Suppose sites rely heavily on HTML / PHP / JavaScript. Ajax is an extra feature that you already focus too much on. It's great that you know what Ajax does, but you should focus more on basic things like number one.

  • Suppose that it takes two years of constant interest in this area. So, first you learn the PHP syntax, then you begin to understand how HTTP works, and then you experiment with HTML and JavaScript / jQuery / Ajax a little more, and then try to use the Framework. You keep trying until you become the master. The Zend Framework is one of the most comprehensive, so it will take some time to learn how it works and all the related technologies that it brings with it.

My last piece of advice is to focus, build something, see what problems it brings, solve these problems, and eventually become a master. Good luck

+1
source

The first question is a short answer: it depends on the type of site you are building. The structures you are talking about were created to optimize the development of web applications that make extensive use of databases and object-oriented principles. If you plan to create a site with the main static content, I would not begin to study the framework.

Question two - Again, it depends on the site. AJAX concept has many applications, but most sites use it to make the site more interactive (for example, do not refresh the page to download new content). For sites with predominantly static content, AJAX has fewer uses.

The third question. It may take some time to β€œmaster” the structure. I am not so familiar with the ones you talked about, but studying the structure is less about understanding its syntax / quirks and more about learning how to approach the problem in your own way. Again, it depends on what you do.

+1
source

Source: https://habr.com/ru/post/1379706/


All Articles