PHP vs ASP.Net

ASP.Net is a compiled language and doesn't have scripting support like the Evaluate function.

Also .Net will not evaluate variables in a string like PHP does.

You show me how it's possible and I'd be very interested to see it!

:)
 
Dim mytemplate as new customclasstemplate()
mytemplate.TemplateType = "Posts"
mytemplate.FetchTemplate()

Literal1.Text = mytemplate.Header
Literal2.Text = mytemplate.Footer

Your customclasstemplate() gets the variables via DB, text file,etc. You said a site like this cant be done using asp.net becuase it is compiled, doesnt mean you cant dynamically load data at runtime. However, this may not be the best way to do things anyways. Asp.net has usercontrols which probably be better for this situation that you can cache.
 
What does the evaluation function have to do with asp.net not being able to create a site like this one and php being able to. Getting back to the original topic, I think asp.net, despite its higher learning curve, is a great tool not only for web development, but if you want to include it in a company wide system that all uses managed code. From web to smart devices, to desktop apps to windows services.
 
Here's one major difference: PHP is loosely typed whereas all .NET languages are strongly typed. IMHO that alone is reason enough to use .NET.

Also, development in .Net is significanly faster than in PHP - by orders of magnitude. This makes a HUGE difference if you're developing a large website.

I've worked in PHP and .Net. The only way I'd work in PHP again is if someone paid me too. Why drive a Chevy if you can have a Mercedes? .Net simply outclasses PHP in every area.
 
let me throw my stick into the hornets nest

kahlua001 said:
...I think asp.net, despite its higher learning curve...

That is precisely the reason people like PHP, it's simple and doesn't require learning much.

I've found that most people who have learned there PHP from message boards copying and pasting code, so when someone mentions .NET they freak because now they may actually have to learn something on there own that requires a higher learning ability... and trust me OO isn't a difficult concept... I could teach a 10 year old the basic principals so it's not so much as a learning curve but rather the ability and willingness to learn.

Oh, and those other servers being more secure... If those servers were 90% of the market instead of MS, the hackers out there would gladly use that open source to pull out the vulnerablities, but there's no market for hackers in that world...so why should they focus there efforts there? People on that whole anti-MS kick really need to get a clue. Maybe some of you older folks that started long ago could describe to these folks the joys you had trying to get something to work across several differant computer systems and how at one job you might of been a 'guru' but going to another job your were a fresh fish because nothing they used was the same as your previous job.
 
What does the evaluation function have to do with asp.net not being able to create a site like this one

It's not so much creating a forum, as creating a templated forum as this one is responding to various options. The evaluate funcion is used to parse the templates allowing them to contain conditionals and site dependent variables. I don't believe this is possible in ASP.Net.

Don't get me wrong I like ASP.Net. I just think they both have their place.

As for PHP being more time consuming - I completely disagree!

:)

Oh and thanks for the welcome!
 
Evaluation function?

A lot of you are yapping nonsense! You can create a base-class to be used as a template page... then every single item on the page yes any page can be dynamic, this includes the meta-tags, client scripts, CSS file and more.
 
Maverick.Net doesn't seem to have anything programming related.

Perhaps I best highlight the situation I'm thinking about with an example.

You have a setting in the database that stores the title image path of the page. This setting is retireved from the database into a PHP variable $titleimgv and displayed on the page. The page is created from a template that perhaps has the form:

Code:
<html>
<Head></head>
<body>
<div class="title"><img src="$titleimg" /></div>
<div class="content">Content goes here</div>
</body>
</html>

If however the site owner decides to move the title image to the bottom of the page he can just edit the template to:

Code:
<html>
<Head></head>
<body>
<div class="content">Content goes here</div>
<div class="title"><img src="$titleimg" /></div>
</body>
</html>

As the template is evaluated no matter where the variable appears it is parsed.
 
Robby said:
Well in .NET you can have 100% of the page content come from a database. How's that for variable?

You've kind of missed it. In my example both the template and the varaible would be stored in a database so would be 100% in the database. It's just the way it's organised.
 
mark007,
Your example is nothing you couldnt do with old ASP with the <%= %> tags as well as in asp.net, although in asp.net, the referred method is to set these values in your codebehind, so to add that extra separation of your data and presentation.
 
mark007 said:
Maverick.Net doesn't seem to have anything programming related.

Perhaps I best highlight the situation I'm thinking about with an example.
Maverick.NET does EXACTLY what you are showing in your example.
 
Michael, how? do you have an example?

Kahlua001, how would you execute the <% tags? I assume you are talking about something like this?

Code:
<html>
<Head></head>
<body>
<div class="content">Content goes here</div>
<div class="title"><img src="<% =titleimg %> /></div>
</body>
</html>

Now if that is stored in a database how do you then execute it to replace <% =titleimg %> with the actual data??
 
Back
Top