ASP.NET MVC open source. MySQL or SQL Server?

I have about 4 years experience with ASP.NET and SQL Server (web forms only). I am a little savvy with Ruby on Rails and have developed one very small 2-3 page application in ASP.NET MVC in my work. Now I and one of my friends (same experience as me) are ready to get more ASP.NET MVC experience. To this end, we thought about developing an open source application in ASP.NET MVC. It could be a blog system or forum or something else for the community to take advantage of as well. But we cannot define the underlying database for the application between MySQL and SQL Server. What would you suggest in terms of the following -

  • What will be more supported or required by the community?
  • If we are using MySQL, is it going to be a difficult path forward?
  • Is there any chance to support both with ORM (I have no experience with ORM)
  • Any other suggestion?

Thanks in advance.

+2


source to share


6 answers


What will the community support or demand more?

For most business users and most specialized ASP hosting providers this will be Microsoft SQL Server IMHO. With an amazing range of version numbers. I see quite a lot of SQL Server 2008, a lot of 2005, and quite surprisingly a lot of 2000 too.

For the little ones "are we cheap, is it free?" businesses and individuals, I also see some MySQL on Windows. I think in my small circle of companies that I worked with, it is 2/3 MSSQL and 1/3 MySQL of the two databases you mentioned.

Is it going to be a tricky road if we use MySQL?

In terms of more complex development? Yes and no; LINQ to SQL is more or less only available for MSSQL and is considered by many to be a simple and natural technology to work with. So yes, if your plan was to use LINQ to SQL as your ORM. Other good ORMs like nHibernate work equally well with both databases, as senior_george says.

Is there any way to support both with ORM (I have no experience with ORM)



Of course fx with nHibernate and some extra XML for nHibernate configuration, as well as for some more extensive installation documents, SQL scripts, etc. for users.

Any other suggestion?

Since this is your first app, play around with the design first using mocksups and prototyping, UML, or whatever else you choose. See if you can get some seasoned MVC developers to criticize your design, but don't take their criticism as gospel, there is more than one way to get it right.

Definitely consider tvanfosson's proposal to use IRepository for storage layer flexibility.

Consider using unit testing and dependency injection from the start; both are IMHO very important and useful in the long term. On the other hand, it will be a lot of new technology if you have no prior experience with them.

+3


source


If you can't decide what to use as the backend, then one suggestion I have is that defines an interface for the data layer, uses the IRepository pattern for that interface, and just picks one and writes a data layer implementation for that selection. In a (successful) open source project, it's unlikely that everyone who wants to use it will have the same ideas about which database will work for them. In this case, designing it so that it can use any database given a suitable interface implementation is a smart move. Using something like nHibernate , which already supports many different databases, there might be a route that you want to use if you don't mind having dependencies on other libraries.



+4


source


  • MS SQL is easier to use with .NET..NET includes LINQ to SQL ORM out of the box, so nothing needs to be installed.

  • MS SQL has a free version of Express, but it's up to you if its capabilities (4Gb for DB, 1 CPU, etc.) can work for your application (IMHO they will =))

  • There are ORMs that allow you to switch between DBMS: NHibernate , SubSonic , DbLinq . NHibernate is the strongest beast and it has an active entry implemented if you are looking for familiar concepts from RoR.

+3


source


tvanfosson and old_george gave good comments.

ASP.NET MVC aside, it's more MySQL versus MSSQL. I have developed web projects using them and found them relatively up-to-date in terms of development. The ORM I have been using is NHibernate.

From a deployment / production perspective, you will be limited by the MSSQL Express release limit if you are not going to pay for it. You might want to conduct some thoughts in this aspect.

0


source


Use ORM -> NHibernate

https://www.hibernate.org/361.html

0


source


I was in a similar situation a couple of months ago. Now my newest ASP.Net MVC project is almost complete. Here's the set I chose

- ASP.Net MVC + MySQL. No ORM.

I decided to go with MySQL instead of MS SQL because MySQL is free and MS SQL is very expensive. If you are building an open source application, you should seriously think about it. This will be a major problem if you plan to distribute your application widely.

I first tried using MySQL via ORM-Enterprise Framework (EF). This was the worst decision. The Enterprise Framework completely killed performance. These were the pits of the pits. I think nHibernate is better, but I don't know how much better.

Things are fast enough with my own SQL code.

The first iteration of my site will be in public beta this week, followed by several iterations.

Everything went well, so I can easily recommend the set I chose.

0


source







All Articles