Impressions of PHP Development on Netbeans 6.7

Here is yet another review of Netbeans 6.7 Beta (I have not yet downloaded the release candidate). I have started to use daily Netbeans 6.7 and started to do everything I do with Netbeans, including remote development (sychronization) and debugging of PHP Scripts. Which you are used to these if you were using Netbeans 6.7 nightly builds. What you might not be familiar with are the unit test creation, code coverage plugin and subversion capabilities of Netbeans (or I have stopped using TortoiseSVN on Windows and shell on *nix)
[Read the rest of this entry...]

Tags: , , , , , ,

Comments (2)

How to change the URL of your SVN WC

Yet another self reminder to myself about subversion commands.
It’s possible that the location of your svn repository has changed. And you were not aware of it and when you have checked in you encountered an:

svn: PROPFIND request failed on '/codebase/trunk'
svn: PROPFIND of '/codebase/trunk': Could not resolve hostname `svn.oldcodebaseurl.com': Host not found (https://svn.oldcodebaseurl.com)

Remember that you don’t have to manually check out again and do your changes to it. It’s a painful experience if you have lots of repository you are working on or if the repo you have checkout has has pretty big on size.

All you have to do is to relocate your svn url with this command:

 svn sw --relocate https://svn.oldcodebaseurl.com/codebase https://svn.newcodebaseurl.com/codebase

As a self reminder, you can count on that I have encountered it, felt the pain and found the painkiller :)

Tags:

Leave a Comment

Working on Ruby and Ruby on Rails

As you know I have recently had an idea on what is Ruby and how this Rails and Trains works. I did not had enough time to work on them but I got a book to read. Instead of starting from Pragmatic’s Guide to Ruby, I have started with RoR book for a hands-on experience with real time apps. I guess that’s pretty good way, because you learn the best when you read some else’s code.
[Read the rest of this entry...]

Tags: , , ,

Leave a Comment

How To Roll Back To A Previous Revision In SVN

Yet another self reminder about subversion tricks. If you are using subversion, this means you need to keep track of the changes you have done to a text file and this changes are important to you and you may want to get back to the revision you want anytime you want and you may easily commit it as a new revision. But actually you can’t.

At least not that easily. The thing you should is to merge the current revision with the revision you want to get back. And by this I mean, you are applying the patches done till that revision from backwards. If you have add something, the patch automatically removes the thing that is added. It does the thing you are doing manually automatically.

Here is the shell script:

svn merge http://my.svn.com/mycodebase/trunk/myfile.php@HEAD http://my.svn.com/mycodebase/trunk/myfile.php@51 .myfile.php
svn commit

51 here means the revision you want to get back. Remember that changes are done on your working copy and they are not committed to the repository. Instead of a file you may use a folder too.

Or You may want to try something like this too:

svn diff -r HEAD:51 myfile.php > backwards.patch
patch -p0 < backwards.patch --dry-run
patch -p0 < backwards.patch
svn commit

Bacisally that’s what the merge operation does. Second command is not necessary but you might want to try out how the changes will affect your files without damaging your working copy.

Tags:

Leave a Comment

What I like in PHP

Last Week, I was in Open Days organized by Istanbul Bilgi Univesity and LKD (Linux Users Association in Turkey). It was a great event, very precious people gave conferences. It was really educational and more importantly fun.

I have joined a workshop done by Erek Gokturk about Ruby and Ruby on Rails. I was really curious about what was going on there. I follow the PHP Planet and other rss too, especially blogs of Terry Chay made me curious about “Are these people really that much asshole?”.
[Read the rest of this entry...]

Tags: , ,

Comments (1)

Connecting Zend_Form to Multiple Controllers with Helpers

So in my previous post I have mentioned Zend_Form and some of the basic components and how you can use it. If you haven’t read that yet, than do and come back here. Or if you have the basic knowledge on what is and how Zend_Form works you can go on. In this post I will mention how you can use one form in multiple controllers.

[Read the rest of this entry...]

Tags: , , , , , ,

Leave a Comment

PHP Debugging on PHP IDEs

As NetBeans has started to be a great IDE with powerful debugging features, like most people who are migrating to NetBeans, I would like to use it’s built-in debugger abilities. PHP debugging is not new. XDebug is quite around for some time but it always lacked the attention it has now. From now on PHP Developers are starting to use IDEs instead of colorful text editors. Because from now on, PHP started to be accepted as an Enterprise language. It’s pretty easy to code with PHP, it’s very simple but yet it can be a good base for complex applications. With the newest release of PHP 5, it also contains OOP features and with powerful frameworks built around (CakePHP, CodeIgniter, Symphony, Zend,…) some strict rules apply on designing your application for a cleaner, better code and yet you can still use the quick and dirty ways. :)

[Read the rest of this entry...]

Tags: , , , , , , , , ,

Comments (3)

Using Zend_Form

After my obsessions with logger and debugger functionality in Zend Framework, for nearly a month I was looking for Zend_Form component. It drove me to look for Zend_Form_Decorator and Zend_Controller_Action_Helper. I did quite a research about them, looked around the code, tried to understand how it worked and how I would be manipulating them to my needs. I have read a lot about forms and helpers and decorators. You will find a some useful links which helped me to understand how it worked. I will try to wrap all I have learned in multiple posts. So the first one will begin with Zend_Form.

[Read the rest of this entry...]

Tags: , , , , , ,

Comments (5)

NetBeans 6.7 M2, PHP and Remote Development

Well, as you know I have started to use Netbeans for PHP development for a time being and I’m about to give up from my favorites, Zend Studio and of course Vi!

[Read the rest of this entry...]

Tags: , ,

Comments (13)

How to set Subversion to ignore files

This part is a self reminder more than an actual blog :)

First you got to understand that svn does not have an ignore command. so you can’t use something like:

svn ignore tmp/*

It does not actually suit subversion anyway. If you add it to the repository you have to want to check it’s changes, else don’t add them to the repository.

But there are cases which is important. If you have a tmp/ folder in your repo and you don’t have any files in it. But as this is a tmp folder and you could add caches and other things there will lots of ‘?’ with an svn status command.

To solve this issue you can set an ignore property to the files like this:

svn propset svn:ignore * tmp/*

the above command means this: second argument tmp/* means every file or folder under the tmp folder. so you will include everything under your folder. But this is not simply enough. and the first argument “*” comes in here. This one works as a wildcard (like always) and means everything! So the statement tells to ignore all the files and folder under tmp folder.

That’s it. As I said, as my previous subversion entry this is again a self reminder :)

Tags:

Leave a Comment