Eclipse for building PHP sites?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Harris Kosmidhs

    Eclipse for building PHP sites?

    Hello,

    I recently installed eclipse with the php plugin.

    My question is: can eclipse be used in a medium size site where php file
    include others?

    Or when you use an MVC approach. To be more specific.

    I started coding a site with implementing my own simple mvc approach
    (not a framework). I have separated the files physically into folders:
    views/ and controllers/. The file views/albumview.php includes a file
    include('top.ph p'). The file views/albumview.php is included from a file
    index.php in the root directory and top.php is also located at the root
    directory.

    So when the application is running index.php includes
    views/albumview.php which includes top.php. That's ok. But eclipse shows
    a warning when views/albumview.php includes top.php because it searches
    for top.php in views/ folder. So I have a bunch of warnings like this.
    Sorry If I messed you up with my poor english grammar!

    Generally speaking how should a site like this be developed? I use
    bluefish for 3-4 years now but I 'm getting tired of doing silly and
    simple mistakes[1] which the only way to find is to alt-tab to firefox
    reload, see the error, alt-tab to the editor and fix it.

    Thanks a lot


    --------------------------------------
    [1] like forgeting to close a ), using variables without $, etc
  • Piotr

    #2
    Re: Eclipse for building PHP sites?

    Harris Kosmidhs wrote:
    Hello,
    >
    I recently installed eclipse with the php plugin.
    >
    My question is: can eclipse be used in a medium size site where php file
    include others?
    >
    Or when you use an MVC approach. To be more specific.
    >
    I started coding a site with implementing my own simple mvc approach
    (not a framework). I have separated the files physically into folders:
    views/ and controllers/. The file views/albumview.php includes a file
    include('top.ph p'). The file views/albumview.php is included from a file
    index.php in the root directory and top.php is also located at the root
    directory.
    >
    So when the application is running index.php includes
    views/albumview.php which includes top.php. That's ok. But eclipse shows
    a warning when views/albumview.php includes top.php because it searches
    for top.php in views/ folder. So I have a bunch of warnings like this.
    Sorry If I messed you up with my poor english grammar!
    >
    Generally speaking how should a site like this be developed? I use
    bluefish for 3-4 years now but I 'm getting tired of doing silly and
    simple mistakes[1] which the only way to find is to alt-tab to firefox
    reload, see the error, alt-tab to the editor and fix it.
    >
    Eclipse is great tool, I use it everyday for all sorts of projects.
    Static code analyze is not yet at it's top possible quality in the PDT,
    so you might ignore some warnings. It's there just to give you a hint,
    that something might need your attention.

    In bigger projects, as the number of files grow, including them usually
    causes some problems. Popular solution to it is to use __autoload function.


    You cant really get rid of mistakes. All what you can do is to detect
    them early. Testing is my answer to this problem. Check PHPUnit.de.

    For Eclipse relatd questions, i recomend using eclipse.tools.p dt
    newsgroup at news.eclipse.or g (you need to register, but it's free)

    Also, PDT has good Xdebug support, so check that too. It's support is in
    that same news group.


    best regards
    Piotr N

    Comment

    Working...