知道美河 | 上传资料 | VIP申请 | 精品课程 | 资料搜索 | 问题反馈 | 会员手册 | 积分消费 | 积分充值 | 帐号保护
美河学习学习在线赞助VIP

美河学习在线(主站) eimhe.com

 找回密码
 建立账号
查看: 13552|回复: 20

[建议] J2EE 5 !!!!! 强烈建议~~

[复制链接]
发表于 2007-4-10 11:03:23 | 显示全部楼层 |阅读模式
强烈建议各位老师出一个EE5的视频
据说可以不用其他框架写起来一样很简单了~~
 楼主| 发表于 2007-4-10 11:20:54 | 显示全部楼层
Version 5 of the Java Platform, Enterprise Edition (Java EE, formerly referred to as J2EE), has arrived. Its streamlined features offer added convenience, improved performance, and reduced development time, all of which enable developers to bring products to market faster.

To get an update on the Java EE 5 platform, we met with Java EE specification lead Bill Shannon, a Distinguished Engineer at Sun Microsystems. Shannon has been with Sun since 1982 and previously worked on the JavaMail API, the HotJava Views product, the Common Desktop Environment (CDE), the Solaris Operating Environment, and all versions of SunOS. He graduated from Case Western Reserve University with an MS in Computer Engineering.

Can you give developers some specific ways that Java EE 5 will reduce the amount of code they need to write?

There are so many ways we've made life simpler for developers, it's hard to know where to start. To some extent, the amount of improvement you'll see is based on the tools you use.

I think one of the biggest improvements is that, in most cases, you no longer need to use deployment descriptors. Even something as simple as combining modules together into an "ear" file used to require a deployment descriptor to list where the modules were. Now all you need to do is to put the modules in the ear file in an obvious way, follow some simple conventions like putting all your shared libraries in the "lib" directory, and that's it.

Here's a simple programming example. Previously, to create a web service, you needed to write a Java interface that describes the web service API, a Java class that implements the web service, a deployment descriptor that tells the container about the web service, and a configuration file that tells the web service runtime how to map Java classes to web service operations. Much of this was boilerplate that changed little from application to application. In Java EE 5 all of this can be done by writing a single Java source file -- the class that implements the web service. The rest is taken care of for you by the container, based on annotations you include in your source code, and based on default rules for what to do when no annotations are present.

Here's the complete source code for a simple web service:

package endpoint;

        import javax.jws.WebService;

        @WebService
        public class Hello {

                public String sayHello(String param) {
                        return "Hello " + param;
                }
        }



Time Saved


  "There are so many ways we've made life simpler for developers, it's hard to know where to start."
   


Bill Shannon
Distinguished Engineer, Sun Microsystems


Can you estimate how much time a developer would save in developing an enterprise application with Java EE 5 compared with J2EE 1.4?

Of course that's difficult to measure and depends a lot on the type of application you're developing. For a relatively simple app, the time to develop the application may be proportional to the number of lines of code in the app. For simple apps, we've probably reduced the number of lines of code you need by half. And if you factor in the reduction in the number of concepts you need to understand in order to write such apps, the time to develop the application is even less. For larger enterprise class apps, the bulk of the application is likely to be the actual business logic of the app, and the reduction in lines of code won't be as great. But the reduction in the number of concepts you need to learn will help, and the overall simplification will reduce the drudgery of creating such an app. You really can focus all your attention on your business logic.

Take us through the importance of annotations in Java EE 5.

Java EE has always promoted a declarative approach for many aspects of enterprise application development. Without support in the Java language for this style of programming, we used external files -- deployment descriptors -- to hold this declarative information. The use of annotations allows us to move this information into the source code, which is where it belongs in most cases.

So, instead of calling an API to request the container to do something for you, and instead of writing a deployment descriptor that has to be synchronized with the code you're writing, you can put your request for the container right in the code. You can say "please expose this class as a web service" or "please start a transaction when this method is called".

"If you were scared off of J2EE because it seemed too complex, it's time to take another look."
   


Bill Shannon
Distinguished Engineer, Sun Microsystems   


Of course, this new capability in no way removes or interferes with older capabilities. There are cases in which a deployment descriptor is the right approach, and you can continue to use them when desired.

If you could speak to an audience of 1000 talented developers who were on the fence, and considering moving to Java EE 5, what would you say to them?

This is not your father's J2EE!

If you were scared off of J2EE because it seemed too complex, it's time to take another look. If you've been attracted to alternative technologies such as Spring and Hibernate, you'll find many of the good ideas from those technologies in Java EE 5.

Take a look at Java EE 5, you'll be amazed at how easy it is.
发表于 2007-4-10 12:00:25 | 显示全部楼层
发表于 2007-4-10 12:08:58 | 显示全部楼层
发表于 2007-4-10 12:32:15 | 显示全部楼层
发表于 2007-4-10 13:21:17 | 显示全部楼层
现在的高新技术都是用英文写的呀
看来要掌握第一手资料要把英文先学好来呀
发表于 2007-4-10 13:40:22 | 显示全部楼层
 楼主| 发表于 2007-4-10 15:12:31 | 显示全部楼层
发表于 2007-4-10 17:15:12 | 显示全部楼层
发表于 2007-4-11 18:26:03 | 显示全部楼层
 楼主| 发表于 2007-4-13 19:02:34 | 显示全部楼层
发表于 2007-4-14 23:22:56 | 显示全部楼层
 楼主| 发表于 2007-4-15 16:04:43 | 显示全部楼层
恩纳,不过据说可以不用spring和hibernate也一样方便了,不知道是不是
发表于 2007-4-20 12:14:36 | 显示全部楼层
发表于 2007-4-20 12:16:58 | 显示全部楼层
发表于 2007-4-26 19:56:51 | 显示全部楼层
发表于 2007-4-26 20:11:02 | 显示全部楼层
发表于 2007-4-26 21:47:42 | 显示全部楼层
发表于 2007-4-26 21:48:20 | 显示全部楼层
发表于 2007-5-4 15:22:24 | 显示全部楼层
发表于 2007-5-17 18:30:39 | 显示全部楼层
您需要登录后才可以回帖 登录 | 建立账号

本版积分规则

 
QQ在线咨询

QQ|小黑屋|手机版|Archiver|美河学习在线 ( 浙网备33020302000026号 )

GMT+8, 2025-5-23 12:29

Powered by Discuz!

© 2001-2025 eimhe.com.

快速回复 返回顶部 返回列表