[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Whats the best PHP dev tool\ide to create and build a PHP web service ?

Posted on 2012-09-05
5
Medium Priority
?
438 Views
Last Modified: 2012-09-07
Very quick question, can anyone recommend a good dev studio\IDE to develop a PHP REST based webservice on? As im a complete noobie to PHP, the only requirements are that the IDE be simple to use (almost wizard like if possible) and most importantly free.

Thanks in advance
0
Comment
Question by:wilko100
5 Comments
 
LVL 17

Assisted Solution

by:Chris Harte
Chris Harte earned 500 total points
ID: 38371745
The best ide is a matter of opinion. Mine says that eclipse pdt is the best and not just because it is free. But it does not do any of the work for you. If you wish to build a web service, you are going to have to learn to code and do it the old fashioned way.

[The latest version of eclipse is Juno. It has a lot of performance issues especially with pdt, so go for the previous edition Indigo.]
0
 
LVL 13

Assisted Solution

by:Andrew Derse
Andrew Derse earned 500 total points
ID: 38372129
I personally use Dreamweaver, but I've seen many developers use Eclipse.

A few other options are:

HTML Kit
Aptana

Also, check here for a good listing of these...
http://en.wikipedia.org/wiki/List_of_PHP_editors
0
 
LVL 111

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 38372440
For a RESTful web service, the advice from MunterMan is spot on.  You will need to learn PHP from the ground up and you will want to handcode your script.

I use Textpad or BBEdit; I find that IDEs get in my way.  For a "build" I use FTP.  I never test my scripts on a local machine.  I always test in the expected environment.

Here is how I do it.  First, I write the basic PHP hello world script like this:
<?php // hello.php
error_reporting(E_ALL);
echo 'Hello World';

Open in new window

I use FTP to send that script to a live web server on the internet.  Then I visit the web site, and go to the URL of the script.  In a RESTful web service, all of the script output goes to the browser output stream, so if I see "Hello World" when I visit the URL, I know I've got the script working correctly.  Then I start adding code to perform other functions.  Make a lot of tests along the way; you want to eat the elephant one bite at a time.  It's good to avoid large debugging projects.

This book will not make you a pro, but it will help you get a foundation in PHP.  It's very readable and has good examples, as well as a code library that you can download and modify for your own purposes.
http://www.sitepoint.com/books/phpmysql5/

Here is an example of a RESTful web service.  You can test it on my server with this sample URL.
http://laprbass.com/RAY_REST_get_last_name.php?key=ABC&resp=XML&name=Ray

<?php // RAY_REST_get_last_name.php
error_reporting(E_ALL);


// DEMONSTRATE HOW A RESTFUL WEB SERVICE WORKS
// INPUT FIRST NAME, OUTPUT FAMILY NAME
// CALLING EXAMPLE:
// file_get_contents('http://laprbass.com/RAY_REST_get_last_name.php?key=ABC&resp=XML&name=Ray');


// OUR DATA MODEL CONTAINS ALL THE ANSWERS - THIS COULD BE A DATA BASE - AS SIMPLE OR COMPLEX AS NEEDED
$dataModel
= array
( 'Brian'   => 'Portlock'
, 'Ray'     => 'Paseur'
, 'Richard' => 'Quadling'
, 'Dave'    => 'Baldwin'
)
;

// RESPONSE CAN BE PLAIN TEXT OR XML FORMAT
$alpha = NULL;
$omega = NULL;
if ( (isset($_GET["resp"])) && ($_GET["resp"] == 'XML') )
{
    // PREPARE THE XML WRAPPER
    $alpha = '<response>';
    $omega = '</response>';
}


// TEST THE 'API KEY' - THIS COULD BE A DATA BASE VALIDATION LOOKUP - AS SIMPLE OR COMPLEX AS NEEDED
$key = (!empty($_GET["key"])) ? $_GET["key"] : FALSE;
if ($key !== 'ABC')
{
    echo $alpha . 'BOGUS API KEY' . $omega;
    die();
}


// LOOK UP THE FAMILY NAME
$name = (!empty($_GET["name"])) ? $_GET["name"] : 'UNKNOWN';

// IF THE NAME FROM THE URL IS FOUND IN THE DATA MODEL
if (array_key_exists($name, $dataModel))
{
    // RETURNS THE APPROPRIATE FAMILY NAME FROM THE DATA MODEL
    echo $alpha . $dataModel[$name] . $omega;
    die();
}

// RETURNS THE UNKNOWN NAME INDICATOR
else
{
    echo $alpha . 'UNKNOWN' . $omega;
    die();
}

Open in new window

HTH, ~Ray
0
 
LVL 9

Assisted Solution

by:Derek Jensen
Derek Jensen earned 500 total points
ID: 38372596
I have used both HTMLKit and Aptana(which is built on top of the Eclipse platform); there's also NetBeans or your favorite flavor of text editor. :)

I enjoyed using HTMLKit, but it didn't suit my needs, specifically; Aptana has always been my fav. since the beginning, but that's probably because that's what I learned PHP on. That, and it has the best regex support I've ever seen in any editor.

That doesn't necessarily mean it's the best choice for you, of course. ;-)
0
 

Author Closing Comment

by:wilko100
ID: 38376318
Thanks for the input, just installed the PDT for Eclipse so will go with that
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses
Course of the Month17 days, 18 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question