设为首页 收藏本站
查看: 978|回复: 0

[经验分享] SCJP,SCWCD,OCA,OCP|| javaEE 5 SDK下载

[复制链接]

尚未签到

发表于 2015-6-16 12:06:52 | 显示全部楼层 |阅读模式
  

SCJP,SCWCD,OCA,OCP

http://java.sun.com/javaee/downloads/(Java EE 5 SDK Preview (includes Sun Java System Application Server PE 9 Beta)

The Advantages of the Java EE 5 Platform: A Conversation with Distinguished Engineer Bill Shannon

By Janice J. Heiss, March 2006





  Articles Index
  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.
  



Try It Out!
Get started with the Java EE 5 platform preview:

  • Download the Java EE 5 SDK Preview.
  • Use the Preview: NetBeans IDE 5.5 with NetBeans Enterprise Pack 5.5 package.
  • Explore the source with Project GlassFish.







Enterprise JavaBeans 3.0 and the Java Persistence API


Tell us how the EJB programming model has been simplified in EJB 3.0. How does the use of Plain Old Java Objects (POJOs) in EJB 3.0 make programming easier?
First, it's important to understand that the thing people have been calling "EJB 3.0" is really two separate things. The core of EJB 3.0 is a great simplification of the classic EJB programming model. But probably the most exciting work done by the EJB expert group is the new Java Persistence API.
  Java Persistence is in many ways a replacement for EJB CMP (Container Manager Persistence), although CMP is still fully supported. Java Persistence is a much simpler approach to mapping Java objects to relational databases, and benefits greatly from work done in other products and technologies such as Hibernate, TopLink, and Java Data Objects (JDO). The lessons we've learned from them, and from years of using EJB CMP, led us to create Java Persistence. Java Persistence is a significant departure from EJB CMP, and more resembles those other technologies. Java Persistence is based on POJOs with annotations. Java Persistence is available both as part of Java EE, and for use outside Java EE in a Java SE environment.
  In addition, we've greatly simplified the basic EJB programming model. It is much easier to write a stateless or stateful component that takes full advantage of the transactional capabilities of the EJB container. EJB components can be written as POJOs with, for example, a simple @Stateless annotation. By default, the public methods of the component will be exposed to clients and will run in a transaction. Additional annotations can be used to control security requirements for methods and transaction requirements.


JavaServer Faces and Web Application Design


How does the addition of JavaServer Faces (JSF) make web application design more convenient?
JSF makes web application development more convenient both in the ease with which you can write web application code, and in the code that you never have to write at all.
  There is a large third-party component market for JSF, which means the developer has the option to leverage high quality commercial off-the-shelf components in their application. JSF is a Java Community Process (JCP) standard that already has broad adoption from major vendors such as IBM, Oracle, BEA, JBoss, and Borland. With such market penetration, you can be sure that your investment in JSF will be preserved.
  The technical convenience of JSF stems from its component model, which allows page authors to compose their user-interface at a higher level of abstraction than previous technologies. JSF presents a Swing-like event model for web applications that works very well with tools.
  Lastly, JSF is very adaptable and extensible. Existing popular technologies such as Spring and Hibernate have included JSF adapters to allow their use with JSF. Naturally, because JSF is a part of Java EE 5, it integrates very well with Java Persistence and EJB 3.0.


Java EE 5 and Service-Oriented Architecture


Let's talk about Service-Oriented Architecture (SOA), which is regarded by many as the next big thing. Java EE 5 includes simplified web services support and the latest web services APIs, making it an ideal implementation platform for SOA. Tell us about this.
The web services support in Java EE 5 is based on the JAX-WS (Java API for XML Web Services) and JAXB (Java API for XML Binding) APIs, and the web services metadata support defined by JSR 181.
  JAX-WS is mostly based on JAX-RPC (Java API for XML-based Remote Procedure Calls), but has been improved to better support the latest web service standards and programming styles.
  JAXB 2.0 is a significant improvement over JAXB 1.0, which adds full support for W3C XML schemas. JAXB is used to map Java classes to XML data and is used by JAX-WS to encode and decode data that is sent in web services calls.
  Once again, the use of annotations makes it much easier to create and use web services. JSR 181 defines the annotations that are used with JAX-WS to define web services. In the simplest case a POJO is annotated with the @WebService annotation to make it a web service, as I previously described. JAXB also uses annotations to control the mapping to XML. Both JAX-WS and JAXB provide useful defaults so that it's often not necessary to use most of the annotations they provide. The simple cases "just work" and the more complex cases are made easy through the use of annotations.
Why should a developer who has never before used Java technology try Java EE 5?
The many improvements in Java EE 5 make it much more user-friendly for first-time Java developers, most of whom will want to start with an integrated development environment such as NetBeans or Sun Java Studio Creator. The IDE can help take you through the steps of creating a Java EE application. You'll find that many applications can easily be created without detailed knowledge of Java programming. As we talked about earlier, JSF is a key to creating simple web user interfaces using off-the-shelf components.
  But an IDE is not necessary to create Java EE applications. Some first time Java EE developers might prefer to start by writing simple JSP pages, making use of the JSP expression language, and never need to learn the Java language at all.
What should developers understand about the Sun Java System Application Server PE 9.0?
The Sun Java System Application Server, Platform Edition 9.0 -- that's a mouthful! -- is Sun's product version of the GlassFish code that serves as the reference implementation for Java EE 5. The PE application server is suitable for development and small scale deployment. Sun will also make available an EE (Enterprise Edition) version of the application server that will include more advanced features such as five nines availability.
  The PE application server, built from the GlassFish code, is the application server included in the Java EE 5 SDK, as well as our development tools such as NetBeans and Java Studio Creator.


The Importance of GlassFish


What is the significance of Glassfish and the open source community? And what should the open source community understand about Java EE 5?
The GlassFish community is building a free, open source application server that implements all of Java EE 5. GlassFish includes both Sun and non-Sun contributors. For instance, the Java Persistence implementation in GlassFish is contributed by Oracle. GlassFish really is a community effort. If you're interested in helping to build the reference implementation of the Java EE spec, GlassFish is the place to be.
  





"If you're interested in helping to build the reference implementation of the Java EE spec, GlassFish is the place to be."




Bill Shannon
Distinguished Engineer, Sun Microsystems



  GlassFish is free, and it is open source. I repeat: GlassFish is free, and it is open source. GlassFish uses the OSI-certified CDDL license.
How can developers contribute to the future of Java EE?
There are many ways to contribute to the future of Java EE 5. Perhaps the best approach is to go to the Java EE hub page, read the tutorial, download the SDK, try it out, and send us feedback!
  Developers who are interested in understanding "how it all works" will definitely want to explore GlassFish.
  The GlassFish site also includes tips and examples that will be useful to developers. Developers who want to get involved in contributing to the GlassFish project will find instructions there.
  Finally, developers who want to contribute directly to the development of future Java EE specs should become JCP members, review draft specs, and consider participating in future expert groups to develop specs.
If you were pressed to name the single most important thing to know about Java EE 5, what would it be?
It's hard to name just one thing. Certainly the thing that pervades all of Java EE 5 and is key to the simplified programming model is annotations. We've used annotations to make it much easier to deal with persistence, web services, transactions, security, and all the other powerful capabilities of Java EE. We expect that developers will quickly understand and embrace the annotation approach to application development and will then move on to explore the improved persistence and web service capabilities in Java EE 5.

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-77934-1-1.html 上篇帖子: oracle ocp笔记(1) 下篇帖子: OCP—051试题
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

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