Friday, March 2, 2012

Migrating to Eclipse

My current work project, true to the nature of projects, has become more intensive than expected.  I have made it through several ASP and PHP projects with minimalist development environments, but my current mix of PHP with Javascript, including jQuery and multiple plugins for it, is too much to handle efficiently in a plain text editor.

I realized yesterday afternoon that every time I have built a major application, I have had some sort of IDE to work in. Early on, it was Visual Basic 6. I did a lot of PHP work in Dreamweaver, which is adequate for that.  Later I dove into Flex, and Adobe's IDE was good to work with.

I had explored Eclipse at some point but never had reason to follow through on it until now. I started downloading and configuring it yesterday and have spent many hours since then trying to get the pieces working.  Here are a few items I have found, in hopes it can assist others on the same voyage:

Major components I am using:
  1. SQL Explorer
  2. PHP Development Tools
  3. Target Management (RSE)
  4. Javascript IDE
  5. EGit
My first goal is to install Git, since apparently Eclipse requires a version control system. That is another thing that is new, and something I have been trying to get established for a few years. So far, it is going well, and I am looking forward to the enhanced efficiency it will bring, even though I don't currently work in an Agile team. Here are some Git references that have helped me to make progress:

This morning I had an urgent request from a colleague to update some content in a database. I tried to use Eclipse SQL Explorer to accomplish that and ran into a series of problems. The setup has been frustrating at best. There are a lot of partial instructions in the documentation, like 'download and install ____" but no clarification on where or how to do that.

My first hurdle was to locate the MySQL driver it required. Finally I located a blog post somewhere that pointed me to http://dev.mysql.com/downloads/connector/j/  and I successfully downloaded the .jar file. I was expecting Eclipse to incorporate it somewhere, but evidently it just points to it, so download it to a location where it can reside permanently.

The next confusion was how to connect to the database.  I have used several front end clients for databases over the years, and all had specific fields for server IP/domain, port, and other parameters. It took a couple of hours to figure out what Eclipse requires. I filled in the fields as well as I could guess, but kept getting the error to "check your url."  I copied what I thought was the URL directly from my other database client, so I knew it was correct.  What I didn't know was that Eclipse, rather than providing fields for all the parameters,  uses a single string with embedded parameters and calls it the URL.  I finally located http://www.sqlexplorer.org/connections.php and ccopied the example there, creating a string like jdbc:mysql://mydomain.com:3306/myDBname.  It let me in. I still have not figured out what the "Example URL" is for in the MySQL driver setup window. The page at http://www.sqlexplorer.org/drivers.php shows it filled in with pseudocode, but doesn't explain it in the text.  I guess users are supposed to understand that the "example URL" is supposed to show us how to create the real URL in the connection parameters?  Unfortunately, when I loaded the driver, that field remained blank so I had no clue what to do.

Now that I'm in, it's time to get to work on the Javascript and see what Eclipse can do...


Update 15:00

One more quirk regarding MySQL in SQL Explorer: I wasn't able to view table contents in a grid like I am familiar with. I located a post in a forum that indicated the documentation showed an obsolete  method. I found that the three icons in the upper left of the SQL editor produce different results. I had been using the blue one, which returned the data in long strings. The first one in the row returns data into a grid. Now, to see if there is a way to edit that data.

No comments:

Post a Comment