Phper experience of early asp.net and comparison between them [1]
Source: Internet
Author: User
I'm not the boss of PHP, it's the company.
Play or play. NET is not my decision, but also the company to decide
Previously did not touch PHP before, I was using ASP, and then 03 years asp.net very popular ha, began to pay attention to this aspect of things, but also from http:// Www.mycodes.net downloaded a copy of what the gold version came to see, hereby declare, just to see, why, hahaha, the machine is too slow to run VS, and no one on the side will. NET, so just stay in the theoretical stage, just know that there are HTML controls, there are server controls, there are dat Agirl or something.
But then changed jobs, ran to engage in PHP, was also the company's request, no way, hahaha, about PHP, I wrote the article, here is not wordy ha ~ URL here http://www.111cn.net/31721/viewspace_12952.html~
When I switched to the fourth company, they were doing it. NET, but there is just a project customer name to use PHP (how customers will have such a request, strange, and even more strange is that he asked for the project with PHP, but the environment is WinDOS, estimated customers there are people in the back of pretend to know Backseat bar), so I came in
Not a little suspense, the first program is Helloword, hehe
I've found that PHP and ASP.net have a lot in common. Really, very similar.
MVC separation
PHP with Smarty, and asp.net with the same name plus a. cs file to replace, like Default.aspx is bound to have a Default.asp.cs file
It's just that PHP is like this (indicates which template the program file is)
$tpl->display ("default.htm");
And ASP.net is like this (in my eyes he is the reverse, actually by the template to declare which is the program file)
So is this really the case? I don't know, I'm just getting started in asp.net, stay in the future.
Class library calls (in PHP parlance)
PHP uses the include first to include the file in, and then the new instantiation
And ASP.net, he was directly using
Using System;
Using System.Data;
Using System.Configuration;
Using System.Collections;
Using System.Web;
Using System.Web.Security;
Using System.Web.UI;
Using System.Web.UI.WebControls;
Using System.Web.UI.WebControls.WebParts;
Using System.Web.UI.HtmlControls;
The way, in fact, I feel the same, as to not specify which file to call, it is because the functions of those namespaces are all from the development of MS, not like PHP by the public to provide a class library or framework or something
To play a metaphor, asp.net inside the class library (level difference, estimate and so called it, I do not know what is called,) in fact, is the MS Self has done, so like a mother of the same tire brother, with each other without nonsense will be able to work together
and the class library in PHP, by the community different from the crowd to complete, like a bunch of strangers, include is like to say hello to tell people that I am here, and then instantiate the use of
As to why the. NET has declared the use of system why do you have to declare the use of Sys.web
In my experience, system is not a specific implementation of a function of the generation, the specific implementation of a function of the code is the subclass of the web and the child class UI, such as the completion of his existence as if to straighten out some kind of relationship
Alas, to go to work, write so much today, after two days have what experience to write it again
——————— of the Invincible split line ————————————————————————————————
By the way, there's a little bit of confusion to consult.
The HTML file is composed purely of HTML tags, but in MS's aspx file, he converts all HTML tags into MS's own HTML control or server control, aspx.cs to the background code
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service