Web/Database Development

Web/Database Development

Post just about everything that isn't directly related to Spring here!

Moderator: Moderators

User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Web/Database Development

Post 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.
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Web/Database Development

Post by CarRepairer »

SinbadEV wrote:testing PHP code
http://us2.php.net/manual/en/function.echo.php
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Re: Web/Database Development

Post 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?
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Web/Database Development

Post 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.
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Re: Web/Database Development

Post 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
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Re: Web/Database Development

Post by SinbadEV »

Running on Apache
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Web/Database Development

Post 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.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Web/Database Development

Post by Forboding Angel »

Dreamweaver can and will debug php, but I don't trust it any farther than I can throw it... notepad4lyfeyo!
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Web/Database Development

Post 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.
User avatar
ralphie
Posts: 426
Joined: 08 Jan 2007, 08:39

Re: Web/Database Development

Post by ralphie »

install xampp. Start apache/mysql. Stop apache/mysql when done - 4 clicks total.
User avatar
Spawn_Retard
Posts: 1248
Joined: 21 Dec 2006, 14:36

Re: Web/Database Development

Post by Spawn_Retard »

dreamweaver ftw.

i could set you up with a good version of it... unless you already have one?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Web/Database Development

Post by AF »

notepad++ ftw
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: Web/Database Development

Post 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
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Re: Web/Database Development

Post by SinbadEV »

AF wrote:notepad++ ftw
++1 to notepad++
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: Web/Database Development

Post 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.
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Re: Web/Database Development

Post 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.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: Web/Database Development

Post 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.
User avatar
Teutooni
Posts: 717
Joined: 01 Dec 2007, 17:21

Re: Web/Database Development

Post by Teutooni »

Licho wrote:I guess its best to start php/perl/python to understand how stuff works on low level
Wait, what?
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: Web/Database Development

Post 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..
User avatar
bartvbl
Posts: 346
Joined: 21 Mar 2009, 15:55

Re: Web/Database Development

Post 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
Post Reply

Return to “Off Topic Discussion”