Friday, January 18, 2008

Mac + Eclipse Europa + XOOPS Cube

Now that we get our local server and XOOPS Cube installed, we need a few more tools to complete our combination of open source technologies and demystify web development.


Eclipse is a single integrated development environment (IDE)

"Eclipse Europa is the annual release of Eclipse projects. Like last year’s Callisto release, the Europa release is a coordinated release of different Eclipse project teams. This year, the annual release includes 21 projects. By releasing these projects at the same time, the goal is to eliminate uncertainty about version compatibility and make it easier to incorporate multiple projects into your environment."


System requirements


You'll need the following:

Apache, MySQL and PHP
We already see how to install Mamp on a Mac

Eclipse Europa
You can get the last release from here, Eclipse V3.3 (Europa).

MySQL Connector
You'll need the official JDBC driver, donwload 5.1
(No need to register, click on the link below login box, if any ^^)

XOOPS Cube
Download last stable release from here, Package Legacy 2.1.3


Installation


Once you get all that, you'll be ready to start your installation of Eclipse Europe. You can install it in your Applications folder or in your workspace.


Eclipse PDT is free of charge and is open source. Since it's built on Eclipse, we get all of the advantages of the Eclipse Platform. By the way, it's also cross-platform. So we can use it on Windows, Mac, or any Linux distribution out there.


Eclipse benefit from an impressive list of plug-ins, thus, PDT, so you can extend your Europa environment with specific functionality, and develop in other languages. Among other things, PHP plug-ins provide syntax highlighting, integration with your web server and collaborative tools to share your code (ie cvs, svn). You can also designate an external browser like Firefox for viewing your pages.

How to Install Eclipse plug-ins


Eclipse's plug-in architecture makes easy the installation of PDT.
The easiest way to install any Eclipse plug-in is to use its update system.


Help>Software Updates>Find and Install

Add a "New Remote Site...", name it the way you want and enter the site url

http://download.eclipse.org/tools/pdt/updates


The site should appear now on the list that you will select all to update.


Eclipse will ping these sites for a list of updates available to install.
Select PHP Development Toolkit Updates and click Finish.
If you ever get an error message, try to "select required".


Then check the list of features to install.
You'll get the license agreement screen.
Accept the terms and click Finish


After Eclipse download and install PDT plug-ins you may be asked to restart Eclipse.

Just like the free app Think switch is helpful to keep our attention in one application at time, Eclipse User Interface has "Perspectives" to manage things on screen. To verify that PDT installation was well done, select "PHP" from,

Window > Open Perspective > Other



With PDT installed, we'll start by configuring our Web server.

Configuring Eclispse PDT with Apache



You can set up your project under your web server's root. But you may prefer separate your project development from deployment (ie site on-line). PDT need to know where the web server is to publish the source code. So, open Eclipse preferences.



Under Preferences, expand PHP and select PHP Servers. A default server is already there but not been configured. You can add a new one or configure the default settings. Configure the path to the web server and the url. If you're running Mamp, it's important to keep the port in your url: http://localhost:8888 as bellow




PHP executables preference

Specify PHP executable directory

Preferences > PHP > PHP executables


You can put whatever label you like. The most important thing is to select the
directory of your PHP executable. Since our installation is based on Mamp, just browse to its bin php folder and keep the default Zend Debugger. Finally, our last step will be to configure PDT database.


Configuring Eclispse PDT connecting MySQL



Our application, XOOPS Cube, is going to use a database MySQL.
You should have download MySQL official JDBC driver 5.1 by now
because you will need it for this step.

Window > Open Perspective > Other > Database Development


If you can't see data source explorer, click on the small icon at the left bottom of your window. Then click on Database and from options choose New...


Click on "Generic JDBC Connection" and button Next



Create a new profile for the project



This is an important step where you add the MySQL connector.
Browse your computer to add the downloaded MySQL
JDBC driver.


Add the name of your database and modify to MAMP port 8889


Et voilĂ .
Have Fun!

^^

0 comments:

 
Feed Shark