Computer Science Canada

Professional advice needed

Author:  QuantumPhysics [ Fri Oct 19, 2012 12:21 am ]
Post subject:  Professional advice needed

All i'm asking is, how does PHP differ from HTML5 and CSS. How is it better, how is it worse? Many people say PHP is horrible now. I want to know why.

Author:  mirhagk [ Fri Oct 19, 2012 9:12 am ]
Post subject:  RE:Professional advice needed

Those are completely different things, for completely different uses. PHP is a web server langauge, HTML5 and CSS are client side formatting languages. PHP is hated by many people because people consider it to be confusing and lacking in features.

I personally don't have a problem with it, but I do prefer ASP.NET which is NOT at all suitable for lightweight applications, but I find it much easier to use, and comes with a great IDE. (I don't use the stupid ASP tags that come with ASP.NET, I just use the MVC system, and the views are regular html with tons of javascript).

I'd recommend you learn a LOT more about PHP and HTML before you start asking questions like this, and a LOT more about PHP and it's alternatives (ruby, ASP.NET, and more that I can't think of right now) before you judge it in any way.

Author:  QuantumPhysics [ Fri Oct 19, 2012 12:08 pm ]
Post subject:  RE:Professional advice needed

Why do you prefer ASP.NET over VB.NET?

Author:  mirhagk [ Fri Oct 19, 2012 1:30 pm ]
Post subject:  RE:Professional advice needed

ASP.NET and VB.NET are again 2 entirely different thigns.

VB.NET is visual basic running on the .NET framework (like a java virtual machine).

ASP stands for Active Server Pages and ASP.NET is the framework running on the .NET framework.

VB is a language used to program things, and it runs on the .NET, and could even use ASP.NET, which is a framework for creating web servers.

I also never said I did prefer ASP.NET over VB.NET (as that doesn't make sense anyways, because when you use ASP.NET you have to choose a server language, which could very well be VB)

Your question made no sense, but I'll give you the benefit of the doubt, and assume you're just asking why I prefer ASP.NET, if so here's my answer:

I like ASP.NET because I like the MVC concept of websites. I like C# (I can explain that also if you'd like). I do like some of the integration ASP allows, however I don't like a lot of the controls they use, opting to use a javascript library to build the client rather than ASPX controls (or even HTML most of the time)

Author:  Dan [ Fri Oct 19, 2012 2:01 pm ]
Post subject:  RE:Professional advice needed

Part of the hate for PHP is that people keep comparing PHP to another language + a web frame work. For example PHP vs Ruby on Rails or PHP vs Django (or PHP vs ASP.NET MVC which mirhagk just did).

I think there would be a lot less hate for PHP if the use of the same MVC web frameworks where more strongly encouraged with PHP

Author:  mirhagk [ Fri Oct 19, 2012 6:57 pm ]
Post subject:  RE:Professional advice needed

Yes I agree Dan, ASP.NET is framework not a web language, but I think PHP doesn't really market itself well with a web framework.

Like you said, there are several options that most people consider, and for most of them it's a certain language with a certain web framework. PHP is the odd one out there, it's most often marketed completely alone, and it makes it seem like it's all you need (a LAMP package is consistently noted for being all you need to set up your own web server, PHP has no framework there).

It's hard to make a fair comparison, because as JUST a langauge, comparing something like Ruby to PHP is unfair. General purpose PHP will fail each time, and for a web platform, well people don't often use just ruby, or just C#, or just visual basic in order to build a website. The only real comparison is to compare the common PHP set up with a common ruby or C# set up, the latter 2 of which almost always have a framework accompanying them, while PHP is often all alone with MySQL.

Just out of curiosity Dan, what frameworks would you suggest to somebody who was considering PHP? Or do you just mean to implement the MVC style with PHP yourself?

Author:  md [ Fri Oct 19, 2012 11:27 pm ]
Post subject:  Re: RE:Professional advice needed

Dan @ 2012-10-19, 2:01 pm wrote:
Part of the hate for PHP is that people keep comparing PHP to another language + a web frame work. For example PHP vs Ruby on Rails or PHP vs Django (or PHP vs ASP.NET MVC which mirhagk just did).

I think there would be a lot less hate for PHP if the use of the same MVC web frameworks where more strongly encouraged with PHP


There are frameworks for PHP, they tend to be a lot less polished compared to say Rails and are usually not nearly as easy to work with. The big problem with PHP is that it's standard library is a confusing mess of mismatched naming schemes and inconsistencies. That, and because of the lack of a dominant structured framework you get all sorts of horrible spaghetti code (which I myself am certainly guilty of writing).

As for the orignal question, it's like asking what the difference between an oven and icing is. The comparable differences are so vast as to make the comparison entirely meaningless.

Author:  QuantumPhysics [ Sat Oct 20, 2012 2:20 am ]
Post subject:  RE:Professional advice needed

Oh okay, and ASP.NET comes installed with MSVS? I will actually now look into that. Thank you for the great tips everyone!

Author:  Dan [ Mon Oct 22, 2012 3:34 pm ]
Post subject:  Re: RE:Professional advice needed

mirhagk @ 19th October 2012, 6:57 pm wrote:

Just out of curiosity Dan, what frameworks would you suggest to somebody who was considering PHP? Or do you just mean to implement the MVC style with PHP yourself?


There are a bunch of MVC style frameworks for PHP, however, the only one I have tried is CakePHP. I would recommended people do there research and pick the best tools for the job.

Making your own framework can give you more flexibility, but you waste more time reinventing the wheel then producing code directly related to your project. You also have to know what you are doing in terms of properly escaping and processing user input data or you will end up with SQL injections and XSS issues that most frameworks would protect you from (if you use them correctly).

Author:  mirhagk [ Mon Oct 22, 2012 4:56 pm ]
Post subject:  RE:Professional advice needed

Yeah see that's the biggest problem with PHP, the choice. Lots of choices is usually seen as a good thing, but in actuality too many choices are a bad thing. Since PHP doesn't attach very well to any particular framework, you have to choose between many, and more choices means more time spend evaluating different choices. It also means that you get very conflicting responses with what framework you should use, and the help forums are very splintered to many different frameworks. The more frameworks people use, the less people use the same framework as use, the smaller the amount of people who can help you.

If you ask "How should I do web development with Ruby?" You'll most likely get "Rails" as your overwhelming answer. Same with .Net languages. With PHP you'll get "Use this" "Use that" "This framework has feature x that framework y doesn't" etc... It's confusing to most new developers.

Author:  Dan [ Mon Oct 22, 2012 5:21 pm ]
Post subject:  RE:Professional advice needed

You should spend time researching the development stack you are using regardless of what programming language you have picked. Planing is an important part of software development and the stack you are using might be the hardest thing to change latter on in the project.

Author:  mirhagk [ Mon Oct 22, 2012 6:02 pm ]
Post subject:  RE:Professional advice needed

Oh I agree you should research. But when researching it becomes time consuming to evaluate a ton of different tools that do the exact same thing. You usually want to limit your research to the most likely candidates.

And even after researching into PHP and finding some frameworks that'd work, the large number of choices means less support for your particular choice. It's worth choosing a language/framework based on the support alone sometimes, as every framework has oddities and weird things in them, and if you are choosing a framework that no-one on your team has experience with (very likely if it's not common) then you are pretty much screwed when the project starts to fail in weird places.

Author:  btiffin [ Fri Oct 26, 2012 5:37 pm ]
Post subject:  Re: RE:Professional advice needed

Dan @ Fri Oct 19, 2012 2:01 pm wrote:
Part of the hate for PHP is that people keep comparing PHP to another language + a web frame work. For example PHP vs Ruby on Rails or PHP vs Django (or PHP vs ASP.NET MVC which mirhagk just did).

I think there would be a lot less hate for PHP if the use of the same MVC web frameworks where more strongly encouraged with PHP


http://www.youtube.com/watch?v=GQXqWkWqnSw (spoofy commercial for RoR)

Had to. almost on topic

Cheers


: