MySQL

The world's most popular open source database

Contact a MySQL Representative


  • MySQL.com
  • Developer Zone
  • Partners & Solutions
  • Customer Login
  • DevZone
  • Downloads
  • Documentation
  • Articles
  • Forums
  • Bugs
  • Forge
  • Blogs
 
  • Pages

    • About me
    • Bio
    • Press Release: “Kaj Arnö Appointed MySQL VP of Community Relations”
  • Blogroll

    • Ein Finnlandschwede in Bayern
    • En finlandssvensk i Bayern
    • It’s some interesting topic
    • Kaj Arnö blog aggregation
    • No Software Patents!
    • Planet MySQL
  • Recent Posts

    • How we fixed the MySQL.com Power Outage
    • A Remote-Attendee’s Look at OSCON
    • MySQL Librarian: Capturing Community Insights
    • MySQL: Powering a New World Religion
    • The Embedded Reporter in the Half-Marathon
    • Berlin Open 09: Social Networking
    • Search the planetary archives, and tag your blog entries
    • SELECTing SELECT statements for Wordpress MU blogging statistics
    • How do MySQL users keep track of digital pictures?
    • Presenting and blogging in Chinese
    • On the Merits of Voting
    • The Future of MySQL
    • The Great Open Cloud Shootout: Videos and other links
    • Karen’s Commitments to the MySQL Community
    • What hasn’t changed with MySQL
  • Tags

    Alexander Arnö Black Swan Blogging Blogs Brazil Call for Papers Call for Participation CfP Community Contributions David Axmark Event scheduler Football FOSDEM Growth Innovation Ivan Nikitin Language Launch Mårten Mickos Michael "Monty" Widenius Mountains MySQL MySQL 5.1 MySQL AB MySQL Forge MySQL User Conference MySQL Users Conference Nassim Nicholas Taleb Open Source Oracle Paris Partitioning Photography Running Runnism Runnismus Social Networking South Africa Sun Microsystems Sun Tech Days Thank you Travel Twitter Use case
  • Archives



  • Categories

    • Architecture of Participation
    • Connectors
    • Documentation
    • Events
    • Falcon
    • GPL
    • GUI
    • Licensing
    • MySQL
    • MySQL Cluster
    • MySQL Proxy
    • MySQL Server
    • MySQL Users Conferences
    • MySQL Workbench
    • Photography
    • PHP
    • Release Policy
    • Ruby on Rails
    • Running
    • Summer of Code
    • Sun
    • Sun visits
    • Travel
    • Use cases
    • Virtual company
  • Calendar

    June 2008
    M T W T F S S
    « May   Jul »
     1
    2345678
    9101112131415
    16171819202122
    23242526272829
    30  
Observations by Kaj Arnö @Sun
« Ubuntu and MySQL: Getting closer?
The Why and How To of Localising Presentations beyond English »

NetBeans as IDE for developing MySQL itself

Since meeting yesterday with Vladimir Voskresensky, a Sun colleague from St Petersburg, I have a new favourite answer to the request “so tell me an example of technical advantages resulting from Sun’s acquisition of MySQL“:

Using NetBeans as an IDE (Integrated Development Environment) for coding and learning MySQL.

Now, that’s a simple answer, and that’s because it’s a simple and beautiful thought. But let’s start from the beginning.

In my days as a coder, I enjoyed the command line. I’ve used various coding editors, and I’ve disliked the hassle of learning new IDEs, who sometimes are more of a straightjacket than a productivity enabler. So call me conservative if you will, but I’ve written my PHP stuff directly in an editor.

Those who write the C and C++ code of MySQL are likely even more conservative than I am, and for a good reason: They’ve set up an environment that they’re happy with and used to. They are about as likely to change their development environment away from the vim/emacs/gdb/gcc stack as football fans change their favourite football teams.

So you can imagine that Vladimir had a bit of an uphill battle when he wanted to demo the C / C++ extensions to NetBeans.

But then Vladimir started to describe how the NetBeans team had used MySQL as a test case even before MySQL became a candidate for “eat your own dog food” through Sun’s acquisition of MySQL. It’s a real-world complex piece of software, and if an IDE can handle MySQL, it can probably handle most applications.

And the NetBeans team was able to successfully support MySQL:

  • MySQL can be directly imported as a NetBeans project
  • NetBeans can show dependencies between MySQL routine calls
  • NetBeans can show all occurences of a C variable in MySQL’s source code, in a scope-sensitive way (i.e. not a simple grep)
  • NetBeans shows all occurences, across the code base, of a particular class, function, field, macro etc.
  • NetBeans can rename any identifier in-place, such as “a” to something more meaningful (see demo)
  • NetBeans integrates debugging, even of MySQL
  • NetBeans provides easy navigation of code

Now this was enough even for a sceptic like me to become eager. During his demo, Vladimir used the Discovery Wizard to import MySQL and was then quickly able to dispel my deeply rooted skepticism against “unnecessary straightjacket GUIs that prevent real work”. I got a sting in my heart, longing back to do some Real Work, i.e. coding (of which I’ve done much too little this century).

My conclusion is that

  • NetBeans is a great way to learn the MySQL source code
  • learning the MySQL source code is simplified both for our community and for our own engineers
  • usage is so simple and provides so many advantages that it’s worthy of a try

So I didn’t leave the meeting before Vladimir had promised me three things:

  • to write a MySQL Forge Wiki article with pointers to all resources necessary to open MySQL as a NetBeans project
  • to write a MySQL Dev Zone article, expanding on the Wiki article, on how to productively use NetBeans when learning and developing the MySQL code base (from downloading NetBeans over importing MySQL to debugging MySQL, including the key productivity-enhancing benefits of NetBeans)
  • to try his best to come to the MySQL Developer Meeting in Riga in September, to demo NetBeans to our engineers

In return, I promised Vladimir

  • to introduce Vladimir to key MySQL engineers that may evaluate the IDE
  • to set up a MySQL University slot on development MySQL with NetBeans
  • to encourage MySQLers (employees and community) to provide the NetBeans time with feedback that may improve upon, say, the debugging properties

In short, stay tuned for some practical tips on how to work on the MySQL code base from the NetBeans integrated development environment.

I showed a draft of my blog entry to a small group of developers from the MySQL Engineering Team and here are some points I found interesting in their feedback:

  • “I was an emacs hacker once, but since then I got my behind kicked by a VB-developer, a dreamweaver clicker, and a drag-n-drop flash code designer so I opened my eyes to a bigger world. Now I use NetBeans.”
  • “There are some small shortcomings, like attaching debug process, but it works very well in most cases.”
  • “I tried the NetBeans C/C++ package. I liked that I don’t need to download all the Java bloat just to use C/C++. Something I used to miss with Eclipse - just packaged for the C/C++ developer. Bravo!”
  • “Please allow me the luxury of obeying to my habits and staying away from IDEs (being a 10+ years exclusive vi/gcc/gdb command line user this is a lot of inertia that I don’t like to lose right now).”
  • “NetBeans has a neat little re-factoring goodie: change the name of a variable in one place and NetBeans can change it in other places for you.”
  • “My colleague seems to enjoy the ease of extending NetBeans by plug-ins. He has written a plug-in which integrates PHP test runs and presents the results as HTML during a weekend. Can you mention http://blogs.sun.com/netbeansphp/ ?”
  • “The only feature which I don’t like - which is a killer feature for me as I’m a typical “MSIU” (most stupid imaginable user) - is the automatic close and reload of modified files. Accidently remove a file outside of NetBeans, go back to NetBeans and *damn* NetBeans has closed the file. Anyway, this has been reported to the responsible dev already.”
  • “Class browsing and debugging worked well for C/C++. And yes, performance was very much acceptable.”

Links:

  • NetBeans C/C++ Support: http://cnd.netbeans.org/
  • NetBeans IDE 6.1 Features: C/C++ Development: http://www.netbeans.org/features/cpp/
  • Find Usages and Rename in NetBeans (3 minute demo): http://wiki.netbeans.org/wiki/attach/CndRefactoring/Refactoring.htm
  • NetBeans for PHP: http://blogs.sun.com/netbeansphp/
  • NetBeans C/C++ mailing list: users@cnd.netbeans.org — registration and subscription: http://cnd.netbeans.org/servlets/ProjectMailingListList

This entry was posted on Wednesday, June 18th, 2008 at 17:25 and is filed under Architecture of Participation, MySQL, Sun visits. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

4 Responses to “NetBeans as IDE for developing MySQL itself”

  1. Bill Newton Says:
    June 18th, 2008 at 18:53

    Net beans is ok for locally changing code. My major problem with it is its inability to play nice with VIM style folding {{{ code to be foldable }}}. Its missing some polish and ease of use for the edge cases like editing remote files, and use of source code control integration. (some other java based OSS ide, that will go nameless works out of the box with remote repositories on windows).

  2. LenZ Says:
    June 19th, 2008 at 7:49

    Hi Kaj,

    very nice blog article, thanks for the summary and for sharing your impressions!

    Yesterday, I attended and spoke in front of a crowd of ~30 people from the Hamburg Java User Group (http://www.jughh.org/). Talking to some individuals later over drinks also covered NetBeans a few times - here’s some feedback from this audience:

    - Eclipse and IntelliJ IDEA were more popular
    among this audience, many had not looked at
    NetBeans lately
    - The ones that had agreed that NetBeans
    “feels” faster to work with than other
    popular Java IDEs. And they were surprised
    about the nice-looking and polished GUI -
    obviously something that Sun has not been
    known for before :)
    - NetBeans is the best choice for developing
    Groovy/Grails applications, the plugins for
    the other IDEs are inferior in functionality
    - The possibility of directly connecting to a
    MySQL Server and working on tables with the
    table editor (with SQL syntax highlighting)
    or via the GUI was highly praised

    Positive comments from other developers (at different occasions) included mentioning the great support for PHP as well as Ruby/Rails.

    I’m a die-hard VIM user myself, but if I ever have a chance to get back to some serious coding, it seems as if I should take a closer look at NetBeans myself :)

    Bye,
    LenZ

  3. Nacer ADAMOU Says:
    July 25th, 2008 at 9:32

    Very interesting article!
    I am waiting for resources about how to import mysql as a netbeans project.

  4. Magnus Svensson Says:
    August 29th, 2008 at 9:58

    Remember that I saw instructions how to use NetBeans for the MySQL Server source but now I can’t find it anymore. Anyone remembers where it is? We should probably link from this blog to there….

Leave a Reply

Observations by Kaj Arnö @Sun is proudly powered by WordPress MU running on Blogs.mysql.com.
Entries (RSS) and Comments (RSS).