PDA

View Full Version : We'll need a QT Jambi section!



GreyGeek
2nd August 2006, 03:42
I've downloaded the QT Jambi Preview and began playing with it.

First observation: It is extremely easy to install.
Second observation: It's seems very familiar
Third observation: It looks like a merging of C++ and Java, but with the familiar QT API. Here's a code snippit of the "Application" example:


/************************************************** **************************
**
** Copyright (C) 1992-2006 Trolltech ASA. All rights reserved.
**
** This file is part of Qt Jambi.
**
** $JAVA_LICENSE$
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
************************************************** **************************/

package com.trolltech.examples;

import com.trolltech.qt.core.*;
import com.trolltech.qt.gui.*;

public class Application extends QMainWindow {

private String curFile;
private QTextEdit textEdit;
private QMenu fileMenu;
private QMenu editMenu;
private QMenu helpMenu;

private QToolBar fileToolBar;
private QToolBar editToolBar;

private QAction newAct;
private QAction openAct;
private QAction saveAct;
private QAction saveAsAct;
private QAction exitAct;
private QAction cutAct;
private QAction copyAct;
private QAction pasteAct;
private QAction aboutAct;
private QAction aboutQtAct;

private String rsrcPath = "classpath:com/trolltech/images";

public Application()
{
QMenuBar menuBar = new QMenuBar();
setMenuBar(menuBar);

setWindowIcon(new QIcon("classpath:com/trolltech/images/logo_32.png"));

textEdit = new QTextEdit();
setCentralWidget(textEdit);

try {
createActions();
} catch (Exception e) {
e.printStackTrace();
}
createMenus();
createToolBars();
createStatusBar();

readSettings();

textEdit.document().contentsChanged.connect(this, "documentWasModified()");

setCurrentFile("");
}

I'm going to re-write my Homestead QT/C++ app in Jambi just to see how it sizes up. My boss is really excited about it because he favors Java over C++ and I'm the only pgmr who uses C++ in our dept and I'll be retiring in about two years.:D

jacek
2nd August 2006, 15:49
Just like with PyQt, if there will be enough questions, we will create a new section.

ball
2nd August 2006, 16:06
What is the point for Java guy to use QtJambi, when they already have SWT, with Eclipse project as a mature project prove?

GreyGeek
2nd August 2006, 16:45
What is the point for Java guy to use QtJambi, when they already have SWT, with Eclipse project as a mature project prove?

Apparently you haven't read the whitepaper or the docs, and I doubt that you've compared the "Listener" features in Java/SWT with the Signal/Slot features in Jambi. Read the white paper and the docs and then come back and ask that question.

GreyGeek
2nd August 2006, 16:53
Last night I posted from my laptop at home, which runs MEPIS 6.0, and used the code example from it.

This morning I installed Jambi on my W2K workstation and played with the demo program: qtjambi.exe, which ran identically to the Linux version. Then I went to the "generator_example" and recompiled it. The compile went OK and it ended with the message that I should now run qtjambi.exe to see the generator in action. Unfortunately, qtjambi.exe now breaks with a memory address error. I deleted the Jambi directory and purged the registry of stray jambi entries. (Installing Jambi doesn't create any registry entries, but using WinZip and notepad on Jambi files does.) Then I re-unzipped QTJambi again, but a fresh install still crashes with the same memory address error.

However, Jambi's Designer and Assistant appear to work properly. More later.

GreyGeek
4th August 2006, 04:04
Last night I posted from my laptop at home, which runs MEPIS 6.0, and used the code example from it.

This morning I installed Jambi on my W2K workstation and played with the demo program: qtjambi.exe, which ran identically to the Linux version. Then I went to the "generator_example" and recompiled it. The compile went OK and it ended with the message that I should now run qtjambi.exe to see the generator in action. Unfortunately, qtjambi.exe now breaks with a memory address error. I deleted the Jambi directory and purged the registry of stray jambi entries. (Installing Jambi doesn't create any registry entries, but using WinZip and notepad on Jambi files does.) Then I re-unzipped QTJambi again, but a fresh install still crashes with the same memory address error.

However, Jambi's Designer and Assistant appear to work properly. More later.


UPDATE: qtjambi.exe crashed because I had "..java/bin/server" in my PATH. When I removed it the demo app ran fine.

GreyGeek
4th August 2006, 04:16
I downloaded Eclipse 3.2 (full 120MB version) and installed it. I discovered that before I open Eclipse for the first time I must install the QTJambi plugin, oherwise Eclipse doesn't see it.

When I open Eclipse, make a project and then add a file using an extension of "ui", Eclipse opens the QT Jambi Designer. I can use "Show View/Other" to add a properties tab, a signal/slots tab, etc... Works great!

I run MEPIS 6.0 on this laptop. I installed Eclipse 3.1.2 from the repository, which dragged along 45 other files. Under /usr/share/eclipse are the "features" and "plugins" directories. I "kdesu konqueror" and opened the QTJambi Eclipse pluggin, which comes as a .tar.gz file. Then I dragged the contents of the "features" directory to the features directory under /usr/share/eclipse/ and ditto for the files under "plugins" in the tar.gz file. Then eclipse/QTjambi works great.

Eclipse/QTJambi runs, looks and feels the same on both my W2K workstation and my MEPIS 6.0 laptop.

Kumosan
4th August 2006, 11:05
What is the point for Java guy to use QtJambi, when they already have SWT, with Eclipse project as a mature project prove?

For a Java guy? Don't know. For me? Easy to explain. Due to my job in the last 5 - 6 years I hardly had the chance to code in Java. Everyting was C/C++ + Qt. For quite some time I felt a bit sorry that I was more and more losing my Java knowlege. Oh, from time to time I decided just for practice to start a little private Java project. But sooner or later I came to the conclusion: 'Why bother? What I do now can be done so much easier with C++ and Qt'. That alwas was the time when this 'project' died.

A few days ago I installed QtJambi and it felt comfortable. I am quite experienced in Qt, its layout manager, widgets. Knowing them I started coding in Java/QtJambi as if I had done so for years. I'd say an experienced C/C++/Qt developer, who has never written on line Java can do serious development in Java after a few hours skimming through a beginners Java book.

GreyGeek
4th August 2006, 19:51
For a Java guy? Don't know. For me? Easy to explain. Due to my job in the last 5 - 6 years I hardly had the chance to code in Java. Everyting was C/C++ + Qt. For quite some time I felt a bit sorry that I was more and more losing my Java knowlege. Oh, from time to time I decided just for practice to start a little private Java project. But sooner or later I came to the conclusion: 'Why bother? What I do now can be done so much easier with C++ and Qt'. That alwas was the time when this 'project' died.

A few days ago I installed QtJambi and it felt comfortable. I am quite experienced in Qt, its layout manager, widgets. Knowing them I started coding in Java/QtJambi as if I had done so for years. I'd say an experienced C/C++/Qt developer, who has never written on line Java can do serious development in Java after a few hours skimming through a beginners Java book.


Eaxctly. I spent the last 7 of the last 8 years developing in-house apps with Visual FoxPro. A couple of years ago my employer, not wanting to get locked into VISTA, decided that it would be good if our tools and apps were platform neutral, so I was assigned the task of finding good crossplatform development tools and languages. (Java, Python, Ruby, C++) (JDev, Eclipse, JBuilder, Netbeans, Oracle HTP.P, Boa Contructo, MSVSC++2003 and and several others.)

JDev/Java was a total washout. I learned to hate Java. Python was easy but has scope problems. Boa_Constructor is a useable GUI RAD tool for Python but its development cycle is too slow and there are deployment problems. Oracle HTP.P is fantastic, but web based applications are not too good for clerks who have registered machine-guns for fingers.

Although I hadn't coded in C/C++ in years, my search ended quickly when I encountered QT/C++. I had my test app up and running in 1/3 the time it took me to get the JDev/Java version only 90% done.

I'm the only one out of 15 developers in our department who programs using C++, so my boss is happy with the prospect that we can use the QT API/Designer will using Java as the language. What has amazed me, however, is that I can see very little difference between coding MVC with QT/C++ and coding MVC with QTJambi/Java. ;)

wiktar
11th August 2006, 13:21
I have some questions about using Jumbi.

1. Can I desing my form in QT Designer and use .ui files with Java/Jumbi?

2. How does work binding Java to QT? I need installed QT4-libs on each computer where I launch my class?

3. Is it ready for use now? Or is it a deep beta?

4. Is Jambi free for non-commercial using?

Thanks you!

ball
11th August 2006, 19:21
What you 2 guy said are true, but the same thing is: both of you are Qt expert, which QtJambi is a great tool for a Qt guy to code Java.

But I am not talking about your case. A chance for a Qt guy to code Java actually is quite small. It is due to the proportion of Qt expertise VS Java expertise in the world. Qt guy know what Java is, but I can tell you that > 50% Java guy may even dont know what is Qt.

As a result, QtJambi is a great product, but since most of the Java guy in the world dont know Qt, and they are already familiar with SWT/Swing/AWT and they also have a large community for these 3 tools. Are you guy sure they will really look at QtJambi?

This is just my 2 cents. Thanks.


Eaxctly. I spent the last 7 of the last 8 years developing in-house apps with Visual FoxPro. A couple of years ago my employer, not wanting to get locked into VISTA, decided that it would be good if our tools and apps were platform neutral, so I was assigned the task of finding good crossplatform development tools and languages. (Java, Python, Ruby, C++) (JDev, Eclipse, JBuilder, Netbeans, Oracle HTP.P, Boa Contructo, MSVSC++2003 and and several others.)

JDev/Java was a total washout. I learned to hate Java. Python was easy but has scope problems. Boa_Constructor is a useable GUI RAD tool for Python but its development cycle is too slow and there are deployment problems. Oracle HTP.P is fantastic, but web based applications are not too good for clerks who have registered machine-guns for fingers.

Although I hadn't coded in C/C++ in years, my search ended quickly when I encountered QT/C++. I had my test app up and running in 1/3 the time it took me to get the JDev/Java version only 90% done.

I'm the only one out of 15 developers in our department who programs using C++, so my boss is happy with the prospect that we can use the QT API/Designer will using Java as the language. What has amazed me, however, is that I can see very little difference between coding MVC with QT/C++ and coding MVC with QTJambi/Java. ;)

Brandybuck
11th August 2006, 20:21
1. Can I desing my form in QT Designer and use .ui files with Java/Jumbi?
Yes.


2. How does work binding Java to QT? I need installed QT4-libs on each computer where I launch my class?
I believe you need to install Qt4 on each computer. I'm not sure of the exact logistics. It sounds like a pain, but not nearly the pain of installing a JRE on each computer. :-)


3. Is it ready for use now? Or is it a deep beta?
It's in "technology preview" beta. t's usable, but expect some bugs. Only the brave should consider it for production use. However it is suitable for previewing the technology. You don't have to wait for the final release before learning how to use it.


4. Is Jambi free for non-commercial using?

It will be free for Open Source. Just like Qt.

See the FAQ for more information. http://www.trolltech.com/developer/faqs/Qt%20Jambi

Brandybuck
11th August 2006, 20:41
As a result, QtJambi is a great product, but since most of the Java guy in the world dont know Qt, and they are already familiar with SWT/Swing/AWT and they also have a large community for these 3 tools. Are you guy sure they will really look at QtJambi?
The goal isn't to get every Java developer using Jambi. If you don't want to use it you don't have to. Leave world domination goals to Windows and Linux :-)

As a professional Qt developer, I can tell you that there is a huge demand for this out in the real world. Trolltech didn't do this on a lark, they did it because their customers kept asking for it.

Mr_Blonde
15th September 2006, 10:40
I can only speak for myself but have to say that I absolutly do not like SWT/AWT/Swing. I am fine with Java though. I started with Qt/C++ some years ago and had to do some Java stuff lately (espacially developing Web Service clients and server).

I got my hands on Jambi 3 days ago and like it so far. For me it combines a great GUI framework with the benefits of Java.

And back to the topic: I also vote for a Jambi section. :-)

wysota
16th September 2006, 01:27
And back to the topic: I also vote for a Jambi section. :-)

We've started discussing forum structure changes and I'm sure we'll be considering creating some dedicated place for things like Jambi too, although probably not a pure Jambi-only section. I think we still have some time before Jambi goes out of alpha stage.

Mr_Blonde
16th September 2006, 21:21
Works for me. Maybe you can devide it into 'Qt - C++' and 'Qt - other funny flavours' ;-)

miketech
29th September 2006, 17:27
The goal isn't to get every Java developer using Jambi. If you don't want to use it you don't have to. Leave world domination goals to Windows and Linux :-)

As a professional Qt developer, I can tell you that there is a huge demand for this out in the real world. Trolltech didn't do this on a lark, they did it because their customers kept asking for it.

Well, now there is QtJambi nearly the final release, but I don't see anybody really being interested in it :confused: So where are all those customers, who wanted to have a Qt for Java? :)

But I have to agree, that most java developers don't know Qt. They have SWT, AWT and Swing and SWT looks native on all platforms. And it is for free instead of Qt, if you don't wanna write GPLed software.

There isn't really interest in Qt# for .NET too. Although it should work with mono on all platforms too and C# is a really nice language. Why isn't there any interest for this? Are there similar reasons?

Greetings

Mike

high_flyer
29th September 2006, 19:05
Oracle HTP.P is fantastic, but web based applications are not too good for clerks who have registered machine-guns for fingers.
I love that description :)

Brandybuck
29th September 2006, 19:48
Well, now there is QtJambi nearly the final release, but I don't see anybody really being interested in it :confused: So where are all those customers, who wanted to have a Qt for Java? :)
The names of those customers are confidential. I can say, however, that one is major chip manufacturer, and one is a large aerospace company.

They are excited about Jambi because they can get different development groups working together on the same projects. It probably won't be used in a pure-Java shop, simply because it hasn't been blessed by McNealy, but most companies are mixed environments. Because it's not a scripting language, Jambi won't be quite as popular as PyQt, but it will still be warmly welcomed.

Companies that don't already use Qt aren't going to be interested in Jambi. But a lot of companies that do use Qt will be. Get out into the real world and look at Trolltech's customer base. The only one's I've seen that aren't interested are those that aren't using Java somewhere inhouse.

miketech
29th September 2006, 23:03
Hi,

ok we will see, how QtJambi will evolve. I already tried the webstart demo, which has been very amazing. And I favor Java over Python :)

I've already tried the Qt designer in eclipse. Very nice too. But why should I use Qt instead of e.g. SWT or Swing when I start a new java project? Ok, I know the API of Qt, but there are many things in Qt I don't need again, because I have them already in Java. In C++ it makes sence, because the standard doesn't offer many technologies. But in Java I already have sockets, threads, xml parsing ...

Greetings

Mike

wysota
29th September 2006, 23:41
And I favor Java over Python
Poor you :) Maybe you'll walk out of darkness one day. :D


Ok, I know the API of Qt, but there are many things in Qt I don't need again, because I have them already in Java.
Java is only a language and provides only the basics. Correct me if I'm wrong but things like SWING are not part of the language specification but rather an external component (a framework, like Qt is).


In C++ it makes sence, because the standard doesn't offer many technologies. But in Java I already have sockets, threads, xml parsing ...

Many things will work better/faster than using "native" (look above) Java components, as a big part of them is compiled into binary and not interpreted. Apart from that, you can easily port C++/Qt code into QtJambi code and have a working Java-based application. Try "easily" porting SWING based code to C++.

miketech
30th September 2006, 00:05
Poor you :) Maybe you'll walk out of darkness one day. :D


Personally I like strongly typed programming languages. And if I wanna use a scripting language I favor ruby over python :)



Java is only a language and provides only the basics. Correct me if I'm wrong but things like SWING are not part of the language specification but rather an external component (a framework, like Qt is).



Many things will work better/faster than using "native" (look above) Java components, as a big part of them is compiled into binary and not interpreted. Apart from that, you can easily port C++/Qt code into QtJambi code and have a working Java-based application. Try "easily" porting SWING based code to C++.


Hm, java isn't interpreted.

Imho it is only a matter of choice. Let's see what the future brings.

Greetings

Mike

wysota
30th September 2006, 01:35
Hm, java isn't interpreted.
Oh, really? That's something new... What CPU family do you use? AFAIK no current processor familiy runs java code natively - they all need a virtual machine... But hey, that's great news, if that's true maybe java applications will move from TurtleSpeed mode to CheetahSpeed mode soon!

Sorry for being ironic :)

Brandybuck
30th September 2006, 01:38
Hm, java isn't interpreted.
Neither is it native code. It's compiled into byte code which must be run a virtual machine. Even with the JIT compiler, most of the program is still byte codes being interpreted in the virtual machine. You simply can't get the performance with Java that you can with native code.