14 Replies - 1423 Views - Last Post: 07 January 2012 - 12:38 AM

Topic Sponsor:

#1 drklnk  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 25-December 11

Is php necessary?

Posted 30 December 2011 - 06:44 PM

Lately I've heard a lot of talk about web standards and how html5, javascript and css are the future. Is php still relevant? Is there something that php can do that the combination of the other 3 can't?
Is This A Good Question/Topic? 0
  • +

Replies To: Is php necessary?

#2 RudiVisser  Icon User is offline

  • .. does not guess solutions
  • member icon

Reputation: 811
  • View blog
  • Posts: 3,238
  • Joined: 05-June 09

Re: Is php necessary?

Posted 30 December 2011 - 06:54 PM

*
POPULAR

PHP is nothing to do with HTML5.
HTML5 is nothing to do with Javascript.
Javascript is nothing to do with CSS.

They are all completely independant technologies and used for completely different applications from everything. They *can* work together, but don't have to.

Of course PHP is still 'relevant' in web development as a whole and HTML5/JS/CSS is not a replacement for what PHP (or related) is.
Was This Post Helpful? 5
  • +
  • -

#3 drklnk  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 25-December 11

Re: Is php necessary?

Posted 30 December 2011 - 07:07 PM

Maybe i phrased my question wrong, what i meant to ask is if it is necesary to learn php or is it enough to use the other 3, is there something that php the combination of the 3 wont?

sorry...here is the correct question :rolleyes2:

is ther something that php can do that the combination of the other 3 wont?
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1  Icon User is offline

  • Suiter #2
  • member icon


Reputation: 3546
  • View blog
  • Posts: 14,961
  • Joined: 12-June 08

Re: Is php necessary?

Posted 30 December 2011 - 07:13 PM

I tend to use php for my preprocessing work - like getting data from a database to make dynamic pages.
Was This Post Helpful? 1
  • +
  • -

#5 drklnk  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 25-December 11

Re: Is php necessary?

Posted 30 December 2011 - 07:24 PM

View Postmodi123_1, on 30 December 2011 - 07:13 PM, said:

I tend to use php for my preprocessing work - like getting data from a database to make dynamic pages.



Yeah, that's why I started to learn PHP, because of the dynamic pages. The reason for my question is that recently i visited the Mozila Developer Network website and they said nothing of php, apparently, according to them Javascript is the future, they even talked about serverside-javascript, i dont get it where is the love for php. Are they purposely trying to push it out of the way and make people use javascript.
Was This Post Helpful? 0
  • +
  • -

#6 modi123_1  Icon User is offline

  • Suiter #2
  • member icon


Reputation: 3546
  • View blog
  • Posts: 14,961
  • Joined: 12-June 08

Re: Is php necessary?

Posted 30 December 2011 - 07:31 PM

That's their path... why are you so concerned? PHP isn't going anywhere too fast.
Was This Post Helpful? 0
  • +
  • -

#7 macosxnerd101  Icon User is offline

  • Self-Trained Economist
  • member icon


Reputation: 7516
  • View blog
  • Posts: 28,881
  • Joined: 27-December 08

Re: Is php necessary?

Posted 30 December 2011 - 07:48 PM

It's important to understand the various technologies. HTML is used to describe the webpage. CSS is used to style it. Javascript allows for some client-side functionality and programming. PHP is a server-side technology, which can interact with a database amongst other pieces of functionality that Javascript isn't suited for.

The way browsing works is that the user sends a request to the server. If there is a server-side script present (like a PHP Script, ASP.NET, ColdFusion, etc.), that server-side technology is processed first and returns the result to the browser. The browser then displays what the server sends it (HTML/CSS/Javascript). You would use PHP for things like connecting to a database, File I/O on the server-side, sockets and networking, etc. Javascript is more applicable for things like drop-downs, popup windows, client-side form validation, etc.

Quote

apparently, according to them Javascript is the future, they even talked about serverside-javascript, i dont get it where is the love for php. Are they purposely trying to push it out of the way and make people use javascript.

When people refer to Javascript and standards, it is usually in comparison to other technologies like Flash. Node.js is a new server-side JS technology. At this point, PHP really isn't going anywhere. It is one common option for server-side development, though not the only one.

Also, I'm going to move this to Web Development for better discussion. :)
Was This Post Helpful? 3
  • +
  • -

#8 baavgai  Icon User is offline

  • Dreaming Coder
  • member icon

Reputation: 3751
  • View blog
  • Posts: 9,704
  • Joined: 16-October 07

Re: Is php necessary?

Posted 31 December 2011 - 04:19 AM

*
POPULAR

View PostRudiVisser, on 30 December 2011 - 09:54 PM, said:

HTML5 is nothing to do with Javascript.
Javascript is nothing to do with CSS.


Yes and no. Technically, this is correct. However, whenever you hear someone gushing over HTML5 capabilities, they're invariably lumping Javascript in there. You don't technically need CSS at all, depending on whether you consider the style attribute to be part of it...

PHP? Let's be more general. How about "server side support." The language used on the server side really doesn't matter. It could be PHP, or perl, or Java, or a batch file. Without such support, your site is just a collection of web pages. That might be fine. However, if you want someone to "login" to that site, then you've already defined a requirement for server side support.
Was This Post Helpful? 8
  • +
  • -

#9 RudiVisser  Icon User is offline

  • .. does not guess solutions
  • member icon

Reputation: 811
  • View blog
  • Posts: 3,238
  • Joined: 05-June 09

Re: Is php necessary?

Posted 31 December 2011 - 06:22 AM

View Postbaavgai, on 31 December 2011 - 11:19 AM, said:

Yes and no. Technically, this is correct. However, whenever you hear someone gushing over HTML5 capabilities, they're invariably lumping Javascript in there.

Yeah, that's highly irritating isn't it :P I don't know why W3C themselves lumped them all together, was the previous javascript to be called a HTML4 Javascript API?

"HTML5 can do geolocation!"
Riiiiiiiiiiiiiiiiight, well HTML4 can do jQuery ;)

Quote

The reason for my question is that recently i visited the Mozila Developer Network website and they said nothing of php, apparently, according to them Javascript is the future, they even talked about serverside-javascript, i dont get it where is the love for php. Are they purposely trying to push it out of the way and make people use javascript.

I wouldn't spend too much time reading into that rubbish, you should figure out what you need to achieve in your projects and decide what is the best technology from there on.

Server Side Javascript is going to primarily refer to node.js as previously mentioned, which in my opinion won't really go anywhere fast. I'm not saying it's not a great technology, but the great server side gods like PHP and ASP.NET (and JSP/ColdFusion and whatever other rubbish is out there :/) aren't going anywhere.

Put it this way, you're not going to be wasting your time if you learned PHP.
Was This Post Helpful? 3
  • +
  • -

#10 Curtis Rutland  Icon User is offline

  • (╯°□°)╯︵ (~ .o.)~
  • member icon

Reputation: 3126
  • View blog
  • Posts: 5,400
  • Joined: 08-June 10

Re: Is php necessary?

Posted 31 December 2011 - 12:59 PM

Questions like this come from a fundamental misunderstanding of the web. PHP, ASP.NET, JSP, Perl, Django, RoR, etc...are all server-side languages. They execute on the server, and as such, have access to things like databases, file systems, and other server-side resources. The HTML5 technologies are all client side. Client side technologies will never replace server-side technologies as a whole, because some applications will always need access to the server's resources.

Node.js is the only exception, and it's not really even an exception. It's being interpreted and executed by a C runtime.

Anyway, my point is that you should feel free to learn any server-side language you want, because the concept of server pages is going nowhere. They'll adapt to be able to work better with HTML 5, and some already have. ASP.NET MVC 3 has a toggle to use HTML 5 syntax. Since server pages are converted and streamed as HTML, it's no stretch of the imagination that they'll soon be capable of being converted into HTML 5 compliant syntax.
Was This Post Helpful? 1
  • +
  • -

#11 CTphpnwb  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1940
  • View blog
  • Posts: 7,292
  • Joined: 08-August 08

Re: Is php necessary?

Posted 31 December 2011 - 03:05 PM

View PostCurtis Rutland, on 31 December 2011 - 03:59 PM, said:

Since server pages are converted and streamed as HTML, it's no stretch of the imagination that they'll soon be capable of being converted into HTML 5 compliant syntax.

Soon? I would think that's up to each individual server script. If it outputs W3C compliant HTML5 then it's HTML5 compliant, no?
Was This Post Helpful? 1
  • +
  • -

#12 Curtis Rutland  Icon User is offline

  • (╯°□°)╯︵ (~ .o.)~
  • member icon

Reputation: 3126
  • View blog
  • Posts: 5,400
  • Joined: 08-June 10

Re: Is php necessary?

Posted 01 January 2012 - 01:07 AM

I probably said that wrong. I meant ones like ASP.NET that use the concept of "controls" will be updated to emit HTML5. Ones like PHP and ASP.NET MVC 3 where you write most of the HTML yourself are obviously different.
Was This Post Helpful? 0
  • +
  • -

#13 baavgai  Icon User is offline

  • Dreaming Coder
  • member icon

Reputation: 3751
  • View blog
  • Posts: 9,704
  • Joined: 16-October 07

Re: Is php necessary?

Posted 01 January 2012 - 04:15 AM

View PostCurtis Rutland, on 01 January 2012 - 04:07 AM, said:

I meant ones like ASP.NET that use the concept of "controls" will be updated to emit HTML5.


If it makes you feel better, I knew what you meant. ;) And Microsoft is doubtless moving that direction. XNA generating HTML5 and javascript sounds right. Would jive with Windows 8 pretty well.

One of the big things with HTML5 is the canvas. What's old is new again. You can just doodle on your little drawable control. What I'm surprised I haven't seen is a basic widget set for it, yet. You can, in effect, make your own internal GUI with Windows etc, if you just have the tools.
Was This Post Helpful? 0
  • +
  • -

#14 FanOfProgramming  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 06-January 12

Re: Is php necessary?

Posted 06 January 2012 - 11:14 PM

View Postdrklnk, on 30 December 2011 - 06:44 PM, said:

Lately I've heard a lot of talk about web standards and how html5, javascript and css are the future. Is php still relevant? Is there something that php can do that the combination of the other 3 can't?


Not really. P.H.P is has nothing to do with HTML5, HTML5 has nothing to do with CSS, CSS Has Nothing to do with Javascript and javascript has nothing to do with any of the 4.
so PHP can't do the combination of the other 3.
Was This Post Helpful? 0
  • +
  • -

#15 Curtis Rutland  Icon User is offline

  • (╯°□°)╯︵ (~ .o.)~
  • member icon

Reputation: 3126
  • View blog
  • Posts: 5,400
  • Joined: 08-June 10

Re: Is php necessary?

Posted 07 January 2012 - 12:38 AM

Um...no, not true. PHP can emit valid HTML5, if you want it to. The same can be true of CSS and Javascript. And while what you said about HTML5, JS, and CSS is technically true, it's all commonly referred to under the umbrella of HTML5. Things like localStorage and features of CSS3 are technically not HTML5, but are frequently referred to as it because it's a convenient way of describing emerging web technologies.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1