PHP (a few questions) OO, refactoring, eclipse

I am using PHP in eclipse. It works fine, I can connect to my remote site, there is a color coding of the code elements and some code hints.

I understand that it may be too long to answer all the questions if you have a good answer for one part, answering only that.

First common coding

  • I found that an easily free track of the included files and their variables. For example, if there was a $ cursor database, it’s hard to remember or even know that it was declared in the included file (this gets a lot worse than the more files you included). How are people doing this?

  • How do people document their code - in particular, the required GET and POST?

Secondly, the development of OO:

  1. Should I go through a full OO in my development. I currently have a library of functions that I can include and split the "task" into a separate file. This bit is unpleasant, but it works.

  2. If I go OO, how do I structure directories in PHP, java uses packages - what about php?

  3. How do I name my files if I use all lowercase with _ for spaces "Hello_world.php"? Should I name classes with Uppercase as Java "HelloWorld.php"? Is there a different naming convention for classes and regular function files?

Third, refactoring

  1. , . , . , . ? Java .

  2. - php ? PHP Eclipse -.

+5
4

1) OO . , . , , , OO, , , . (: . .;)) , , - " " - .: |

2) " ". PHPdoc - ; API.

-, OO:

3) - " ". . OO "hello world". . . , "" . , - .:)

4) , " ". , "" "". , ; ; .

5) , . , . , ; 3 , .. . Symfony, , CamelCase Java.

-,

, .

: 3 .

, , , . , - . , ? Java, , .

, . , ; java, , , .;)

- . , .. . /, . . .

? , , ;)

Eclipse-Plugin - PHP ; .., , . , , " " , Java. , , .:)

+1

PHP (, Zend, Cake, CodeIgniter ..) , , , , PHPDoc, , (, ).

+1

OO:

, . java. java (, HelloWorld.php). (, FW_package1_package2_HelloWorld {...}).

, autoload _ / (, FW/package1/package2/HelloWorld.php).

Java, .

0

Take a look at nWire for PHP . This is a plugin for Eclipse PDT that provides code exploration and visualization.

It can be easily used to track dependencies within your application, and it is very convenient for OO projects, allowing you to visualize class hierarchies and much more.

It does not support refactoring, but it can help by showing you links to specific components (for example, a function or field).

0
source

All Articles