How to Succesfully Incorporate Eclipse IDE into a Drupal Workflow
I have successfully set up Eclipse IDE with the the Eclipse Web Tools Platform (WTP) and PHPeclipse. I have also followed the guides at http://dev.civicactions.net and the guide aimed at how to Configure Eclipse to use Drupal Coding Standards. Everything is running fine and I am using the new environment on my current project. But now what do I do?
I know that I can find a way to incorporate this into my workflow, but instead of using my trial and error method I would like someone with experience to show a successful proven method of implementation. I am not so much concerned with platform specific (os's) examples but I would be interested in how to incorporate Eclipse into my current workflow. Things such as incorporation with your current local host drupal sandbox, live site, and "private" team development for things like virtual companies would be absolutely wonderful. I have already set up Eclipse IDE to access Drupal CVS, but it is my understanding that there are some problems. Possible work arounds to these problems would be a plus. I am more than willing to create documentation of any lessons or instructions provided that provide a successful workflow so that others can benefit as well.


Ical feed
Take a look at how the IBM guys use this setup in their project
I have used Eclipse extensively with other projects, just for CVS or SVN integration it's great. And with Web Tools (editing, autocompletion, reference look up, error signalling, pretty pring formatting, great support for HTML, CSS, XML apart from PHP...) it's great; and free, of course. Haven't used it with Drupal, yet, though. But, fortunately, we are not alone, others have walked that road before, the IBM trio, here is the long list of articles:
http://www-128.ibm.com/developerworks/ibm/osource/implement.html
Specifically, these:
Part 3 (Windows): http://www.ibm.com/developerworks/edu/i-dw-i-osource3.html?S_TACT=105AGX...
Part 4 (Linux): http://www-128.ibm.com/developerworks/edu/i-dw-i-osource4.html?S_TACT=10...
speak about getting your environment up to speed with the Eclipse IDE, Apache, PHP5, MySQL 5, and of course, Drupal. How to create, for example, a virtual host alias thing so you can edit and have version control and debug in the browser all on the same code directory.
Victor Kane
http://awebfactory.com.ar
Those Are Good
Yes, those are very good articles. I guess I should have listed those in my above post. I have read them and they do provide a basic setup but I feel like eclipse holds the potential for so much more than what is explained in those very brief setups. I will continue my quest for a great workflow with Eclipse and report back. Keep the links coming. I am going to continue with the trial and error and hopefully be able to assemble some text for others.
Peace,
Matthew Pare
Pare Technologies
info at paretech dot com
www.paretech.com
Very good idea
Yes, you must stick to your idea.
There's no road like the road itself!!!
We are currently assessing, on one project, the Zend IDE vs. this Eclipse setup, so will report back on that if you would like to hear our experiences.
Victor Kane
http://awebfactory.com.ar
And part 13
Add in part 13 of their series Using open source software to design, develop, and deploy a collaborative Web site, Part 13: PHP development within Eclipse
_mike
Another Great Article I'm Sure
Thanks Mikey, I didn't know that they had already released Article 13. I will read over this but a brief skim looks like this is the answer to my calling. I still intend to culminate all these articles together to help others. Sometimes all these links, formats and voices can get in the way of what one is trying to accomplish.
Peace,
Matthew Pare
Pare Technologies
info at paretech dot com
www.paretech.com
WOA! Those guys are great...
That's incredible, and right bang on topic they are!!! :)
In any case, don't forget to see the discussion in the other articles (after 3 and 4) on how they write their drupal module in the Eclipse environment.
But, when we are trying to fit together stuff for those who come later, the best is the right place to start, so I think these 13 articles should be cited for a long time to come!
Victor Kane
http://awebfactory.com.ar
Lullabot Podcast on Development Tools
Here is a link to the Lullabot podcast talking about several Apps that make developing easier. They talk a lot about Eclipse IDE and how it stands up to other applications available. Also there is a decent mention to Drupal-Dojo.
Peace,
Matthew Pare
Pare Technologies
info at paretech dot com
www.paretech.com
Eclipse PDT vs phpEclipse
I recently moved from phpEclipse to Eclipse PDT, so I could use XDebug. I wrote about it here:
http://www.starbowconsulting.com/blog/tao/setting-eclipse-pdt-and-xdebug
Overall, PDT isn't quite as good (it just at 0.7 RC2), but it's worth it for the ease of debugging.
Eclipse in the Handbook
Yes, kudos to all the cited articles. But, we really need to get this stuff in the handbooks.
I've made a start on drafting up my notes into an installation guide (it took me at least 2 days solid work trying to get everything running fine, so I bet other people have the same difficulty). If we then also add details about using the software specifically for Drupal development, I think we can save a lot of people a lot of time. Even by introducing them to another form of debugging other than print_r().
One of the difficulties is that there are different plug-ins for Eclipse as well as different platforms that it runs on. I'm using the Zend plugin, for example, rather than PHPeclipse. I think a setup guide should reflect these different choices and clearly show the differences to aid making a choice.
I'm also thinking that there should be a parent page in the handbook listing other alternatives as well as pointing out some of the best software for use with programming Drupal. Introduce people to Firebug, for example.
Has anyone made any progress with documentation already? Is there an issue in the documentation queue? If not I'll make a start on this, and then hopefully others can build from there.
Best,
Alan
-
www.alanpritt.com
I would appreciate this
being added to the Handbook. CVS and how to implement it seems quite arcane to me.
yes indeed - a few resources exist
In response to both alpritt and magedlaine:
Don't forget that there are many existing resources on these:
If/when you find problems with those, edit them (or add a comment with your proposed edits).
Yay for better docs!
--
Knaddisons Denver Life | mmm Free Range Burritos
Yep,
I had discovered them already. I've not delved into Eclipse CVS yet, so I don't know about those four pages. I ran through the coding standards page, and that seems fine.
Issue created
I've amended an existing related issue for this. It's in regards to creating a new handbook chapter about setting up a development environment for Drupal. The Eclipse section will be part of this wider chapter. I'm going to start by creating a first draft and then hopefully people will help add to it as there will be lots of gaps to fill. Issue is here... http://drupal.org/node/118977
Alan
Discrete Module Development/Debugging in EclipsePDT
I appreciate all the good comments and information above and realize that it has been quite a while since any activity has occurred here, but I'll give it a shot.
Let me provide a description of what I am used to and see if anyone has a solution or suggestion.
I come from another open source project on the Microsoft .NET Framework platform. In Visual Studio .Net I would create a solution, similar to a workspace in Eclipse. In the solution I would add the core application framework project as a project. In this case that would be a project just for the Drupal standard core application files.
Then for each module I was developing for, I would create individual projects. One for each module that development was going to take place. The location of these projects was in the correct module directory of the core application. In this case /drupal/sites/all/modules/.
Drupal Project
/drupal/
CustomModule1
/drupal/sites/all/modules/custommodule1/
Then I would create a reference in the Custom Module 1 project definition to the core application framework library. (/drupal) This way the module project has access to all the classes, functions, constants, etc... form the core application framework.
I think I have a way to make this work in Eclipse. What I am still missing is how to get a debug launch in the customModule1 project to execute the index.php of the core application framework (/drupal).
By using this type of setup I can keep each module under it's own version control and packaging solution as needed.
Any thoughts are greatly appreciated.
Blessings...
Instant FTP support?
I like a lot about Eclipse, but one thing I really need is the ability to upload files instantly to the right place via FTP. Dreamweaver and PhpEd do this, but Komodo and Eclipse don't seem to have that feature (and they seem to be the most popular around here). I'm just curious if maybe I'm missing something, or if there's another workflow that people use to manage their sites.
I typically have a local site on which I test, and then a remote site I upload to when the changes are ready. The instant FTP uploading is a huge time and sanity saver, and it means I don't have to fish around on the remote server each time I need something.
Any suggestions?
Thanks!
Chris
try looking for "deployment"
hi Chris, I thought I had something that allowed me to specify a "publish to server" property for a project in the past - but can't find it anymore... I'm only using CVS and SVN these days
But maybe check http://eclipse-plugins.info/eclipse/plugins.jsp?category=Deployment (eg: Eclipse DeployerFTP). Alternatively, the Zend Studio for Eclipse comes with the remote system explorer of the "target management" project (http://www.eclipse.org/dsdp/tm/tutorial/), and some people have built Ant files to upload projects via ftp as part of the build process.
HTH - rolf
FTP extension
Eclipse does have a plug-in for FTP support, and Aptana, as mentioned, has FTP support as well.
Has anybody tried the Aptana
Has anybody tried the Aptana IDE? It is Eclipse based and supports php, javascript, html,css and it can synchronize files between local and ftp locations.
OpenMusic, a network of Drupal based music social communities
I find it is far to slow. I
I find it is far to slow. I prefer PhpED in alot of ways, I do of course like the whole open source idea of the IDE(s) but still just way to slow for me.
vision media
350designs
Print Huge Edmonton Printing Services
Design Inspiration Gallery
I found this article
@stompeer
I found this article www.eclipse.org/projects/slides/DSDP-TM_Europa_Review.pdf about target management.
This tool provides ssh, ftp, ...
Add http://download.eclipse.org/dsdp/tm/updates/2.0/
It is a big download ... it needs cdt which i got through 'europe discovery site'
It seems a huge install.
I only tested the ssh connection. Looks great.
Vendor branch concept
I am actually trying ot set-up a dev. environment base on Eclipse and PDT.
I am trying to implement the Vendor Branch concept to be able to update core and contrib easily while having version control for my own website projects. The problem is that I have difficulties implementing the process in Eclipse.
I would like to share my thinkings with you in order to have feedback and suggestion.
Software used : Eclipse ide with included CVS support, PDT plugin (Php), Subversive plugin (SVN).
I have created a svn repo on a server to host my projects.
I have read many things about the vendor branch process, and it seems to be the right way to work with 3rd party module such as Drupal and any other contrib modules. In theory it enables to update easily the core and the modules
SVN repository structure :
Project X :
- Trunk
- Branch
- Tag
Vendor :
- Drupal
- Contrib :
- Module 1
- Module 2
The process :
I checkout (CVS) the last version of Drupal.
I checkout (CVS) each module.
I copy them in the svn repo (initial SVN comit) :
Drupal goes in Vendor / Drupal
Modules goes in vendor / contrib / X
I tag Drupal and each module 1-0
Then I have to copy Drupal to the trunk and the module in sites/all (how can I do that in Eclipse?)
I checkout the trunk to my eclipse workspace.
There I have a working copy of drupal in Eclipse and i can do all modification i want.
Then imagine there is a new Drupal version :
I check out (CVS) the new Drupal Version.
I import it (SVN) into my repo in Vendor/drupal and tag it 1-1
and then : "I don't know" ! What should i do to merge Drupal1-1 with my trunk in Eclipse ?
Thanks for yout help and suggestions, especially on the way to do that inside Eclipse...
Alex
www.ineation.com
question
Do you hack core or any conrib module?
I may have to hack core (of
I may have to hack core (of course if no other way is possible), and contrib module.
This is why the "vendor branch" process (see : http://svnbook.red-bean.com/en/1.1/ch07s05.html) seems a great way to handle that.
Alex
www.ineation.com
Correction for the end of
Correction for the end of the process.
It would be :
SVN repository structure :
Project X :
- Trunk
- Branch
- Tag
Vendor :
- Drupal
- Current
- Contrib :
- Module 1
- Module 2
The process :
I checkout (CVS) the last version of Drupal.
I checkout (CVS) each module.
I copy them in the svn repo (initial SVN comit) :
Drupal goes in Vendor / Drupal / Current
Modules goes in vendor / contrib / X / Current
I tag Drupal and each module 1-0
Then I have to copy Drupal to the trunk and the module in sites/all (team/copy)
I checkout the trunk to my eclipse workspace.
There I have a working copy of drupal in Eclipse and i can do all modification i want.
Then imagine there is a new Drupal version :
I check out (CVS) the new Drupal Version.
I check out (SVN) the current version of drupal from the vendor/current directory
On this working copy, I overwrite all the files with the new release.
I handle fille addition or deletion.
I commit the modified working copy to Vendor/drupal/current
I tag the new version as 1-1
Then on the working version, I merge change between 1-0 and 1-1 (--> how to do that in Eclipse ?)
Edit : answer to the question : simply by doing Team/merge and selecting the right tags
Alex
www.ineation.com
CVS files
How do you get rid of the CVS files (CVS/Entries.Log etc) before you do the initial SVN commit?
Or do you check them in to SVN? If so how do you prevent them ending up in your production site?
Thanks
On unix/linux (prbly mac)
On unix/linux (prbly mac) command line. Within the base cvs checkout.
find . -type d -name 'CVS' -exec rm -rf {} \;Another option is to tell svn to ignore CVS on a global level. Can't remember the config file location, but I am sure a quick search in your favorite search engine can help with that.
Thanks, I worked out a
Thanks, I worked out a similar solution
rm -rf
find . -name 'CVS'-type d is a useful addition though.
I'm new to SVN and hadn't though of getting it to ignore CVS folders.
Please don't ignore CVS folders
Ok, so now you've committed your site to the prod server, and it doesn't have any CVS folders in it. Now you hire me to upgrade your site to the next version of Drupal, and I perform a checkout of your code only to find that I cannot update the core code via CVS as I'd hoped I could.
There's nothing wrong with having CVS folders on your servers. Those of you that see this as a hindrance probably also organize the forks in your drawers according to the level of tarnish on the silver. Don't you? ;)
______
Senpai
Eclipse PDT templates
I've been using PDT for a while now. I've tried Komodo, PHPEclipse and Zend IDE.
PDT had been frustrating me for a long while but now that the 2.x version is somewhat stable, I'm really starting to enjoy it.
Anyways, I've built up a massive collection of Drupal (6) code templates, including all hooks and forms array elements.
One great thing is that each hook template has a general description and includes the phpdoc @link to the relevent api.drupal.org page. It's great when you're coding and need to quickly refresh yourself on the ins and outs of a certain hook... with a simple ctrl-click you can get all the info you need.
For those who haven't used PDT templates you simply start typing (for example) hook_f and press code assist and you'll see a list of all hooks that start with hook_f*. Select the one you want (say hook_form_alter) and "fill in the blanks".
<?php/**
* Implements hook_form_alter. Perform alterations before a form is rendered.
*
* @link http://api.drupal.org/api/function/hook_form_alter/6
*/
function hook_form_alter(&$form, $form_state, $form_id) {
// ^^^^
// PDT steps you through the template letting you specify your module name here.
}
?>
In this example PDT will let you replace 'element_name','title',default_value and 'element_description'.
<?php$form['element_name'] = array(
'#type' => 'textfield',
'#title' => t('title'),
'#default_value' => default_value,
'#description' => t('element_description.'),
);
?>
Anyhow, if there is sufficient interest I'd be happy to package the templates up and put available them for download on my site.
Excellent, indeed Eclipse
Excellent, indeed Eclipse seems to have lot's of productivity tools (once you've mastered the basics). It would be cool to have a bunch of dedicated Drupal plugins, tools or snippet for Eclipse...
And of course, I would be interested in having a look at yout templates...
Alex
www.ineation.com
compile templates together
I have a bunch as well, maybe instead of me trying to create a JAR of them, we should just compile them and distribute the XML file people can import as a temporary way to share code templates.
I have hooks, node module scaffolding, form API, and my latest were to be Actions. AltaVida, would you like to get these compiled together for us and the Drupal world?
Good idea. Why not create a
Good idea.
Why not create a group specific to eclipse so that we can put all related material available for others?
Alex
www.ineation.com
Sorry for the delay
I can get those XML files posted soon, the only question is - should we start a new group for it?
If we do I would suggest making the group for any "Eclipse-based" PHP IDE's instead of any particular flavour (Like PDT). Most techniques, templates and such should be usable in any PHP IDE based on Eclipse for the most part.
Chris: I didn't know you could distribute code templates as JAR files, I've been simply using the import/export XML feature. I'm not really sure what the implications are of distributing as a JAR package (for example, can you edit/delete/export individual templates when the are part of a JAR package?).
Mark
On a side note..
On a side note, I'm mostly new to Drupal Groups. Is there a way to disable the flashing read "Loading" message as the preview is updated?
For the love of earth, who in their right mind thought that would be good? What a terrible, terrible idea.
I am new to using Eclipse
I think it is a good idea to create a new group to centralize the discussion for this topic.
Joe Moraca
http://www.moraca.org
Agreed!
Start that group - I'm in!
Has anything been done on this?
I have been using templates in PDT for a year now (unstable as heck, but worth the fiddling... 2 seems very nice!), I have created my own templates for 4.7 and some 5 hooks and they work great for developing clients custom modules in a jiffy, but I have just started 6 and thought I might save some time by searching the interweb. Has the eclipse group been started and/or has anyone created templates for 6?
basic template
Had some free time this afternoon, so I created some basic Drupal 6 PDT templates. There is still a lot of work to be done, but a lot of basic hooks and module install/info. Take a gander and edit as necessary. Remove the txt extension before importing it.
B/w I am using Eclipse 3.4 with PDT 2.1, not sure how this effects template import files.
Thanks a lot, looks awesome
I just import your template file and it seems to work really well.
I'm in too!!!
I'm in too!!!
Got it!
Thanks for the great start on this!
+1 for getting a group
+1 for getting a group together, and thanks for the templates!
Tom - www.kirkdesigns.co.uk