The dead horse, PHP or asp.net?

My friend who is a web developer and admin for his small town's website in Ohio tells me the same thing on how much he hates PHP. A lot of the complaints people have here in this thread and the blog site posted on the previous page are the same problems he has with PHP.

I do some web pages on the side and have similar issues with PHP. When someone mentioned Django here, I looked into it and looks pretty interesting. It might be something I'll teach myself to use. I wonder if it's possible to make a fully featured dynamic website pulling data from a MySQL database with it.
 
I wonder if it's possible to make a fully featured dynamic website pulling data from a MySQL database with it.
This concept is worth spinning off on another thread -- but you could at least clarify the bounds of a "fully featured dynamic website", and how that differs from blog or CMS engines that happen to use MySQL as a backend.
 
To echo others' statements, PHP in a collaborative environment is just torture, and even if you are solo on a project, you'll find yourself getting frustrated constantly with minutia.

I currently am working on a side project using Python and Django. I'm having fun with it, but I would question its use on larger scale projects. Still, fun is the name of the game for a side project, right?

For anything serious in solo or small team development, however, I would go Java. .NET is simply too much hassle for solo or small group work, in my opinion.
 
Sorry for not examining his example better.
No worries. If you don't look at code, it is impossible to make valid conclusions about it.

To continue my last thought, if PHP arrays were strings, this should probably print true, but it doesn't. It prints false.
PHP is very aggressive about interpreting arrays as maps. I think the problem is that you're insisting on focusing on "purely object oriented implementations" instead of thinking of fundamental data structures.

Your claim that C++ has a separate string class to save us from multi-byte strings is simply not true. std::string assumes that each character is a single byte; std::string::substr(), for example, counts byte offsets and not character offsets. Getting a single character with std::string::eek:perator[] returns a single character, not a UTF-8 multibyte character.

Try this code on your favorite compiler:

Code:
	std::string str( "\xe6\x9d\xb1\xe4\xba\xac" ); // tokyo

	std::string sub = str.substr( 1, 1 ); // first character (not byte), one character length (not byte)

	if ( sub[0] == '\x9d' )
		std::cout << "broken" << std::endl;
	else if ( sub[0] == '\xe4\xba\xac' )
		std::cout << "correct" << std::endl;
	else
		std::cout << "other" << std::endl;

It demonstrates that substr and operator[] work as I describe, not as you've assumed. Is this another case where you've made an assumption about what you wanted from the behaviour of the code, and not what you learned by acutally studying the specification or the code itself?

To continue my last thought, if PHP arrays were strings, this should probably print true, but it doesn't. It prints false.

Are you sure your proof is adequate? One counter-example is that this code:

Code:
<?php

$string = 'abc';
var_export( $string[0] == 'a' );
var_export( $string[1] == 'b' );
var_export( $string[2] == 'c' );

?>

prints "true" three times.

This concept is worth spinning off on another thread --
Please don't forget to invite me to your new thread.
 
For anything serious in solo or small team development, however, I would go Java. .NET is simply too much hassle for solo or small group work, in my opinion.

If you think so, then that's nice warm fuzzies for me. I can feel good that the "hard to solo" platform is simple enough for me. If so, that means it will be easy for me to catch on to other web languages. Minus the quirks, and and other odd behaviors languages always will have.
 
Last edited:
No worries. If you don't look at code, it is impossible to make valid conclusions about it.

PHP is very aggressive about interpreting arrays as maps. I think the problem is that you're insisting on focusing on "purely object oriented implementations" instead of thinking of fundamental data structures.

Your claim that C++ has a separate string class to save us from multi-byte strings is simply not true. std::string assumes that each character is a single byte; std::string::substr(), for example, counts byte offsets and not character offsets. Getting a single character with std::string::eek:perator[] returns a single character, not a UTF-8 multibyte character.

Try this code on your favorite compiler:

Code:
	std::string str( "\xe6\x9d\xb1\xe4\xba\xac" ); // tokyo

	std::string sub = str.substr( 1, 1 ); // first character (not byte), one character length (not byte)

	if ( sub[0] == '\x9d' )
		std::cout << "broken" << std::endl;
	else if ( sub[0] == '\xe4\xba\xac' )
		std::cout << "correct" << std::endl;
	else
		std::cout << "other" << std::endl;

It demonstrates that substr and operator[] work as I describe, not as you've assumed. Is this another case where you've made an assumption about what you wanted from the behaviour of the code, and not what you learned by acutally studying the specification or the code itself?



Are you sure your proof is adequate? One counter-example is that this code:

Code:
<?php

$string = 'abc';
var_export( $string[0] == 'a' );
var_export( $string[1] == 'b' );
var_export( $string[2] == 'c' );

?>

prints "true" three times.

Please don't forget to invite me to your new thread.

I could keep arguing here but I think we have veered off too much from the track. The last time I worked with true array strings was a few years ago in college during my C++ courses. Didn't enjoy C strings / arrays one bit. I could make more assumptions here (sorry, I am not of type Polymath... get the joke? :p) and say that most programmers don't like to treat string as arrays. I like to keep my strings as they are, as high level as possible.

Anyways, another (brave) alternative to PHP would be Smalltalk + Iliad. Smalltalk is quite a language to learn.

My personal favorite is Ruby + Sinatra + Active Record combo (as Datamapper is now basically dead). Leaves things wide open and makes projects a lot of fun.
 
I've always used PHP for simple projects for the following reasons:

1. I can get a server up and running in under and hour (this doesnt handle tweaks for performance or security).

2. It's fairly fast to achieve results

I'm sure I could find ways to do the same with python or ruby, I've just never tried because PHP has suited my needs. I plan on trying Ruby at the very least though sometime soon.

The thing that annoys me the most, (consider that I come from a shell scripting background) is having to do stuff like this:

Code:
if(isset($_GET['from'])){$from = $_GET['from'];}
if(isset($_GET['to'])){	$to = $_GET['to'];}

But that's how I was shown to do it, and based on previous comments - maybe that was wrong. I usually just initialize my variables to nothing now, but like I said - coming from a shell background - I'm used to creating them as I need them.

Learning perl and python has certainly helped sway my thinking there.
 
I use both PHP and .Net at work. I actually like both.

I use PHP for small, quick, one-off projects that don't need to have a big framework behind them. It's fun, relaxing and I can really play around in the code. I like being able to dabble in some old school procedural style, or go OOP, or even mix both. Yeah, the code can be messy, but the apps are so small that it's not hard to figure out what they are doing.

I use .NET for the more serious enterprise level stuff. It's more formal, rigid, no non-sense, and integrates seamlessly into our Windows AD environment. Which is exactly what I want when building these kinds of applications.
 
If you think so, then that's nice warm fuzzies for me. I can feel good that the "hard to solo" platform is simple enough for me. If so, that means it will be easy for me to catch on to other web languages. Minus the quirks, and and other odd behaviors languages always will have.

It's not that developing in .NET is difficult. I just don't like it for side projects. I'm not a huge fan of Visual Studio Express, hosting options are more limited or more expensive, and I'd just rather not be tied into Microsoft technologies for small projects.

Call it a preference, I guess.

I use mostly .NET at work, but at home, I find it to be a hassle compared to other options for web development.
 
This can't be a serious suggestion.

Why not?

Smalltalk, from what I know, is a powerful language to learn... And quite different from anything C-synatx-related (meaning, a PHP developer will learn a ton and some more).

The only thing I'd be concerned is the community around the language. It's sparse compared to the big boys.
 
Why not?

Smalltalk, from what I know, is a powerful language to learn... And quite different from anything C-synatx-related (meaning, a PHP developer will learn a ton and some more).

The only thing I'd be concerned is the community around the language. It's sparse compared to the big boys.

My question, not knowing anything about smalltalk, would be - would the time spent learning smalltalk be better spent learning something else though?

I honestly don't know the answer, but in the groups I travel within it almost never gets brought up.
 
To continue my last thought, if PHP arrays were strings, this should probably print true, but it doesn't. It prints false.

Code:
<?php
var_export( (array('a','b','c') == 'abc') ); ?>

in C style strings they're arrays w/ a null terminator...

try that...

it's funny you don't feel it's intuitive... i was taught programming in C, so it's unfathomable to think of a string as anything else than an array of chars.... or just an array of bytes...

when we're talking memory and storage, how could it NOT be the case... lol noobs and their strings...
 
the syntax of a language is hardly consequential. Just because a language doesn't use curly braces, doesn't automatically mean it will grow a persons mind. I could create a clone of FORTRAN that looks similar to C code, and having someone familiar with FORTRAN use that wouldn't teach them much of anything.

If you want to learn and grow, changing paradigms is more important.

Why not?

Smalltalk, from what I know, is a powerful language to learn... And quite different from anything C-synatx-related (meaning, a PHP developer will learn a ton and some more).

The only thing I'd be concerned is the community around the language. It's sparse compared to the big boys.

Well, you should convince yourself to abandon that concept of strings, because it's not 1987 anymore, and characters wont always be a single byte, or a fixed size for that matter.

in C style strings they're arrays w/ a null terminator...

try that...

it's funny you don't feel it's intuitive... i was taught programming in C, so it's unfathomable to think of a string as anything else than an array of chars.... or just an array of bytes...

when we're talking memory and storage, how could it NOT be the case... lol noobs and their strings...
 
Smalltalk is esoteric; few people know it, tool support lacks, and so on. The Illiad project is dead -- the last activity is more than a year ago. Recommending an esoteric language on a dead framework seems like it can't possibly be a good suggestion when there are so many more verdant and approachable solutions.
Well, you should convince yourself to abandon that concept of strings, because it's not 1987 anymore, and characters wont always be a single byte, or a fixed size for that matter.
It's 2012, but the vast majority of software still treats strings as arrays of characters.
 
Well, you should convince yourself to abandon that concept of strings, because it's not 1987 anymore, and characters wont always be a single byte, or a fixed size for that matter.

abandoning the knowledge of the very framework of data storage and efficient use of memory is never a good idea...


but i do agree with you on the paradigms... once you learn the logic behind computer programming, learning other languages is more or less a couple of text books away.... there are some paradigm changes in newer languages though that are very useful to know
 
C strings are not "the very framework of data storage and efficient use of memory".

You need to be aware that strings aren't always going to be single byte arrays, or fixed size characters, or you are putting yourself at risk of getting burned by encoding and internationalization errors. Unless you want to live in an alternate world where everyone speaks only english.

abandoning the knowledge of the very framework of data storage and efficient use of memory is never a good idea...


but i do agree with you on the paradigms... once you learn the logic behind computer programming, learning other languages is more or less a couple of text books away.... there are some paradigm changes in newer languages though that are very useful to know
 
Last edited:
While php is not a perfect language and is messy as mentioned, one big advantage is that it's completely free and very widely available. There is tons of php scripts out there (heck, this forum is coded in php) and it cost nothing to run. It's native platform is Linux, Apache and it is easy to make it talk with Mysql. asp needs Windows which comes with a cost, and running a windows server in general is usually really messy as it's just not as robust as Linux when it comes to stuff like automated backups or encrypted connectivity (ex: ssh). You end up needing 3rd party stuff for everything such as backups, antivirus etc... next thing you know you are spending several grand in software when a php environment is free.

It's too bad php development has stagnated though. It has not been updated in years.
 
in C style strings they're arrays w/ a null terminator...

try that...

it's funny you don't feel it's intuitive... i was taught programming in C, so it's unfathomable to think of a string as anything else than an array of chars.... or just an array of bytes...

when we're talking memory and storage, how could it NOT be the case... lol noobs and their strings...

Me forgetting the null terminator is probably a good example of why C strings are not intuitive. I have a formal education in computer science and took a number of C++ classes... Three, to be exact. And yet I forgot that. Frankly, I don't have much industry experience (out of school for <2 years) and haven't worked in C/C++ out of school, but I guess that illustrates the problem...

If you work as a low-level programmer, I'd be reluctant to call a high level programmer a noob, btw. What high level languages are capable of would blow your mind away.

the syntax of a language is hardly consequential. Just because a language doesn't use curly braces, doesn't automatically mean it will grow a persons mind. I could create a clone of FORTRAN that looks similar to C code, and having someone familiar with FORTRAN use that wouldn't teach them much of anything.

If you want to learn and grow, changing paradigms is more important.

It is a change of paradigms. That's what I meant by saying that it's different. Learning syntax of a new language definitely does not make one a better programmer...

How often does a typical programmer use metaprogramming for example? How often are methods added at runtime? This is a really, really cool programming concept that seems to be rarely used when programming, typically.

Smalltalk is esoteric; few people know it, tool support lacks, and so on. The Illiad project is dead -- the last activity is more than a year ago. Recommending an esoteric language on a dead framework seems like it can't possibly be a good suggestion when there are so many more verdant and approachable solutions.

I wouldn't call it esoteric. Simply because you can't find a Smalltalk developer anywhere nearby does not make it esoteric. It's anything but, given that the community is still alive and kicking today.
I would argue that the major reason it never caught on is because it veers off too much syntax wise compared to C-languages, without knowing too much about it.

I remember learning PHP... It took me something like 5-10 minutes to learn it's syntax. I looked up how to write classes, and that was it. I knew some Java, C++ and C# at that point in time. There was no learning curve to PHP. Zero. Null.

Some time later I began learning Ruby. Ruby is a bit of a different breed, but it's still similar enough to C-syntax that it eventually caught on to me. It took me a whole lot longer to learn it though. For example:
Forget the "for" loop. There is none. Nada. As a Rubyist would say, nil.
There is a foreach loop and a while, but in the last two years of programming Ruby, I haven't seen anyone use it.
Everything is done with iterators.

Although Java, C#, and C++ have concepts of iterators, they are barely every used. When learning C++, I remember learning iterators as one of the last items... "Oh, here's what else you can do, but it ain't really important because your for loop can do anything."

No for loop, must be quite intimidating. It was, for me - initially. But now that iterators are my tools, I look at a for loop as something crude and less intuitive. I guess the same way that I stopped thinking of strings as arrays of bytes, and forgot the internals such as the null byte...

Smalltalk seems no different in that aspect. But in Smalltalk's case, it's probably a tad too different for the average, non-curious developer.

It's 2012, but the vast majority of software still treats strings as arrays of characters.

Yeah... Sure. Except that event today's seemingly embedded systems (phones, tablets?) use Java and other high level languages to do majority of the work...
 
Me forgetting the null terminator is probably a good example of why C strings are not intuitive. I have a formal education in computer science and took a number of C++ classes... Three, to be exact. And yet I forgot that. Frankly, I don't have much industry experience (out of school for <2 years) and haven't worked in C/C++ out of school, but I guess that illustrates the problem...
Indeed, it seems like the problem is that you're far more opinionated than educated or experienced.

I wouldn't call it esoteric. Simply because you can't find a Smalltalk developer anywhere nearby does not make it esoteric.
that's exactly what makes it esoteric.

Yeah... Sure. Except that event today's seemingly embedded systems (phones, tablets?) use Java and other high level languages to do majority of the work...

Code:
char[] helloArray = { 'h', 'e', 'l', 'l', 'o', '.' };
String helloString = new String(helloArray);
System.out.println(helloString);
 
Smalltalk, from what I know, is a powerful language to learn...

That's hardly a compelling argument. I can think of piles of languages that are 'powerful'. In fact, I think it's a better challenge to think of a language that isn't 'powerful'.
 
Indeed, it seems like the problem is that you're far more opinionated than educated or experienced.

Let's see. 4 years of programming in Java, C++, Fortran 77 and PHP (my school languages), in addition two two years of Ruby and PHP (work experience)... I wouldn't call myself a senior programmer by any means, but that's certainly enough not to be a newbie programmer anymore. If I made such a mistake (missing a NULL byte), certainly anyone can. And since a NULL byte didn't come to me by intuition (maybe a 6th sense is needed :p), I think I can concluded that C strings aren't very intuitive either.

that's exactly what makes it esoteric.
Um, no it doesn't. This isn't 1990. We have a global community which you can reach just the same as you reached me.
So let me quote myself here:
I wouldn't call it esoteric. Simply because you can't find a Smalltalk developer anywhere nearby does not make it esoteric.
While there might not be plenty of Smalltalk communities, there are plenty of Smalltalk developers around the world.

In the community that I live, nobody speaks Spanish. Certainly must be an esoteric language, huh?

Code:
char[] helloArray = { 'h', 'e', 'l', 'l', 'o', '.' };
String helloString = new String(helloArray);
System.out.println(helloString);
The same way that one can create a JSON object from a JSON string. The same way that you can cast and int to a string, or vice versa. One data type to another, no surprise here.
 
I think I can concluded that C strings aren't very intuitive either.
You can conclude whatever you want, particularly if you don't care about correctness. Remember that PHP, which you claimed to have learned in ten minutes, stumped you earlier in this same thread.
 
You can conclude whatever you want, particularly if you don't care about correctness. Remember that PHP, which you claimed to have learned in ten minutes, stumped you earlier in this same thread.

Nobody's a master of anything... Nobody ever will be.
 
In the community that I live, nobody speaks Spanish. Certainly must be an esoteric language, huh?

The difference here, is that somewhere in the world, there is a dense population of those who speak Spanish in some community or locale. In other words, in some regions Spanish is completely ubiquitous. I'm not convinced that the same is true of Smalltalk, not including web communities dedicated to Smalltalk itself.
 
The difference here, is that somewhere in the world, there is a dense population of those who speak Spanish in some community or locale. In other words, in some regions Spanish is completely ubiquitous. I'm not convinced that the same is true of Smalltalk, not including web communities.

Maybe somewhere in [insert-country-here] there is a school that teaches Smalltalk which creates a big community. I'd think there would be some schools out there that teach the language.

Sorry guys - I'm just arguing for the sake of arguing sometimes (especially you, mikeblas). It's fun, but I realize I sometimes go off the wall with my comments or ideology.

I probably took the String != Array argument a bit too far... I realized I was (mostly) wrong right away, although there was some truth to what I said so I just went with it. My personal apology to y'all.
 
Keep in mind that a String is just an abstraction. The beautiful thing about abstractions is that you don't necessarily need to care how it's implemented, but should have some sense of what's happening under the hood. What you really need to know most of the time is that Strings are immutable and that string concatenation is an expensive operation.

I've yet to have an interview for a Java or C# position where I haven't been asked to solve a problem designed to demonstrate my knowledge of Strings, char arrays, and the StringBuilder class.

Why I'm posting this in a thread that was intended to discuss PHP vs ASP.net is beyond me.
 
Why I'm posting this in a thread that was intended to discuss PHP vs ASP.net is beyond me.
I guess the root cause is that threads don't well model conversations because they aren't strictly scoped.
 
I'm a Senior Dev probably soon to be Software Architect... but I still have a lot to learn. I've been a PHP dev for about 1 and a half years now, prior to that I primarily worked in ASP.net (webforms, not MVC) for a while.

One of the things you learn quickly in a team or managing is most developers write bad code or at least code that is not very readable to other people. Using readability metrics 90% of the people in this thread are probably writing consistently poor code or pushing mediocrity. I may be terrible too. You'll quickly find people cover this up with a huge pile of crap - whether it's highly opinionated object oriented thought paradigms, functional programming, a LISP/smalltalk obsession, or overuse of design patterns.

The tool doesn't matter THAT much as long as it fits your purpose and you follow standards that work for you and your team. I've professionally written code in more languages than I can remember. Facebook is built on PHP, a lot of the web runs on Apache. For most things there are not any show stopping issues with PHP especially post 5.3. Namespaces add more OO so that you can get object oriented enough. Git/SVN are less friendly than TFS, but they work. Suddenly switching tools won't make a bad team effective.

Personally, I've had more issue with the MS stack than anything else. After Java it was really rough. Biztalk was a nightmare(we were early adopters), and many of the ASP.net controls were too heavy back in 1.1, 2.0. I'm sure they're better by now. Overall though, the tools were fine and maturity takes time. We were in too early with most of it, and it got better towards the end when I left that place.

It's more about you and finding a style and tool that works for you. Someone criticizing your paintbrush when you know you can paint the Mona Lisa with it is pretty ridiculous, right? This has been the same for years and years. I have the benefit of a parent who was in the field from the RPG (punch card) days all the way up through Java. Things haven't changed that much.

So learn PHP, learn Smalltalk if you want, learn Node.js, learn Perl, learn whatever you want that interests you. You will probably use tools that you hate and tools that you love professionally. Stay open minded and create cool stuff and try to write good code in any tool instead of developing a bunch of opinions!

PHP isn't going to necessarily get you hired as a rockstar programmer, but being diverse and adaptable with an open mind might. If you can succeed anywhere, who wouldn't want you on their team.
 
Last edited:
Using readability metrics 90% of the people in this thread are probably writing consistently poor code or pushing mediocrity.
How did you arrive at this figure?

Facebook is built on PHP,
Except that it isn't. Facebook has rewritten PHP almost completely; they actually translate their PHP code to C code, and run the C code.
 
Yeah, there was neat little tech video from the engineers of Facebook released about a year ago. Not only is their site compiled to C, the non-static content code is 1 served as massive executable (I think it was about 2 gigs).
 
Except that it isn't. Facebook has rewritten PHP almost completely; they actually translate their PHP code to C code, and run the C code.

Yeah, they developed HipHop for that. Pretty cool stuff. Though, as you noted in your post, it is still largely written in PHP (syntax; and likely debugged as such by their developers? obviously I am not a Facebook dev). I am sure they have some good standards in place to avoid the massive pitfalls noted in this thread like the ability to input both echo 'foo'; and echo('foo'); to get the same result.

I love a good PHP vs the world thread. We don't get enough of them anymore.

Regarding the OP. I must agree, my current love is ASP.NET MVC. Awesome platform. That said, don't hesitate for a second to learn PHP for this project if you are interested in it (as you suggested).
 
An article in ComputerWorld about Facebook's translator says the resulting code uses 90% less memory and runs 60% faster.
(syntax; and likely debugged as such by their developers? obviously I am not a Facebook dev).
With the translator in place, it would seem that there are challenges around debugging. I've wondered how they were addressed.

I am sure they have some good standards in place to avoid the massive pitfalls noted in this thread like the ability to input both echo 'foo'; and echo('foo'); to get the same result.
This is a tiny syntax inconsistency; it's hardly a pitfall.
 
Tweakin, you forgot the best one. Using a comma, period or double quotes to concatenate strings/variables with echo and one of them performs noticeably faster than the others but the fastest method doesn't work for concatenating strings/variables in variables because echo is actually a function that internally concats parameters you pass to it.

With the translator in place, it would seem that there are challenges around debugging. I've wondered how they were addressed.

If you're interested in how their code is debugged one of these videos gave a brief introduction:
https://www.facebook.com/Engineering?v=app_2392950137

I forgot which one exactly but I think it was this one:
http://www.facebook.com/photo.php?v=10100259101684977

From what I remember from watching it a year ago they have a ton of very robust apps in place to help pin point problem areas.
 
Yeah, they developed HipHop for that. Pretty cool stuff. Though, as you noted in your post, it is still largely written in PHP (syntax; and likely debugged as such by their developers? obviously I am not a Facebook dev). I am sure they have some good standards in place to avoid the massive pitfalls noted in this thread like the ability to input both echo 'foo'; and echo('foo'); to get the same result.

I love a good PHP vs the world thread. We don't get enough of them anymore.

Regarding the OP. I must agree, my current love is ASP.NET MVC. Awesome platform. That said, don't hesitate for a second to learn PHP for this project if you are interested in it (as you suggested).

And that's kind of what gets me, with things like 'for loops' and similar such compiled code just runs circles around standard php. I do wonder, will this compiled PHP make its way unto the wide spread usage of web projects? A strong community behind it would really be a boon.

Anyways, compiled vs. non-compiled still makes me itch. I get this somewhat false feeling that compiled is always superior. My company has too much code using for loops, and not enough dictionaries for grabbing individual data objects within a collection. (and I'm looking for ways to steer our code a little bit in the other direction), but there is always that good reassuring feeling when you know that your compiled code will run through that big list or array as fast as possible. I'm probably digressing, but performance really attracts me. Compiled PHP for the masses would really get me pumped. I ask the question, in real world use with smart programming, with good caching and efficient data and object access is the performance difference between standard PHP and asp.net negligible? I guess only I can answer that myself with I try them both.

Anyways, ASP.NET MVC + Jquery is pretty sweet. I'd recommend it for almost any situation that doesn't require linux. There is much less tendency towards bloat with that than with old asp.net forms.
 
And that's kind of what gets me, with things like 'for loops' and similar such compiled code just runs circles around standard php. I do wonder, will this compiled PHP make its way unto the wide spread usage of web projects? A strong community behind it would really be a boon.

Anyways, compiled vs. non-compiled still makes me itch. I get this somewhat false feeling that compiled is always superior. My company has too much code using for loops, and not enough dictionaries for grabbing individual data objects within a collection. (and I'm looking for ways to steer our code a little bit in the other direction), but there is always that good reassuring feeling when you know that your compiled code will run through that big list or array as fast as possible. I'm probably digressing, but performance really attracts me. Compiled PHP for the masses would really get me pumped. I ask the question, in real world use with smart programming, with good caching and efficient data and object access is the performance difference between standard PHP and asp.net negligible? I guess only I can answer that myself with I try them both.

Anyways, ASP.NET MVC + Jquery is pretty sweet. I'd recommend it for almost any situation that doesn't require linux. There is much less tendency towards bloat with that than with old asp.net forms.

Why worry about that for a hobby site? The sites will still respond quickly. Unless you know you're going to get millions of users immediately that will bring down the site, running into performance limitations over time with a decently well-designed product is usually a good thing and means you're making money or at the very least you have high user adoption.

In some cases you can just throw hardware at it which is cheaper, and even if you do need to retool/refactor you're likely going to be additionally limited by your network, database engines/design, and possibly external services as well. At that point, it's worth the effort to reevaluate your needs when they arise and plan to redesign with actual requirements and metrics rather than optimize for a number of unknown potentials.
 
I do wonder, will this compiled PHP make its way unto the wide spread usage of web projects? A strong community behind it would really be a boon.

No, their compiler has been open source for a long time. It's had years to become popular.

I'm not an expert on the compiler but I'm pretty sure it won't work on shared hosting. A big reason why PHP is so popular is because most web sites generate pretty much no traffic at all and aren't doing complicated things. A $4/month shared hosting service is good enough in most cases and without supporting that type of user base, it'll never become as popular as regular PHP.
 
There's bigger and easier optimisations to make before having to pre-compile the application (database design design and caching spring to mind).

One of the benefits of using PHP is that it isn't pre-compiled. The application can dynamically generate portions of itself, without causing the whole thing to stop and rebuild.

.Net is pretty much the only framework which doesn't support this yet. But that's changing with Roslyn, the best of both worlds (something that MVC really needs)!
 
Back
Top