The Artima Developer Community
Sponsored Link

Weblogs Forum
Hybridizing Java

129 replies on 9 pages. Most recent reply: Mar 18, 2011 1:41 PM by David Benson

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 129 replies on 9 pages [ « | 1 ... 2 3 4 5 6 7 8 9 | » ]
Mark Fortner

Posts: 1
Nickname: mfortner
Registered: Feb, 2007

Re: Hybridizing Java Posted: Feb 2, 2007 8:48 AM
Reply to this message Reply
Advertisement
"OpenOffice is not written in Java, but in C++. I don’t believe it was because the programmers wanted to struggle with the cross-platform issues presented by C++. It was speed, and perhaps the need to more directly control the underlying platform."

I was briefly involved in the Open Office discussion concerning the adoption of a different toolkit for Open Office 's Visual Class library.

At the time I was advocating Swing, while others were advocating Qt and GTK (among others).

The primary reason for NOT adopting Swing was the fact that (at the time) Java was not open source. And the limited usage that Java had within Open Office was causing licensing problems.

The other problem was that having your graphical toolkit in another language would complicate writing and debugging. Most of Open Office is still written in C++ and will likely stay that way.

The most recent discussions that have the chance of changing this is the start of the ODF Toolkit project which proposes to create a library for creating and modifying Open Office documents. However, for the time-being this will also require developers to use the UNO runtime library which is a native library. Most of the usecases that they are planning to support involve server-side generation of Open Office files.

There is however, a compelling reason to have Java-based version of Open Office -- namely that enabling Java desktop applications to read/write/render Open Office files is as useful to Java developers, as the equivalent MS Office components are to C# developers.

Frank Sommers

Posts: 2642
Nickname: fsommers
Registered: Jan, 2002

Re: Hybridizing Java Posted: Feb 2, 2007 8:53 AM
Reply to this message Reply
> I just don't get this. I have a Web Started Swing app. It
> was developed to run on one machine and using Spring
> Remoting was able to get it remoted in <1 day. I think the
> real problem is that people are not familiar with Swing
> and with all the things possible with Java.

That's good to know, as I haven't used Spring RCP yet. It sounds interesting. I obviously can't comment on Spring RCP, but I have looked into the NetBeans RCP, and I have to say that that's rather complex, as it is now. It sounds like Spring RCP is a lot simpler to grok.

Frank Sommers

Posts: 2642
Nickname: fsommers
Registered: Jan, 2002

Re: Hybridizing Java Posted: Feb 2, 2007 9:24 AM
Reply to this message Reply
> Being the same "standard" is not the same as being the
> same language.
>
>
> > I have wondered myself how hard it would be to do a GWT
> > type thing for Flex. Done best it would re-use the
> Swing
> > API instead of coming up with another GUI API (like
> GWT).
> > Write Swing -> custom compile -> output Flex. Could be
> > e interesting.
>

Actually, ECMAScript 4 will eventually be supported by the major browsers, but that'll probably take years to happen. The differences in the DOM (for good reasons) may be a bigger beef for people wanting to move between ActionScript/Flex and JavaScript/Ajax. So, for practical purposes, Flex does seem to be a different environment/language.

Personally, at the end of the day, I think we need to consider what solution would make our clients the happiest whether we toil for an employer or work as a consultant. If providing that solution means learning a new language, I'm happy to do that any time, but the benefits have to be there.

For a client/GUI environment, my experience is that most clients want something that:

1. Can be implemented quickly.
2. Provides no hurdles for a user to start using it
3. Provides some "wow" factor, i.e., looks pretty good and modern.
4. Is fast.

To these could be added another requirement, one Bruce mentioned in his blog:

5. Can be used both inside a browser and in desktop apps.

From my experience at least, if Swing is to provide (3), it has a hard time providing (1) and (2). I'm pretty sure that this situation will change, but that's just my experience with it now. In other words, using the defaults and relying mainly on JDK-based classes, and some IDE support, it's possible to build a Swing app quickly, and one that performs well.

But it won't look very nice (e..g, most everyone now uses LCD screens, and Swing in JDK 6 looks great on LCDs - but most people have some pre-JDK 6 JRE installed, and that means they'd now have to install JRE 6, which goes against desires #2). To use some of the fancy drawing, etc. capabilities in Swing, you need to know a lot about providing custom painting for your components, but I think that requires a skill set not available to many enterprise developers who just want to put a nice GUI on front of a business app. And to make your app perform well, you really need to understand how to use the event handling thread and ensure that you only update component state from that thread, and perform all other work in other worker threads. Yes, that can be done but, again, it's something you need to keep in mind, need to test and debug - again, that goes against desire #1.

To be fair, Swing is no longer just the JDK-provided classes - SwingLabs and some other projects (JGoodies, for instance) are important parts of Swing that solve some of these problems.

And once you overcome the JRE install issue, Swing definitely works very well both inside the browser and on the desktop.

It could well be that Flex (or any GUI toolkit) has the same issues.

John Groppe

Posts: 1
Nickname: jgroppe
Registered: Feb, 2007

Re: Hybridizing Java Posted: Feb 2, 2007 11:34 AM
Reply to this message Reply
Testing

Great post Bruce, however you left out one vital area, testing. Does flex have any automated client side / end user / gui testing tools? I know testing frameworks are usually provided by a third party. Sun never made anything for AWT or Swing.. (I tried Mercury’s java tools a couple years ago and they were miserable). It took several years before we got something decent like Selenium on the web/AJAX front.

So what’s the testing story for Flex? You may no need such a tool for tiny apps that individual’s put together. But if I’m going to convince my manager to switch to Flex, I’ll need a better answer than, “wait and see”.

p.s. Thanks for all the books.

Bill Snyder

Posts: 3
Nickname: wsnyder6
Registered: Feb, 2007

Re: Hybridizing Java Posted: Feb 2, 2007 11:38 AM
Reply to this message Reply
Lots of interesting stuff here.

The following is over-stated :

"And you can’t deny that Flash produces very pleasing user interfaces"

Flash facilitates[b/] the creation of very pleasing user interfaces. Usability and good graphical design are ultimately a product of the designer/developer - NOT the toolkit - whether its Flex, Swing, or AJAX.

--Bill

Bill Snyder

Posts: 3
Nickname: wsnyder6
Registered: Feb, 2007

Re: Hybridizing Java Posted: Feb 2, 2007 11:39 AM
Reply to this message Reply
Doh.

James Ward

Posts: 42
Nickname: jlward4th
Registered: Jun, 2006

Re: Hybridizing Java Posted: Feb 2, 2007 12:29 PM
Reply to this message Reply
> Does flex have any automated client side / end user / gui
> testing tools?

There are free unit testing frameworks and an automated testing Mercury plugin. Find out more about the Flex Automation Package here:
http://www.adobe.com/products/flex/productinfo/faq/#item-40

Doug Erickson

Posts: 2
Nickname: erickson
Registered: Feb, 2007

Re: Hybridizing Java Posted: Feb 2, 2007 12:48 PM
Reply to this message Reply
Your disclosure of potential conflict should be at the top of the article, not sprung on readers after you've hooked them.

Nevertheless, flex does sound intriguing. Maybe it's time to give it a look. Free (as in beer) tools are crucial.

Mark Nuttall

Posts: 13
Nickname: mnutty
Registered: Jan, 2007

Re: Hybridizing Java Posted: Feb 2, 2007 1:26 PM
Reply to this message Reply
> That's good to know, as I haven't used Spring RCP yet. It
> sounds interesting. I obviously can't comment on Spring
> RCP, but I have looked into the NetBeans RCP, and I have
> to say that that's rather complex, as it is now. It sounds
> like Spring RCP is a lot simpler to grok.
I wasn't refering to Spring RCP. Just Spring Remoting. But aside from that, Spring RCP, Netbeans RCP and Eclipse RCP provide much more than what Flex2 and RoR and etc currently provide. There is also the Application Framework to look at too.

I am not saying Flex2 is bad. I am looking at it. But I have built plenty of Rich Client type interfaces (in VB, C#, PowerBuilder, Java, ...) and have build browser ones too. I have found that complex declarative UIs are difficult to build and maintain.

Mark Nuttall

Posts: 13
Nickname: mnutty
Registered: Jan, 2007

Re: Hybridizing Java Posted: Feb 2, 2007 1:41 PM
Reply to this message Reply
> And to Mark Nuttall, who wrote, "I just don't get
> this. I have a Web Started Swing app. ... I think the real
> problem is that people are not familiar with Swing and
> with all the things possible with Java." This is kind of
> funny. Are you putting Bruce in that camp of folks "not
> familiar with all things possible with Java"? :-) We don't
> know each other, so I mean no offense if "of course you
> do", but it just surprises me if you're arguing that the
> blog entry's author is of that camp. Bruce is a legend to
> many in the Java world.

Well, when you put it in that light, it does seem funny. :)

I was really responding to the other person's post. I really do agree with Bruce on a lot of things (not that my agreement counts). I need to go back an look at what Bruce said about Swing. And then comment further. A quick look though makes me think this comment really wasn't about him.

But even so, technology moves fast and there is a lot of it. It doesn't take long for someone to miss something. And we all have our own set of experiences. From my experience, declarative GUI design and resourced based GUIs are a pain. But that is based on the types of applications I build.

> Just to inject some levity (again, no offense to Mark),
None taken. :) Love the commercials.

Chris Adamson

Posts: 4
Nickname: invalidnam
Registered: Jan, 2007

Credibility Posted: Feb 2, 2007 2:11 PM
Reply to this message Reply
One of the points that hasn't been talked up in the comments is Bruce's point about credibility. To wit: It’s not impossible to build GUI applications with Java, but it’s been 10 years and there are still installation hiccups with applets, Java WebStart, and regular applications. After 10 years, people don’t trust it anymore.

That's a pretty key point because regardless of the technical or political (ie, proprietary vs. open-source) points in this debate, developers seem to be saying they're not going to go back to a party that's let them down in the past. Troubled or utterly failed AWT and Swing projects in the late 90's seem to still linger over Swing in this decade (except, of course, for the true believers who think that Swing hasn't even begun to be adopted or appreciated).

On the other hand, though, it's widely believed that every 1.0 Microsoft puts out is terrible, but they keep working at it, and everyone fears what'll happen when they hit stride around 3.0. So why is it that Microsoft gets do overs and Sun doesn't?

I've got no answers. It's just an interesting set of behaviors.

Fabrizio Giudici

Posts: 14
Nickname: fgiudici
Registered: Jan, 2007

Re: Credibility Posted: Feb 2, 2007 2:17 PM
Reply to this message Reply
Well, probably the fact that they control a desktop operating system, and Sun doesn't, is one of the points... :-(

Tim Nash

Posts: 11
Nickname: tim99
Registered: Apr, 2005

Re: Hybridizing Java Posted: Feb 2, 2007 2:24 PM
Reply to this message Reply
I watched the turbogears demo and I am impressed. It would be great if Healthcare applications could use Flex because the industry really needs well designed user interfaces. Can the Flex data services be made secure? Can the data cache be flushed off the client machine? (HIPAA fears)
The pricing for Flex Data services seems fair, but I wonder if sites are able to achieve significant growth (viability) before performance issues force them to purchase the enterprise license.

Hello SUN! Maybe you should transform applets into a flash clone that is scriptable with java. The competition would be good for everyone.

Jeffrey Vroom

Posts: 1
Nickname: jeffvroom
Registered: Feb, 2007

Re: Hybridizing Java Posted: Feb 2, 2007 2:46 PM
Reply to this message Reply
Data kept on the client side with Flash/Flex is typically only kept in the Flash player's memory. As soon as your browser exits, all of that data is gone so it ought to be no less secure than an HTML page. Flash does have a cookie-like mechanism called "local shared objects" which can be used to persist data on your local machine but you would not use that for any patient data or anything like that. Flash has really grown up over the years and now is used in many mission critical applications in healthcare, financial services, and government all concerned with data security. See the customer list on Adobe's site for a detailed list if you are interested:

http://www.adobe.com/products/flex/customers/customer_list.html

The number of users/CPU you can support for an FDS application varies quite a bit based on the application but usually there is less server load than a similar HTML app since the server does not have to generate the HTML. We use efficient binary protocols that use object serialization so there is no parsing overhead for incoming form data as well.

Fabrizio Giudici

Posts: 14
Nickname: fgiudici
Registered: Jan, 2007

Re: Hybridizing Java Posted: Feb 2, 2007 2:52 PM
Reply to this message Reply
> Hello SUN! Maybe you should transform applets into a flash
> clone that is scriptable with java. The competition would
> be good for everyone.

I suppose that the problem is not here: in facts, it's perfectly possible to write cool applets. Look here for example: http://blogs.sun.com/chrisoliver/entry/more_f3_demos

I think that everything boils down to the installation thing.

Flat View: This topic has 129 replies on 9 pages [ « | 2  3  4  5  6  7  8  9 | » ]
Topic: Scala 2.8.0 + Lift 2.1 + IntelliJ: First Step(s) Previous Topic   Next Topic Topic: Security Debt

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use