03-30-2005, 02:20 PM | #1 (permalink) |
Crazy
|
PHP vs. ASP.NET
Here's the project:
1) Users pay via credit card online to join a group. 2) Users login to the system which provides a content specific webpage in regards to their group. This is about as basic as I can make things. It's not a huge endeavor- nothing needs to be logged or monitored. All data is harmless and low-priority (save the credit cards info, which is a one time thing) so we're not worried about making things very grand. I'm most concerned about my limitations in the future as far as delivering the data. The current design for the project is oriented around filtering information from the database. Currently there are no plans to do any computations or processing on-the-fly of the information. However, the goal is to develop the project with the assumption that such tasks will be created. My incling for this project is to do it in PHP. It's fast, easy, and works so smoothly with MySQL. It will also mesh well with the current design of the website which uses CSS for a modular approach. The question however, is what to do down the line? I realize that ASP.NET is merely a platform- if we chose to use it, we'd develop in C# and/or Java. This would allow much more conceptual flexability becuase of better object oriented design. It's not to say that PHP can't do these things. Rather, that if things were to become very complex, it would be easier to plan them out with a higher-level language. In the long run, I see both approaches fairly equal. PHP will be quicker to start- It'll be easy to talk to the database in long or short run. However, it'll be more difficult to conceptually plan out more complex tasks. With ASP.NET there will be a slower start, but conceptual design will be easy. Talking to the database will be more difficult however, as ASP.NET is not as seemless as PHP. I don't mind either just so long as things don't switch once the project has started. I suppose that given the scope of the project, things will ultimately boil down to opinions. I'm curious as to what you folks think. Also, if there are any suggestions, I'm all ears. Last edited by Robaggio; 03-30-2005 at 02:31 PM.. |
03-30-2005, 02:54 PM | #2 (permalink) |
Professional Loafer
Location: texas
|
I would go with PHP. At least if you do it that way, you can run it on multiple platforms where ASP.NET is limited to Windows .NET.
PHP can connect to a multitude of databases as well. PHP 4 | PHP 5 | ASP.NETSoftware price: free free free Platform price: free free $$ Speed: strong strong weak Efficiency: strong strong weak Security: strong strong strong Platform: strong strong weak (IIS only) Platform: any any win32 (IIS only) Source available:yes yes no Exceptions: no yes yes OOP: weak strong strong Price: Here, we must consider not simply the price tag of the initial investment, which, in the case of PHP, is obviously free, but also the implementation, maintenance, and debugging costs. In the case of PHP, you may invest in the Zend optimization engine. With ASP, however, you're investing from the very beginning, and you're spending for add-on technologies—libraries for doing graphics manipulations, for instance. But, in the long term, PHP isn't going to press you to upgrade and collect more licensing fees. Everyone who has dealt with complex licensing also knows that companies spend time and money just ensuring they are compliant. Furthermore, you have a difference in response when getting bugs fixed. This, of course, translates to time, which translates to cost for overall development. Speed and efficiency: ASP.NET is a framework allowing you to use various programming languages. In addition, it is touted as having a great object-oriented model. All this is true, but it becomes a detriment as far as speed is concerned. For all that advantage, there is a lot more code to run through to execute the same ASP page than you have to execute in the PHP engine for an equivalent PHP page. PHP is the quick-and-dirty type of solution, the one to get the job done. And though a lot of robustness has been added to it since its 2.0 and 3.0 days, it still retains that core optimized high-speed approach. Speed is not the only consideration. Memory usage is also important. Security: ASP.NET runs on IIS, which has been compromised innumerable times, as evidenced by IT news reports every other week. It has become such a liability, in fact, that in spite of all the marketing dollars spent on it, many IT professionals refuse to have their networks exposed with an IIS Web server. PHP, however, works with Apache, which has a proven track record of speed, reliability, and hardened security. Check www.securityfocus.com for more information. Cross-platform applicability: ASP.NET runs on IIS and is starting to run on Apache, which can run on a whole host of platforms. PHP has been designed to work with Apache from the beginning, so you have many proven and reliable server platforms to choose from. Open source opportunity: Open source is not just some philosophical torch idealistic programmers, or companies wanting to save a few bucks on licensing costs, are carrying. When you're dealing with bugs in the software itself, open source can be a serious godsend. In either case, with PHP or ASP.NET, you have a large user base using the software and possibly encountering bugs. With ASP.NET, those bugs have to go through a bureaucratic process to get acknowledged, fixed, tested, and rolled out in a new patch or release. PHP fixes, however, can get fixed quickly and rereleased. Anyone who has watched open-source development knows new releases and patches often come out in days rather than in weeks or months, as with commercial software. If that's not fast enough, you can always fix a problem yourself if you have to.
__________________
"You hear the one about the fella who died, went to the pearly gates? St. Peter let him in. Sees a guy in a suit making a closing argument. Says, "Who's that?" St. Peter says, "Oh, that's God. Thinks he's Denny Crane." |
03-30-2005, 03:27 PM | #3 (permalink) |
Banned from being Banned
Location: Donkey
|
Having been around the block with pretty much every scripting language available, I choose asp.net mainly because it's much more easier to deal with, program, and maintain. I personally HATE dealing with scripting languages, and C# kinda fixes that for me. Plus I know .net almost inside and out, so I can easily override base controls and classes for my own purposes (which, depending on the project, you may need to do).
Speed and efficiency are pretty trivial, especially with a very basic online app that only deals with users paying via credit card and logging in. Generally when these platforms are compared, there are some ridiculous examples used, like heavy scientific apps that aren't even written by 1% of the programmer base for that language. In the end, there's no solid definite answer and it doesn't really matter because linux also has mono that ties into apache... so it really just boils down to preference, just like J2EE vs. .NET. You could go back and forth all day on how fast something is vs. another, but when it comes down to it it's milliseconds of processing time per thousands of users per second that... from the sounds of your site, you won't even remotely have to ever deal with. [edit] Asp.net is much easier with handling data than you'd think! I think it's much better than PHP.
__________________
I love lamp. Last edited by Stompy; 03-30-2005 at 03:31 PM.. |
03-30-2005, 03:56 PM | #4 (permalink) |
Crazy
|
Speed/Memory arn't issues. The project won't ever get that big.
Money is also not an issue- everything is already provided. The project is for my college- we're just one department in one division of the school. I'd feel better if there were more external factors (what kind of server, etc) to push me in a certain direction. Unfortunatly it's completely open-ended, which is why the decision has to be made based on the project's own specifications. Limitless options are supposed to be a good thing! But there's too much to choose from |
04-04-2005, 01:51 AM | #6 (permalink) |
Addict
|
I asked a similar question here http://www.tfproject.org/tfp/showthread.php?t=76272 I ended up using php, I encountered no problems and would definately reccomend it, I have however not used ASP in anywhere near as much detail.
|
04-04-2005, 08:01 PM | #7 (permalink) |
Insane
|
The more equally attractive two alternatives seem, the harder it can be to choose between them - no matter that, to the same degree, the choice can only matter less. -- E Fredkin
Meaning.. you shouldn't spend time pondering over hard decisions if the alternatives are both good. |
04-05-2005, 05:00 AM | #8 (permalink) |
Crazy
|
Why use asp.net with Java? You should take a look at the Struts or Spring frameworks with Ibatis or Hibernate if you want to go the Java route. Both Struts and Spring are nice MVC architectures that will help you make your website scale easily if you ever decide to expand it later down the road, and by using Ibatis or Hibernate, dropping in an entirely new database (something other than MySQL) would also be very easy. However, such frameworks can sometimes be more than is necessary for a small website, at which point I would suggest using PHP. However, if you are interested in going a purely Java route, which is actually my preferred way of doing it, go check Struts and Spring out – they are great starting points for creating robust websites.
__________________
Solve two problems at once. Feed the homeless to the hungry. |
04-05-2005, 06:48 PM | #9 (permalink) |
Insane
|
For the long run, I'd have to agree with ryborg, the Struts or Spring frameworks and Java are really nice. I'm kinda partial to Spring and Hibernate (probably cause I have a thing for reflective coding and XML). Looking around on the net you can find tons of examples using Spring and Hibernate, not to mention books about them both (Spring in Action, etc..).
For the short term I would consider LAMP (Linux, Apache, MySQL, PHP) the way to go. |
04-07-2005, 07:49 AM | #11 (permalink) |
Insane
Location: Austin, TX
|
I say go with PHP not only because I believe it to be a better platform (PHP has object-oriented stuff in it if you really want classes and objects), but because you're at a university. Universities are supposed to be about the pursuit of knowledge, and, more importantly, the sharing of knowledge. Being tied to Microsoft (or any other proprietary platform) severely hinders that ability.
Also, I think it is silly for colleges to teach students to program in MS-centric environments simply because "that's what the market is demanding". If you want to be a VB/VC++/C# programmer, go to your local community college and get an associates degree. If you really want to be a computer scientist, you should be able to go to a real college and learn about all different kinds of platforms and languages, from Linux to Unix to Windows to VMS to AIX, and PHP to ANSI C to PostScript to C#. /rant |
04-07-2005, 07:23 PM | #12 (permalink) |
Crazy
|
Well the decision has been made for me: the university tech head-honchos are phasing out PHP. This is a complete surprise- they hired a new head admin who at the time, they thought was hugely into PHP. Turns out, when he got intertwined with things, he did a complete 180 and started moving towards ASP.NET as if he'd never heard of PHP.
skaven: The college isn't teaching MS-centric things. This is something completely separate from the education. The college basically has it's own ISP which they make money off of. |
04-08-2005, 06:56 AM | #13 (permalink) |
Insane
Location: Austin, TX
|
Oh, I wasn't implying that your college was doing that. I was just frustrated over my own college, which over the past four years has been systematically phasing out all unix/linux-based courses in favor of more "salable" courses in ASP.NET, Visual *, and other MS-centric platforms.
Sorry that I didn't point that out more clearly. |
04-09-2005, 12:10 AM | #14 (permalink) |
Crazy
|
On a slightly related topic - I work in web systems development for a company here in town, and just recently one of the other departments handed us an *ancient* Visual Basic app that desperately needed emergency fixing. We generally implement Java solutions in my department, and suddenly switching over to VB has not been fun. Where did "==" go? Where did ";" go? However, I will say that just learning Microsoft Software does not make you totally marketable. It seems Java's roll in today's industry is growing, so don't limit yourself to learning Microsoft only.
__________________
Solve two problems at once. Feed the homeless to the hungry. |
04-25-2005, 08:27 PM | #15 (permalink) |
Upright
|
As a Unix sysadmin with at least a small amount of experience, I would have voted for PHP as well. Large-scale projects are quite implementable in PHP (Wikipedia is the largest that comes to mind), and it is much more versatile than ASP.NET. With ASP, you're tied to Windows-only; with PHP, you can run on any platform, and backend the thing on anything from a plain-text file to an Oracle database.
Your department head doesn't sound very intelligent, at least not from my experience. I could see deciding on JSP over PHP, but nobody with field experience picks a Microsoft solution when they have any alternatives. |
04-25-2005, 09:20 PM | #16 (permalink) | |
Crazy
|
Quote:
It makes sense to me- the main web department REALLY knows their stuff. They can't have the 100's of other school departments going off and running 50 different languages and such. They need a way to manage the school's network, and it makes sense to conglomorate things. They could have just as easilly gone PHP, just that the main admin is gung ho about ASP.NET. It's silly though... my department head is getting really pissed at the main web admins. He thinks that the way they do things is silly and only seeks to slow him down. I disagree however- I'm glad that there is a team of people with their stuff in order taking care of the main system. We should be concerned with coding, not administering- and that's exactly the way things are setup. I think my boss just wants control though... but what he doesn't understand is that he doesn't NEED it. (And what he most definatly doesn't understand is that he doesn't WANT it... that's a bite much bigger than he can chew at this point.) Last edited by Robaggio; 04-25-2005 at 09:27 PM.. |
|
Tags |
aspnet, php |
|
|