Non Java VM based PHP/JS IDE for MAC OSX? - php

I'm a PHP developer and I use Eclipse on Mac (through Java VM), however - it seems to be very slow responsive when working with large source files (sometimes it is inevitable to edit such files).
That forces me to open subject file in some editor like TextMate or TextWrangler because these two handle large files much better than Eclipse.
I assume this is because Eclipse is driven on a Java VM, and probably TextMate and TextWrangler aren't (not sure though)?
Therefore, I'm wondering if someone could recommend some good IDE for PHP/JS for MAC OSX not based on Java VM (TextMate and/or TextWrangler are too narrowed to be used as IDE)? It is not important for such IDE to be freeware, as long as it is not too expensive.
Thanks in advance,
Radovan

Don't underestimate the power of TextMate. The Emacs style macros can do a lot very quickly. Still, aside from the intuitive shortcuts and macro's the program is rather "dumb".
Coda by Panic is a good step in the right direction. I usually alternate between the two depending on what I'm working on.
There's actually a lot of support for PHP related tasks in Dreamweaver but... it's Dreamweaver so, it has the same "fatty" problems that most Java based apps do.
There's a program call Espresso, I believe by macrabbit, that's rather similar to Coda, but in the brief time I gave it, preferred Coda.
XCode can handle PHP projects, but it's clearly not the right tool for the job. The file merge program that it comes with is very useful though.
OS X is really missing a clean, intuitive, cocoa based PHP/JS/CSS editor that includes things like code sense, macros, code folding, project management, version control integration. Coda's the best start IMHO, but still not a home run.

I don't know about non-JVM PHP IDEs, but loading big files is not an "intrinsic" problem of Java VM (the VM can handle big files as the same way as a native application, so the problem is not there.. how the IDE renders the editor could be another cause).
If you couldn't find a good non-Java VM alternative, there are some things that you could do to improve the performance with large files by change the JVM startup parameters used by Eclipse (you can do something similar for other Java based IDEs).
Show the package contents of your Eclipse.app and edit Contents/MacOS/eclipse.ini
At the end of that file you have JVM startup arguments you can look into the JVM documentation
A parameter that will affect the performance with large files is -Xmx which indicates the maximum memory available for the Java application, if the value is low or not present (the default is low for the IDE needs) your IDE will be slow because it spends a lot of time doing garbage collection (in Eclipse you can check if this is the problem by activating Eclipse->Preferences...->General / Show heap status -or something like that)
Here is an example of the startup parameters that I use for Eclipse (I'm using a MacBook with 4Gb of RAM):
-XX:PermSize=32m
-XX:MaxPermSize=384m
-Xms20m
-Xmx1024m
-Xss2m
-Xverify:none
-XX:+CMSClassUnloadingEnabled
-XX:+CMSPermGenSweepingEnabled
-Xverify:none turns off JVM bycode verification and makes Eclipse to load a little bit faster.
-Xms20m (is the initial heap size) is low.. the JVM will allocate more as needed, a big value maybe is better for other kinds of apps but in this case it makes Eclipse slower to load
-Xmx1024m use 1gb as maximum heap (I work with big Java projects and the heap never reached more than 600m)

I found my Mac Air battery was getting annihilated with Netbeans normally 8-10 hours usage down to about 1-2 with background scanning disabled, not good if your travelling!!
TextMate. Extremely lightweight,unnoticeable on consumption but has all the normal syntax features and GIT integration. When I'm not on my desktop this is the answer.

Related

compiling PHP using HIPHOP

Can any one here provide me a good tutorial on compiling PHP using HipHop? i saw this link . But i cannot understand the linux commands. I developed the application in windows. I was not able to run those commands in linux
$HPHP_HOME/src/hphp/hphp test.php
This command gave me error bash command not found.
in the source i got, i do not have anything named hphp inside the folder hphp, is that a method inside main.cpp???
Can any one here provide me a good tutorial on compiling PHP using HipHop? [...] i cannot understand the linux commands.
HipHop and the companion/successor HHVM, are for advanced users that are trying to resolve specific performance edge cases. Normal PHP developers will not ever benefit from any of the things that HipHop provides. In fact, in many cases, you can get just as much of a performance benefit through simple performance profiling and targeted optimizations combined with a bytecode cache, like APC.
If you do not understand the commands needed to get it running, you do not fall into the class of user that should attempt to use it. Break out your profiling tools instead, as they will be far, far more valuable to you.
It's been clarified that the actual intent is to use HipHop as a PHP code protection mechanism. That's an even worse idea!
HipHop is designed to run as an application server. That is, it contains a web server.
HipHop binaries are huge, often greater than 500 MB. They are not appropriate for redistribution.
HipHop memory use is significantly larger than the binary.
HipHop is designed and intended to run on machines dedicated to the task.
It's not intended for that purpose... and everything can be decompiled. That includes the commercial products that are designed for the task, ionCube and Zend Guard. All it takes is a bit of time or money, and your source is mine. Your best defense against intellectual property theft is a good license and a good lawyer, not a technological solution that makes it harder to run your code.

Upgrading from Textmate to a real IDE

I've recently started using PHP for OO development. On OSX, I have outgrown Coda and feel like Textmate takes more time to set up than to actually use. I've downloaded a few of the "real" IDEs, but I feel like they are overkill and I can't find any way to ease myself into it and/or they are way too busy.
I'm looking for something that does code folding, validation, can colorize PHP/PDO/HTML in the same document, and hopefully do completion of my classes and methods that doesn't require 6 months to be productive again.
Can anyone throw me a bone?
Aptana
Eclipse PDT
Netbeans
Kate
Currently I'm using Aptana Beta 3 and there are a couple of bugs, but with the new IDE coming out in a couple of months it should be great. Been a avid Aptana user for a couple of years now.
NOTE: Aptana was Acquired by Appcelerator
I personally use netbeans 6.9.1 and have been very happy with it. Here are my favorite features:
-- functions, classes, comment blocks and other structures are automatically set up for code folding, but you can also highlight any block and make an arbitrary code fold.
-- syntax highlighting is good
-- full support for new php 5.3 features (namespaces etc.)
-- the autocomplete works, but also stays out of the way when I don't need it.
-- refactoring works really well
-- it has a lot of built in macros, plus you can create your own
-- it does nice, fast code validation.
-- completely supports xdebug through a local/remote web server.
-- has built in symfony support
-- tracks polymorphism well
-- I program a lot of c/c++ and java as well, so its really nice to get familiar with just one IDE.
-- it has seamless built in supprt for SVN/CVS and other SCMs. Things like renaming/deleting a file in the IDE play nice with your SCM. You can also commit, update, diff etc. in the ide. It also does live diff via colors on the left hand side.
-- I really like the scm diff features.
-- the learning curve isn't too steep, I feel the IDE's features/commands are pretty intuitive.
Overall I have been really happy with netbeans. I have used a lot of other IDE's and none of them are bad, but they just lack certain features that I need. netbeans is not perfect either, but for me its the best IDE I have been able to find. The things I don't really like about netbeans are:
-- everything has to be a project, you can't just work on some code without netbeans creating metadata. However, the location of the metadata storage is customizable, so it doesn't interfere with your source file directory structure.
-- profiling doesn't really work unless you install some weird solaris stuff.
-- it can't mount an svn+ssh working copy, you have to pull it down locally. if you want to use the SCM features.
-- it can be a little slow if you have a lot of large projects open at a time. You can close the projects so netbeans doesn't scan the source code continuously, and that helps. Re-opening a project isn't too slow or difficult either.
All in all, netbeans isn't really breaking any new ground, vim, eclise, phpide and others all do similar things. I just feel like those things work better in netbeans and are easier to access.
hth
I have to suggest vim despite potentially not meeting your last requirement: "doesn't require 6 months to be productive again".
Vim does everything you listed, but has a very steep learning curve. Not likely six months, but you will be fumbling around for a while. In the long run it you'll probably find it worthwhile.
I use Eclipse PDT on a regular basis, but have been thinking about checking out PhpStorm. It looks like it could be a nice alternative (albeit not free).
I suggest use of Nusphere php ide , its too great for php, it has auto complete features and in built server and you can debug run time, you can also set browser for debugging your code , its true php debugger, i am using this debugger since last 3 years ,it’s amazing and it has inbuilt ftp feature so you can also debug your ftp file.

PHP IDE to suit my needs for Win 7

I've been battling with several IDE's so far without much success, so I decided it would be ask someone wiser. I'd love one to have these features:
Fast code completion;
Completion for HTML (with tags and tags' content), CSS and, preferably, jQuery;
Debugger which can work with WampServer installation;
Completion for native PHP commands as well
Shortcut to go to a file in the current project/workspace (like Ctrl+Shift+O in Netbeans) --> What I meant here is that a shortcut to open a window, where you can type beginning of a file name and it will show you all matching files in project; so a way to navigate the project with keyboard only.
I have already tried some of IDE's:
Netbeans:
It is slow, really slow. The slowest IDE of them all I believe
Debugger had issues and overall I failed to make it work
You can barely customize auto-formatting (at least in the way I'd like to customize it) - you can either disable it or live with it
I am using it right now but strive to change it!
Eclipse PDT
Kinda slowish, though faster than Netbeans
There was no code hinting for native PHP commands #_#
After restarting IDE, the Debugger decided to stop adding ?X-DEBUGwhatever stuff to links and it stopped working as result
Subclipse didn't work!
Nusphere PHP Edit
Fast and shiny, good for my netbook, but there is no "Go to file" command
No JS hinting
Komodo and PHPDesigner 7 were disqualified for some reasons I can't really remember now but they were severe.
I tested a wide variety of IDE's but there is a real lot of them and pretty difficult to test them all, which is why I'd appreciate some input about one which fits all the above specified needs.
Consider vim. It's painful at first, but it does meet all of your requirements, unless you also have a (as of yet unspoken) requirement for a Graphical User Interface.
Fast Code Completion: Fastest I've ever encountered, C-x C-o
Yes, Yes, and Probably.
vim can use xdebug to get this functionality. How to set up on linux.
Yes.
:o supports tabbed completion even.
PHPStorm is a relatively new contender in the IDE scene by the people who make IDEA and Resharper. I can't say it's blazingly fast, but it's geared specifically toward PHP and has a lot of nice features. I feel it is a considerable improvement over Netbeans or Eclipse.
You might want to try the pre-release of the next version, since they've added a lot of new features.
Funnily enough I decided to settle for Aptana 3 Beta. Though lots of features don't work it is awfully quick and I love the antialiased font. Thanks to all for help anyway!

Eclipse + PDT performance tips?

I recently wanted to get a decend IDE for my PHP side-projecs, and by searching SO found Eclipse+PDT. Although it's not quite at the level of Visual Studio yet, it's pretty nice and better than Notepad++ for this purpose. I can even debug somewhat, although it's pretty glitchy.
But there is one thing that is bugging me. It seems to have some kind of weird performance issue, whereupon it it uses lots of CPU about once a minute or so. By itself this is not noticeable, but if you do something else at the same time (like watch a movie, or play Quake 3), it produces an annoying hicup now and then.
Granted, my computer is not state-of-the-art (Sempron 2200+ with 1GB of RAM), but then it's certainly more than enough for all of this.
Another performance question is that I'm used to Visual Studio where IntelliSense pops up as soon as you type a compatible symbol. Here you have to wait for a moment. Is there any way to make it open up instantly?
P.S. Perhaps there's an even better freeware IDE for PHP?
Added: It was suggested by Stefan Schmidt to change Auto-Activation speed. It seems that there is a bug with this. The smaller I set it, the more it fails to open at all. For example, when it's 200, it opens mostly all the time when there is something to open. At 10 it doesn't open (at least) for static class members. What gives?
I think I found it !!!
Given:
a) That Eclipse for PHP (Eclipse PDT) is updated just about everyday complete with daily builds. I can only assume this is from a team of very dedicated and competent developers who only want the same thing you do.
b) That only a small portion of us have been coming here complaining about our CPU maxing out while trying to edit PHP code.
Observations:
a) I have turned off just about every item in the preferences box to no avail.
Solutions:
In my past experience with software, especially large black boxes that normally work well for others. When faced with a situation that does not seem to respond to conventional theory... I like to do the unconventional. In this case... simply take care of the "little things".
In this particular case this means that I:
Did an update via Help->Check for Software Updates
Installed the latest updates
Removed the old workspace and created a new one
Paid attention to ALL THE WARNINGS, especially the YELLOW warnings which kept pointing to all the HTML errors in code that I either wasn't really using or meant to clean up anyway.
In other words...
Once I eliminated ALL THE WARNINGS.... The CPU stopped maxing out !!!
After updating the to latest Eclipse build and then taking the time to either fix the warnings and/or remove ALL unnecessary source code (that was slated to removed anyway)... the CPU returned to "normal".
In other words...
The problem was not that Eclipse PDT wasn't working properly...
...it was that it was working TOO GOOD !!!
It was doing precisely what it was designed to do... check ( & recheck ) for warnings in your source code while the keyboard was considered dormant.
So...
There you go...
Pay attention to ALL the warnings in your "Problems" window and do what it takes to reduce the number of warnings to ZERO !!!
And then report back here with your findings.
I honestly cannot believe just how well my Ubuntu 10.04 (32 bit) installation is operating on a $500 Compaq Presario. It's a dream and ALL I did was take care of the "little things".
Cheers,
Perry
It could be the garbage collector. Try a different JVM or a different garbage collection algorithm. It might help you shorten the pause times. With JRockit you can set a pause time target for the garbage collector.
For instance you could set:
-XgcPrio:pausetime
-XpauseTarget:250
in you eclipse.ini file. See this blog for some information on how you can set up Eclipse to run on JRockit
you could try this:
Selec Project => clean from menu and select all php projects. This could take a while ( if you have many/large projects ), but then it should get faster.
For an alternate free IDE you could try NetBeans. From version 6.5 it has full php support, and for me it's faster than Eclipse+PDT, and more stable / memory consupting.
There are known issues with PDT 3.1 and eclipse 4.2 (juno).
https://bugs.eclipse.org/bugs/show_bug.cgi?id=385272
This is the solution:
Open a different perspective (for example java, but not php) and restart eclipse. Afterwards you can savely switch back to php perspective. Eclipse will have no performance issues.
Also mentioned here
For your second question:
Go to Window->Preferences ...
From there go to PHP->Editor->Code Assist
At the bottom is a box called Auto-Activation.
There you can specify the delay it takes for the Code Assist to show up.
I have no solution for your other problem, but perhaps if you wait until 29th of December your problems will be solved by the 2.0 version.
Edit: Not a solution, but perhaps a workaround: Try lowering the prcess priority of your PDT process.
Ive had no hiccups using PDT with Ganymede .. you might want to try (as an experiment) downloading and copying eclipse from the All-in-One Eclipse PDT + Zend Debugger Package zip and see if it runs better?
You can use multiple different eclipses as they don't need any installation and won't interfere with each other - just open and use
There is another project for adding PHP support to Eclipse: PHPeclipse. I know that when PDT was still young, people often choose PHPeclipse because of performance problems with PDT, but I cannot say, how the current versions of both compare with respect to performance (and features), as I quit my PHPeclipse development activities quite some time ago.
If your performance problem is a real show stopper, you might want to give PHPeclipse a try.

Which Eclipse distribution is good for web development using Python, PHP, or Perl?

I'd like to try out Eclipse, but I'm a bit baffled with all the different distributions of it. I mainly program in Python doing web development, but I also need to maintain PHP and Perl apps. It looks like EasyEclipse is a bit behind. Should I just grab the base Eclipse and start loading plug-ins?
Maybe try Aptana (http://www.aptana.com/) - you can then plug in as many extra modules as you require.
PDT 2.0 is vey good Eclipse PHP Ide . It is created with cooperation with Zend, so there a lot of featuers from Zend Studio.
I also use it with Subeclipse(for SVN) and Target Management (for work on FTP remotely).
I will also advice to use Aptana plugins fot HTML and Js - they are much better than standard Web Tools from Eclipse.
I develop Python applications at work and find Eclipse Classic and Eclipse for Java Devs a good fit because I don't do any plugin or Java EE Stuff. We use Eclipse for Java, Python, and NSIS (nullsoft installer) scripting.
The Python development I do requires the pydev plugin (see: http://pydev.sourceforge.net/) which so far has been fantastic on a Windows machine. I found some instability on a Fedora 9 machine, but that is not the general consensus among my linuxier colleagues :)
The pydev plugin comes with a very minimal set of customizable features including a short list of syntax for colouring, and it's very easy to create a dark colour scheme (black bg, bright text) for python development (if that matters to you). The debugger has been pretty good so far, but I have problems when my applications hit threading in PyQt. I don't know if that is a problem with QThread (a Qt Thread) or python threads in general.
I can't offer any advice regarding PERL or PHP but basically like you said, download an Eclipse version and find some good plugins for your development environment.
PyDev is pretty decent as I'm sure you know. It can fit on top of all the Eclipse distributions (provided they meet the minimum version requirements). If you're doing webdev stuff, you'll probably find the closest fit with Aptana.
That said, I find Aptana hideously clunky when compared to a decent text editor. I build sites using django and for that I use Eclipse (pure) and PyDev to do the python and gedit (gnome's souped up notepad) for writing the HTML for templates/CSS/JS/etc.
At the end of the day, whatever suits you best is what you'll go with.
EPIC is the only Eclipse Perl plugin I know for Perl.
The integration is okay. Offers a graphical debugger, but watch out for inspecting data that contains cycles, as the perl exec could just go into an infinite loop
I develop in PHP, python, C(python modules), SQL and JS/HTML/CSS all on eclipse. I do this
by installing PDT, CDT, pydev and SQL tools onto the eclipse-platform, and then using different workspaces for mixed projects.
Two workspaces to be specific, one for PHP web development and another for Python/C. I do run it on a rather powerful machine so I allow eclipse the luxury of added memory (2G).
Works like a charm and it is very nice to be able to use the same IDE for everything :)
I use the javascript eclipse helios and added pydev plugin to it for django support it seems to do everything I need.

Categories