
After reading more than a month ago on Habré about the appearance of
SharpDevelop 4.0, I did not attach any importance to this, but a little later a colleague reminded me of this post and said that it is necessary to try (earlier we didn’t see this IDE). I run ahead and say that he never launched it, but I, the other day, installed it and decided to write a small C # application that will interact with the MySQL database. All interest in this IDE is due to the fact that I did not use anything other than MS Visual Studio, starting with version 6, and smoothly switched to 2010. Under the cut, I’ll tell you about the impressions I received from using Sharpdevelop, I’ll show the main windows (for those who are just wondering what it is like) and talk a little about the development.
First of all, we need to download the environment:
SharpDevelop . Immediately what catches your eye is the size of 15535 KB, since I have Visual Studio 2010, then I don’t need to install anything else (we are talking about framework 4).
')
Run the installer and can choose to bind to the files:

We run SharpDevelop and when loading we see such a picture (I couldn’t do it right away, I had to make several attempts, because the medium download speed is very high):

According to numerous opinions, this is an ideal environment for "weak" computers. Therefore, loading it went very quickly, and I was able to see it in all its glory SharpDevelop 4.0 main window.

This is where the dejawe appeared at once, that I saw it somewhere, the interface is very close to Visual Studio, and sometimes I even forgot that I was working SharpDevelop and pressing Ctrl + "." in the hope that adding for MySQL will be added. The possibilities are certainly more modest and I chose the Windows Application from the menu for creating a project and set to work. This window is practically no different from the Visual Studio window, in the upper right corner you can select a version of the framework, on the left possible projects are available.

For MySQL, we will need to install the database and provider, my choice fell on mysql-essential-5.1.54-win32.msi and mysql-connector-net-6.3.5.zip, which can be found on the offsite:
dev.mysql.com , also do not forget to configure the my.ini file to avoid problems with Russian characters.
After we create a project, we will see a window that is equally familiar.

There is no desire to do anything “big”, but it’s ridiculous to write the “hello world” application, so this will be a database of friends with their surname, name and date of birth, by the way, here’s the designer:

Add a link to the library MySql.Data.dll and we can start writing the code. You should also add:
using MySql.Data;
using MySql.Data.MySqlClient;
In the form constructor, add:
string connStr = "server=localhost;user=root;" ;
using ( var conn = new MySqlConnection(connStr))
using ( var cmd = conn.CreateCommand())
{
conn.Open();
cmd.CommandText = "CREATE DATABASE IF NOT EXISTS `sharptest`;" ;
cmd.ExecuteNonQuery();
}
connStr = "server=localhost;user=root;database=sharptest;" ;
using ( var conn = new MySqlConnection(connStr))
using ( var cmd = conn.CreateCommand())
{
conn.Open();
cmd.CommandText = "CREATE TABLE IF NOT EXISTS `friends` (" +
"`id` int(11) NOT NULL auto_increment," +
"`lastname` varchar(50) NOT NULL default ''," +
"`firstname` varchar(50) NOT NULL default ''," +
"`birth` date NOT NULL default '1000-01-01'," +
"PRIMARY KEY (`id`));" ;
cmd.ExecuteNonQuery();
}
* This source code was highlighted with Source Code Highlighter .
As
hazzik noted in his comments, this code cannot be used in “normal” applications, this is just an example that I wrote in order to familiarize myself with the environment, this application is by no means the final product.
Of course, it would be worthwhile using GRANT to create permissions to access the database, not to use root, but the article is not about that, also the basic operations (UPDATE, SELECT, INSERT, DELETE) and the project itself can be downloaded via a
link or a
link . I especially want to highlight the fact that MS Visual Studio 2010 and Sharpdevelop understand each other’s projects and, without any problems (conversions), opened projects created by another IDE.
Now I want to say a few words about working with the code:

When writing code, hints also pop up, you can see the parameters and what the method returns, everything is fine with debugging too:

Conclusion
Honestly, I expected the result of my acquaintance to be sad, but Sharpdevelop was pleasantly surprised, because Today it is quite a powerful product, it has a rich functionality, it works fast, takes up little space and, most importantly, is free. The purpose of this acquaintance was not to search for alternatives, but only acquaintance with a new medium that I had not used before. For some people, this IDE will be enough and you can not put the same Visual Studio Express edition (if we are talking about free products), but in my daily work I use quite a few things that are not in Sharpdevelop, but I believe that in the future the project will gradually catch up with visual studio.
Links
SharpDevelop 3.0 vs Visual Studio Express editionUPD: The link above has a good table comparing the two environments, just not everyone follows it.