B
B
beduin012014-06-06 23:02:39
PHP
beduin01, 2014-06-06 23:02:39

What are the advantages of PHP over ASP.NET?

Ask. Do not submit to Google because I did not find an answer to my question.
1. In theory, PHP is an interpreted language, which means it should lose to the compiled one. Question. What tasks make the difference? If we make two similar portals in PHP and ASP.NET, which one will be faster (and in what operations)?
2. Which of these languages ​​is easier to learn? Explain why (docs for both dofig)
3. Which of these languages ​​is easier to support?
4. What about development speed?
5. Which solution would be more secure? Explain why?
6. If the site is made with an eye on the clouds, then how will PHP behave there? Are there any conceptual issues?
Ideological moments are not of interest. I'm only interested in the practical side. Please describe in simple words. I don’t understand in which of these languages, and most importantly, _why_ the site will, for example, load the server less?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
S
svd71, 2014-06-07
@svd71

1a. ASP is a compiled language in which components are wrapped in some framework (which are also compiled) and which directly calls OS functions. The speed of execution depends on the speed of the machine code accessing the same code of components, which are processed through the code functions of the framework by the codes of the operating system functions understandable to the processor. Moreover, when compiling, the resulting code can be optimized. At the same time, do not forget that the server organization needs to install the OS, the work frame (and often more than one), additional libraries and the server. Which in itself is not a cheap solution with a win in the speed of code execution.
1b. PHP is a scripting language. This means that he needs some interpreter of everything that is written in these scripts. The speed of execution depends on the size of the scripts, the speed of "translating" the text of the scripts into some pieces of program code that can no longer be optimized in any way, and which therefore refer to OS functions. True, some cunning individuals have managed to make such compilers into the so-called bytecode. Basically, this code can be slightly optimized. but more often only on the complete exclusion of left comments and missing symbols. Although it must be admitted, every year this scripting language is getting faster, including because of the ability of the OS to read data from files faster. The execution chain is not complicated: server, script, interpreter, OS. Even in inept hands, you can start with a light kick. And under any OS.
2a. ASP requires some mandatory compiler, some ways to debug the resulting code, some knowledge of OS and framework specifics. This, it should be noted, is not an easy task. Moreover, there is no way to conduct normal development in any very primitive text editor. But you can.
2b. PHP does not require any special knowledge, let alone deep knowledge in any area - from memory usage to the features of working with certain functions of the OS kernel. All these concerns are taken over and most often successfully solved by the developers of the interpreter. Even error suppression is most often disabled by default.
PS: The conclusions can be supplemented by yourself. I have described the most obvious differences in technology. Of course, I didn’t specify much: for example, working with objects has some significant differences. Proprietary, hackable, debugging, number of IDEs for each technology.

V
Viktor Vsk, 2014-06-06
@viktorvsk

I think if one of these questions could be answered objectively, why X is worse / better than Y, then one of them would have been forgotten by now.
1) The slowest language on the web is SQL. in 99% of cases (ceteris paribus) no modern language can be so distorted that it would lose SQL
2) Easier to learn - the concept is subjective, at least today, in relation to popular languages, and with accuracy, again, 99%
3 ) It is easier to maintain the solution, which is based on good architecture, and implemented by a competent team
4) Hardly, the development speed depends more on the language than on any factors such as the team, salary, mood, etc. Indeed, ruby ​​has more syntactic sugar than php. But everything is relative and this concept is also quite subjective. For example, in Ruby, you can do various complex manipulations with arrays with one line out of the box, which you will have to master yourself in PHP.
But when it comes to the implementation of classical OOP , there may be a need to understand where abstract classes and interfaces are in languages ​​such as ruby ​​and python and a compiler... Then you're lucky, your project has taken off, and you'd better think about how to smile in front of the camera :)
6) I do not quite understand what you mean by clouds? PaaS like heroku? or a SaaS like Dropbox for static? or yandex cocaine?
Perhaps in some statements there are gross and fundamental errors. It would be interesting to know where I'm wrong.

K
Kirill, 2014-06-06
@kirill89

1. PHP in modern projects re-creates the entire context for each request (all objects, database connections, etc.). ASP.NET, like JavaEE, preserves context, which saves a lot of time on large projects.
2. PHP is easier to learn. There are much more materials on it, and most importantly, there are much more relevant materials.
3. It's easier to maintain ASP.NET code. it is usually more strict (depending on the language). But it's really easier to maintain PHP - because. finding a programmer is much easier (there are just really more of them).
4. Development is faster in PHP - but quality may suffer.
5. A very controversial issue. The one in which there will be the best security specialist.Personally, I think that on ASP.NET, because. most likely it will be ASP.NET MVC - it has been developing for a long time and is used in a lot of places.
6. Most likely there will be no problems in both cases.
Please note that everything said is my subjective opinion.

A
AlexP11223, 2014-06-06
@AlexP11223

In the price?
Server, etc. cheaper.
Well, it so happened that there are more PHP developers (for example, the entry threshold seems to be lower. But it’s only entry, and not development to a good level, in my opinion, this is about the same everywhere), probably the price for their work is less (if the project is not very complicated).

A
Alexey, 2014-09-08
@HaJIuBauKa

Seems like a bad search.
https://www.google.ru/search?q=asp.net+vs+php
Holivar has been living for a long time...
On the topic. My opinion is that ASP.NET is more promising for large, highly loaded projects. For example, some service for providing online functions (cloud) - online accounting, project management - this is an example. That is, such projects where there is a complex architecture, a large number of modules and developers.
But feel the subtext in my words - all this requires considerable experience, well-coordinated teamwork and building a clear software solution architecture. Yes, MicroSoft positions ASP.NET technology as easy to learn and designed for absolutely any solution. Basically, that's how it is. But it shows its full power in LARGE systems.
Now about PHP. There is a place to be its development in large projects. There are a large number of developing MVC frameworks - this is both a plus and a minus. On the one hand, this creates healthy competition among framework developers, on the other hand, it does not provide such power aimed at supporting and developing one solution.
MicroSoft is doing smarter :) - it peeps PHP framework solutions and implements something similar in itself, relying on the .NET library, which has a debugged and quick access to OS and hardware functions, unlike PHP - which does not have it and is unlikely to have it in the future.
For this, to sum up: PHP has an advantage over ASP.NET only in the fact that it is free and easy to learn - there are none more :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question