views:

1683

answers:

14

I am looking to start a new project and I am trying to decide which framework to go with. I have been using ASP.Net for a while and enjoy it. My first introduction to web applications was with PHP and I still love it. The project should be a medium sized project maintained by 1 or 2 developers with a potential to grow. The only pros and cons are can think of are as follows:

ASP.Net MVC Pros

  • Big community support and increasing
  • Seems to be fully featured

Cons

  • Getting a dedicated server will be expensive.
  • A licensed version of SQL Server will be expensive

Zend Framework Pros

  • Also a fairly large community
  • Free, using the typical LAMP setup

Cons

  • Not as mainstream
  • Might contain possible limitations

Lastly, I have enjoyed working with ASP.Net's concept of Master pages. Does ASP.Net MVC still support this and does Zend Framework have something similar. I think that Zend offers something called templating and it looks close to Master pages.

What is your opinion?

A: 

At first, i recommend not to use PHP but a better language, Python for example. You code less, faster, more stable and with less maintenance issues. I'm currently using the Pylons-Framework and am very happy with it.

Anyway, if you want to stay with PHP, it depends on how flexible you want to be, means, how much the framework shall do for you. Recently I ran into a bundle of problems using CodeIgniter, which is a fast and leightweight framework that does, ehm, not much for you but only the "frame". There is a fork named "Kohana" which is besser concerning the licensing, but poorly documented.

Zend ist very powerful but complicated - what what is more an PHP- than a Zend-Problem though.

Symfony is also powerful and complete. It's totally derived from Ruby on Rails, and I never had a PHP-Project where i used all the Symfony-features. It has a really nice scaffolding.

From all PHP-Frameworks i tried, I liked CakePHP most. It seems like a middle-way between complexity and an easy-to-use approach.

All serious PHP-Frameworks support standard-applications like templating, modeling and caching.

schneck
PHP is fast and stable, PHP isnt the problem its the developers that write crap code is the problem.
Shard
As is the problem with most of us ;)
uriDium
i think it's not the right place for a flamewar - nevertheless poor to give a thumbs-down just for an opinion.
schneck
+2  A: 

Yes you can have master pages for your views in ASP.NET MVC Framework as well, it works pretty much the same as in Webforms.

Oskar Duveborn
+1  A: 

If you are worried about the license costs, then perhaps you should use another database? PostgreSQL and mySQL is often sufficient.

Carl Bergquist
That is true. I did mention that if I took the Zend Framework route I would use the LAMPP stack which includes MySql. I know that I can use MySql with ASP.Net in fact I already have. It was quite easy to do BUT I prefer to stick to a more standard (hopefully more support) stack.
uriDium
A: 

As a developer I think it is more abt asp.net and php. I know asp.net more than php, so I will suggest asp.net. Also you can't have power of linq with php,which is a very big advantage.

Zend has been here from some time, Asp.net MVC is still new. What I have seen is that alot developers are more comfortable with traditional methods than MVC.

MS has open sourced MVC, so its community will grow for sure.

Sharique
I have done both more traditional methods and MVC and I love the benefits that MVC gives me. Yes granted some more complexity but it is really worth it. I think that people that love good design and love to design might appreciate MVC more than people who just like to get things done. My opinion :)
uriDium
+5  A: 

I've tried both Zend Framework and ASP.NET MVC, and my impression is that ASP.NET MVC is the easiest to develop with. ZF takes a lot of time to learn and it also takes too much time (in my opinon) to set up. ZF also limits you in many cases, making you build large workarounds for things that ought to be implemented by default in the framework. Many of the libraries ZF offers are also made for very specific use cases, and are difficult to customize.

With ASP you can have an application up and running in no time. Any changes you want to make to the default setup is richly documented. You also have the advantage of a 'real' programming language like C#. The MVC pattern combined with a real programming language makes it easy to unit test, especially good if you're into test driven developement. My pros list of ASP.NET MVC is:

  • Easy localization and globalization with the .NET framework
  • Master Pages is much easier to use and more flexible than the layout model in ZF
  • You get all the good things from ASP.NET like SiteMap and the like
  • Linq
  • Microsoft Entity Framework / NHibernate / Spring.NET

About the cost of the server and the SQLServer, many hosting companies provide dedicated servers at fairly decent prices.

Erik
Brilliant Erik. Thank you. This is exactly the kind of response I was looking for. Hopefully there will be some Zend-Framework fanboy who will give me some nice counters. I like a balanced view. I appreciate your answer. (So far ASP.Net MVC seems to be winning. I am sure ScottGu will be happy)
uriDium
I use ZF and haven't used ASP.NET. ZF does take time to learn but the results are proportionate to the effort. I'd argue that ZF components are high quality, loosely coupled and ZF is a great glue framework. I've not struggled with customisation at all and haven't needed any big workarounds or hacks
David Caunt
Thanks dcaunt. By the way, what IDE are you using. I am not sure that I like the Eclipse port and I might use Zend Studio v5.5
uriDium
I don't find ZF libraries restrictive or overly specific. On the contrary, they tend to error on the side of flexibility and often require configuration and dependencies to be injected.
rick
PHP is certainly a "real programming language" and, imo, far superior to C# for web development. It's a dynamic language which lends to RAD. No compilation. Unit testing is no problem. One specific advantage: having the option of returning a single variable or an array from the same function.
rick
"Real programming language"? Wheres type safety, generics, reflection, dependable system types, etc? And by the way, regarding IDE's, it's one of the reasons I favour .NET. I've tried alot of them, and Visual Studio is one of the richest and full featured IDE's there is. I only like Eclipse for Java
Erik
A "real programming language" is not exclusively a static language. If that were true, python and ruby wouldn't qualify. The truth is that both dynamic and static typing have benefits. It's all about flexibility. PHP has type hinting (static types on method params) and C#4 introduces dynamic typing.
rick
And PHP has reflection.
rick
I still consider them script languages and not programming languages. The reason I like static typing is that error handling is required. This makes the business logic handle more error prone scenarios than with dynamic typing. I like PHP as well, I just feel that dynamic typing makes it messier.
Erik
+5  A: 

I think ZF has more going for it based on your requirements. The cons you've listed against ZF are rather subjective, but the cost of ASP.NET is definite.

There's definitely a rich community working on Zend Framework and its 1.0 release came well over a year ago, so it's stable and reliable.

Zend Framework supports a two step view, where a view template is rendered inside a layout template. I think this satisfies your need for master pages.

It seems you have equal love for PHP and ASP. If I was making the decision, I'd work with whatever I'm most confident using, or which would be most relevant for the future.

David Caunt
That is the problem. I loved PHP when I used some years ago, love ASP.Net now and I am trying to decide on which route to go. So I decided to try and use some reasoning to make a choice. The only thing that scares is the cost of a MS solution. Even hosting is more expensive.
uriDium
A: 

* Getting a dedicated server will be expensive.

what do you mean by dedicated server? You have to host any website whether you use ASP.NET MVC or PHP+Zend framework.

* A licensed version of SQL Server will be expensive

Depending on the size of your database, you can use free version sql express from Microsoft or MYSQL. ASP.NET MVC works with any database under the hood.

Besides I do not like the way you have to use the whole '_' thing to mean Zend/File as Zend_File. Whats up with that? ASP.NET MVC is well crafted, and is open source, and has an integrated url routing system built.

CodeToGlory
I know the website has to be hosted. I have done a good couple already. A dedicated server as in I don't share with anyone. You are right, the licensed version of SQL Server is very expensive. But it seems you also have to pay to use MySQL commercially unless you make the source open which I am not.
uriDium
You don't have to have a dedicated server to host ASP.NET MVC any more than you have to have a dedicated server to host PHP. You can use shared hosting for either. As CodeToGlory mentioned, you can use a free Express version of SQL Server. I have used it for substantial apps without issue. Or if you are doing shared hosting, you can very likely get shared SQL Server hosting as well from the same provider.I operate a hosting company that can provide this. If you are interested, you can contact me via the form on my blog (in my profile - didn't want to be seen as "spamming" here).
daughtkom
+2  A: 

Just passing through and saw this. As someone who's used ASP.Net for a couple of years and Zend Framework for a couple of years (PHP itself for many years and ASP.Net MVC briefly) I would definitely choose PHP and ZF. I have found the exact opposite and don't see how anyone could find anything in ASP.Net to be more flexible. I think what most people mean by "flexible" is that the IDE does alot of code completion or the framework scaffolds everything for them. The later is the exact opposite of flexible. To be honest ZF may be overly flexible. This is why the documentation while extensive doesn't seem to cover everything. Re-usability with ZF for my projects has been off the charts. Its definitely been better than plain ASP.Net.

You're probably going to find the same features in both as most are standard for an MVC framework and probably more in ZF. The Zend_Db library works alot like LINQ and any dynamicaly typed language will win out on DB access (hence the reason .Net had to add it for LINQ). ZF has a built-in URL routing system as well...nothing amazing there about .Net MVC. Master pages is handled by the layout system in ZF and to be honest you could have been doing master pages with raw PHP years ago. I don't know where comments about a "real" language would come from...PHP and ZF projects are capable of being unit tested. I do it all the time. If your roots aren't in C/C++ then usually a "real" language means it forces you to write OO code. Given any other option you won't because you don't know how to enforce it yourself.

In conclusion check out the features in both for yourself. From years of watching it happen firsthand I can tell you the .Net crowd will tell you about all sorts of "exclusive" .Net features that stem from a lack of actually having decent knowledge of other technologies and frameworks. The truth is that most if not all of the features are available on other platforms...many being older than the .Net implementations.

A: 

i dont understand why people listing cons in .NET that MSSQL is expensive .NET have MYSQL API that supports MYSQL and other Databases.

A: 

i am also deciding between the 2 + Ruby on Rails ...

i am using Zend Framework 1.8.2 and like it (started abt ~3 mths ago). its learning curve is steep. but i now quite like it. apart from MVC it has Zend_Forms with allows me to even separate the "input" logic and validation with is nice.

templating is achieved through Zend_Layouts and Zend_View. i dunno how to change layouts yet (now i have the whole site using the same layout ...) but i think its possible.

but after Zend Framework for a while i know is hard and now is exploring if theres any better frameworks .. so ASP.NET MVC and Ruby on Rails

1st impression on ASP.NET MVC is ok maybe need to know how they do forms and validation. apart from that ... i feel LINQ is GREAT!

for Ruby on Rails i like the auto generation of Models and Forms at the same time. speed things up alot but need to know whether customization of these auto generated forms will be easy. watched a screencast at the official site and incorporating AJAX seems easy .

iceangel89
A: 

If you're going for PHP I would try another framework, I didn't like Zend framework very much. Why not try CakePHP maybe?

There are a lots of PHP-MVC frameworks better than Zend.

Check this http://www.mustap.com/phpzone_post_73_top-10-php-mvc-frameworks

emzero
A: 

If you are planning to do business, take a look at Microsoft's Empower and BizSpark programs. They can help you with the licensing costs until your business can stand on its feet.

Emrah
A: 

The dedicated server MIGHT cost $10 more for a Windows platform. Might. And you can get good deals for hosting with MSSQL Server as well. And will you need a dedicated server to begin with? Good luck with the project though!

Gromer
A: 

I am working on .net for 3 years. .net framework has some cons such as expensive cost of database and host. But you can use ms sql express which has a free license. The problem with .net is: It doesn't have an active community like php, which is so important! For years I had this problem whenever I needed a component, I had to search a lot for a free version of a component. However in php everything is free! But in general I think developing software in .net is faster and easier because when you are coding and designing, this is VS that is doing most of things for you. And especially coding in .net keep you away from most of details because it has a very nice abstraction.

ahmad