Flex 2 應用說明訪問

In flex   June 21, 2006 - 3:46 pm

FDS 產品線的負責人 Jeff Vroom 日前接受了 TheServerSide.com 的採訪,由於 TheServerSide 是 Java user 的大本營,因此這場採訪很像是在跟 java developer 說明 Flex 是什麼之類的入門簡介。

這段訪問可在上述的位址看到(提供 real video 與 windows media兩版本)。

下面是該訪問中所提的問題:
(每一題看起來都很有趣,主持人,呃,或是助理,真正有用心啊)

1. Welcome Jeff. Can you tell us little bit more about yourself and what you do at Adobe?

2. Could you describe how Flex technology works both the client and server perspectives?

3. Flex Technology uses ActionScript. Why would a developer choose to use ActionScript over say Java or JavaScript?

4. Great, so how prevalent is Flash support in browsers today?

5. AJAX has gained a lot of momentum in the last two years. Why would developers choose to use Flex instead of building their applications using AJAX?

6. Is tight coupling between the Flash client and the Flex server?

7. Can you describe how to implement a server push of messages in J2EE?

8. Can Flex also integrate with JMS topics and queues?

9. Can you talk a little bit about how Flex integrates with technologies like Spring and Hibernate?

10. So the abstraction and I guess synchronization between clients happens within Flex?

11. Are you doing anything with JSF and Struts?

12. We seem to be returning to the thick client approach of the 90s. What are we doing differently this time versus how we built thick clients in the past?

13. Does this new rich client paradigm mark the death of browser-based applications? What types of apps are good for the browser what types of apps are probably best left outside of the browser?

14. What types of applications would benefit from the use of Flex 2.0?

15. Now, have you worked with any sort of customers that are in the process of implementing Flex 2.0?

16. When can we expect the final version of the Flex 2.0 and Flash 9?

17. How is Adobe balancing the need of its large enterprise customers and the smaller developer shops that tends to use more open source software?

18. What are some of the challenges of clustering Flex applications?

19. Where does Flex fit in into the world of Web 2.0?

20. You mentioned that there is tight coupling between the Flex client and the server. For developers building applications using Web services and those building out their service-oriented architectures, how does Flex fit into that paradigm?

21. Are there any performance implications to using Flex versus Ajax?

22. Are more people transitioning their existing J2EE applications to Flex 2 in order to add more rich UI functionality or are people embracing Flex as a way to build their applications from scratch?

23. Do you have any final words of advice for Web developers out there?

花了快半小時聽完一遍後,才發覺旁邊有個 transcript 把內容都寫出來了,有大陸地區的網友說無法連線觀看,因此下面列出全文。

=== begin transcript ===

00:00:07
1. Welcome Jeff. Can you tell us little bit more about yourself and what you do at Adobe?

Jeff Vroom: Sure, I work in the Flex Data Services group. Flex is a technology that produces Rich Internet Applications that run in the Flash player. We are currently working on Flex version 2, which runs in Flash player version 9 that’s going to be released soon. In Flash Player 9, there is a new version of ActionScript: ActionScript 3, which is significantly faster and more efficient than player 8. Some benchmarked this as an order of magnitude faster. It supports compile-time type checking, introspection, packages, interfaces, all of the things that I think really fix a lot of the problems we had with JavaScript. It also comes with a plug-in to Eclipse, so that you now have structured code editing, , rich code navigation facilities, things like that and a nice visual debugger. The part I work on is Flex Data Services and this is connecting Flex clients to Java J2EE servers. We have WAR file that you drop into your J2EE application. It gives you some nice features for communicating with Flex clients.

00:01:17
2. Could you describe how Flex technology works both the client and server perspectives?

Jeff Vroom: Sure, sure. On the client, Flex is about building really rich user interfaces. We have a complete set of UI controls with style sheets, layout constraints, transitional effects and of course with the flash player you’ve got tremendous graphics, video, audio, all those things, so Flex Data Services adds client server communication features. So you can use SOAP or REST to call your existing Web services applications. With Flex Data Services, we also have a remote object facility. So, you can directly call Java methods on J2EE servers very efficiently using a binary protocol, so that gives you some nice power, I mean a sort of publish/subscribe messaging system so that you can actually push messages directly to browser apps and you now have clients communicate directly.

The other thing that Flex Data Services provide is the data management facility, which is a declarative persistence framework that lets you serialize graphs of objects to the client and then it detects changes automatically as you modify those objects, builds up a set of change lists and when you commit your changes, those changes are sent to the server where we do conflict detection. If there are no conflicts and the server can accept the changes and it pushes the data out to the other clients, which are looking at the same data sets. So, this kind of eliminates a lot of glue code that you need when building kind of thick client-based applications.

00:02:49
3. Flex Technology uses ActionScript. Why would a developer choose to use ActionScript over say Java or JavaScript?

Jeff Vroom: Yeah, Java is a great programming language and I think for serious programmers and for applications on the server, where you need multi-threading, you know, it’s really the best option out there, but for business programmers and for people that maybe are more focused on design, some of the concepts in Java, particularly, multi-threading and synchronization, I think, make it hard for those people to consume and collaborate than with these less-skilled programmers. So, with ActionScript, it’s a singly threaded model like JavaScript, where none of them causes to block, it’s very asynchronous. So, when you make a call that needs to be asynchronous, you get a call back handler, that will then handle the results of that operation, so this is a much more efficient way of building applications for people that are less skilled and when you only have a single user I think that programming model is simpler.

The other thing that Java or JavaScript has is lots of productivity problems in terms of portability and does not have nice typing and things like that. In ActionScript 3 we have addressed those problems as well. The other thing that neither Java nor JavaScript really address is a sort of third class of programmer, which are those that are even less skilled than the script programmers and they really can’t deal with dynamic state, they like to add a declarative markup language like HTML, so we have that MXML language, which is also a declarative way to represent some of the coding in your application and the Eclipse plug-in gives you a structured editor for MXML and design view which lets you drag and drop components from a UI palette. You can interactively build these and this I think really gives you a great designer-developer-serious programmer workflow.

00:04:51
4. Great, so how prevalent is Flash support in browsers today?

Jeff Vroom: It depends on the version, but Flash is really in about almost all the browsers out there, some version of Flash and the adoption curve is very quick for Flash 8, which we released in September is already in about 60% to 70% of the browsers out there. So we have a very quick uptake with Flash.

00:05:23
5. AJAX has gained a lot of momentum in the last two years. Why would developers choose to use Flex instead of building their applications using AJAX?

Jeff Vroom: Well, first of all, I don’t think it’s really an either or choice because you can call JavaScript from ActionScript and vice versa so you can use Flex for anything from a small widget on your existing page to a complete user interface with many tabs and lots of forms and menus, so but I think the issue with JavaScript, I mean portability problems I think, are a huge problem and we also don’t have great client server connectivity. With Flex you have got a server push and some of these other features and it also scales better when you get to large applications.

00:06:19
6. Is tight coupling between the Flash client and the Flex server?

Jeff Vroom: Yeah definitely, I mean, they well — they work well together, but you actually can use Flex clients to talk directly to existing Web services and things like that as well, you don’t need a server to use Flex.

00:06:40
7. Can you describe how to implement a server push of messages in J2EE?

Jeff Vroom: In Flex we actually support two protocols. There is HTTP and RTMP. The HTTP of course now is a one-way protocol where the client always initiates the call so for that we do use a polling mechanism. With RTMP, it’s a protocol that has been used by the Flash Player for quite a while to do audio, video and data synchronization and it provides a persistent socket that the client keeps open with the server, to analyze the server it just naturally push messages to the client in real time. Flex Data Services provides an abstraction layer, so the client does not really need to know, which protocol is he using and it actually fails over from one to the other, so that technique actually makes it easy to build applications that support push even when the user might be applying a firewall and can’t use RTMP.

00:07:33
8. Can Flex also integrate with JMS topics and queues?

Jeff Vroom: Yeah, in the Flex Data Services there is a publish-subscription mechanism and so a Flex client can directly subscribe to JMS Topic or Queue. We also provide kind of dynamic topics because of the nature of Flex clients is they are very dynamic, so you want to be able to create lots of groups of clients for a peer-to-peer communication and things like that, so we have a nice set of publish/subscribers messaging support there.

00:08:02
9. Can you talk a little bit about how Flex integrates with technologies like Spring and Hibernate?

Jeff Vroom: Certainly. Yeah, I am a big fan of both of those types of technologies. I think component frameworks really help you kind of manage your components and extract some clarity of intent, so in Flex Data Services we’ve added a factory facility so that when you want a component, you use this facroty facility and we’ve integrated that with Spring and we integrated that with EJB, so that will allow a client to directly call a remote object kind of Spring component without having the right glue or wrapper code.

For Hibernate Flex’s data management layer has a Hibernate adapter and this allows you to directly expose Hibernate object models directly to Flex clients. So without any coding, Flex clients can execute queries on Hibernate, get back lists or graphs of objects. Using Flex’s data binding support, we listen for changes that you make on the client to those objects, which queue up changes up to the server, commit them to do conflict detection. If there are any conflicts, report those conflicts back to the client, so the client can do either accept server or accept client and then we will also push those changes out to other clients that happen to be looking at that same data. So, this is a very easy way to quickly get your Hibernate models published to Flex clients. Now a lot of people don’t want to expose their Hibernate models directly to the client, so there is a way you can kind of extend that and filter it to restrict the model or add your own security constraints on top of the security constraints which Flex provides out of the box.

00:09:51
10. So the abstraction and I guess synchronization between clients happens within Flex?

Jeff Vroom: Yeah exactly, because we control sort of a client in the server wrapper code, we are able to make that a very efficient process.

00:10:06
11. Are you doing anything with JSF and Struts?

Jeff Vroom: Those technologies are of prespecific to the HTML based form model, where your clients are very loosely connected with your server and certainly Flex can support HTML forms and things like that because you know it can support the HTTP protocol, but if I were writing an application from scratch where I control the client and server code, I would probably just use RPC. I think a lot of the benefits of rich internet applications are when the client is making smaller calls to the server, so it might be validating each form field as the user entered to it rather than waiting for you to press this submit button and then the other factor is that the Model-View-Controller paradigm is really now happening on the client and not between the browser and the server, so I think that kind of changes how the UI model would be structured.

00:11:00
12. We seem to be returning to the thick client approach of the ‘90s. What are we doing differently this time versus how we built thick clients in the past?

Jeff Vroom: Well, I think hopefully, we are finally getting back to the usability of those applications in the ‘90s and I think hopefully we are going to be picking up any of the maintenance and problems that we had with thick clients, like in the thick client world, there typically wasn’t an application tier, so the clients connected directly to the database and that caused scalability problems and contention problems when clients might hold locks to objects and other clients would randomly hang. So, I think the optimistic concurrency approach that we are using is the one that’s probably going to stick around in these thick client apps; this makes conflict action and resolution all that much more important and one of the other reasons why it is good to use a high-level framework.

00:11:56
13. Does this new rich client paradigm mark the death of browser-based applications? What types of apps are good for the browser what types of apps are probably best left outside of the browser?

Jeff Vroom: Flex, right now isn’t as good as HTML at displaying text and we have so much invested in HTML for context formatting and display, that I think applications tend to be very rich in text probably should stay as HTML based apps. If there is a lot of dynamic content, I might put a hidden Flex control on the page and use ActionScript to actually control my HTML UI. I think your ActionScript still has more productivity benefits over JavaScript.

The other challenge that Flex has is sort of integrating with the browser metaphor like the back button and history management and you can do those things with Flex now, but it requires a little bit more work whereas they tend to kind of come more or less for free with HTML based apps. I think search engine indexing is another one of those challenges, which you can again solve with Flex, but it requires a little bit more work.

00:13:03
14. What types of applications would benefit from the use of Flex 2.0?

Jeff Vroom: I think particularly where the user is using the application repeatedly where their productivity is important and where the timeliness of the data is also important. So, things like stock trading, trader desktops, call center applications, where multiple call center reps might be collaborating on solutions to problems and are pulling cases off and sharing them. Those types of things, I think would be much better implemented in a Flex environment than using browser-based apps.

00:13:43
15. Now, have you worked with any sort of customers that are in the process of implementing Flex 2.0?

Jeff Vroom: We’ve got lots of Beta users out there and people are building real world scenarios. Where the beta 3 release we are starting to see some real apps come out of there, but nothing is sort of public or really finished, because the product itself isn’t finished yet.

00:14:09
16. When can we expect the final version of the Flex 2.0 and Flash 9?

Jeff Vroom: We are committed to shipping in the first half of this year, which is real soon now and you can actually kick the tires right now, at labs.adobe.com, there is a Beta 3, which is available for public download and that includes all the technologies I’ve been talking about here and the Flex SDK, the Flex Builder and Flex Data Services.

00:14:36
17. How is Adobe balancing the need of its large enterprise customers and the smaller developer shops that tends to use more open source software?

Jeff Vroom: Yeah, I think we have a nice balance there because we have the SDK, which includes the command line compiler and all the UI tools that’s going to be free and there will be a free version of Flex Data Services that has CPU limits, you know. The Flex Builder is going to be charged kind of like the other Adobe products, you know kind of shrink-wrapped based software, so it is not going to be only priced for enterprises. I think once you get into the large clusters and those types of features, you know that’s where the enterprise pricing starts to kick in.

00:15:22
18. What are some of the challenges of clustering Flex applications?

Jeff Vroom: Flex does support clustering technology very well and when you are starting to deal with client-to-client connectivity, the issues involved include being able to have one client connected to one cluster server be able to push messages to clients that are connected to other servers. So we have technology so that last cluster remembers to exchange messages and push them out to the peers. With the data management services there are also challenges in being able to detect what clients are asked first. Caching certain versions of the data is when one client changes the data, the other clients that are connected to other servers also see those changes and we also support that well. So, the Flex technology should scale pretty well even for the the largest enterprise applications.

00:16:15
19. Where does Flex fit in into the world of Web 2.0?

Jeff Vroom: I think it will play a significant part, it has a lot of dynamic graphics and UI technology, so for people that care about kind of the rich experience, it is definitely a technology to consider. I don’t think it replaces AJAX entirely and yet it interoperates well with AJAX. So, I think you can build those types of applications using HTML UIs, you know very efficiently with Flex and either have an HTML based kind of experience look and feel or a Flash, Flex based look and feel.

00:16:55
20. You mentioned that there is tight coupling between the Flex client and the server. For developers building applications using Web services and those building out their service-oriented architectures, how does Flex fit into that paradigm?

Jeff Vroom: Well, I think Flex actually works really well. With ActionScript 3, there are native XML parsing capabilities built in the language, so if your Flex client is talking to an existing Web service it is actually very easy to code and and all that stuff is compiled into efficient code. I think when you are using Web services you really are focused more on interoperability and sort of a decoupling of the client and the server. If I was building a new application and I control both the client and the server code, I think I would still tend more towards using ActionScript classes calling Java classes on the server. The protocols used there are binary, so there is no parsing involved and there also isn’t the overhead in having to write those wrapper classes that generate the XML formats on both the client and server. So, it is actually easier and more efficient in the development process.

00:18:07
21. Are there any performance implications to using Flex versus Ajax?

Jeff Vroom: We’ve done some comparisons with Ajax and you can pull down 20,000 rows, and display it in a table in under a second with a Flex application. It varies with AJAX. It’s got to send down a complete XML document, parse the XML, turn that XML into HTML and then finally parse the HTML and turn that into, you know, graphics commands. With Flex, we have the binary version, we deserialize it right into a graph, traverse that graph and display the results, so it’s very efficient.

00:18:51
22. Are more people transitioning their existing J2EE applications to Flex 2 in order to add more rich UI functionality or are people embracing Flex as a way to build their applications from scratch?

Jeff Vroom: I think there is really a combination of the two groups. For those that have a lot of existing server side code, you can either take your JSP files and turn them into producing XML and then just have Flex parse that XML and you know, add rich UIs directly on top of that kind of existing infrastructure or you can take that tier, which is just behind the JSP, and expose those as remote objects and have Flex go directly to that layer and I think that layer is going to give people a little bit more of the power Flex because you can improve the number of remote calls and improve the response and the feedback that you give your users because you are interacting at a lower level in your domain model.

But I think Flex is not trying to reinvent the world and we certainly work well in the existing J2EE architecture, so you should be able to leverage a lot of your backend, it is really just that the JSF Struts and JSP layer that you might just kind of pull off and have Flex work right with the layer behind that.

00:20:10
23. Do you have any final words of advice for Web developers out there?

Jeff Vroom: I’ve been working on the tools effort for a long time and so one of my passions is analyzing efficiency of the software development process and trying to make it be as productive as possible and to produce as efficient end-user applications as possible. So, that is really why I was attracted to the Flex team and I think that, you know, with the Flex technology we really have an opportunity to give you a lot of benefits of the rich UI layers without a lot of the pain that you get easily out of existing browser based languages like JavaScript, which tend to be hard to use and I think end up producing applications in my network and all browsers and occasionally have performance problems as they scale and there is no combination step in Javascript, it’s all parsed at one time. So, hopefully, if you’ve got some free time, it is worth checking out Flex and go to labs.adobe.com and download a version and see if you agree.

00:21:18
Interviewer: Great, thanks for chatting with us today Jeff.

Jeff Vroom: Thanks for having.

=== end transcript ===

by admin

5 Comments Add your own

  • 1. RitaLee&hellip  |  June 22nd, 2006 at 10:11 am

    看完這篇也可以去看看TSS中回應,
    http://www.theserverside.com/news/thread.tss?thread_id=41016

  • 2. jeremy&hellip  |  June 22nd, 2006 at 1:14 pm

    TSS 的人顯然比較理性,感覺是用很開放的態度在看一個新技術與評估可行性,不像某斜點站的人太基本教義派,根本很難坐下來好好討論…

    或許成員屬性大不同吧?

  • 3. solocello&hellip  |  June 22nd, 2006 at 9:08 pm

    (偷問)某斜點站是指….?不好意思,沒有慧根…呵呵

  • 4. jeremy&hellip  |  June 23rd, 2006 at 12:11 am

    咳 這還是不要明說比較好,總之首頁由黑、灰、綠三色組成,英文站,是國外 IT新聞八卦大本營。

  • 5. miao&hellip  |  June 23rd, 2006 at 9:58 am

    嗯,嗯,哦。慢慢消化……

留言回應

hidden

您的留言會先經過站長認証後才刊登在網站上。
your comments will be approved by Administrator before appearing on the page.

Trackback this post  |  Subscribe to the comments via RSS Feed

mobile phone