views:

223

answers:

4

We have an enterprise application written in asp.net c# (3.5) and SQL server that we want to bundle and release for customers.

However, several have expressed concerns that it requires a Microsoft server due to the costs. Yes, I know... Therefore, we are considering porting it to a LAMP stack, with the "P" referring to php.

What challenges can we expect to face developing on a LAMP stack coming from a Visual Studio asp.net environment?

The issues I am sure of are:

  1. Debugging: Visual Studio is awesome for both client and server side debugging.
  2. Framework: The code behind model works great, and the MVC framework is nice.
  3. Maintenance: We would like the feature set to be common on both platforms.
  4. Database layer: Code is loosely coupled to the mssql data types.

If you've been through this exciting process, I'd love to know what it was like with some recommendations/tips.

As a side to this, is there any way for us to run this code as is? Mono? Others?

+1  A: 

I have more experience with .NET than the *AMP stacks, but based on my experience with XAMPP, I would offer the following observations

  1. Debugging: Visual Studio is awesome for both client and server side debugging.

    Eclipse PDT works great for design, development, and debugging. I've heard good things about Zend Studio but haven't worked with it.

  2. Framework: The code behind model works great, and the MVC framework is nice.

    There are frameworks to allow you to separate presentation from logic (e.g. Smarty ) and at least one MVC framework is available (e.g. CakePHP)

  3. Maintenance: We would like the feature set to be common on both platforms.

    If you exclude Windows specific functionality (Windows Integrated Security, etc) there shouldn't be much you can't do in both stacks, but if you have to reproduce controls like the gridview it will be labor intensive.

  4. Database layer: Code is loosely coupled to the mssql data types.

    I am not aware of any data types that cannot be mapped between mysql and sql server and there is good documentation for handling migrations

Mono might decrease the amount of time required to port your solution, but I am unaware of any way you could re-use all of your code "as is".

cmsjr
+2  A: 

Another PHP IDE that you can consider is NetBeans.

As a .NET, Java, and LAMP developer at one point or another, the biggest change was largely cultural. For example, PHP has a legacy of not using OO principles whereas ASP .NET started off as a .NET language with full OO support. This basic difference leads to significant issues such as PHP's long lists of reserved keywords and so forth.

Zian Choy
+2  A: 

Other MVC frameworks:

  • CodeIgniter
  • Kohana
  • Yii

(Just found out about Yii. Here's an article that compares them.)

There are probably a half-dozen more out there, as well.

sprugman
A: 

i have a Asp.net background myself and have been researching open source frameworks for the last few months. I still haven't made up my mind. I've recently been looking at Grails. Seems to have the best of both worlds - a scripted, easy to use, open source RAD MVC framework on an enterprise platform. It uses the Groovy scripting language (ruby -like) but runs on the JVM so you can use full Java framework if you like. there's tons of prewritten java components out there to tap into. This thing is pretty cool. you'd be able to port your existing app pretty quickly. You'll need a Tomcat webhost though.

if you need PHP, straight PHP performs pretty well but most of the frameworks are poor performers. If go with straight PHP there's no mvc. You'd be using the traditional page based model. But you'll feel more at home. You can roll your own DAL with PDO and use stored procedures. You'll need a templating system though. Stay away from Smarty which uses it's own templating language. It's slow and why do you need to learn a seprate templating language. i never got that. Use Savant instead: http://phpsavant.com/. it uses php for template language and is fast. You can mimick code-behind with this too by creating a template page for each site page. As far as mvc there's a new PHP framework called Yii (http://www.yiiframework.com/) that claims to have the best performance out there for php frameworks. It's well documented too. It's probably the best the php framework out there if you're coming from .Net. Feels enterprisey like Zend but without the poor performance. Most of the others are toy-ish or really slow like Symphony and Cake. Php works great with Apache. Not a lot of tuning or maintenance unlike Rails and Django.

Next you need an IDE. Go with Netbeans. Use the PHP version and install http://www.xdebug.org/. Will feel inferior to VS but it's not bad.

For a DB, MySql is the sexy pick but Postgres is superior. It has one db engine that does it all. With Mysql, some features you want are in InnoDB and some are in MyIsam. If you need foreign keys and transactions you have to use InnoDB. Use MyIsam for fulltext search and faster read performance. Postgres performance has greatly imnproved with the version 8 release (same as mysql now) and has a nice windows installer finally.

johnW