Page 1 of 3

Web/Database Development

Posted: 09 Feb 2010, 00:14
by SinbadEV
I have, up to this point, been primarily experienced with ASP.NET development against an MSSQLServer. I would like to play around with PHP, and was wondering what the best way to do this is. The glitch I'm seeing is that with ASP.NET in a Visual Studio I can run my server is "debug" mode when I need to run it and not have it running at all in the background the rest of the time, but the PHP installer is for running on an existing web-server.

So, is there something like a IDE for writing and testing PHP code that runs it's own server on execution instead of running in the background all the time.

Re: Web/Database Development

Posted: 09 Feb 2010, 00:19
by CarRepairer
SinbadEV wrote:testing PHP code
http://us2.php.net/manual/en/function.echo.php

Re: Web/Database Development

Posted: 09 Feb 2010, 00:24
by SinbadEV
CarRepairer wrote:
SinbadEV wrote:testing PHP code
http://us2.php.net/manual/en/function.echo.php
Either you mis-understood me or you are being a douche. Any non-moron/asshats want to answer?

Re: Web/Database Development

Posted: 09 Feb 2010, 00:45
by CarRepairer
Trying to help. The best thing about php development is it's so quick and easy that you don't need an IDE. You drive an electric vehicle right? Wouldn't you find it weird if someone wanted to put a turbocharger in it?

But to answer your question, Dreamweaver can probably debug php. Never used it though.

Re: Web/Database Development

Posted: 09 Feb 2010, 00:54
by SinbadEV
CarRepairer wrote:Trying to help. The best thing about php development is it's so quick and easy that you don't need an IDE. You drive an electric vehicle right? Wouldn't you find it weird if someone wanted to put a turbocharger in it?

But to answer your question, Dreamweaver can probably debug php. Never used it though.
It's not so much the IDE as the not having to run a server... I just installed a really tiny server instead...

Wait, nevermind I couldn't figure out how to make PHP work with XITAMI

Re: Web/Database Development

Posted: 09 Feb 2010, 02:51
by SinbadEV
Running on Apache

Re: Web/Database Development

Posted: 09 Feb 2010, 05:34
by AF
XAMPP or WAMPP ftw

if php crashes, it tells you when you load the page why and what line and character and in what file.

If you need to know values, use echo.

Php is a lot simpler and easier in most cases from what I know of ASP .Net.

Re: Web/Database Development

Posted: 09 Feb 2010, 05:37
by Forboding Angel
Dreamweaver can and will debug php, but I don't trust it any farther than I can throw it... notepad4lyfeyo!

Re: Web/Database Development

Posted: 09 Feb 2010, 07:37
by CarRepairer
AF wrote:If you need to know values, use echo.
Oh noes, that's what I said in the second post and was then called a moron/asshat.

Re: Web/Database Development

Posted: 09 Feb 2010, 10:00
by ralphie
install xampp. Start apache/mysql. Stop apache/mysql when done - 4 clicks total.

Re: Web/Database Development

Posted: 09 Feb 2010, 11:37
by Spawn_Retard
dreamweaver ftw.

i could set you up with a good version of it... unless you already have one?

Re: Web/Database Development

Posted: 09 Feb 2010, 12:36
by AF
notepad++ ftw

Re: Web/Database Development

Posted: 09 Feb 2010, 14:21
by Licho
Every windows has built in IIS and PHP can run in IIS.

To debug/step you can use specialized tools like zend studio - which is basically what you want PHP IDE

Re: Web/Database Development

Posted: 09 Feb 2010, 15:05
by SinbadEV
AF wrote:notepad++ ftw
++1 to notepad++

Re: Web/Database Development

Posted: 09 Feb 2010, 15:21
by Pxtl
Ahh, the cold-water shock of finding out that most OSS stuff is developed outside of an IDE and debugger, and most of the debugging is done with brute-force "printline" approaches rather than fighting with GDB-like debuggers.

A few years ago I would have agreed with you about picking up PHP.... ASP.Net webcontrols are a friggin' abomination against everything sane and reasonable in software.

However, MVC allows you to use ASP.Net in a PHP or Ruby-like fashion, so it might be worth sticking with what you know and just picking up the new MVC stuff.

Re: Web/Database Development

Posted: 09 Feb 2010, 15:36
by SinbadEV
Pxtl wrote:Ahh, the cold-water shock of finding out that most OSS stuff is developed outside of an IDE and debugger, and most of the debugging is done with brute-force "printline" approaches rather than fighting with GDB-like debuggers.

A few years ago I would have agreed with you about picking up PHP.... ASP.Net webcontrols are a friggin' abomination against everything sane and reasonable in software.

However, MVC allows you to use ASP.Net in a PHP or Ruby-like fashion, so it might be worth sticking with what you know and just picking up the new MVC stuff.
What I really want is something like this:
Write page in Notepad++
Press F5, WebServer Starts, Browser Opens to Page I'm editing, close browser- web-server stops.

Re: Web/Database Development

Posted: 09 Feb 2010, 15:40
by Licho
You can do that with any tool - including notepad++ - it supports custom tools execution etc.

But zend has advantage of actually allowing you to put breakpoints, watch variable values etc without need to echo everything.

And regarding asp.net - you can get used to webcontrols system, its not so bad, problem is you need to know about how its done internally to make really advanced things. MVC is certainly cleaner.

But both of these are advanced and I would not recommend it to newbie web developer. I guess its best to start php/perl/python to understand how stuff works on low level, like its imo good to start on C/C++ before moving to more powerful languages.

Re: Web/Database Development

Posted: 09 Feb 2010, 16:01
by Teutooni
Licho wrote:I guess its best to start php/perl/python to understand how stuff works on low level
Wait, what?

Re: Web/Database Development

Posted: 09 Feb 2010, 16:05
by Licho
You can make simple python script and run it through CGI interface to understand how arguments are passed etc. Believe me, python is still very close to low level compared to those heavy asp.net frameworks where you can be completely clueless about web things like get parameters, cookies, etc..

Re: Web/Database Development

Posted: 09 Feb 2010, 23:12
by bartvbl
SinbadEV wrote:
AF wrote:notepad++ ftw
++1 to notepad++
+1
I LOVE that tool :)
I believe there was a PHP debug plugin for notepad++, but I have never tried it.
For debugging: I agree to the echo funciton. but in addition:
print_r() useful for printing arrays
var_dump() also prints arrays, but in a slightly different way. might be more useful for bigger arrays.
not sure if it is possible to get full stacktraces in some way, though..
but for me, these are often enough to find what is causing the problems.
edit: I guess it is known, but who cares :P