Building the Ship - IDE

mudoch
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Sat Jun 02, 2007 8:34 pm

Re: Building the Ship - IDE

Post by mudoch » Fri Aug 24, 2007 3:32 pm

The podcasting nd recorded session might be a good way to allow some time zones to keep up.  Maybe flip flopping the speaker/moderator in different TZ and of course record the session for later re-broadcast... Let's keep this in mind as we choose our tools of communication.
Last edited by mudoch on Fri Aug 24, 2007 3:36 pm, edited 1 time in total.

User avatar
seadap
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 123
Joined: Mon Dec 04, 2006 12:22 am
Contact:

Re: Building the Ship - IDE

Post by seadap » Fri Aug 24, 2007 3:47 pm

I think if we pooled our pennies and bought Amy a headset it would be a great idea to record our sessions and make them available for download.  The only problem is being able to show someone's desktop in sync with the discussion.  I'll do some digging and see if I can come up with some ideas.  Maybe just a screencap of the leader's pc while recording the skype conversation....
Knowledge is realizing that the street is one-way, wisdom is looking both directions anyway.

shumisha
Joomla! Guru
Joomla! Guru
Posts: 516
Joined: Sat Aug 20, 2005 3:15 pm
Contact:

Re: Building the Ship - IDE

Post by shumisha » Wed Sep 05, 2007 12:51 pm

Hi All,

Let me first thank you for what you are doing here. I have used the IDE install tutorial on the wiki and was up and running in minutes. I now have en environnement that reminds me of, well, many years back and I am sure this will makes things a whole lot easier and faster for me (and others of course). I still have to get more familiar with the IDE, but I was able to setup a SVN repository on Joomlacode for sh404SEF and checkout code from the IDE in a very short time. I did not dare getting into SVN and an  IDE on my own before, for fear of spending days in trials and errors, searching the net for docs, tweaking params, etc
So thanks again, as everything is working now, and it took only a few hours.

Now I have one more question, but I think it is also of public interest (maybe it should reside in another thread ?). I believe in many case using IDE+Joomlacode is a good choice even for small projects. In such case, I am wondering what would be the best code organisation ?
A bit of background (using sh404SEF as an example)

1 - I have 5 or 6 joomla web site for testing sh404SEF. They are located in subdirs of htdocs (/htdocs/base, /htdocs/j1013, /htdocs/multilang, ...). Whenever I develop things or test, I install the current version on one of those sites for testing

2 - I have setup the SVN repository on Joomlacode as :
/administrator/components/com_sef/
        - admin.sef.php
        - admin.sef.html.php
        - sef.xml
/components/com_sef/
        - sef.php
        - sef404.php
        -sef_ext.php
....

3 - I thought I would make an IDE project for each site, and when I want to test a new version residing in SVN, simply checkout code to the existing projects (base, multilang,...)

4 - This does not work because upon checking out, Subclipse erase the content of /administrator and /components, removing all dir and files not present in SVN (that is all other components than sh404SEF).

So my question is : what is the most efficient way to handle this ? how are you experienced programmer doing this ?

THe alternative I was thinking of is to change the tree structure in SVN to be that of the component zip file. Then I would checkout to a temporary location, zip the files and install (using Joomla installer) the newly created zip to whatever site I want to test on.

This alternative is much less handy. Is there any option in Subclipse I missed ? again, how are your handling this ? Should'nt you have general guidelines for organising the code together with the IDE install how to ?

Thanks and regards
See all about sh404sef and wbAMP at https://weeblr.com
I don't reply to PM anymore. Thanks for using sh404SEF and wbAMP

User avatar
mjaz
Joomla! Guru
Joomla! Guru
Posts: 821
Joined: Thu Nov 10, 2005 10:08 am
Contact:

Re: Building the Ship - IDE

Post by mjaz » Wed Sep 05, 2007 2:06 pm

Just thought I'd mention this here as it's relevant to the whole workflow thing:

When you need to create zip files of your project, instead of doing it manually every time, you can script this using Apache Ant. I don't know about other IDE's, but using EasyEclipse or J!Code, this is very easy.
I use this all the time, eg for DOCman, with one click I can generate all zip files for the core, the addons, and the translations.
I released a build script that's easy to customise using a config file. You can find it here: http://joomlacode.org/gf/project/jbuild/
BTW if anyone has ideas or wants to join the project, you're welcome!

From the readme:
J!Build is an Apache Ant build file to quickly make Joomla! installer packages.

Instead of manually making zips each time you want to test or distribute a new version of your extension, you can use this to do it automatically.

By changing the options in the config.ini file, you can make your archive look like this:
myextension.zip

...or something this:
mycompany_myextension_v1.3.0_build_641_2007-06-02.tar.bz2

Features:
- Automatic lookup of the version in the extension's xml manifest
- Add version, build number, and date
- Zip, gzip, bzip2 (more on request)

Requirements
------------
Apache Ant: http://ant.apache.org/manual/
If you're using EasyEclipse or J!Code this is pre-installed.

Usage
-----
Make sure you set cfg.name in config.ini to the name of your extension (the name your xml file uses).

Folder structure, using default settings:

|-- mjaztools_jbuild
    |-- build.number
    |-- build.xml
    |-- config.ini
    |-- readme.txt
|-- trunk
    |-- myextension.php
    |-- myextension.xml
    |-- ...
|-- packages (will be created automatically)
    |-- com_myextension_v1.5_build15.zip
    |-- com_myextension_v1.5_build15.tar.gz
    |-- com_myextension_v1.5_build15.tar.bz2

Command Line:
ant -f path/to/mjaztools_jbuild/build.xml

Using EasyEclipse or J!Code:
- In the menu, choose Window -> Show View -> Other -> Ant
- Drag build.xml from the Navigator to the Ant view
- Double click the new "MjazTools J!Build" item
- Refresh the Navigator, the new packages should appear
Better SEO & multi-lingual Joomla sites with Nooku Content
http://www.nooku.org
Nooku Framework for advanced Joomla extension development
http://www.nooku.org/framework

shumisha
Joomla! Guru
Joomla! Guru
Posts: 516
Joined: Sat Aug 20, 2005 3:15 pm
Contact:

Re: Building the Ship - IDE

Post by shumisha » Wed Sep 05, 2007 2:39 pm

Hi mjaz,

That's brilliant. I had that on my mind also, and had not yet started to look into it. Looks like it is solved !

Regards
See all about sh404sef and wbAMP at https://weeblr.com
I don't reply to PM anymore. Thanks for using sh404SEF and wbAMP

User avatar
CirTap
Joomla! Explorer
Joomla! Explorer
Posts: 418
Joined: Mon Dec 12, 2005 5:34 pm

Re: Building the Ship - IDE

Post by CirTap » Wed Sep 05, 2007 5:52 pm

Hi,

what you're doing sounds like "branches" in SVN terms.
SVN book: http://svnbook.red-bean.com/en/1.4/svn.branchmerge.html
If you also happen to have TortoiseSVN installed, check their manual for "5.2.1. Repository Layout". I recommend to use a foll-blown SVN client as a companion to any of the available Ecipse plugins for general Repository management.
shumisha wrote: 1 - I have 5 or 6 joomla web site for testing sh404SEF. They are located in subdirs of htdocs (/htdocs/base, /htdocs/j1013, /htdocs/multilang, ...). Whenever I develop things or test, I install the current version on one of those sites for testing
Each of them should become its own project in Eclipse and have a local SVN repository. I have an average of a 12-14 different website (not all are J! driven) running on my local machine for maintenace. Each domain has it's own VirtualHost and a DocumentRoot that physically points "anywhere" on my harddrive, hence I don't use http:/localhost/site1, http:/localhost/site2, http:/localhost/site3, but
http://local.customer1.com/, http://local.customer2.com/, http://local.customer3.com/
It only requies a few lines added to httpd.cond , and this layout serves me well for +10 yrs now.
shumisha wrote: 2 - I have setup the SVN repository on Joomlacode as :
/administrator/components/com_sef/
        - admin.sef.php
        - admin.sef.html.php
        - sef.xml
/components/com_sef/
        - sef.php
        - sef404.php
        -sef_ext.php
....
I dont know if that is the content of the "standard" /trunk/ folder in your repository, if you don't have a /trunk/, go ahead and consider to create a standad layout of folders such as this:

Code: Select all

 /trunk
      /administrator/components/com_sef/*.*
      /components/com_sef/*.*   
 /branches
      /base
            /administrator/components/
            /components/com_sef/*.*   
      /j1013
            /administrator/components/
            /components/com_sef/*.*   
      /multilang
            /administrator/components/
            /components/com_sef/*.*   
/tags
      /release-1.0.0/
      /release-1.1.0/
      ....
Remember: read the mentioned chapter in the SVN book or TortoiseSVN manual
All SVN clients are aware of these names and will guide and warn you if you want to fool around with /branches or /tags
In this case:
/trunk : contains your cutting edge, unrelease development version. The prerogative of the trunk is to contain anything the developer(s) need to code. It might be broken and not functional, it may contain yet unreleased bugfixes and new features for the next release of your project. If people use the /trunk as-is, they're on their own.
/branches : not sure if you actually need them. Anyway, they'd contain the specific "variations" of your component for the base, j1013, and multilang sites, created at any arbitraty moment of time. They're like "trunks" of their own, independent snapshots taken to test or enhance the code for whatever reason. Branches can become /tags, but they don't have to. SVN allows you to easily merge code of different branches, with your working copy, into another branch, or to create a brand new release version located in /tags.
/tags : they are done, any content here is considered to be frozen and tagged "as a release". You should never ever need to change a single bit in these folder. This is the code people have installed. It's the history of your development, and you can't change history :)
If you need to make changes to a "tagged" release, check it out as a  new working copy or "branch" it. This might be neccessary if you provide update support like security fixes for older release versions.. Make your changes and then tag it again as a new "service pack" release.
shumisha wrote: 3 - I thought I would make an IDE project for each site, and when I want to test a new version residing in SVN, simply checkout code to the existing projects (base, multilang,...)
Not sure if I can follow, but you can go the other way round.
Eclipse provides an easy way to link external files into a project.
I recently wrote a plugin for DokuWiki which runs as a J! component (the one used for the doc-site), here's what I did:

- add a VirtualHost for jwiki.devbox.local with DocumentRoot W:\webs\joomla_docs
- add entry into "hosts" file: 127.0.0.1 jwiki.devbox.local
- installed J! in W:\webs\joomla_docs, installed JD-Wiki
so this is just yet another local website running Joomla!
Now comes the developer part:
- created a subfolder in \components\com_jd-wiki\..\plugins\myplugin
- made this subfolder my SVN working copy ~ content of /trunk/
- create a new PHP project in Eclipse, with the pysical project location: \components\com_jd-wiki\..\plugins\myplugin
- linked several new folders and files to this project I considered useful while developing via "New Folder > Advanced > Link to folder in the file system" (samy featue is available for "New File")

I don't need direct access to all the files of J! in order to test and write my plugin within Eclipse. You don't want every image and .js file parsed by the Eclipse for no good. I added a link to the /com_jd-wiki/lib/ folder for convenience so I can look into the parser code and other plugins. I also linked to the configuation.php file of my test site to make quick changes.
Inside Eclipse here's what I see in the Navigator view:

Code: Select all

Navigtaor outline:
/Plugin-Project DocuWiki [svn infos]
 * /myplugin/*.php
 > /lib/               folder link to W:\webs\joomla_docs\components\com_jd-wiki\lib
 > configuration.php   file link to   W:\webs\joomla_docs\configuration.php
I can easily commit and update in Eclipse. Using svn:ignore on the project folder I can cloak files and folders not related to the project such as the /lib/ folder and config file.

Have fun,
CirTap
You can have programs written fast, well, and cheap, but you only get to pick 2 ...

"I love deadlines. I like the whooshing sound they make as they fly by." Douglas Adams

shumisha
Joomla! Guru
Joomla! Guru
Posts: 516
Joined: Sat Aug 20, 2005 3:15 pm
Contact:

Re: Building the Ship - IDE

Post by shumisha » Wed Sep 05, 2007 6:19 pm

Hi cirTap,

Thanks for this detailed explanation. I was familiar enough with SVN to know about the traditional organisation in trunk/branches/tags. I have all of that, plus releases, but I just wanted to simplify my explanation to go to the point.
My problem is not with managing localy sites locally, as I have been doing quite a bit these last 24 months !
My problem is really about the most convenient way to handle version management of the various items in sh404SEF, and being able to test it within several test sites, so
- created a subfolder in \components\com_jd-wiki\..\plugins\myplugin
- made this subfolder my SVN working copy ~ content of /trunk/
- create a new PHP project in Eclipse, with the pysical project location: \components\com_jd-wiki\..\plugins\myplugin
- linked several new folders and files to this project I considered useful while developing via "New Folder > Advanced > Link to folder in the file system" (samy featue is available for "New File")

I don't need direct access to all the files of J! in order to test and write my plugin within Eclipse. You don't want every image and .js file parsed by the Eclipse for no good. I added a link to the /com_jd-wiki/lib/ folder for convenience so I can look into the parser code and other plugins. I also linked to the configuation.php file of my test site to make quick changes.
Inside Eclipse here's what I see in the Navigator view:
is right on target. I will look into "linking external files" to a project. I understand from what you say that it is a way of attaching files to the project, so as to be able to browse, edit and possibly debug them, while keeping them outside of the actual project. That's good.
Can you confirm however, that I can handle the specifics of a full component like sh404SEF, which has

- some files and sub-dir in /administrator/components/com_sef
- some files and sub-dir in /components/com_sef
- some files in /modules

That's what I could not "model" so to say. I can see it working as described with a plugin, residing in one directory, but how do you extend that to several sets of versionned files into several directories ?

Thanks for any (additionnal) advice
regards

[EDIT] let me check also that I understood you well; When doing this :

Code: Select all

Navigtaor outline:
/Plugin-Project DocuWiki [svn infos]
 * /myplugin/*.php
 > /lib/               folder link to W:\webs\joomla_docs\components\com_jd-wiki\lib
 > configuration.php   file link to   W:\webs\joomla_docs\configuration.php
- whatever is in /myplugin/ is versionned, under the control of SVN (ie: your working copy)
- /lib/ and configuration are not versionned, solely linked because you need to be able to edit them or monitor, or debug

Is this correct ?
Last edited by shumisha on Wed Sep 05, 2007 6:34 pm, edited 1 time in total.
See all about sh404sef and wbAMP at https://weeblr.com
I don't reply to PM anymore. Thanks for using sh404SEF and wbAMP

User avatar
CirTap
Joomla! Explorer
Joomla! Explorer
Posts: 418
Joined: Mon Dec 12, 2005 5:34 pm

Re: Building the Ship - IDE

Post by CirTap » Wed Sep 05, 2007 8:40 pm

[quote=∓quot;shumisha "\]
- whatever is in /myplugin/ is versionned, under the control of SVN (ie: your working copy)
- /lib/ and configuration are not versionned, solely linked because you need to be able to edit them or monitor, or debug

Is this correct ?
[/quote]
yep.
sorry for being a bit over elaburous about SVN and it's layout; it wasn't clear how you set up your repository, and since this isn't a private chat, others might stumbles across this information and it could be useful as a starter to get an idea.
As you said, it's more likely that people using Eclipse will also (try to) use JommlaCode as it's so easy to get connected withing Eclipse.

However, the problem with Eclipse + its SVN clients is you can't have several working copies in one project - guess you already figured that out :) SVN settings apply on project level, and the project root must be some folder inside a working copy. Although you may add a link to an external folder -- which might be the root on a different working copy - you can't manage "both" within the same project. If things get really wrong (and I've been there), the .svn files in the linked folder get screwed.

Maybe "some folder inside a working copy" is the key.
When I wrote, /plugin/myplugin ~ the WC trunk, I lied to keep things simple . It's in fact a subfolder somewhere deep inside the real trunk. I can happily commit and update its content because it's the root directory for my Eclipse project.
The "real" trunk is an Eclipse project on its own. Unlike SVN, Eclipse doesn't bother if there are any other project's files in a subfolder.
Here's the (simplified) layout:
Doc project /trunk
.project
.externalToolBuilders
/folder1
  /docbook
  /wiki
      /plugins
/japi  (Plugin-Project DocuWiki)
                .project
                .externalToolBuilders
                plugin-files ...

So this is a possible outline for Eclipse, but "and being able to test it within several test sites" is subject to Apache. Just because yu can criss-cross- link folders in your IDE doesn't help for browsing the files in the contect of a website.
If you're on a NTFS file system you can use junctions to create "hard links" of a folder in any of the test sites to link to a particular working copy. If you're on a *nix system this isn't news.

SVN:
/branches/version1/components/com_sh404SEF
/branches/version1/administrator/components/com_sh404SEF
/branches/version1/modules/mod_sh404SEF
...
/trunk/components/com_sh404SEF
/trunk/administrator/components/com_sh404SEF
/trunk/modules/mod_sh404SEF

Apache:
/htdocs/site-foo/components/com_sh404SEF
/htdocs/site-foo/administrator/components/com_sh404SEF
/htdocs/site-foo/modules/mod_sh404SEF

/htdocs/site-bar/components/com_sh404SEF
/htdocs/site-bar/administrator/components/com_sh404SEF
/htdocs/site-bar/modules/mod_sh404SEF

Again, stressing my simple "Plugin" project: within several installationo f J! and the various incarnations of jd-wiki(open-wiki I added a junction to the plugin folder in the working copy -- which is even located on another partition.

Using hard links you can even do it the other way round, and link them into your Eclipse workspace. You just need to be creative, flexible and inventive to get the different environments to work together: file system, Apache, Eclipse workspace and projects.

Hope this gives you enough ideas to solve your happy mix of releases and environments :)

Have fun,
CirTap
You can have programs written fast, well, and cheap, but you only get to pick 2 ...

"I love deadlines. I like the whooshing sound they make as they fly by." Douglas Adams

shumisha
Joomla! Guru
Joomla! Guru
Posts: 516
Joined: Sat Aug 20, 2005 3:15 pm
Contact:

Re: Building the Ship - IDE

Post by shumisha » Thu Sep 06, 2007 6:08 am

Hi cirTap

:-\ well, the organisation you laid is what I was thinking would be required, after your previous message. Honest, I don't like it very much. It means to get the latest trunk version and set it up in an eclipse project for further dev, I'll have to do 3 checkouts (admin/comp, /comp and /modules) and afterwards of course 3 commits.

It is a bit frustrating, because it would be so simple : when Subclipse is doing a checkinout into an existing Eclipse project, it should simply leave unversionned file untouched (maybe this could be optionnal). That would allow checking out in one batch the full comp (admin+comp+modules).
If that can't be done, I think I'll give a try to the other option I mentionned :
THe alternative I was thinking of is to change the tree structure in SVN to be that of the component zip file. Then I would checkout to a temporary location, zip the files and install (using Joomla installer) the newly created zip to whatever site I want to test on.
To to expand, I could be doing :
- Eclipse : have 3 projects : sh404SEF, base_test, multi_lang_test
    - sh404SEF is simply the extension's files, laid out as they are in the component zip file
    - base_test and multi_lang_test are joomla installs (yes, Eclipse will parse them fully!)
- SVN repos : use zip file layout : all files together + a few subdirs

WHen checking out a WC, I'll check it out to the sh404SEF. Actually, I could do it directly using Tortoise as well. Then outside of Eclipse, I zip the component, and install it normally to, say, base_test site

Then I can go back inside Eclipse to use editor and debugger.

I'll give it a try during the next few days. Any input welcomed !

Thanks to cirTap for your detailed anwsers!

Regards
See all about sh404sef and wbAMP at https://weeblr.com
I don't reply to PM anymore. Thanks for using sh404SEF and wbAMP

shumisha
Joomla! Guru
Joomla! Guru
Posts: 516
Joined: Sat Aug 20, 2005 3:15 pm
Contact:

Re: Building the Ship - IDE

Post by shumisha » Thu Sep 06, 2007 12:56 pm

Hi,

Fllow-up on my previous post. I have been in touch with the Subclipse dev, and they said what I want is not possible currently, as this will break the check out process if the target directory is not empty. Hence the need to delete existing content, even if unversionned. They suggested to simply put back the files after doing the check-out, and this might wel be the fastest solution.
If the SVN repos matches Joomla directory structure, and I keep a copy somewhere of the directories that checkout will delete (/administrator, /components and /Modules) I can just put them back afterwards, including some config files.

Yes I think that can work well!

Regards
See all about sh404sef and wbAMP at https://weeblr.com
I don't reply to PM anymore. Thanks for using sh404SEF and wbAMP

User avatar
ianmac
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4784
Joined: Sat Sep 24, 2005 11:01 pm
Location: Toronto, Canada

Re: Building the Ship - IDE

Post by ianmac » Thu Sep 06, 2007 2:00 pm

Thought I would jump in here with some insight that Louis shared a while ago on the Skype chat.

I used to setup my repo with a site directory and an admin directory.  Then, I would link these into my Joomla! built using file system links.  This didn't work too badly, but caused problems with something (can't remember what).

What I do now, which is what Louis suggested, is the following (this is also the directory structure that my new Eclipse MVC Component wizard uses).

Say my component is called amazing (because all my components are amazing -heh, well, not  really, but let's pretend).  I would create the following structure in my repository:
tags
branches
trunk
trunk/components
trunk/components/com_amazing
trunk/administrator
trunk/administrator/components
trunk/administrator/components/com_amazing

Then, I checkout the trunk into a folder in my webroot, so I might have something like:
/var/www/amazing
/var/www/amazing/components/com_amazing
/var/www/amazing/administrator/components/com_amazing
etc.  etc...

now all that is left is to get Joomla! there.  Well, to do that, I do:
cd /var/www
svn export http://joomlacode.org/svn/joomla/development/trunk /var/www/amazing --force

Then, I run my Joomla! installation, and I add the necessary entry to the components table.

Then, I'm ready to go.

If I want to update the Joomla! codebase, I simply do another export.  But, generally, you don't want to keep constantly updating Joomla! while you're working on your project because you want to work on a stable codebase (and not spend all your time fixing because Joomla! changed (although this is less of an issue now).

Then, to commit, it is one commit.  All you have to do is make sure that you don't add files outside of your component directories.

I then use a bash build script to create a zip file or a tgz file (or both).  It works beautifully.

Ian

AmyStephen
Joomla! Champion
Joomla! Champion
Posts: 7056
Joined: Wed Nov 22, 2006 3:35 pm
Location: Nebraska
Contact:

Re: Building the Ship - IDE

Post by AmyStephen » Thu Sep 06, 2007 2:12 pm

I have a question related to this discussion. (Thanks to each of you for sharing - it has been most helpful.)

Are developers encouraged to get an SVN repository for EACH project? Or, should they get one repository, and then host all of their projects?

Given the answer to that, how does that impact your directory structure?

Thanks!
Amy :)

shumisha
Joomla! Guru
Joomla! Guru
Posts: 516
Joined: Sat Aug 20, 2005 3:15 pm
Contact:

Re: Building the Ship - IDE

Post by shumisha » Thu Sep 06, 2007 2:20 pm

Hi ianmac,

I think what you describe here is what I said above, except in my case, I don't want to get an uptodate Joomla, but rather one of 3 or 4 Joomla full joomla sites, each of them with a zillion components and modules already installed, so I can test how sh404SEF behaves with each of them. So I intend to keep these (master) copies somewhere on my local machine and simply drop them back in after a checkout. That would be the equivalent of the svn export from Joomla repos that you are doing, except
Basically, one just need to repair what the checkout process is destroying ie delete unversionned files.
As said, I have to put it to work now and see how handy it is

Thanks for your input

Regards
See all about sh404sef and wbAMP at https://weeblr.com
I don't reply to PM anymore. Thanks for using sh404SEF and wbAMP

User avatar
mjaz
Joomla! Guru
Joomla! Guru
Posts: 821
Joined: Thu Nov 10, 2005 10:08 am
Contact:

Re: Building the Ship - IDE

Post by mjaz » Thu Sep 06, 2007 4:43 pm

AmyStephen wrote: I have a question related to this discussion. (Thanks to each of you for sharing - it has been most helpful.)

Are developers encouraged to get an SVN repository for EACH project? Or, should they get one repository, and then host all of their projects?

Given the answer to that, how does that impact your directory structure?

Thanks!
Amy :)
I have one repository I use for all kinds of small stuff, like little modules for client's websites, hacks to existing extensions etc. For larger projects, especially ones I intend to maintain over a longer period of time, or for projects where I work with different people, I use a separate repository.

The small projects each have a folder in the root, and often only have a trunk folder inside, unless I've made several versions.
eg.
project1
-- trunk
project2
-- trunk
-- tags
-- branches
-- build
-- documentation
-- packages

I group related extensions:
project3
  -- proj3component
    -- trunk
    -- etc...
  -- proj3plugin
    -- trunk
Better SEO & multi-lingual Joomla sites with Nooku Content
http://www.nooku.org
Nooku Framework for advanced Joomla extension development
http://www.nooku.org/framework

tekcronic
Joomla! Intern
Joomla! Intern
Posts: 73
Joined: Wed Nov 15, 2006 12:17 am
Location: USA - Ohio
Contact:

Re: Building the Ship - IDE

Post by tekcronic » Fri Sep 14, 2007 4:45 pm

just a doc note for those who may care in ubuntu (linux) for XAMPP

I found it is easiest to start with the command line to uncompress
sudo tar xvfz xampp-linux-1.6.3b.tar.gz -C /opt
For Ubuntu users more info can be found at: http://ubuntuforums.org/showthread.php?t=223410
Last edited by tekcronic on Fri Sep 14, 2007 4:51 pm, edited 1 time in total.

User avatar
Pentacle
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 165
Joined: Wed Oct 25, 2006 12:34 pm
Location: Turkey

Re: Building the Ship - IDE

Post by Pentacle » Thu Sep 20, 2007 8:44 pm

Can someone please explain me how to enable this toolbar?

I know it sounds stupid. But I can't even find it at this stage in Eclipse. :)
You do not have the required permissions to view the files attached to this post.
My Joomla! 1.5 extensions - http://ercan.us
Progress is made by lazy men looking for easier ways to do things.

User avatar
ianmac
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4784
Joined: Sat Sep 24, 2005 11:01 pm
Location: Toronto, Canada

Re: Building the Ship - IDE

Post by ianmac » Thu Sep 20, 2007 8:50 pm

ahhh...  that toolbar...  I dunno...  it is always there for me...  you don't have any of it?

Ian

User avatar
mjaz
Joomla! Guru
Joomla! Guru
Posts: 821
Joined: Thu Nov 10, 2005 10:08 am
Contact:

Re: Building the Ship - IDE

Post by mjaz » Thu Sep 20, 2007 9:53 pm

Pentacle wrote: Can someone please explain me how to enable this toolbar?

I know it sounds stupid. But I can't even find it at this stage in Eclipse. :)
Perhaps in Window -> Customize Perspective ? Haven't tried it myself.
Better SEO & multi-lingual Joomla sites with Nooku Content
http://www.nooku.org
Nooku Framework for advanced Joomla extension development
http://www.nooku.org/framework

User avatar
Pentacle
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 165
Joined: Wed Oct 25, 2006 12:34 pm
Location: Turkey

Re: Building the Ship - IDE

Post by Pentacle » Thu Sep 20, 2007 10:21 pm

I think I found where to enable it, but the problem was that it came its place after a restart. :)

Thanks for fast responding. :)
My Joomla! 1.5 extensions - http://ercan.us
Progress is made by lazy men looking for easier ways to do things.

User avatar
Pentacle
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 165
Joined: Wed Oct 25, 2006 12:34 pm
Location: Turkey

Re: Building the Ship - IDE

Post by Pentacle » Sun Sep 23, 2007 10:51 pm

Another problem. This time about debugging.

I'm trying to debug a file using 'PHP XDebug Script' in PHPEclipse.

After selecting project and file and choosing the needed php interpreter, I press Debug.

In the bottom of the window, the console gives me the correct output. But the debug window says terminated about the process.

Code: Select all

<terminated>debugtest [PHP XDebug Script]	
	<terminated>PHP XDebug Client at localhost:9999	
	<terminated, exit value: 0>D:\xampp\php\php.exe		
I can't be more specific since I'm not too familiar with debugging, but if you need further data to give an advice, I'm ready to give off.

Regards.
My Joomla! 1.5 extensions - http://ercan.us
Progress is made by lazy men looking for easier ways to do things.

User avatar
DeanMarshall
Joomla! Hero
Joomla! Hero
Posts: 2352
Joined: Fri Aug 19, 2005 2:26 am
Location: Lancaster, Lancashire, United Kingdom
Contact:

Re: Building the Ship - IDE

Post by DeanMarshall » Mon Sep 24, 2007 3:01 am

I know next to nothing about debugging PHP interactively - but my guess is that without any breakpoints set your script runs and completes successfully - giving an 'exit code' of zero - which is usually good.

To set a breakpoint - in most IDEs - click (or doubleclick) in the left margin alongside a line of code - you should see some sign that a break point is set - probably a coloured circle of some sort. Now click the debug and your interface should show the line of code with the break point and you should be able to examine the contents of variables as well as step forward one line at a time and follow the script's execution.

Dean
Dean Marshall Consultancy - six Joomla experts - http://www.deanmarshall.co.uk/

Joomla Experts - Joomla Support http://www.deanmarshall.co.uk/joomla-se ... pport.html

shumisha
Joomla! Guru
Joomla! Guru
Posts: 516
Joined: Sat Aug 20, 2005 3:15 pm
Contact:

Re: Building the Ship - IDE

Post by shumisha » Mon Sep 24, 2007 6:10 am

Hi all,

Just as deanmarshall said above, you need to set breakpoints in your code to have the debugger stop on them, and then be able to step into your programm.

However, you may also be facing an issue I am having myself : eclipse upgrades breaks the debugger. I installed on sept 6. Everything was working allright. I enabled automatic upgrades features, and then when presented with the list of available upgrades, I accepted the default selection of upgrades.
Whenever I do this, it breaks the debugger, which then have the behavior described above : debugger starts, but does not stop on breakpoints.
Fortunately, Eclipse can revert to a previous stable config (Help menu, Software updates, Manage configuration, Revert to previous), so I went back to the Sept. 6 config, which works flawlessly.

This happens for every upgrades, I checked again yesterday evening, and the debugger was broken again.

What I have found is that upon making an upgrade, there is a new debugger added, from Zend (though I did not see any notification of that). Going to Preferences, PHP, Debug, there is a new select list which now ask to select the Preferred debugger.
After an upgrade, Zend is selected by default. However, selecting XDebug instead of Zend does not fix this up, even after restarting the IDE.

So I have disable automatic upgrades so far, but any information of why this happening, and how I can select xdebug permanently and stil l have upgrades would be appreciated.

Regards
See all about sh404sef and wbAMP at https://weeblr.com
I don't reply to PM anymore. Thanks for using sh404SEF and wbAMP

User avatar
Pentacle
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 165
Joined: Wed Oct 25, 2006 12:34 pm
Location: Turkey

Re: Building the Ship - IDE

Post by Pentacle » Mon Sep 24, 2007 8:47 am

Dean and Shumisha,

Thanks for pointing out to the breakpoints. The problem is I have already set some breakpoints in the code. I also can't see anything in the variables section. If it completes successfully, then why don't I see even the global variables?

Regards.
My Joomla! 1.5 extensions - http://ercan.us
Progress is made by lazy men looking for easier ways to do things.

shumisha
Joomla! Guru
Joomla! Guru
Posts: 516
Joined: Sat Aug 20, 2005 3:15 pm
Contact:

Re: Building the Ship - IDE

Post by shumisha » Mon Sep 24, 2007 9:02 am

Hi,

As far as my experience with it goes (3 weeks), you only see the variable contents when being stopped and stepping through. After the script has completed, all variables are cleared. I would say you are suffering from the same thing I described, and your setup has been broken by latest updates. Or if you set this up recently, maybe the most recent downloads of the IDE does not work any more with Xdebug and need added configuration steps.

I myself did an upgrade yesterday evening. This morning the debugging was behaving exactly as you describe (terminating immediatately, without complying with breakpoints). I had to revert configuration to the last good one (sept 6, just after I installed), and debugging immediately started working again.

Regards
See all about sh404sef and wbAMP at https://weeblr.com
I don't reply to PM anymore. Thanks for using sh404SEF and wbAMP

User avatar
Pentacle
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 165
Joined: Wed Oct 25, 2006 12:34 pm
Location: Turkey

Re: Building the Ship - IDE

Post by Pentacle » Mon Sep 24, 2007 1:14 pm

I haven't done any upgrade since I installed Eclipse till now.

Minutes ago, I installed all PDT, PHPEclipse and The Eclipse Project Updates. But again the same in debugging.  ???
My Joomla! 1.5 extensions - http://ercan.us
Progress is made by lazy men looking for easier ways to do things.

shumisha
Joomla! Guru
Joomla! Guru
Posts: 516
Joined: Sat Aug 20, 2005 3:15 pm
Contact:

Re: Building the Ship - IDE

Post by shumisha » Mon Sep 24, 2007 1:39 pm

Hi,

And when was it that you installed first ?

Regards
See all about sh404sef and wbAMP at https://weeblr.com
I don't reply to PM anymore. Thanks for using sh404SEF and wbAMP

User avatar
Pentacle
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 165
Joined: Wed Oct 25, 2006 12:34 pm
Location: Turkey

Re: Building the Ship - IDE

Post by Pentacle » Mon Sep 24, 2007 1:44 pm

Hmm, It has been about 2 week for Eclipse PDT and about 1 week for PHPEclipse extension, plugin, whatever it is.

Regards,
Ercan.
My Joomla! 1.5 extensions - http://ercan.us
Progress is made by lazy men looking for easier ways to do things.

shumisha
Joomla! Guru
Joomla! Guru
Posts: 516
Joined: Sat Aug 20, 2005 3:15 pm
Contact:

Re: Building the Ship - IDE

Post by shumisha » Mon Sep 24, 2007 1:57 pm

Hi,

As said, I downloaded and installed on sept 6 (as per instructions on the wiki). It is set up to fetch updates automatically and prompt for install. I did a couple, and then around 15-16 sept, accepted an upgrade which broke the debugging. Any further upgrade breaks the debugging process, and I have to revert to the initial config to make it work again. I have not found which setting I have to change to make it work, what's for sure is that when it does NOT work, I have two options (Zend and XDebug) available under /PHP/debug in preferences, whereas when it works, this select list is not available.
Regards
See all about sh404sef and wbAMP at https://weeblr.com
I don't reply to PM anymore. Thanks for using sh404SEF and wbAMP

shumisha
Joomla! Guru
Joomla! Guru
Posts: 516
Joined: Sat Aug 20, 2005 3:15 pm
Contact:

Re: Building the Ship - IDE

Post by shumisha » Sun Sep 30, 2007 6:40 pm

Hi all,

This is just to confirm that it looks like something is wrong with the debugging. As soon as I run an update process on an install of PDT, it breaks the debugging. As described above, after setting breakpoints, the page is served and the debugging process is marked as termnated immediately in the debugging window. This happened on two differrent installs. I still have my main, original install on one pc, and this is still running perfect (I have disabled updates, fearing it would break  my only running setup).
I have also downloaded the latest version of PDT, to do a clean setup, and it is the same. BTW, the xdebug plugin is not required with latest version of PDT, it has been integrated.
Maybe it is only a matter of setting up correctly the parameters, but I have going through them many times now, and I can't find my way around this.

Any advice ? second opinions ?

Thanks and regards
See all about sh404sef and wbAMP at https://weeblr.com
I don't reply to PM anymore. Thanks for using sh404SEF and wbAMP

bayness0
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Sat Oct 13, 2007 3:22 am

Re: Building the Ship - IDE

Post by bayness0 » Sun Oct 21, 2007 3:50 pm

I am trying to install eclispe and run Joomla 1.5rc3 under it.  however, I have a mising JHTML module - andy ideas?


Locked

Return to “Joombie Tools of the Trade”