Are you a. NET developer who is seeking to migrate. NET e-business applications to Java 2 Platform Enterprise Edition (ee)? Or do you need to write your first Java EE application from scratch? In either case, this roadmap is for you. It is designed specifically for. NET developers who want to quickly move to Java EE, a platform-independent open standard set that uses the Java-based language to develop Web and other types of distributed applications. We'll show you how to use the Java language to program and develop the EE WEB application. Better yet, we will link this information to concepts and technologies that you already know from the experience of writing. NET applications.
Why turn to the Java EE?
If you are not very eager to venture into a new development environment, consider the following benefits of Java-ee:
Choice, more options: Because Java EE is a well-defined set of standards, you have a number of Java EE implementations to choose from when deploying your own code. By insisting on using standard APIs and avoiding vendor-specific extensions, applications can run on a variety of Java EE implementations without coding changes.
Are we talking about choice? : Java EE is available on a variety of platforms from mainframes to Wintel, UNIX, and Linux. You can write your application once, and then deploy it on a variety of platforms.
Can't we just be complacent? : Java EE includes a standard API for accessing many legacy EIS systems such as CICS, IMS, ERP, and CRM. It also includes Web service support, so you can integrate. NET systems and other systems that support industry WEB service standards. Java EE also includes standard messaging API support (SERVICE,JMS), and an API for accessing relational databases (Java database connectivity,jdbc). This wide selection allows you to integrate a variety of existing systems without losing your investment in them.
The engine room was no longer smoky: experts from around the world developed Java Community Process (JCP) specification. JCP issued a preliminary draft of the code for public comment. Even if you don't take the initiative, you will always know which future specifications are being prepared. The specification also includes a reference implementation that you can use to check the new technology before you decide to implement it.
Introduction to Java EE
Java EE, that is, 2 Enterprise Edition, is a specification of a number of components related to developing distributed applications in the Java language. You can use the Java EE component to write web-based applications and traditional client-server applications, and to use standard APIs to connect to legacy resources such as relational databases. If you are from the asp.net development background, the Java servlets and JavaServer Pages (JSP) technologies are the most useful components for you.
Java Servlets
Java Servlets are Java classes that run as extensions to Web servers such as IIS or Apache Web server. The Java Servlet is similar to an ISAPI filter, that is, a asp.net HttpHandler class, or similar to a Cgi-bin program/script. The Java Servlet runs when the client browser invokes a specially configured URL, either directly or indirectly. The servlet has access to all the information in the HTTP request and is able to process the request directly by providing content that is returned to the client. Alternatively, the servlet can redirect the client browser to another resource. Most Java EE Web applications use the servlet primarily as a target for HTML forms to handle user input and then handle them accordingly. The generation of response pages is typically delegated to a JSP page.
JavaServer Pages Technology
JSP pages are similar to asp.net pages. That is, they are also HTML pages that contain script elements that run on the server when a user requests the page. A key difference between a asp.net page and a JSP page is that the ASP.net page uses a. NET language such as C # and VB. NET) as a scripting language, while JSP pages use the Java language. Typical JSP pages contain special class HTML tags defined in Java snippets and JSP specifications that are interwoven with standard HTML to provide a combination of static and dynamic content. The difference between a Java Servlet and a JSP page is conceptually similar to the difference between a ASP.net HttpHandler class and a ASP.net page. In both cases, the former is a piece of code that can be used to send HTML directly or indirectly to other resources, which is an HTML document that can contain embedded code.
Web Server and Application server
If you are familiar with ASP.net pages, you should know the ASP.net runtime that runs these pages-it works with IIS. You will also add your own HttpHandler classes and managed and unmanaged components to your WEB application, which the ASP.net runtime will also call. This makes it easy to deploy WEB applications on IIS. But it restricts you to the Windows platform, the only platform that can run IIS. Java EE uses a different approach because it is designed to run on a variety of different operating systems (including Windows). Unlike trying to embed code that runs a Java Servlet and JSP page directly into a WEB server, it runs them using a separate server component called an application server. Most application servers, such as IBM WebSphere application Server, also have a separate insert component for bridging application servers and specific WEB servers. For example, the WebSphere application server comes with a separate plug-in for IIS and Apache Web server. This allows you to use the WEB server of your choice when you run the Java EE component.
The role of the application server as a separate pluggable server component offers several advantages:
Web Server selection: You are not limited to using a Web server to provide HTML page services. You can continue to use your favorite Web server for this purpose, and use any application server to process Java Servlet and JSP pages. This ability is especially useful when porting asp.net applications to Java EE. You can continue to run IIS and the ASP.net runtime and migrate applications in stages. You don't need to rewrite the entire application at a draught.
Platform selection: You can write the Java EE application once, and then deploy it on a variety of operating systems that can run the application server —— include Windows, AIX, and Linxu. You are not limited to a platform that can run a particular WEB server.
Application Server Vendor Selection: Because the industry standard specification defines the Java Servlets and JavaServer Pages technology, you can write an EE application once and then deploy it in a variety of application server environments, such as WebSphere Express or Apache Tomcat,apache Tomcat is a popular open source application server. Java EE also defines how a WEB application must be packaged, so you can introduce your own developed application into a Java EE environment that can be redeployed to another application server without changing the code or recompiling the application. The same is true for deploying applications to multiple platforms.