Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

C++ and MySQL?

4 views
Skip to first unread message

William Gill

unread,
Oct 31, 2009, 11:09:43 AM10/31/09
to
I'm toying with the idea of dusting off my C++ for programming some of
my MySQL applications. I haven't coded in C++ for many years, and don't
know the state, or the future of the language (i.e. is it a legacy relic?).

Any thoughts, pro and con?

--
Bill

The Natural Philosopher

unread,
Oct 31, 2009, 11:20:21 AM10/31/09
to
dunno. I stopped short of the ++ bit.

C is a not unreasonable language to handle MYSQL requests. There is a C API.

which would work with C++.


I am doing webapps, and php turned out to be a bit less work. Similar to
C but interpreted.

I miss the strong typing, but not the pages of declarations ;-)

toby

unread,
Oct 31, 2009, 11:25:18 AM10/31/09
to

If it's the language you'll be most productive in, then use it, but as
the NP says, there are plenty of more modern alternatives.

There is a C++ wrapper API. http://tangentsoft.net/mysql++/

>
> --
> Bill

toby

unread,
Oct 31, 2009, 11:38:01 AM10/31/09
to

As well as this one:
http://forge.mysql.com/wiki/Connector_C%2B%2B

>
>
>
>
>
> > --
> > Bill

Jerry Stuckle

unread,
Oct 31, 2009, 1:53:39 PM10/31/09
to

You're really asking in the wrong newsgroup. But for compiled
languages, you can't do much better than C++.

Sure, there are more "modern" languages. But more modern doesn't mean
better (the most popular language in the world is still COBOL, for
instance). Many other languages have limitations, like platform
dependence (C## and .NET), are slower (Java, Delphi, etc.) or other things.

But no matter what - you should be looking at what the most appropriate
language is for your application. I wouldn't for instance, use C++ in a
web application any more than I would use PHP or Perl in a big desktop
application.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstu...@attglobal.net
==================

Robert Hairgrove

unread,
Oct 31, 2009, 4:39:22 PM10/31/09
to

The Qt libraries offer native MySQL plugins (or static compilation, if
you wish). Might be worth looking into if you intend to write a GUI
application using a MySQL backend:

http://qt.nokia.com/

Qt is completely in C++, and the language is definitely alive and well. :)

Balwinder S Dheeman

unread,
Oct 31, 2009, 4:36:37 PM10/31/09
to

I think, using Qt4 (see http://doc.trolltech.com/4.5/) seems to be good
choice, though programming in C++ might be an overkill for web apps.

--
Balwinder S "bdheeman" Dheeman Registered Linux User: #229709
Anu'z Linux@HOME (Unix Shoppe) Machines: #168573, 170593, 259192
Chandigarh, UT, 160062, India Plan9, T2, Arch/Debian/FreeBSD/XP
Home: http://werc.homelinux.net/ Visit: http://counter.li.org/

William Gill

unread,
Nov 1, 2009, 1:11:06 PM11/1/09
to
Jerry Stuckle wrote:

> You're really asking in the wrong newsgroup.

Not sure I agree with that. For the most part MySQL requires some sort
of wrapper for user apps, unless your users can use the MySQL CLI.
Asking people experienced with MySQL applications programs seems
marginal but appropriate.

> But no matter what - you should be looking at what the most appropriate
> language is for your application. I wouldn't for instance, use C++ in a
> web application any more than I would use PHP or Perl in a big desktop
> application.

"Most appropriate" is what I was thinking, but "big" as in "big desktop
application" seems to be the dis-qualifier. I guess I'll put the C++
books back on the shelf, and keep cobbling together HTML UI's powered by
scripts (PHP, Python, etc.) until the need for a truly stand alone
changes the equation.


--
Bill

The Natural Philosopher

unread,
Nov 1, 2009, 1:57:04 PM11/1/09
to
William Gill wrote:
> Jerry Stuckle wrote:
>
>> You're really asking in the wrong newsgroup.
> Not sure I agree with that.

Oh, that's standard stucl=klespik for 'I dont have anything worthwile to
say and don't know the answer, but I cant resist saying something
superficial and patronising'


>
> "Most appropriate" is what I was thinking, but "big" as in "big desktop
> application" seems to be the dis-qualifier. I guess I'll put the C++
> books back on the shelf, and keep cobbling together HTML UI's powered by
> scripts (PHP, Python, etc.) until the need for a truly stand alone
> changes the equation.
>
>

really depends on what the apps have to do. Mysql is easily accessible
by interpreted languages but if you want to do serious backend web code
on the fly, or simply feel at home with C++ well, or want your code to
be saleable without it getting ripped off..why not?

Jerry Stuckle

unread,
Nov 1, 2009, 2:03:02 PM11/1/09
to
William Gill wrote:
> Jerry Stuckle wrote:
>
>> You're really asking in the wrong newsgroup.
> Not sure I agree with that. For the most part MySQL requires some sort
> of wrapper for user apps, unless your users can use the MySQL CLI.
> Asking people experienced with MySQL applications programs seems
> marginal but appropriate.
>

Please show me in the MySQL manual where it talks about which language
you should be using for your project.

Which is the best language to use on a project is NOT a database
question. It is much better asked in appropriate language newsgroups,
where you can learn of advantages and disadvantages from experts in that
language.

Of course, you will have to sort out some of the bias in the answers,
but you'll still get much better information than here.

>> But no matter what - you should be looking at what the most
>> appropriate language is for your application. I wouldn't for
>> instance, use C++ in a web application any more than I would use PHP
>> or Perl in a big desktop application.
>
> "Most appropriate" is what I was thinking, but "big" as in "big desktop
> application" seems to be the dis-qualifier. I guess I'll put the C++
> books back on the shelf, and keep cobbling together HTML UI's powered by
> scripts (PHP, Python, etc.) until the need for a truly stand alone
> changes the equation.
>
>

As I said - there are both advantages and disadvantages to both. My use
of the word "big" does not mean I wouldn't use C++ for smaller
applications. It means I would not use PHP, Perl, etc. for big
applications.

The tool should fit the need, not vice versa. Try the language
newsgroups; describe your proposed application and see what the language
experts think.

0 new messages