Showing posts with label pdt. Show all posts
Showing posts with label pdt. Show all posts

2007-10-21

PDT CodeDataResolver and ContentAssistSupport Unit Testing

Just wrote the subject related article here.

The article explains the concept of editor caret position based Unit Testing of editor links and code completion in PDT.

2007-10-20

Debug PHP and JavaScript simultaneously

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.

2007-06-25

PDT and me

Luckily, some projects I work on currently are open sourced, what makes me able to post close to everything I want about them.

I have been involved in PDT more than one year, starting with my entrance to Zend's Development Team (After finishing to work about 4 years in the e-Business team as Zend's site developer and maintainer. 4 long, hard and pleasant years of coding PHP. Needless to say, how proud I was to start developing tools for people like ex-me - common PHP gurus.).

Terse History
PDT (former PHP-IDE) was born from two parents - IBM and Zend. The father dipped two mature committers, which fertilized the idea (and withdrew shortly thereafter); and mother's bosom solicitously received the contribution and started to grow it carefully. As every whelp, PDT got it's good and bad heritage from their parents. Some code chunks were (sometimes thoughtlessly) copied from JDT/JST, others were forcedly brought from Zend Studio. There were hot discussions, hard solutions, brilliant brain-waves and horrible mistakes...

But, as we know, time heals. Now, when we are close to the first release of the product, the situation is not so bad. The model is robust, views are useful and informative, debugger support is awesome. Performance is acceptable.

And, surprisingly or not, the project became one of the most popular among other Eclipse's ones with thousands of daily downloads, dedicated and energetic community. It conquered most of its competitors (this may be disputable) and even came close to compete with the real monster - Zend Studio itself.

My commitment
Now it's hard to remember each line of code I committed to the project, but fortunately and occasionally I found the amazing site of Ohloh, which kindly refreshed my memory.

So, let's go. I've added/changed about 25k lines of code, which is not so much when comparing with some other committers. It's not surprising, since most of my code were feature improvements, performance optimizations and bug fixes. As results of my direct work which are visible with unaided eye, I can mention only these things:
  • Outline views (PHP Explorer View, Project view and Editor Outline View) synchronization,
  • Include Path trees in PHP Explorer View,
  • Files Drag-and-drop support,
  • Smart bookmark enablement and
  • The project's download site.

    That's all, folks. Not so much, honestly. But I have to mention, that I am still proud of each character I typed.

    End.
  •