Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

An ideea for an RDBMS project using C::B. Would be this a challange or what?

<< < (2/2)

eugen_mihailescu:

--- Quote from: JGM on April 30, 2010, 01:28:54 am ---Code::blocks could become much powerful with such a feature if some one implements it!

--- End quote ---

That was the idea, the base framework of C::B is such powerful that is shame to not use it at the maximum potential.

eugen_mihailescu:

--- Quote from: stahta01 on April 30, 2010, 04:03:44 am ---The nice thing about Code::Blocks is a plug-in environment; so, feel free to try to do it.

Note, pgAdmin uses wxWidgets so you might be able to borrow ideas and code from it.

--- End quote ---

Hi Tim (again  :D ),

Yes, C:B is a plug-in environment more than a C++ environment, at least that is what I saw from the angle from which I have been looked to the C::B. Yes, the C::B team have done all the efforts to transform it in a veritable IDE for C++ programming that they have succeed to make it an IDE for any kind of programming. The base version has few limitations but they could be easily overcome with some effort.
Right now I just want to collect as much feedback as possible about the whole idea, so any suggestion/criticize/help will be very appreciated and very useful.

Thanks again.
Eugen

thomas:
I think you will have to implement most of the functionality yourself, since the project management pane is not made to browse anything more complicated than files (for example, you wouldn't be able to navigate into a schema). On the other hand, you could implement a database browser as editor component in much the same way wxSmith does it. Then one could add a database file to the project and when clicked on, it would open in an editor, showing tables etc.

eugen_mihailescu:
(the answer is so large because I want to make clear the whole idea, it seems that because of my poor English, people think that I am talking about kind of database administration tool, which is not my intention.)

The idea is not to create another database tool, such as Toad/M$ Enterprise Manager (or its new child SQL Management Studio), or any other tool like database browser.

This tool is more about:

* how to create a database project from the source code
* how to share the same sources between different projects, the same way we use #include in C++
* how to install/deploy the whole project to a destination database server from scratch, or in the case that the database server is a production server, how to deploy incremental update without altering the existent data (or your users/customer will shoot you instantly)
* in the case of source refactoring, deploy the database structure changes by preserving existent data
* because database projects means, like in C++ projects, to test intensive the product (before deployment) using some kind of "test case scenario", you can write (in C++) a plug-in that will run using the the project database server data whatever test you include in your C++ code; ex: to monitor the code execution performances, bottlenecks, limits, any last but not the least to test if the output of test result is according to the input data; I have to mention that these plug-ins have nothing to do with C::B, they should be custom plug-in related to each project, so probably some of them (or all) will never be published to C::B SVN repository, except the case they make sense for other people projects, too
* in the database projects, in order to make it possible to run an test scenarios, you need some initial data; so you need to write a series of custom programs/plug-in (in C++) that will help you to generate random data; I have to mention that these plug-ins have nothing to do with C::B, the should be custom plug-in related to each project, so probably some of them (or all) will be never published to C::B svn, except the case they make sense for other people projects, too
At the end of the day, a database programmer (which usually need both, a database specific language AND also some powerful middle-high-level programming language, as C++) will have the following tool:

* an environment where he has all the database sources (remember that a table source is just a schema, that can be easily represented in a XML language; the table script can be generated from using the xml schema; a stored procedure/function/trigger is nothing more than a code stored in a .sql source file, like yours .cpp/.h; and so on)
* an source editor where he can edit very easy the sources of its database project (.xml files, .sql files, etc)
* an environment which allows him to creates his own plug-ins for his particular needs; plug-ins meant to assist him or to automate some development task.

* using some sort of SQL syntax checker (if you want the SQL compiler that you will use for this project) he will be able to check every file's syntax before deploying on the database (otherwise in the case of error, the database will say "invalid syntax near SELECT keyword" or something like that :)
* using another kind of C::B plug-in, written special for this kind of task,he will be able to deploy (from the file's source code) the entire database project to the database server, meaning: to create database on the server, to create objects to the server (such as tables, procedures, functions, etc), he could have some scripts for pre-deployment and post-deployment (as we already have in C++ the pre-build steps) which he can use it for populating with some initial data the resulted database.
* further, if you want, another plug-in could take care of source changes, meaning that each time that a table structure is changed, a stored procedure/function/trigger code is changed, these changes must be managed somewhere and then they must be packed  and deployed them on the destination server; this is kind of incremental deployment; but of course, the deployment script should take care not only "how the new database will look" but also about preservation of old data
You should never think about a RDBMS as a "bunch of TXT/XLS tables needed to store your data somewhere" because the RDBMS means not only the data structures (tables/views) but also thousands of stored procedure, functions, triggers, security, etc (written in a specific language depending on a database engine).
If you have the same database project installed to more than 100 customers, than you cannot connect manually to each database and make manually the same changes (how you are doing today with pgAdmin, Toad, etc, for example). Also, the project itself sometimes includes some customization for each customer which mean you need a sort of project's file source (where you can keep the source hierarchically) with some kind of "#include" capability.

You see, when you think to a C++ project and when you create a small "EXE" for your customer, you think that the deployment is all about "to overwrite the old "EXE" with the new "EXE" built from the source code (or just deploying the binary)". Well, this is also true for RDBMS, but you should also keep in mind that generally you have to take care of the old data and this can not be done with pgAdmin, Toad, etc. because it involves steps, data processing, automation. Before you spread your new version to your customers, you must test your entire project and make sure that it meets the performance criteria, hence you need to fill up your database with random data, to test it with various scenarios, and ONLY if they meet your expectation that this project become "ready for deployment". Every change you make to a file inside your project can damage other functionality, but if you have a platform which allows you to run  "custom random data", "custom test scenario" then you can automate those task which are for PCs, they are not for the human  :D

Finally: yes, the database browser could help (even any C++ programmer that already use C::B) and this can be implemented as a plug-in component for C::B using the wxSmith which is a great GUI toolkit.

Navigation

[0] Message Index

[*] Previous page

Go to full version