LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   C++ for VB, Powerbuilder, Delphi programmers (http://www.linuxquestions.org/questions/programming-9/c-for-vb-powerbuilder-delphi-programmers-461207/)

cioannou 07-05-2006 10:01 AM

C++ for VB, Powerbuilder, Delphi programmers
 
As the subjects states , I am a Powerbuilder programmer (which unfortunately can't run on linux), and made a few tries to learn C++ , here is the story.

I get a few books, read'em and get terribly bored. Ok guys, I learned the basic stuff, now what? Where is a real world book? C++ is not as easy as VB or Powerbuilder to understand and use by simply reading one or two books with basic examples and this gets even worse if you google for something, you can find 6 billion different ways to do the exact same thing. Which one is suitable for your application? Take a wild guess...

It seems that there is no book to get you into real world programming, e.g. client-server development using QT or GTK or any other widget set. Everything I looked at is good either for an academic approach or for a nice theory on the language which you can't even put to practice because the examples are so generic that don't really help in the real world and last is the category of books that are really written for professionals that already know a lot of stuff and need specific information to master their techniques.

Well, the task is simple. Let's say that we need a simple but nice looking application to store customers, send a few e-mails to these customers, print some nice looking reports and export some data to a spreadsheet or pdf. Simple as that!

Could anyone suggest a book or a series of books that could get us windows programmers to linux "real world" application programming with C++?

graemef 07-05-2006 10:33 AM

The following book is about to be released C++ GUI Programming with Qt 4, to browse through parts of the earlier version you can get it from here.

graemef 07-05-2006 10:37 AM

Taking a different tack, you may be interested in the mono project

ppanyam 07-06-2006 11:37 PM

A typical VB project. www.mindprod.com (?) compared VB to C++ as Tricycle to Ferrari. They are different. You have to use the right tool for right project. Ofcourse, you can do it in C++ the way you want. Why would you want to use a paid toolkit anyway?

Simplest solution probably would be java. All your functionality is well documented, tested and on net, may be you can start working with the Cafe Shop tutorial and add functionality to it.

Most of the frontends for C/C++ commercial apps that we are using are TCL/TK or java! believe me, they costed us the earth.

Having said that, I was trying to look for decent documentation/tutorial/book on wxWidgets for a long time with no success.

ppanyam

alred 07-07-2006 04:02 AM

go and try java ...

i'm a fan boy of delphi but recently i'm trying out this java ... and its a good language to play with ... java does try hiding as much "difficulties" as possible for the newbie while exposing much difficulties for fine tunnings catering to the professionals(probably theres a need for them to work like a compiler itself which i wouldnt know) ...

viewing from newbie angles ... as long as i can recreate basic things mimicking those stuffs(example :: StringList , IniFiles and probably ParamsList) that are "builtins" in languages like delphi/vb etc etc , i can start playing with java right away ...

but there are some java stuffs which came "encapsulated"(lacking of words) for newbies , eg. that ThreadPoolExecutor(and i believe there are more out there) which is a blessing for us newbies and frankly speaking ... i'm kind of looking forward to a day where newbies cant(or dont have to) use any Synchronized() , Lock() and Wait() and their variants , at least for "common" applications that newbies trying to make but these stuffs are still exposed to the professionals(for they are really good in language documentations and probably with some "proper" schooling i guess) ...

all of these are happening while delphi has been re-assigned to fast/quick/"ballistic" wild explorations of the world ...


//also ... dont forget about ruby(i've heard good things about them and i believe they are true) and this gambas which i think i will probably go into it for a while and have a look ...


//goodluck ...

.

alred 07-07-2006 04:27 AM

forgot to mentioned ... i think python's popen() is able to give you a pid of what it is executing ... if i'm not wrong ...


//goodluck ...


.

faris10 07-07-2006 10:13 AM

GUI Linux
 
Quote:

Originally Posted by cioannou
As the subjects states , I am a Powerbuilder programmer (which unfortunately can't run on linux), and made a few tries to learn C++ , here is the story.

Make a search for Kylix, it's really will be what you need and close to what you know. I dont know when if it is at all published already

cioannou 07-10-2006 03:20 AM

Quote:

Originally Posted by alred
go and try java ...

i'm a fan boy of delphi but recently i'm trying out this java ... and its a good language to play with ... java does try hiding as much "difficulties" as possible for the newbie while exposing much difficulties for fine tunnings catering to the professionals(probably theres a need for them to work like a compiler itself which i wouldnt know) ...

.

Thought to try Java until I ran onto this:

http://upp.sourceforge.net/www$uppweb$vsswing$en-us.html

I am now convinced that I must go to C++.

alred 07-10-2006 12:29 PM

>>"I am now convinced that I must go to C++ ..."

if your machine is powerfull enough you can also have a look at or try netbeans rad ide or eclipse but i'm not sure whether they support "automatic" event-handling writing in their ide ...

and borland also released their jbuilder for free(probably somekind of limited edition and they support solaris and mac too) quite some time ago ...

but these kind of "speed" rad usually you can write once on your own(probably only for some specific events) and use it everytime ... so it doesnt prove much anyway ...


//:twocents:


.

ppanyam 07-11-2006 12:59 AM

Quote:

Thought to try Java until I ran onto this:

http://upp.sourceforge.net/www$uppweb$vsswing$en-us.html

I am now convinced that I must go to C++.
All I can say is.. best of luck.

It looks fine.. But my experience(bad ones) tell me that non-standard tools/ non-standard dta formats etc result in huge delays due to lack of support(very few people would have come across your problem, and you dont know where on earth they are!).. and problems in maintenance and expansion. If you are using it for small projects/college assignments/fun etc, well, someone has to try them out first! Not enough people have used it and not enough documentation is there, according to first impressions.

But some of the examples look very good. Especially the SQL handling for Oracle looks very sleek and simple. Infact, its the sleekest one I have seen in any language!

ppanyam

graemef 07-11-2006 02:47 AM

Quote:

Originally Posted by cioannou
Thought to try Java until I ran onto this:

http://upp.sourceforge.net/www$uppweb$vsswing$en-us.html

I am now convinced that I must go to C++.

I have a friend who would say that this is just like comparing apples and oranges.

They're different fruit and so there is no fair comparison. You need to peel away the skin to get a better idea of what is going on. Ultimate++ is generating code in the background for the GUI to work. So they are comparing a code generator with raw code, hardly a comparison of equals.

I'm not suggesting that you shouldn't use Ultimate++ (I did think about it myself before deciding upon QT) just be wary of the comparison.

I don't know why but they also cheated with their code making everything public; whereas the Java code was protected and so it required access methods.

cxl 07-29-2006 04:01 AM

Quote:

Originally Posted by graemef
I have a friend who would say that this is just like comparing apples and oranges.

Sure, such comparisons can never be completely fair.... But as application size grows, they are more and more correct.

Quote:

You need to peel away the skin to get a better idea of what is going on. Ultimate++ is generating code in the background for the GUI to work. So they are comparing a code generator with raw code, hardly a comparison of equals.
No, that is not quite correct description. There is no "background code" that would not be visible in the example(s).

The fact under the skin is that format of .lay files (which can but does not need to be designed visually) can be directly included and compiled using C++, forming several C++ entities directly responsible for layout and content of dialogs. There is no background generated glue code involved (unlike Qt's moc ;)

Mirek

graemef 08-01-2006 03:01 AM

Quote:

Originally Posted by cxl
The fact under the skin is that format of .lay files can be directly included and compiled using C++

and here is the example .lay file:
Code:

#ifdef LAYOUTFILE

LAYOUT(ConverterPaneLayout, 244, 76)
    ITEM(LabelBox, title, LeftPosZ(8, 228).TopPosZ(4, 64))
    ITEM(EditDoubleSpin, value, LeftPosZ(16, 144).TopPosZ(20, 19))
    ITEM(SliderCtrl, slider, LeftPosZ(16, 144).TopPosZ(40, 20))
    ITEM(DropList, unit, LeftPosZ(164, 64).TopPosZ(20, 19))
END_LAYOUT

#endif

Looking at that example something tells be that this is not going to be compiled by a C++ compiler. Therefore I stand by my stance that their is background code. You may want to call it a class that interprets the file but the .lay file it sure isn't native C++

alred 08-01-2006 11:34 AM

do you guys know how ultimate++ parse their layout files ?? i have download their source , but kind of stuck at their "InitLayout()" and some other parsing functions ... donno how to follow their files and dirstories ... or do they really parse their layout files at all ??


btw ... also downloaded the binaries , but some of their dialogs are bad for my 14" monitor ... arrrrrggg ... always the same problems ...



.

cxl 08-01-2006 11:40 AM

Quote:

Originally Posted by graemef
and here is the example .lay file:
Code:

#ifdef LAYOUTFILE

LAYOUT(ConverterPaneLayout, 244, 76)
    ITEM(LabelBox, title, LeftPosZ(8, 228).TopPosZ(4, 64))
    ITEM(EditDoubleSpin, value, LeftPosZ(16, 144).TopPosZ(20, 19))
    ITEM(SliderCtrl, slider, LeftPosZ(16, 144).TopPosZ(40, 20))
    ITEM(DropList, unit, LeftPosZ(164, 64).TopPosZ(20, 19))
END_LAYOUT

#endif

Looking at that example something tells be that this is not going to be compiled by a C++ compiler. Therefore I stand by my stance that their is background code. You may want to call it a class that interprets the file but the .lay file it sure isn't native C++

Sure it can be compiled.

LAYOUT, ITEM and END_LAYOUT are macros (temporary defined several ways during several include passes of .lay file).

E.g.:

Code:

#define LAYOUT(name, cx, cy)  class name {
#define ITEM(type, id, param)  type id;
#define END_LAYOUT            };

Mirek


All times are GMT -5. The time now is 11:30 PM.