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 ... 3 4 5 6 7 8 9 | » ]
Tim Nash

Posts: 11
Nickname: tim99
Registered: Apr, 2005

Re: Hybridizing Java Posted: Feb 2, 2007 4:07 PM
Reply to this message Reply
Advertisement
Jeffry,
One last detail question ...

According to this blog entry

http://weblogs.macromedia.com/lin/archives/flex/security/index.cfm

the combination of https/no-cache/Internet Explorer along with flex is a problem. So it seems patient data would need to be cached to work with IE. If there were a way to explicitly delete that cache on browser exit, all would be well.

BTW, so far I'm lovin flex!

Fabrizio Giudici

Posts: 14
Nickname: fgiudici
Registered: Jan, 2007

Re: Hybridizing Java Posted: Feb 2, 2007 4:39 PM
Reply to this message Reply
I know practically nothing about JavaScript / EcmaScript. Question: does it support multithreading? What about ActionScript?

James Ward

Posts: 42
Nickname: jlward4th
Registered: Jun, 2006

Re: Hybridizing Java Posted: Feb 2, 2007 4:43 PM
Reply to this message Reply
> I know practically nothing about JavaScript / EcmaScript.
> Question: does it support multithreading? What about
> ActionScript?

Neither the Browser's JavaScript interpreters, nor Flash's VM are currently multi-threaded. Thus there is no way to create a new thread. However I've done some pretty crazy stuff with multiple IE windows (what are separate threads). :)

Fabrizio Giudici

Posts: 14
Nickname: fgiudici
Registered: Jan, 2007

Re: Hybridizing Java Posted: Feb 2, 2007 4:50 PM
Reply to this message Reply
Hmm... I'm not wondering about multiple windows and such, but for genuine multithreading. As a lot of people is talking about multithreading as a mandatory practice to enhance in the next few years to deal with multicore computers, this looks like a serious limit of Flex... :-) I'd just point out that multithreading in Java is rather simple.

James Ward

Posts: 42
Nickname: jlward4th
Registered: Jun, 2006

Re: Hybridizing Java Posted: Feb 2, 2007 4:55 PM
Reply to this message Reply
> I'd just point out that multithreading in Java is rather
> simple.

Agreed that as multi-core processors become more common the Flash VM will need to support threading in some form. However, even though creating a thread in Java is simple, using threading correctly in GUI applications is very, very difficult. BTW: I still use Java on the back-end where multi-threading is a must.

Fabrizio Giudici

Posts: 14
Nickname: fgiudici
Registered: Jan, 2007

Re: Hybridizing Java Posted: Feb 2, 2007 5:06 PM
Reply to this message Reply
I agree that multithreading issues with Swing are to be considered, there's all the stuff about the event dispatcher thread. But the point is that is possible and indeed doing the right thing just requires a bit of discipline. Furthermore new JSR and RCP frameworks such as NetBeans (and I believe also Eclipse) simplify some parts of programming with regard to the proper handling of asynchronous events.

In the end I'd say that if we're looking just at a client application that works as a rich, but dumb, interface to a backend service, the lack of multithreading is not an issue and Flex would be adequate. But if I need to create a more complex application with a lot of local computing, today's Flex would not be ok. I imagine that Adobe will be researching to introduce genuine multithreading for Flex in the near future.

Mark Nuttall

Posts: 13
Nickname: mnutty
Registered: Jan, 2007

Re: Hybridizing Java Posted: Feb 2, 2007 5:26 PM
Reply to this message Reply
> It would
> be great if Healthcare applications could use Flex because
> the industry really needs well designed user interfaces.
Tim,
I am building Health Care Applications. And I am using Web Started Swing applications. And thus no data is cached on the client. And the clients love it because it is not a web app. They also love it because it pulls multiple datasources together.

But I am interested in what Flex can do in the way of creating nice UIs quickly. I would like to see a complex application done in it tough before I take the leap.

Mark Nuttall

Posts: 13
Nickname: mnutty
Registered: Jan, 2007

Re: Hybridizing Java Posted: Feb 2, 2007 5:28 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.

Then it is a lot more secure. HTML is normally cached and a history of "where you went" is kept.

Dean Schulze

Posts: 3
Nickname: dwschulze
Registered: Feb, 2007

Re: Hybridizing Java Posted: Feb 3, 2007 8:02 AM
Reply to this message Reply
Nice summary of web UI technologies.

I'm a J2EE developer with 3 years of Struts and 2 years experience developing rich interfaces in Swing. I've been using Flex for 3 months now, and what I've seen so far worries me.

MXML seems adequate for layout, but you have to do a lot of trial and error to get dynamic layouts to work right (like you have to do in Struts). ActionScript, on the other hand, is a hackers language and it's going to lead to a lot of poorly designed, bloated, and difficult to maintain code.

The Flex class libaries seem to have no underlying coherence to them. Can you look at the Flex class libraries and tell me that they are a well designed, well abstracted class library?

I also haven't seen any interest in the Flex community in the use of design patterns and the Flex code I've seen reflects this lack of interest in design. It's easy to create inheritance hierarchies in Flex that are poorly thought out, but I have yet to see adherence to OO principles like programming to interfaces and using delegation rather than inheritance. How many Flex developers even know what these principles are and why they are important?

Bruce, if you're going to work with Adobe to teach people about Flex I hope you can serve as an evangelist for the adoption of solid OO principles and design patterns in Flex applications. I hope ActionScript isn't too much of an obstacle.

Flex Builder is a nice tool that helps catch problems, but there are still lots of problems that don't appear until runtime (think of ClassCastExceptions). Flex builder also requires you to restructure your project so that the Flex code is at the top level. That aspect of Flex Builder needs to be re-architected.

If Java's weakness is its lack of multimedia support and Flash's strength is that it has solved the installation problem then what we really need is a third party library for Flash multimedia support in Java. Then convert the Java bytecodes to a Flash binaries. You get to leverage Java programming knowledge, stricter type dhecking and a language better suited to OO principles rather than a scripting language that encourages hacking.

James Ward

Posts: 42
Nickname: jlward4th
Registered: Jun, 2006

Re: Hybridizing Java Posted: Feb 3, 2007 8:37 AM
Reply to this message Reply
> I also haven't seen any interest in the Flex community in
> the use of design patterns

You should look into Cairngorm. It's essentially the Core J2EE patterns applied to Flex applications:
http://labs.adobe.com/wiki/index.php/Cairngorm

Jeff Ratcliff

Posts: 242
Nickname: jr1
Registered: Feb, 2006

Re: Credibility Posted: Feb 3, 2007 10:39 AM
Reply to this message Reply
> 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?

It's not that Sun isn't allowed to have do overs, it's that Sun won't actually perform the do overs.

Has the Classpath become optional?
Can you name the file independently of the class now?
Have checked exceptions become optional?
Has type erasure been erased?

Sun may have good reasons not to change things, but you can't get credit for changes/improvements that you haven't made.

Etienne Pallier

Posts: 1
Nickname: steven7
Registered: Feb, 2007

Re: Hybridizing Java Posted: Feb 5, 2007 3:13 AM
Reply to this message Reply
Hello Bruce,

I was interested to know your opinion about just one option you did not (directly) mentioned and which (to me) might be as interesting as Flash, I mean "XUL" (from Mozilla).
(http://www.mozilla.org/projects/xul/)
It allows easily to make a unique GUI which works both on the web and on the desktop (with a runtime like apollo for Flex), and it is mainly XML, so a well-known standard.
I know that you may argue what you already said in your article, that this has the limitations due to html/xml/javascript... and the like, but I would have liked at least that you mention it and say what you think of it.
Thank you in advance.

Etienne

Fabrizio Giudici

Posts: 14
Nickname: fgiudici
Registered: Jan, 2007

Re: Credibility Posted: Feb 5, 2007 3:32 AM
Reply to this message Reply
> It's not that Sun isn't allowed to have do overs, it's
> that Sun won't actually perform the do overs.
>
> Has the Classpath become optional?
> Can you name the file independently of the class now?
> Have checked exceptions become optional?
> Has type erasure been erased?
>
> Sun may have good reasons not to change things, but you
> can't get credit for changes/improvements that you haven't
> made.

First, the whole examples are meaningless, since we're talking about Swing and not the Java language. While Swing did really have problems in its early life, the Java language works very well. For instance, a lot of people do appreciate checked exceptions and so on. Coming back in topic, for what concerns Swing Sun has _already_ performed some do over, and in fact Swing is today perfectly usable in areas, such as native l&f rendering and performance. There's the installability issue - but I'd like to _really_ know if today installing a JRE via Java Web Start is really harder than installing a Flash/Flex runtime...

Jeff Ratcliff

Posts: 242
Nickname: jr1
Registered: Feb, 2006

Re: Credibility Posted: Feb 5, 2007 7:21 AM
Reply to this message Reply
> First, the whole examples are meaningless, since we're
> talking about Swing and not the Java language.

Sorry, but you're wrong. I was responding to a post that claimed that MS get's to do "do-overs", but Sun doesn't. Swing had nothing to do with the comparison.


While Swing
> did really have problems in its early life, the Java
> language works very well. For instance, a lot of people do
> appreciate checked exceptions and so on.

I was just illustrating Sun's reluctance to change some of their more dubious decisions even when there's a lot of community interest in doing so. I'd be surprised to find many Java programmers who think Sun made the best decisions on all the items on my list.

Coming back in
> topic, for what concerns Swing Sun has _already_ performed
> some do over, and in fact Swing is today perfectly usable
> in areas, such as native l&f rendering and performance.

OK, let's talk about Swing then. Just about everything I've read about multi-threaded programming says that it's often useful, but that you should avoid it if it really isn't necessary. The design of Swing forces you into multi-threading even when there's really no good reason for it. Has this been changed?

The point is that although Sun does adds functionality to Java and works to improve performance, it really doesn't go back and rework the fundamentals even when there are flaws.

Again, they may have their reasons, but they aren't being treated more harshly than any other vendor.

nopar

Posts: 1
Nickname: nopar
Registered: Sep, 2005

Swing on top of Flash Posted: Feb 5, 2007 8:06 AM
Reply to this message Reply
What would be great is to have the Swing API on top of a Flash Runtime, with its components and layout managers.
Actually, all we have to do is code a Graphics object using the Flash ActionScript API instead of Java2D.
..a kind of ActionScript Swing, we could call it ASwing.

JavaDoc page: http://doc.aswing.org/api/
Home: www.aswing.org (site down this week)

Flat View: This topic has 129 replies on 9 pages [ « | 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