12.07.2006

ASP.Net vs PHP: Love or Money?

This is a response to an email-list question about which is "better", C# or Java for applications, and a separate question about ASP.Net vs PHP.

OK, first the easy question. If you are developing Windows applications, you use C#... never Java. If you need something that is cross-platform, you should probably use Java. The syntax of Java and C# is pretty much the same. The concepts involved are also similar, both being OOP languages with the C-style curly-brace syntax. If you learn one, you will be learning the other as well, they really are that similar. For application development, you need to look at other things as well, such as VB and C++, Java and C# are not the only choices. If you have experience with anything already and you are in a hurry, obviously you should use that.

As for PHP vs ASP.Net... all other things being equal, ASP.Net is 'better' than PHP. However, all things are not equal. It depends highly on the application you are designing, and factors such as budget, size of the development team, existing hardware, and so on. All those things come down to money, and ASP.Net is hands-down more expensive. ASP.Net is also faster and easier to use... IF you understand C# or VB, so you will have to learn one of those languages along side with ASP.Net if you want to be successful. With PHP, you will be able to get up and running for free and with a smaller learning curve, but you won't be able to do as much with it later on. I don't believe there is anything you can do in one language that you couldn't accomplish in the other, so neither choice will limit your possibilities. Here's a brief run-down of the trade-offs...

ASP.Net runs on Windows servers using the IIS web server($$$)
PHP runs on almost any server running Apache. PHP runs on other configurations as well.

ASP.Net is an object-oriented environment.
*PHP is a procedural environment. (Easier to learn)

ASP.Net is easier to debug, but debugging requires Visual Studio($$$)
PHP code is harder to debug, but doesn't require expensive programs.

ASP.Net is elegant and powerful.
PHP requires many workarounds to do complicated things.

ASP.Net requires a lot of system resources and fast servers.
PHP is lean and mean, and runs well on cheaper boxes.

Error handling in ASP.Net is based on Exception handling which is a robust model familiar to many programmers.
*PHP error-handling is tricky, and different programmers use many different methods.

ASP.Net is strongly typed and compiled.
*PHP is a scripting language, resulting in errors that are harder to find.

ASP.Net may be less secure because it runs on IIS.
PHP usually runs on Apache, which is known for good security.

*PHP 5 has addressed some of these issues. It has some better error handling and more object-oriented features.

These decisions all come down to what you know already, what you want to invest, and where you want to go with it. If you know VB or C# already, then ASP.Net is a good choice, but if you're familiar with Javascript, PHP might be a better choice. If money is no object and you don't mind Windows, use ASP.Net, but if you need to run on cheaper platforms, use PHP. If you need a super-rich environment and a robust language with infinite possibilities, use ASP.Net, but if you need to get up and running fast with low cost and are ok with a little extra work for the tough stuff, use PHP.

Clear as mud?
Jasmine

Remember 12/7/1941

At 7:55am, on Dec. 7th, 1941, Japanese forces cowardly (and brilliantly) surprise-attacked US soil for the first time in history at Pearl Harbor, HI and other locations in the islands. Over 2400 people died that day, and it led to a war in which thousands were killed or injured. Since then it has happened only one other time, also leading to a war in which thousands have died. For years, I have used 12/07/1941 07:55 as my "default date" whenever, as a programmer, I needed to set a default date. I do this in the hope that if someone looks at my code and wonders why I picked that date, they will look it up. Actually I hope nobody ever has to look this up. It should be in your mind as indelibly as 09/11/2001. Never forget. Here's some articles.

Survivors gather for what may be their last roll call

What happened on that day

"War is an ugly thing, but not the ugliest of things. The decayed and degraded state of moral and patriotic feeling, which thinks that nothing is worth war, is much worse. The person who has nothing for which he is willing to fight, nothing which is more important than his own personal safety, is a miserable creature and has no chance of being free unless made and kept so by the exertions of better men than himself." - John Stuart Mill

12.06.2006

Yahoo Questions: Am I Pretty?

I like to answer questions on Yahoo Answers, but some of them seem to get asked a bit too often. One of the most popular questions on the Health and Beauty section is simply "Am I pretty?" I understand the need to be thought of as pretty, and I understand that girls are very concerned with it, particularly at a younger age. What I don't understand is why people post this question with no photo, and usually no physical description! "Oh yes, you are a lovely avatar."

At the very least if you're going to ask this question, you should be able to say what you look like. This might seem superficial, this focus on looks, but the question was whether they are pretty or not. That's a primarily aesthetic judgement call, and we need something to go on. The other issue is that whether you are pretty or not has no bearing on more substantial things, like whether you are a good person or not. I think girls need to hear that physical attractiveness isn't as important as they think it is, but don't ask people to make a physical judgement and give them nothing to work with.

12.02.2006

Some of my favorite films

These are in no particular order. Some of them are non-English films, which I indicated. Many of these have elements of alternate sexuality and only a few of them would be appropriate for children (I marked those with a *, everything else is too weird for kids). Links go to the IMDB page for the film.

Hedwig and the Angry Inch (transsexuality, adult sexuality, some violence)

Run Lola Run (German, some violence)

Amores Perros (Spanish, violence, animal cruelty - "Crash" is very similar but not as good)

Silence of the Lambs (violence and sexual abuse)

Ran (Kurosawa) (Japanese, violence)

Rashomon (also Kurosawa) (Japanese, mild violence but it's off-camera, might be ok for kids - a great exploration of the effect of point-of-view)

Akira (anime) (Japanese, violence and bad language)

*Metropolis (Japanese, anime - somewhat similar to the 1927 film, but claimed to not be a remake of that one)

*Metropolis (1927 sci-fi silent film - there is a DVD of this with music and some weird colorization)

*Princess Mononoke (Japanese with a good English re-dubbing, anime)

Zatoichi: the Blind Swordsman (Japanese, violence and alternate sexuality)

Far From Heaven (might be ok for kids, gay situations, but no sex that I can remember - you will love the '50s fashions in this one)

Brokeback Mountain (about 15 seconds of gay sex, would be ok for older kids)

The Crying Game (transvestite, brief male frontal nudity, violence)

Star Wars (A New Hope and The Empire Strikes Back... the others weren't that good - violence)

The Big Chill (probably OK for kids, but hard for youngsters to understand)

Schindler's List (has some nudity and violence, but should be ok for kids)

Boys Don't Cry (not a well-made film, but great subject matter and a true story - violence and female-to-male crossdressing and sexuality - scared the hell out of me)

Shiokari Pass (Japanese, explores faith - great tearjerker ending - might be hard to find)

There's so many more... I've been watching a lot of foreign films lately. This week I saw Solaris (Russian from 1972, kind of boring), and Yojimbo (interesting, funny, but not as good as some of Kurosawa's other stuff). I like Franke Potente (Run Lola Run and The Bourne Identity), so tonight I've got The Princess and the Warrior. I love movies :)

[addendum]BTW, The Princess and the Warrior is very good

 
hit counter script