Seva's notes

Wisdom, Awareness, Responsibility :)

Archive for the ‘zend studio’ Category

Zend Studio for Eclipse Creators

leave a comment »

As I mentioned, yesterday we released the 1st version of Zend Studio for Eclipse (it was released under version 6.0 however, to continue the line of Zend Studio numbering). And I think, my dear diary, that you should see these extraordinarily talented people that sacrificed their minds and hearts to make it possible. Here are they:

Zend Studio for Eclipse Creators

Written by Seva

2008-01-23 (January 23) at 02:33:22

Zend Studio for Eclipse Release & cetera

leave a comment »

Dear diary,

I have 2 news for you today.

  1. Today we successfully released Zend Studio for Eclipse. My contribution to it, beyond PDT commitments, is Sebastian Bergmann‘s PHPUnit testing framework integration plug-in, File Network support, Organize Includes and other parts of Refactoring engine, Code Coverage browser… well, it seems that’s it. Maybe several additional, but minor things. Enjoy, guys. This is really a great (and some say – the best) PHP IDE.
  2. Occasionally, these are my last days at Zend Technologies. Since next week I’m starting at Nielsen Online (BuzzMetrics) to do text-mining. If you ask why, the answer is simple – I got bored of Zend, where I spent last 6.5 years of my life, and wanted to do something really new and exciting. I hope it will work 🙂 For now I’m planning to stay an Eclipse committer and continue to help my brothers at Zend to move on.

Written by Seva

2008-01-22 (January 22) at 06:21:52

PDT Resource Containers Include Paths

with one comment

Last week I have been working on extending of Include Path Libraries management in PDT and Zend Studio for Eclipse (Neon). The change won’t be released either in PDT 1.0.2 or in Zend Studio for Eclipse GA, but in the next ones (since it changed almost every aspect of products’ functionality).

The change’s idea is very trivial – until now you had the project’s root as a unchangeable default include path and ability to attach another project roots as additional include paths (variable and library functionality is not changed, except several minor bug fixes). And the point is to make the default visible and removable and to allow addition of specific folders both under same project and other PHP projects. Seems simple, huh? Well, it’s not so much.

The main change is very quick indeed – just replace IProject references with IContainer ones, handle properties serialization etc. and you are there. However when you think a bit about the model (classes, functions, constants) it comes that element beyond the specified folders should be invisible from within the project. Thus it was a need to implement a project’s model filtered wrapper, which efficiently cuts the unneeded elements from the model. Also include path order is relevant from now, which affects debugger execution. That’s about all the changes which affect PDT.

However, when Zend Studio for Eclipse comes to a picture, it becomes even more complicated. First of all, you have File Network in it, which is a graph of all PHP files connected by include/require statements. Second you have Organize Includes, Refactoring Move/Rename of file/folder and at last – include content assist (code completion). All of these should respect the change in configuration and also reflect the configuration change in reasonable time.

This time I won’t go deep into implementation, because it’s less interesting by itself and limit myself with just a brief demo:

Demo Thumbnail

Written by Seva

2007-12-16 (December 16) at 06:37:52

Debug PHP and JavaScript simultaneously

leave a comment »

Yesterday me and Roy had a brainstorm session on future Zend Neon (Commercial version of PDT) and ATF integration and “occidently” found a way of debugging of an URL with both Zend’s PHPand Mozilla‘s JavaScript debuggers in one session.

Surprise! It’s possible with neither patching nor hacking. I’m not going to show the exact steps of this, but the idea is very simple:

As you probably don’t know, to debug URL on a server which has Zend Debugger installed it’s enough to pass several simple parameters with the HTTP request (either in the query string or as cookies), like client IP and port, debug type etc., to start the debug session. Afterwards the debugger contacts the client machine, where a Neon’s Debug Daemon listens for incoming connections. The Daemon then raises up a new Launch Configuration.

When Neon’s Debug URL action is executed, it just appends the needed debug parameters to the passed URL and sends the updated URL either to the browser. Just grab this URL and start Mozilla JavaScript Debug Launch with it!

As the result 2 simultaneous launch configurations will start; the first activated session will be PHP’s one and then, after the browser will start receiving content from the server, JavaScript’s one will come into the picture.

Voila!

Moreover, if you enabled all-pages (cookie based) PHP debugging, it will go further with your AJAX (AJAH/AJAJ) requests!

Now the only problem 🙂 is you cannot set breakpoints of both PHP and JavaScript types in the PHP source file, since it doesn’t match the final responce which will be passed to the browser, so you should enable the option to suspend the JavaScript execution immediately after it starts to add breakpoints to the responce HTML source.

Written by Seva

2007-10-20 (October 20) at 12:54:00