Topic: [讨论]作为一个程序员到底用不用学GUI(swing,awt)? |
Print this page |
1.[讨论]作为一个程序员到底用不用学GUI(swing,awt)? | Copy to clipboard |
Posted by: hitdemo2002 Posted on: 2003-09-04 07:07 比如我,作的大多是web应用程序,不涉及swing,awt等图形界面的编程. 但是有时候有人会问你这些东西,如果说不会也挺尴尬的,人家可能说,学java的连这都不会? 大家是怎么想的,欢迎讨论 |
2.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: hitdemo2002] | Copy to clipboard |
Posted by: jameszhang Posted on: 2003-09-04 07:58 学学没什么不好 |
3.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: jameszhang] | Copy to clipboard |
Posted by: helloworld Posted on: 2003-09-04 08:00 在实际中该是,用到什么就学什么; 虽然有点短视,但是可以使你集中注意力,向目标前进,做得更好. |
4.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: hitdemo2002] | Copy to clipboard |
Posted by: hitdemo2002 Posted on: 2003-09-04 08:55 我现在就只能是这样了,关键当程序员时间太紧,没有时间什么都学,各位有用swing作项目的么,这东西现在用的多不多 |
5.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: hitdemo2002] | Copy to clipboard |
Posted by: jfml Posted on: 2003-09-04 09:07 做跨平台的NMS |
6.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: hitdemo2002] | Copy to clipboard |
Posted by: ftang Posted on: 2003-09-04 10:48 在美国,有专门的程序员专攻swing,要价也很高的,一般要到12万刀一年,因为JAVA的GUI最高境界是全部用手写code生成的(具体不知道,我是听我公司现在一个SWING consultant说的),所以编程量很大,这么多钱一年,够可以的了,实际上,SWING的人我觉得是很缺的,因为要真正懂USER INTERFACE DESIGN得高手实在不多,我就很不懂这个东西,什么FRENDLY INTERFACE的 |
7.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: hitdemo2002] | Copy to clipboard |
Posted by: roshin Posted on: 2003-09-04 11:09 我曾经干过一年的SWING,别的倒是没什么体会,只是觉得做GUI的对JAVA的初学者来说是一个掌握JAVA基础的好办法. |
8.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: hitdemo2002] | Copy to clipboard |
Posted by: agilechen Posted on: 2003-09-04 12:34 我们公司也有作Swing的,结构有点像Strut。没办法。谁让Strut framework这么的经典呀。 |
9.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: agilechen] | Copy to clipboard |
Posted by: dog72 Posted on: 2003-09-04 15:54 agilechen wrote: swing象structs?那估计没人用了。 |
10.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: ftang] | Copy to clipboard |
Posted by: dog72 Posted on: 2003-09-04 16:09 ftang wrote: 真正的底层工具和平台的开发几乎不用IDE,全部是手工coding,实在是没工夫和集成开发环境角劲;所有的调试都是通过System.out完成的,断点跟踪根本就没用;代码的优化和内存泄露的查找都有专用的工具辅助,但是最终的算法优化是靠人工读代码(code review)来完成的。 软件产品就是完全依赖于这些系统工程中最不稳定的因素--“人”的一种不稳定的产品。 |
11.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: agilechen] | Copy to clipboard |
Posted by: floater Posted on: 2003-09-04 22:16 agilechen wrote: I thought it's the other way around. Struts tries to get to swing ... but not quite like ... hehe ... Comm'n, it's part of j2se, grab a book(Oreilly or John ...'s), read it, and start coding. It's a very clean piece(because MVC is fairly mature), worth it. |
12.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: hitdemo2002] | Copy to clipboard |
Posted by: ftang Posted on: 2003-09-04 22:22 The MVC is a pattern, original is from smalltalk used on User Interface design, SUN use that pattern in Pet Store, and struts just implements that pattern again, I don't feel struts is that great, before the struts, I did one same idea as struts, source code steal from PetStore, works toooo... |
13.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: hitdemo2002] | Copy to clipboard |
Posted by: jsmile Posted on: 2003-09-04 22:26 Learning Swing will definitely benefit you (MVC, Design Patterns, Threading, etc...) I did a couple of projects using Swing. I feel like just scratch the surface. |
14.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: hitdemo2002] | Copy to clipboard |
Posted by: emarket Posted on: 2003-09-05 10:52 Swing是块硬骨头,可不好学呀,那么多API,.... |
15.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: hitdemo2002] | Copy to clipboard |
Posted by: hwx Posted on: 2003-09-05 17:39 学学也不赖,越学越觉得有意思。 鹅对GUI情有独衷。 |
16.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: hitdemo2002] | Copy to clipboard |
Posted by: dwju Posted on: 2003-09-05 17:47 我也在学,做了一个WEB图表显示的,类似JFreeReport,用起来自我感觉还方便,不过感觉和JFreeReport还差的太远,改进中!!! |
17.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: dog72] | Copy to clipboard |
Posted by: floater Posted on: 2003-09-05 22:07 dog72 wrote: This is something that I am worrying about. We can't go far with a two-wheel chariot. We have to have a process in place so that any person with certain pre requirements can following the process and produce the same result. |
18.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: emarket] | Copy to clipboard |
Posted by: heaven Posted on: 2003-09-06 01:34 感觉jsp或者asp出身的程序员都不想学client端的GUI设计,我也是,不知道这算好事还是坏事 |
19.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: hitdemo2002] | Copy to clipboard |
Posted by: fredfred Posted on: 2003-09-07 10:55 I hate Swing, but I want to learning. |
20.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: hitdemo2002] | Copy to clipboard |
Posted by: Arbow Posted on: 2003-09-08 16:44 Java的Swing在window下有点糟糕,IBM的SWT还可以。感觉Java还是强在J2EE方面 |
21.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: hitdemo2002] | Copy to clipboard |
Posted by: hwx Posted on: 2003-09-09 11:54 鹅还从来没有用过SWT写界面,各位有经验的大侠, 能介绍一下SWT的优缺点吗?(跟Swing相比) 谢谢! |
22.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: hitdemo2002] | Copy to clipboard |
Posted by: jigsaw Posted on: 2003-09-09 13:23 我的体会是 用Swing的时候 头脑很清晰 这是因为就像floator说的,MVC已经很成熟了。 |
23.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: hitdemo2002] | Copy to clipboard |
Posted by: hwx Posted on: 2003-09-09 18:14 各位大哥,能介绍下SWT吗? 现在国内外的实际项目中(Application)的GUI用它来开发的多不多? 效果如何?优点和缺点? 谢谢。 我想进一步了解,不知从何入手。 |
24.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: jigsaw] | Copy to clipboard |
Posted by: heaven Posted on: 2003-09-09 23:33 也许是水平不够吧,我看不出SWT有什么好的,哪位能够说说它的优点。 不过eclipse不错,如果不是用SWT就更好了 |
25.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: hitdemo2002] | Copy to clipboard |
Posted by: jeez Posted on: 2003-09-10 11:57 Swing对于初学来讲是很难的,而且写好了非常难改;但熟练了之后,当然要用手写了,结构比自动生成的好得多; 大概有一点经验,分享一下: 1、将大的panel创建单独的类,尤其是与业务相关紧密的类,这样可以避免顶层的Frame代码太多 2、为每个重要panel的创建,写createXXXPanel的方法 3、将Action的处理尽量放到其他类中 4、对Action的处理可以集中一点,通过它们的ActionCommand来区别即可 5、自定义自己的Event和Listener机制,对MVC的分离非常好 6、表格是非常重要和重量级的控件,需要把对表列的定义做抽象化,我自己是扩展了TableRowObject来做的。 7、对于树来讲,每个树的节点可以存自己的Model对象,建议通过对象树生成节点。 8、每个对话框都需要一个Owner,所以需要有一个类来提供当前Frame的引用,这样每个对话框对可以找到它的Owner了 Layout方面我觉得是Swing最最重要的。 界面设计方面吗,主要还是看经验了和多参考国外的软件,SUN的网站上有Swing的很多界面的例子,是非常好的参考资料。 说实话对Swing的经验还不是很多,但Swing的优势也能逐渐的体会到一些了,其实写Swing程序也非常有乐趣的。 |
26.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: floater] | Copy to clipboard |
Posted by: dog72 Posted on: 2003-09-10 14:50 floater wrote: 这是人们所向往的,但是只有大公司才实施的起,而且效果也只有自己才清楚,对外不会说自己不好的;但据我所知很多都没有达到预期的效果。工业生产要求的是标准化作业,软件开发要求的是发挥每个人的创造性,就象写小说一样。两者可以结合,但其中需要权衡的问题太复杂。 我相信,未来标准化作业部分有一天会被人工智能的机器代替(我们就不需要软件蓝领了),到时候软件行业就成为向时装行业一样的艺术创作了。 呵呵,胡思乱想。 |
27.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: hitdemo2002] | Copy to clipboard |
Posted by: stevendu Posted on: 2003-09-10 20:13 俺认为SWING还是要学的,API是很多,但是很有规律呀,能够举一反三的。 |
28.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: hitdemo2002] | Copy to clipboard |
Posted by: hitdemo2002 Posted on: 2003-09-10 20:41 我想如果swing的自动化程度再高一些,比如像现在流行的vb,delphi等支持拖放操作,而不是由第三方ide实现,用的是不是能多一些,sun不这样的道理是什么呢?是为了保持语言的一致性,还是处于性能的考虑. |
29.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: dog72] | Copy to clipboard |
Posted by: floater Posted on: 2003-09-10 22:18 dog72 wrote: Yea, I heard chinese software industry is still at this stage. I heard one of the reasons is cost-saving, typical chinese merchants' style, short-sighted. Industrialization is one of the most distinct characteristics in modernization. It's both a concept and a realization. One way to take a quick look of this important concept is in the game called "Civilization"(or simple CIV in the game world). Once you conquer the world and look back, you would realization how important that concept is.
Yea, just like new shoes' break-in. But, we still have to follow the process. We may bend a rule, but don't break it unless there is a valid reason. When we break a rule, we still need to follow another process. A good process should help us not to make same mistakes made by others, not to restrict us from doing a better job. This is not a dream, I've seen some existing for dozens of years already. Also, I've seen a lot of not-quite-working processes too, just like an old saying, there are plenty of ways to go wrong, only a handle ways to do it right. |
30.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: floater] | Copy to clipboard |
Posted by: robinhoodx Posted on: 2003-09-11 16:47 floater wrote: Excellent remarks! floater could always give us some classic ideas and beautiful english words so that I often save them in my knowledge base. could you also give us some recommendation for which process is a better one?how should chinese software company implement a good process into reality without harming too much on development teams' productivity?maybe this topic is too broad and getting too far away from the original subject. |
31.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: floater] | Copy to clipboard |
Posted by: dog72 Posted on: 2003-09-12 11:10 floater wrote: 你玩CIV吗?好游戏,我从1.0玩到3.0。现在没时间了。 其实我说的大企业并不是国内的,很多国际的大企业面临同样的问题,软件工业化是非常复杂的一件事情。国际上也一直在摸索标准化软件开发的过程,虽然用于项目开发的过程已经相当完善(如CMM),但是目前为止我还没有看到过适用于支撑级软件开发的通用的过程。 当然各公司都有自己的过程,而且各成体系(因为要适合自己公司的情况和文化)。无论是外科手术式的开发模式,还是委员会式的模式,大家都不相同。 其实我感觉这里有一个悖论,过程化的前提是“成熟”,成熟的前提是反复的实验,例如汽车工业,一旦一种产品经过大量的测试后,就可以“上线”了。软件产品“成熟”了以后印光盘就可以了,还需要“上线”吗?而且所有的bug的fix仍然需要技术人员甚至是开发时候的技术人员。 总之要考虑的问题太多,想不清楚。 |
32.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: hitdemo2002] | Copy to clipboard |
Posted by: llcan Posted on: 2003-10-08 15:36 都是高人的言论,看了之后有了目标了,多谢。 |
33.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: hitdemo2002] | Copy to clipboard |
Posted by: NoLimited Posted on: 2003-10-08 17:07 学习一下又没有坏处 不过时间不允许就算了 |
34.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: agilechen] | Copy to clipboard |
Posted by: hitaco Posted on: 2003-10-08 19:37 昏倒, 经典也要讲个先来后到的呀 agilechen wrote: |
35.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: dog72] | Copy to clipboard |
Posted by: floater Posted on: 2003-10-09 01:43 dog72 wrote: A process is not necessarily mature in order to follow. In the real world, processes evolves too. We find an error in the process, we fix it. It's more of an accumulation of good practices, because nobody is a genius on new things, there is a learning/interactive process too. We learn things, document good points, make them a process. Later on, we improve the process. In the movie "battleship Indianapolis"(A real story), the captain of USS Indianapolis didn't follow the normal process for zig-zag *with* a very solid reason, but still got court-martialed for that, although everyone agreed he was right to do that(A battleship can destroy surface ships in one shot, but can't do anything about submarines, so you have to run go zig-zag or run faster). So we should learn from this how much attentions westerners pay for this concept. Even if you have a solid reason, sometimes you still pay for violation of processes. Another example would be the 9-11 World trade center event. Before that, the fire safety rule, I believe, was to wait for instructions from fire safety squad, now, it's improved, you may run down by your own, because of 9-11. This kind of things happen everyday here, so you can imagine, after some time, you could accumulate some good practice. I believe this is the best part in the sense that this self correct system may not be the best in theory or history, but it's the best existing because of the self improving feature. I read a lot of posts written by chinese living on mainland, one thing that I don't like is people like to quote labels/brand/technical terms without understanding the logic and practice behind. And this type of behavior gets spread out quickly into trend/fashions. But if you get down to the logic/practice behind, you would know the trace that it evolves and have a better understanding on the subjects. Don't just follow them plainly, otherwise you always follow, not lead. |
36.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: hitdemo2002] | Copy to clipboard |
Posted by: floater Posted on: 2003-10-09 01:48 Forgot to say, I did play CIV. I was/am(kind of) a gamer. The best game I've ever played is "Strategic conquest" on Macintosh. I play CIV, MOO, Koei's Romance of 3 kingdoms(II, not those later ones), Panzer General, UFO 1-3. But I haven't tried later ones. I kind of lost interest on them, because they don't have much replay values(some scenarios are fixed, some are varying little, not enough difference to replay). |
37.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: hitdemo2002] | Copy to clipboard |
Posted by: yogurtpig Posted on: 2003-10-09 09:34 看这个感觉有点像当年能全部手写html的人可以要高价一样,如果非常好的可视化编辑器出来了。那swing的手写高手用处就不大了。就像现在的html高手。 |
38.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: jeez] | Copy to clipboard |
Posted by: yamakasy Posted on: 2003-10-09 12:04 jeez wrote: 不错的经验,不过对3感觉不同,应该看情况,如果是简单逻辑或者非公用,匿名类或者内部类也是不错的选择(不用传递对象,可视范围大),对于复杂一点的逻辑和公用的抽取(extract)出来是不错的选择。 总的来说,控制逻辑如果是业务逻辑相关的,没的说,抽取出来单独构造,并最好抽象一下使用,对于控制逻辑如果是UI相关的或者少许掺杂业务逻辑,根据复杂性和公用性,选择性的抽取。 |
39.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: hitdemo2002] | Copy to clipboard |
Posted by: floater Posted on: 2003-10-09 21:25 I personally think 3 is right, my main reason for this is when i build a Swing application, I keep in mind that I am building a command line interface in parallel, with this intention, I have to do 3. |
40.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: hitdemo2002] | Copy to clipboard |
Posted by: rombus Posted on: 2003-10-10 09:28 想去学学:) |
41.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: hitdemo2002] | Copy to clipboard |
Posted by: kenzhu Posted on: 2003-10-20 12:55 最近做的一个APP Project,用的是Swing 原因在于: 移植方便 考虑到java和prolog之间有接口 |
42.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: hitdemo2002] | Copy to clipboard |
Posted by: coloumn Posted on: 2003-10-20 21:32 建议学习MVC先,然后试着手写全部code,熟悉swing中的api。最后用JBuilder等可视化工具,你会感觉非常的爽——因为JBuilder等工具自动生成的代码你全都明白,你可以随自己的想法改动。 不用死记swing中的api,理解架构和模式最重要。 在整个学习过程中,找一些开放源代码项目进行学习,吸取人家的开发经验,可以使自己迅速提高。 |
43.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: helloworld] | Copy to clipboard |
Posted by: yekai Posted on: 2003-10-23 00:59 helloworld wrote: 我觉得"helloworld"说的对,人的精力是有限的。 |
44.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: hitdemo2002] | Copy to clipboard |
Posted by: yanwj Posted on: 2003-10-23 20:30 熟悉swing的人能很快地转到swt中去,使用swt写程序时,总有似曾相识的感觉,但swt的框架结构更实用更方便,结合jface能很方便地写出非常复杂的界面,并且不需要可视化工具(当然有工具更好!) |
45.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: hitdemo2002] | Copy to clipboard |
Posted by: bran Posted on: 2003-10-24 08:37 对于任何一些代码为生的人而言, 攻克 GUI 设计 是 必修之课。 在 HTML 环境下长大的程序员往往对重客户端有畏难情绪。这一点必须克服。 Swing 很麻烦, 这也是阻止 swing 被程序员广泛采用的原因之一。 但是 swing 背后的概念很好。《设计模式》 中 一半左右的例子都是 关于 GUI 的。 所以学习 swing 能学到高级程序员必备的很多东西。 Swing 过去以“难“ “慢” 著称。 慢的问题 现在已经基本解决 (当然,坏的编程技术 破坏一切)。 难的问题 也随着 IDE 的进步 和一些专用的 组建的成熟逐渐减轻。 说到底, 有两点理由一个触及程序员要学习 swing: 1. swing 内容丰富, 有助于提高你的修养。 2 swing 有用。 现在大家一窝蜂 做 web. 但是我告诉你,java 重客户端(或者任何重客户端) 对于高级应用来说不可替代。 (再加一条: JSP 程序员 和 swing 程序员工资不一样。) 可惜的是 现在市场上 swing 的书极少, 而出学者们往往是看着书店的书架来判断 “未来” 走向。floater 对 “to follow" 和 “to lead" 的问题提得好。我不能说 学 swing 你就能lead. 但是你跟这书店走 (尤其是 中文书店) 那你一定是在 follow。 至于 swing vs. SWT。 我看是不重要。最好都。 个人觉得 swing 的自由度大些 (也难于操作些) 。 仅供参考。 谢谢 |
46.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: hitdemo2002] | Copy to clipboard |
Posted by: guansanwu Posted on: 2003-10-25 10:02 学Swing主要是搞清楚它的MVC,其他都快了,最重要的不光是技术,而是经验,对用户的使用习惯和风格的掌握最重要! |
47.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: hitdemo2002] | Copy to clipboard |
Posted by: zyzhang Posted on: 2003-11-03 20:41 It's better if you have experience working on application using SWING,even though you are J2EE developer. It's very common requirement to buid admistration gui using rich client swing gui. |
48.Re:[讨论]作为一个程序员到底用不用学GUI(swing,awt)? [Re: hitdemo2002] | Copy to clipboard |
Posted by: huangfei Posted on: 2003-11-16 21:59 好顶,Swing和AWT的区别是什么? |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |