Friday, October 19, 2007

PHP vs. dotNET

Ahh, the age old arguments of PHP vs. .NET. I love how each side so vigorously states their opinions. But it seems to me that most people have only used one or the other when developing web sites and doesn't see so much what the other has to offer.


I spent about 7 years programming with PHP before moving to .NET as my primary programming platform. And I will tell you that anything I do for myself will be mostly done with .NET. That's not to say that I still don't have a place in my heart for PHP, because I do. I still do some work with PHP as well from time to time.


You can follow the blog post that prompted this at the end of this post to see what that author has to say. But I would like to offer a few of my own thoughts here from my own personal experience.


My work with .NET is done 90% of the time using C#. I really don't care for VB.NET and feel that it is entirely too verbose for programming. Plus, having learned to program with C++ and spending years with PHP, the syntax of C# was closer to what I was used to. I like the way that C# is strongly typed, as it certainly helps the compiler find errors when working with the code. Of course, proponents of PHP will say that loose typing is one of the great benefits of PHP. Yes, you can cast a variable as a specific type, but you're just adding to the your code every time you want to add two variables together to ensure that both are integers, or string for concatenation.


The problem with the loose typing that PHP offers is that that same looseness limits the ability of PHP to be used well in an OOP setting. Now I know that PHP5 has come a long way toward allowing classes to be extended and has interfaces and abstract classes, but it still doesn't have the ease of use that .NET does for OOP programming. One of the biggest issues with PHP is that it doesn't allow for function overloading in classes. Come on PHP developers, this kind of functionality has been available in other languages for decades. PHPs OOP abilities also doesn't allow for namespaces, which certainly helps to ensure that you aren't colliding with other objects. Again, this has been available in other languages for a long time.


Many will say that PHP is excellent for putting a web site together fast. I really don't think that you can put together a CRUD application anywhere near as fast with PHP as can be done with .NET. After all, the GridView, FormView, DetailsView, etc of .NET make this a couple minute job everytime you want to add the functionality. Nothing like that available with PHP.


But I will give PHP a good nod for it's useful purposes. If all I had to put together was a quick form mail type script, then PHP would handle this much quicker. In fact, I could probably find several dozen pre-built PHP formMail scripts in the time it would take to build either a PHP or a .NET version myself. Of course, with the number of beginners using and releasing scripts with PHP, I would also be very careful before using one.


PHP is also a great language to help beginners learn about programming. There are a lot more people willing to help the newbie PHP developer than any other language on the planet. A big problem here though, is that there are a lot more people telling the newbie how to do it all wrong. I think a newbie would be better off learning about good OOP programming to begin with and that .NET would be a great place to start (Actually I think that smalltalk would be a better place to start, but we'll leave that for another day). I should add that Microsoft themselves has a wide variety of free tutorials and videos available to help with learning .NET too.


I know that there are so many more arguments available. I just wanted to get a few of my own out there. If you wish to discuss them, please leave a comment and let's discuss them.

read more | digg story

Saturday, October 13, 2007

Should Companies be Sued for Web Site Accessability Issues.

A hot discussion at Sitepoint about Web Site Accessibility has erupted after the filing of a class action lawsuit against retailer Target. With people taking various positions on the issues, I wanted to put in my thoughts here.

If you are a web developer in the US, you've probably heard of 508 accessibility. This is law that has been put into place that requires certain accessibility requirements for the disabled in the US. Though Section 508 pertains specifically to several technologies for the benefit of the federal employees with disabilities and the general public using (certain) federal systems, the US ADA(Americans with Disabilities Act) also provides what it means to provide an accessible web site.

What these laws require, is basically an alternative form for information that is displayed on a web site. For example, images should have alternate text using alt="some text" within an image tag for the web site. Other ways to make a web site accessible includes using labels for form elements, using text based navigation, etc. One way that some sites manage to accomplish this is to just create a text version of their web site for those that require it.

The W3C, the standards body for web development has issued guidelines on how to make websites more accessible. These guidelines are not entirely in line with laws as some of them go into ways to make web sites more accessible than required. You can view the W3c web site accessibility guidelines to see other ways that web sites can be made more accessible.

As the debate goes, there are basically three perspectives on who should be responsible and/or care about accessible design. These perspectives on web site accessibility are as follows:
  • A business should be able to choose whether or not the create web sites with accessibility in mind and the government should not be involved with law making and enforcement.
  • The government has made the laws for the benefit of all in the public and needs to protect all individuals.
  • I don't agree with the government making the laws and feel that each web site owner should be able to do as they wish. However, the government has enacted legislation and it needs to be followed by all.
Though the arguments vary, most agree that building a web site with accessibility in mind will provide a better experience for all users. At the same time, there is the added benefit that search engines will be able to index those web sites easier as well since they can't see images and other elements of a web page as well.

My point here is to not argue for any of those cases but to show you what people are saying. I will mention however that the government should be checking their own web sites before they prosecute the public. I have seen many government web sites that are not accessible by the laws that have been set by the same government.

read more | digg story

Ted

Monday, October 8, 2007

President Bush's Children Health Care Veto Letter to Congress

President Bush, I would like to take this moment in time to show you how hypocritical you are in your veto of the Children's Health Insurance Program. The way I see it, you use the power of your office for your own agenda instead of for the people that you represent in this country. And your veto of CHIPs is a perfect example.

You see Mr. President, your letter to Congress states, "This bill would shift SCHIP away from its original purpose and turn it into a program that would cover children from some families of four earning almost $83,000 a year." It sounds as if you are saying that a family of four making that amount of money is too much for government funded health care. Yet with your salary of $400,000/year, you are entitled to federally funded health care for you and your family.

Oh yeah, I forgot though, you are using the power you have to be a hypocrite and only look after your best interest and not the best interest of the people in your country. Of course, you also make double what any president before you ever made. Funny how the raise was passed while you were president. Even more evidence that you are only looking after yourself.

President Bush, it's time to wake up and stand up for your people. Be a leader and show this country that you care. Start with children's health care and do the right thing.

But wait, there's more. If you're not doing it for yourself, then you're doing it for businesses. I'm sorry, business is not what this country is about, it's the people of this country. So why do I say that you are in it for the businesses? Maybe your veto letter to congress will answer that as well. In it, you state, "If this bill were enacted, one out of every three children moving onto government coverage would be moving from private coverage."

So you're saying that 33% of people moving to the coverage "would be moving from private coverage." What about the 66% that are moving from no coverage, Mr. President? That's right, you don't seem to care for the people of this country, you have more interest in the businesses of this country. Hello, Mr. President. This country is about the people, not the businesses. More of your own writing that proves the people mean nothing to you, let alone the children that are the future of this country.

President Bush, I stood up for you in the early years. But the longer you're in office, the more that I see you are not in it for the people, you are in it for yourself. Children's health care may not mean anything to you, but it means something to the people you are supposed to represent. Take the lead (your supposed to be a leader) and do the right thing.

I know that you are not like to read this President Bush, but I'm tired of being the quiet guy just watching. You've crossed too many lines and it's time that I stand up to be heard. To anyone reading this post, if you agree, make sure that you digg it, stumble it, and bookmark it to get the word out. Also leave your own comments for all to see.

Ted

read more | digg story