Friday, May 24, 2013

Trying Out NetBeans Integrated Development Environment, Part 2

OK, time to start using it...

I fired up NetBeans and learned that it thinks of things in terms of "Projects".  It gave me multiple choices and, frankly, I had no idea which made the most sense.  I was a bit uncertain at first, but I selected a "PHP application" project and clicked "Next"...

Choice - Version of PHP? I went with the latest version they had 5.4  I hope it's enough.

Choice - Metadata separate or no? An interesting feature is that NetBeans was willing to let me save my metadata in a different location than the rest of my files.  I pondered doing that, but decided I would go "all in" on this first try.

I gave it my remote connection info and tested it - Success! I chose to have it upload files on save, so that I don't have to worry about the current files on the site being outdated.

Off to the races!

Houston, We Have a Problem - Upload on Save Not Working

So I decided to start out easy and create a very primitive script to run phpinfo.  Well, immediately I had a problem in that it could not upload the files, as desired.

I opened up the Project Properties and looked at the Run Configuration and saw that the defaults for Upload Directory and Project URL were off.  Upload directory had the project name, that is not what I want.  Cleared that.  The project URL was wrong too.  Fixed them...

Still no luck.

Checked FTP settings.  All looks good.  Test still results in successful connection.

:-( also not working...WTF?

Oh, God, is it the bloody VPN again?  Turned off VPN.

Dreamweaver works.

Uploading files from NetBeans works...file is too high in the directory on the site...fixing Upload Directory.  Hel-lo Goldilocks, that's just right!

Hooray!  I can start working now! :-D

Lesson learned: Even if the FTP test works, fire up a separate FTP access to verify as you go that you are using the correct parameters and writing to the correct place.


The highest version of PHP that NetBeans offers me is 5.4, which begs the question, what version is my host running?  Well, as you know, phpinfo is the way to answer that turns out it is 5.4.11.  OK, good to go.

How in the HELL Do I add a Folder?

OK, so time to get to work and I want to muck about with test files, so let's create a new folder.

Right Click my main folder...umm, nothing for folder creation.  Check the other menu tabs...nothing.

Searching the interwebs...A-ha!  Hmm, you have to pick "Other"...and then "Other"...and THEN "Folder".  Wow, I guess NetBeans people don't care much for folder creation or they *really* like subcategories.

OK, So, In Practice, What Do I Think?

Not bad.  I like their syntax prompts and hints, for the most part.  Honestly, they feel a bit like an overbearing mother, but Dreamweaver felt like an absent parent.  So, NetBeans is definitely worth trying and try it I will.

Saturday, May 18, 2013

Trying Out NetBeans Integrated Development Environment, Part 1

NetBeans logo

Long time, no post!

I need to get back in the habit and today I do just that.

I am trying out NetBeans IDE.  IDE stands for "Integrated Development Environment".  Basically, an IDE is a piece of software that facilitates your development of applications/content in a given coding language.  I am specifically interested in PHP and MySQL for website development, but there are many languages and many IDEs out there.

Why Am I Looking at a New IDE?

Note: This section is mostly personal history.

Excellent question.  The reason I am looking at IDEs at all is because I currently use Dreamweaver to develop web content, primarily for  While it is a very austere and low bandwidth site in appearance, there is a lot of magic going on behind the scenes.  The vast majority of what you see is dynamically generated with up-to-the-second information and there is a mountain of features behind the curtain for the folks running OwlCon...the Wizard of Oz would be proud.

But I do this as volunteer work for a student organization and having them fork out hundreds of dollars a year for Adobe Creative Suite (CS) or even just Dreamweaver is probably no longer necessary.  About a decade ago, I wore many hats and had to work a lot of magic using many components of Adobe CS and Dreamweaver, so when Adobe acquired Dreamweaver, that made life easy.

But damn is it expensive and I want to see if I can find a way to obviate the need for it.

What is Out There?

You can surf the web as well as anyone, but this wikipedia comparison is a reasonably good starting point.

What Did I Look for in an IDE?

I had a number of considerations that mattered to me:
  • Free and open
  • Strong community
  • Highly regarded
  • Cross platform
  • Supports PHP and MySQL development
  • FTP/syncing
  • Easy uploads
  • Easy local testing
Free and open - it's kinda pointless to buy something different, since cost avoidance is one of the reasons for this activity.

Strong community - As with any free or open software, you are going to want a strong community to insure that you will have a reasonably good chance of 1) addressing your questions and problems and 2) the software persisting over time.

Highly regarded - I am not interested in the "sleeper" software with a "cult" following.  I need something that works and lots of developers consider it to be a solid tool.

Cross platform - I don't want to have to worry about whether or not I am on a PC or Mac now or ever.  That said, if I had to choose, I would settle for Windows-specific, since that is my primary means of development.

Supports PHP development - What I primarily mean by this is that it supports syntax and formatting of good PHP code, to include MySQL commands within PHP scripts.  So, if I mistype a function, I would like to have feedback, e.g., the text changing color or not changing color.  I would also like easy references for PHP and MySQL.

FTP/Syncing - I would like the platform to have the ability to compare my local and remote files and determine which ones are newest, then give me the option to update just those.

Easy uploads - I would like the ability to upload a file.  For example, a hot key that will upload the file to my site.

Easy local testing - I would love to be able to do any local testing without extra hurdles, be that moving my sites to specific directories, changing my database names, installing a WAMP stack, etc.

Why Did I Try NetBeans?

Well, it appears to satisfy all of the above requirements.  Yep, that's pretty much it.

I am concerned that it might not be ideal for PHP, as it was primarily created for Java (hence "beans" in the name).  But folks on the interwebs seem to like it for PHP, so I will give it a try.

Installation Notes

NetBeans has the option to download just a PHP version, but I went ahead and downloaded the whole thing, which means I can code in a number of other languages.  Hopefully, this does not create problems or confusion.  If it does, I may have to back off to just the PHP version.

Because I went that route, I had to install the Java SDK (Software Development Kit) from Oracle.  Not surprising.

While installing, I was required to accept the terms for JUnit, which was a surprise, as I had not heard of JUnit until this request popped up. It appears to be legitimate and it enables unit testing.  I am not sure if that will extend to PHP, but if it does, that could be pretty cool. Clickety click.

It Won't DIE!

After it was all installed, I ran into yet another oddity.  It would not stay dead when I closed it normally.  Rather, it would shut down, then restart, giving messages that suggested updates were occurring.  I could only completely close it by killing the process in Task Manager.  OK, not surprisingly, that is because it is trying to do things like make changes to the computer so it can update the software.

Running in administrator mode solves this problem, but I find that I have to keep it in administrator mode, even after everything is up to date, or use Task Manager to kill the process.  This worries me.  I will have to look into this more.

Ready to Rock!

OK, so now it is installed and I am ready to rock.  Until the next post...