Programming Web applications has a difficulty: you have to deal with HTML with Javascript and Php or other languages interspersed in the code. Is there a tool to show the code in a linear, sequential clear presentation?
It's impossible, i guess. There are so many ways to make web apps (Single Page Application for example), many patterns to follow (MVC and variations), many frameworks and so on. Nowadays it's possible to create a application using only JavaScript (NodeJs + MongoDB).
Let me explain again my question, answering also Cristiano: I have a typical web application, several pages, written in HTML + CSS + PHP + JavaScript. For the programmers in my team, it is hard to follow the logic because PHP and Javascript are interspersed in the pages HTML code. CSS is ok, resides on different files. But it is hard for the junior programmers to find, for example, the PHP wich corresponds to an HTML input form. Same for Javascript. And it is made harder by the fact that parts of the HTML is created dynamically by PHP echo statements at the server.
Is there a way, and editor, which can "pretty print" the code in a way it can be followed sequentially? Making clear what is PHP, what is dynamic HTML, what is done at the server?
Perhaps Cristiano suggestion to use only Javascript is a solution.
Hi again. If I understand well, your are using echo to output the dynamic HTML files. I don't know much of PHP, but you should consider use a framework with MVC like Yii (http://www.yiiframework.com/), that will separate the concerns and the HTMLs files will echo only data.
About IDE, I would use Eclipse (https://projects.eclipse.org/projects/tools.pdt/downloads). Aptana is good too. If you have money, try Sublime Text(http://www.sublimetext.com/).
You should consider using one of the following popular MVC frameworks on server side: CodeIgniter, CakePHP, Yii, Laravel, Symfony or Zend and a good client side MV* framework from http://todomvc.com.
Yes, sometimes it is quite difficult for junior coders to follow a complex logic, but MVC like architectures can separate it into easily understandable parts. In addition they will face a problem of View (client side) complexity, that is why it is worth using client side frameworks as well in the age of rich web applications.