Java、J2ee的Spring框架和大数据技术外文文献翻译
J2EE开发框架外文翻译文献
中英文资料外文翻译文献J2EE开发框架Java2企业版为中间件领域思想的统一上发挥了很大的作用。
比如,J2EE为分布式事务管理、目录服务和消息服务提供了一套标准的编程接口。
J2EE的基础——Java2标准版(J2SE) ,成功地为Java提供了一套访问关系数据库的标准。
但是,就像本文中“J2EE缺乏对编程的支持”提到的一样,J2EE这个平台没有能够提供一个令人满意的应用程序编程模型。
Sun公司和一些大的应用服务器供应商都想用开发工具来降低J2EE开发的复杂性,但是这些工具没有其他的JA V A 开发工具优秀,后者有先进的重构工具,和.NET平台相比,J2EE的工具支持显得很逊色。
很多J2EE开发工具自动产生的代码像这些工具本身同样复杂。
在开源社区很多小型J2EE开发者选择了另外一种开发方式——一些可以降低J2EE开发难度的开发框架,较为流行的比如:Struts, Hibernate, 和Spring Framework,他们当今很多J2EE项目种扮演着重要角色。
为什么要采用框架?框架是一由一些类组成,正式这些类为应用程序提供了一个可重用的设计――或者我们经常提到的——应用程序种的一层。
应用程序代码访问类库从而执行任务,而框架是调用应用程序代码,从而管理程序的流程。
这就是经常说道的好莱坞原则:“不要试图联系我们,我们到时候自会通知你。
”开发者写的程序在运行时由框架调用。
设计一个在各种未知背景下都可以使用的框架是很有挑战性的。
框架很适合在复杂的J2EE开发中使用,它可以为开发者提供一个简单易用的模型。
采用一个经过良好设计的开源框架有很多好处:1、在好的框架下,开发者只需要写一些必须的代码;他们不需要直接接触底层的API。
这一点很重要。
2、经过良好设计的框架可以为程序提供清晰的结构并且提高程序的内聚性。
好清晰的结构使得其他人可以更容易加入项目。
3、一个容易使用的框架可以通过一些例子和文档为用户提供最佳实践。
JAVA外文文献+翻译
Java and the InternetIf Java is, in fact, yet another computer programming language, you may question why it is so important and why it is being promoted as a revolutionary step in computer programming. The answer isn’t immediately obvious if you’re coming from a traditional programming perspective. Although Java is very useful for solving traditional stand-alone programming problems, it is also important because it will solve programming problems on the World Wide Web.1.Client-side programmingThe Web’s initial server-browser design provided for interactive content, but the interactivity was completely provided by the server. The server produced static pages for the client browser, which would simply interpret and display them. Basic HTML contains simple mechanisms for data gathering: text-entry boxes, check boxes, radio boxes, lists and drop-down lists, as well as a button that can only be programmed to reset the data on the form or “submit” the data on the form back to the server. This submission passes through the Common Gateway Interface (CGI) provided on all Web servers. The text within the submission tells CGI what to do with it. The most common action is to run a program located on the server in a directory that’s typically called “cgi-bin.” (If you watch the address window at the top of your browser when you push a button on a Web page, you can sometimes see “cgi-bin” within all the gobbledygook there.) These programs can be written in most languages. Perl is acommon choice because it is designed for text manipulation and is interpreted, so it can be installed on any server regardless of processor or operating system. Many powerful Web sites today are built strictly on CGI, and you can in fact do nearly anything with it. However, Web sites built on CGI programs can rapidly become overly complicated to maintain, and there is also the problem of response time. The response of a CGI program depends on how much data must be sent, as well as the load on both the server and the Internet. (On top of this, starting a CGI program tends to be slow.) The initial designers of the Web did not foresee how rapidly this bandwidth would be exhausted for the kinds of applications people developed. For example, any sort of dynamic graphing is nearly impossible to perform with consistency because a GIF file must be created and moved from the server to the client for each version of the graph. And you’ve no doubt had direct experience with something as simple as validating the data on an input form. You press the submit button on a page; the data is shipped back to the server; the server starts a CGI program that discovers an error, formats an HTML page informing you of the error, and then sends the page back to you; you must then back up a page and try again. Not only is this slow, it’s inelegant.The solution is client-side programming. Most machines that run Web browsers are powerful engines capable of doing vast work, and with the original static HTML approach they are sitting there, just idly waiting for the server to dish up the next page. Client-side programming means that the Web browser is harnessed to do whatever work it can, and the result for the user is a much speedier and more interactive experience at your Web site.The problem with discussions of client-side programming is that they aren’t very different from discussions of programming in general. The parameters are almost the same, but the platform is different: a Web browser is like a limited operating system. In the end, you must still program, and this accounts for the dizzying array of problems and solutions produced by client-side programming. The rest of this section provides an overview of the issues and approaches in client-side programming.2.Plug-insOne of the most significant steps forward in client-side programming is the development of the plug-in. This is a way for a programmer to add new functionality to the browser by downloading a piece of code that plugs itself into the appropriate spot in the browser. It tells the browser “from now on you can perform this new activity.” (You ne ed to download the plug-in only once.) Some fast and powerful behavior is added to browsers via plug-ins, but writing a plug-in is not a trivial task, and isn’t something you’d want to do as part of the process of building a particular site. The value of the plug-in for client-side programming is that it allows an expert programmer to develop a new language and add that language to a browser without the permission of the browser manufacturer. Thus, plug-ins provide a “back door” that allows the creation of new client-side programming languages (although not all languages are implemented as plug-ins).3.Scripting languagesPlug-ins resulted in an explosion of scripting languages. With a scripting language you embed the source code for your client-side program directly into the HTML page, and the plug-in that interprets that language is automatically activated while the HTML page is being displayed. Scripting languages tend to be reasonably easy to understand and, because they are simply text that is part of an HTML page, they load very quickly as part of the single server hit required to procure that page. The trade-off is that your code is exposed for everyone to see (and steal). Generally, however, you aren’t doing amazingly sophisticated things with scripting languages so this is not too much of a hardship.This points out that the scripting languages used inside Web browsers are really intended to solve specific types of problems, primarily the creation of richer and more interactive graphical user interfaces (GUIs). However, a scripting language might solve 80 percent of the problems encountered in client-side programming. Your problems might very well fit completely withinthat 80 percent, and since scripting languages can allow easier and faster development, you should probably consider a scripting language before looking at a more involved solution such as Java or ActiveX programming.The most commonly discussed browser scripting languages are JavaScript (which has nothing to do with Java; it’s named that way just to grab some of Java’s marketing momentum), VBScript (which looks like Visual Basic), and Tcl/Tk, which comes from the popular cross-platform GUI-building language. There are others out there, and no doubt more in development.JavaScript is probably the most commonly supported. It comes built into both Netscape Navigator and the Microsoft Internet Explorer (IE). In addition, there are probably more JavaScript books available than there are for the other browser languages, and some tools automatically create pages using JavaScript. However, if you’re already fluent in Visual Basic or Tcl/Tk, you’ll be more productive using those scripting languages rather than learning a new one. (You’ll have your hands full dealing with the Web issues already.)4.JavaIf a scripting language can solve 80 percent of the client-side programming problems, what about the other 20 percent—the “really hard stuff?” The most popular solution today is Java. Not only is it a powerful programming language built to be secure, cross-platform, and international, but Java is being continually extended to provide language features and libraries that elegantly handle problems that are difficult in traditional programming languages, such as multithreading, database access, network programming, and distributed computing. Java allows client-side programming via the applet.An applet is a mini-program that will run only under a Web browser. The applet is downloaded automatically as part of a Web page (just as, for example, a graphic is automatically downloaded). When the applet is activated it executes a program. This is part of its beauty—it provides you with a way to automatically distribute the client software from the server at the time the user needs the client software, and no sooner. The user gets the latest version of the client software without fail and without difficult reinstallation. Because of theway Java is designed, the programmer needs to create only a single program, and that program automatically works with all computers that have browsers with built-in Java interpreters. (This safely includes the vast majority of machines.) Since Java is a full-fledged programming language, you can do as much work as possible on the client before and after making requests of the server. F or example, you won’t need to send a request form across the Internet to discover that you’ve gotten a date or some other parameter wrong, and your client computer can quickly do the work of plotting data instead of waiting for the server to make a plot and ship a graphic image back to you. Not only do you get the immediate win of speed and responsiveness, but the general network traffic and load on servers can be reduced, preventing the entire Internet from slowing down.One advantage a Java applet has ove r a scripted program is that it’s in compiled form, so the source code isn’t available to the client. On the other hand, a Java applet can be decompiled without too much trouble, but hiding your code is often not an important issue. Two other factors can be important. As you will see later in this book, a compiled Java applet can comprise many modules and take multiple server “hits” (accesses) to download. (In Java 1.1 and higher this is minimized by Java archives, called JAR files, that allow all the required modules to be packaged together and compressed for a single download.) A scripted program will just be integrated into the Web page as part of its text (and will generally be smaller and reduce server hits). This could be important to the responsiveness of your Web site. Another factor is the all-important learning curve. Regardless of what you’ve heard, Java is not a trivial language to learn. If you’re a Visual Basic programmer, moving to VBScript will be your fastest solution, and since it will probably solve most typical client/server problems you might be hard pressed to justify learning Java. If you’re experienced with a scripting language you will certainly benefit from looking at JavaScript or VBScript before committing to Java, since they might fit your needs handily and you’ll be more productive sooner.to run its applets withi5.ActiveXTo some degree, the competitor to Java is Microsoft’s ActiveX, although it takes a completely different approach. ActiveX was originally a Windows-only solution, although it is now being developed via an independent consortium to become cross-platform. Effectively, ActiveX says “if your program connects to its environment just so, it can be dropped into a Web page and run under a browser that supports ActiveX.” (I E directly supports ActiveX and Netscape does so using a plug-in.) Thus, ActiveX does not constrain you to a particular language. If, for example, you’re already an experienced Windows programmer using a language such as C++, Visual Basic, or Borland’s Del phi, you can create ActiveX components with almost no changes to your programming knowledge. ActiveX also provides a path for the use of legacy code in your Web pages.6.SecurityAutomatically downloading and running programs across the Internet can sound like a virus-builder’s dream. ActiveX especially brings up the thorny issue of security in client-side programming. If you click on a Web site, you might automatically download any number of things along with the HTML page: GIF files, script code, compiled Java code, and ActiveX components. Some of these are benign; GIF files can’t do any harm, and scripting languages are generally limited in what they can do. Java was also designed to run its applets within a “sandbox” of safety, which prevents it from wri ting to disk or accessing memory outside the sandbox.ActiveX is at the opposite end of the spectrum. Programming with ActiveX is like programming Windows—you can do anything you want. So if you click on a page that downloads an ActiveX component, that component might cause damage to the files on your disk. Of course, programs that you load onto your computer that are not restricted to running inside a Web browser can do the same thing. Viruses downloaded from Bulletin-Board Systems (BBSs) have long been a problem, but the speed of the Internet amplifies the difficulty.The solution seems to be “digital signatures,” whereby code is verified to show who the author is. This is based on the idea that a virus works because its creator can be anonymous, so if you remove the anonymity individuals will be forced to be responsible for their actions. This seems like a good plan because it allows programs to be much more functional, and I suspect it will eliminate malicious mischief. If, however, a program has an unintentional destructive bug it will still cause problems.The Java approach is to prevent these problems from occurring, via the sandbox. The Java interpreter that lives on your local Web browser examines the applet for any untoward instructions as the applet is being loaded. In particular, the applet cannot write files to disk or erase files (one of the mainstays of viruses). Applets are generally considered to be safe, and since this is essential for reliable client/server systems, any bugs in the Java language that allow viruses are rapidly repaired. (It’s worth noting that the browser software actually enforces these security restrictions, and some browsers allow you to select different security levels to provide varying degrees of access to your system.) You might be skeptical of this rather draconian restriction against writing files to your local disk. For example, you may want to build a local database or save data for later use offline. The initial vision seemed to be that eventually everyone would get online to do anything important, but that was soon seen to be impractical (although low-cost “Internet appliances” might someday satisfy the needs of a significant segment of users). The solution is the “signed applet” that uses public-key encryption to verify that an applet does indeed come from where it claims it does. A signed applet can still trash your disk, but the theory is that since you can now hold the applet creator accountable they won’t do vicious things. Java provides a framework for digital signatures so that you will eventually be able to allow an applet to step outside the sandbox if necessary. Digital signatures have missed an important issue, which is the speed that people move around on the Internet. If you download a buggy program and it does something untoward, how long will it be before you discover the damage? It could be days or even weeks. By then, how will you track down the program that’s done it? And what good will it do you at that point?7.Internet vs. intranetThe Web is the most general solution to the client/server problem, so it makes sense that you can use the same technology to solve a subset of the problem, in particular the classic client/server problem within a company. With traditional client/server approaches you have the problem of multiple types of client computers, as well as the difficulty of installing new client software, both of which are handily solved with Web browsers and client-side programming. When Web technology is used for an information network that is restricted to a particular company, it is referred to as an intranet. Intranets provide much greater security than the Internet, since you can physically control access to the servers within your company. In terms of training, it seems that once people und erstand the general concept of a browser it’s much easier for them to deal with differences in the way pages and applets look, so the learning curve for new kinds of systems seems to be reduced.The security problem brings us to one of the divisions that seems to be automatically forming in the world of client-side programming. If your program is running on the Internet, you don’t know what platform it will be working under, and you want to be extra careful that you don’t disseminate buggy code. You need something cross-platform and secure, like a scripting language or Java.If you’re running on an intranet, you might have a different set of constraints. It’s not uncommon that your machines could all be Intel/Windows platforms. On an intranet, you’re respon sible for the quality of your own code and can repair bugs when they’re discovered. In addition, you might already have a body of legacy code that you’ve been using in a more traditional client/server approach, whereby you must physically install client programs every time you do an upgrade. The time wasted in installing upgrades is the most compelling reason to move to browsers, because upgrades are invisible and automatic. If you are involved in such an intranet, the most sensible approach to take is the shortest path that allows you to use your existing code base, rather than trying to recode your programs in a new language.When faced with this bewildering array of solutions to the client-side programming problem, the best plan of attack is a cost-benefit analysis. Consider the constraints of your problem and what would be the shortest path to your solution. Since client-side programming is still programming, it’s always a good idea to take the fastest development approach for your particular situation. This is an aggressive stance to prepare for inevitable encounters with the problems of program development.8.Server-side programmingThis whole discussion has ignored the issue of server-side programming. What happens when you make a request of a server? Most of the time the request is simply “send me this file.” Your browser then interprets the file in some appropriate fashion: as an HTML page, a graphic image, a Java applet, a script program, etc. A more complicated request to a server generally involves a database transaction. A common scenario involves a request for a complex database search, which the server then formats into an HTML page and sends to you as the result. (Of course, if the client has more intelligence via Java or a scripting language, the raw data can be sent and formatted at the client end, which will be faster and less load on the server.) Or you might want to register your name in a database when you join a group or place an order, which will involve changes to that database. These database requests must be processed via some code on the server side, which is generally referred to as server-side programming. Traditionally, server-side programming has been performed using Perl and CGI scripts, but more sophisticated systems have been appearing. These include Java-based Web servers that allow you to perform all your server-side programming in Java by writing what are called servlets. Servlets and their offspring, JSPs, are two of the most compelling reasons that companies who develop Web sites are moving to Java, especially because they eliminate the problems of dealing with differently abled browsers.9. separate arena: applicationsMuch of the brouhaha over Java has been over applets. Java is actually a general-purpose programming language that can solve any type of problem—at least in theory. And as pointed out previously, there might be more effective ways to solve most client/server problems. When you move out of the applet arena (and simultaneously release the restrictions, such as the one against writing to disk) you enter the world of general-purpose applications that run standalone, without a Web browser, just like any ordinary program does. Here, Java’s strength is not only in its portability, but also its programmability. As you’l l see throughout this book, Java has many features that allow you to create robust programs in a shorter period than with previous programming languages. Be aware that this is a mixed blessing. You pay for the improvements through slower execution speed (although there is significant work going on in this area—JDK 1.3, in particular, introduces the so-called “hotspot” performance improvements). Like any language, Java has built-in limitations that might make it inappropriate to solve certain types of programming problems. Java is a rapidly evolving language, however, and as each new release comes out it becomes more and more attractive for solving larger sets of problems.Java和因特网既然Java不过另一种类型的程序设计语言,大家可能会奇怪它为什么值得如此重视,为什么还有这么多的人认为它是计算机程序设计的一个里程碑呢?如果您来自一个传统的程序设计背景,那么答案在刚开始的时候并不是很明显。
计算机java外文翻译外文文献英文文献
英文原文:Title: Business Applications of Java. Author: Erbschloe, Michael, Business Applications of Java -- Research Starters Business, 2008DataBase: Research Starters - BusinessBusiness Applications of JavaThis article examines the growing use of Java technology in business applications. The history of Java is briefly reviewed along with the impact of open standards on the growth of the World Wide Web. Key components and concepts of the Java programming language are explained including the Java Virtual Machine. Examples of how Java is being used bye-commerce leaders is provided along with an explanation of how Java is used to develop data warehousing, data mining, and industrial automation applications. The concept of metadata modeling and the use of Extendable Markup Language (XML) are also explained.Keywords Application Programming Interfaces (API's); Enterprise JavaBeans (EJB); Extendable Markup Language (XML); HyperText Markup Language (HTML); HyperText Transfer Protocol (HTTP); Java Authentication and Authorization Service (JAAS); Java Cryptography Architecture (JCA); Java Cryptography Extension (JCE); Java Programming Language; Java Virtual Machine (JVM); Java2 Platform, Enterprise Edition (J2EE); Metadata Business Information Systems > Business Applications of JavaOverviewOpen standards have driven the e-business revolution. Networking protocol standards, such as Transmission Control Protocol/Internet Protocol (TCP/IP), HyperText Transfer Protocol (HTTP), and the HyperText Markup Language (HTML) Web standards have enabled universal communication via the Internet and the World Wide Web. As e-business continues to develop, various computing technologies help to drive its evolution.The Java programming language and platform have emerged as major technologies for performing e-business functions. Java programming standards have enabled portability of applications and the reuse of application components across computing platforms. Sun Microsystems' Java Community Process continues to be a strong base for the growth of the Java infrastructure and language standards. This growth of open standards creates new opportunities for designers and developers of applications and services (Smith, 2001).Creation of Java TechnologyJava technology was created as a computer programming tool in a small, secret effort called "the Green Project" at Sun Microsystems in 1991. The Green Team, fully staffed at 13 people and led by James Gosling, locked themselves away in an anonymous office on Sand Hill Road in Menlo Park, cut off from all regular communications with Sun, and worked around the clock for18 months. Their initial conclusion was that at least one significant trend would be the convergence of digitally controlled consumer devices and computers. A device-independent programming language code-named "Oak" was the result.To demonstrate how this new language could power the future of digital devices, the Green Team developed an interactive, handheld home-entertainment device controller targeted at the digital cable television industry. But the idea was too far ahead of its time, and the digital cable television industry wasn't ready for the leap forward that Java technology offered them. As it turns out, the Internet was ready for Java technology, and just in time for its initial public introduction in 1995, the team was able to announce that the Netscape Navigator Internet browser would incorporate Java technology ("Learn about Java," 2007).Applications of JavaJava uses many familiar programming concepts and constructs and allows portability by providing a common interface through an external Java Virtual Machine (JVM). A virtual machine is a self-contained operating environment, created by a software layer that behaves as if it were a separate computer. Benefits of creating virtual machines include better exploitation of powerful computing resources and isolation of applications to prevent cross-corruption and improve security (Matlis, 2006).The JVM allows computing devices with limited processors or memory to handle more advanced applications by calling up software instructions inside the JVM to perform most of the work. This also reduces the size and complexity of Java applications because many of the core functions and processing instructions were built into the JVM. As a result, software developersno longer need to re-create the same application for every operating system. Java also provides security by instructing the application to interact with the virtual machine, which served as a barrier between applications and the core system, effectively protecting systems from malicious code.Among other things, Java is tailor-made for the growing Internet because it makes it easy to develop new, dynamic applications that could make the most of the Internet's power and capabilities. Java is now an open standard, meaning that no single entity controls its development and the tools for writing programs in the language are available to everyone. The power of open standards like Java is the ability to break down barriers and speed up progress.Today, you can find Java technology in networks and devices that range from the Internet and scientific supercomputers to laptops and cell phones, from Wall Street market simulators to home game players and credit cards. There are over 3 million Java developers and now there are several versions of the code. Most large corporations have in-house Java developers. In addition, the majority of key software vendors use Java in their commercial applications (Lazaridis, 2003).ApplicationsJava on the World Wide WebJava has found a place on some of the most popular websites in the world and the uses of Java continues to grow. Java applications not only provide unique user interfaces, they also help to power the backend of websites. Two e-commerce giants that everybody is probably familiar with (eBay and Amazon) have been Java pioneers on the World Wide Web.eBayFounded in 1995, eBay enables e-commerce on a local, national and international basis with an array of Web sites-including the eBay marketplaces, PayPal, Skype, and -that bring together millions of buyers and sellers every day. You can find it on eBay, even if you didn't know it existed. On a typical day, more than 100 million items are listed on eBay in tens of thousands of categories. Recent listings have included a tunnel boring machine from the Chunnel project, a cup of water that once belonged to Elvis, and the Volkswagen that Pope Benedict XVI owned before he moved up to the Popemobile. More than one hundred million items are available at any given time, from the massive to the miniature, the magical to the mundane, on eBay; the world's largest online marketplace.eBay uses Java almost everywhere. To address some security issues, eBay chose Sun Microsystems' Java System Identity Manager as the platform for revamping its identity management system. The task at hand was to provide identity management for more than 12,000 eBay employees and contractors.Now more than a thousand eBay software developers work daily with Java applications. Java's inherent portability allows eBay to move to new hardware to take advantage of new technology, packaging, or pricing, without having to rewrite Java code ("eBay drives explosive growth," 2007).Amazon (a large seller of books, CDs, and other products) has created a Web Service application that enables users to browse their product catalog and place orders. uses a Java application that searches the Amazon catalog for books whose subject matches a user-selected topic. The application displays ten books that match the chosen topic, and shows the author name, book title, list price, Amazon discount price, and the cover icon. The user may optionally view one review per displayed title and make a buying decision (Stearns & Garishakurthi, 2003).Java in Data Warehousing & MiningAlthough many companies currently benefit from data warehousing to support corporate decision making, new business intelligence approaches continue to emerge that can be powered by Java technology. Applications such as data warehousing, data mining, Enterprise Information Portals (EIP's), and Knowledge Management Systems (which can all comprise a businessintelligence application) are able to provide insight into customer retention, purchasing patterns, and even future buying behavior.These applications can not only tell what has happened but why and what may happen given certain business conditions; allowing for "what if" scenarios to be explored. As a result of this information growth, people at all levels inside the enterprise, as well as suppliers, customers, and others in the value chain, are clamoring for subsets of the vast stores of information such as billing, shipping, and inventory information, to help them make business decisions. While collecting and storing vast amounts of data is one thing, utilizing and deploying that data throughout the organization is another.The technical challenges inherent in integrating disparate data formats, platforms, and applications are significant. However, emerging standards such as the Application Programming Interfaces (API's) that comprise the Java platform, as well as Extendable Markup Language (XML) technologies can facilitate the interchange of data and the development of next generation data warehousing and business intelligence applications. While Java technology has been used extensively for client side access and to presentation layer challenges, it is rapidly emerging as a significant tool for developing scaleable server side programs. The Java2 Platform, Enterprise Edition (J2EE) provides the object, transaction, and security support for building such systems.Metadata IssuesOne of the key issues that business intelligence developers must solve is that of incompatible metadata formats. Metadata can be defined as information about data or simply "data about data." In practice, metadata is what most tools, databases, applications, and other information processes use to define, relate, and manipulate data objects within their own environments. It defines the structure and meaning of data objects managed by an application so that the application knows how to process requests or jobs involving those data objects. Developers can use this schema to create views for users. Also, users can browse the schema to better understand the structure and function of the database tables before launching a query.To address the metadata issue, a group of companies (including Unisys, Oracle, IBM, SAS Institute, Hyperion, Inline Software and Sun) have joined to develop the Java Metadata Interface (JMI) API. The JMI API permits the access and manipulation of metadata in Java with standard metadata services. JMI is based on the Meta Object Facility (MOF) specification from the Object Management Group (OMG). The MOF provides a model and a set of interfaces for the creation, storage, access, and interchange of metadata and metamodels (higher-level abstractions of metadata). Metamodel and metadata interchange is done via XML and uses the XML Metadata Interchange (XMI) specification, also from the OMG. JMI leverages Java technology to create an end-to-end data warehousing and business intelligence solutions framework.Enterprise JavaBeansA key tool provided by J2EE is Enterprise JavaBeans (EJB), an architecture for the development of component-based distributed business applications. Applications written using the EJB architecture are scalable, transactional, secure, and multi-user aware. These applications may be written once and then deployed on any server platform that supports J2EE. The EJB architecture makes it easy for developers to write components, since they do not need to understand or deal with complex, system-level details such as thread management, resource pooling, and transaction and security management. This allows for role-based development where component assemblers, platform providers and application assemblers can focus on their area of responsibility further simplifying application development.EJB's in the Travel IndustryA case study from the travel industry helps to illustrate how such applications could function. A travel company amasses a great deal of information about its operations in various applications distributed throughout multiple departments. Flight, hotel, and automobile reservation information is located in a database being accessed by travel agents worldwide. Another application contains information that must be updated with credit and billing historyfrom a financial services company. Data is periodically extracted from the travel reservation system databases to spreadsheets for use in future sales and marketing analysis.Utilizing J2EE, the company could consolidate application development within an EJB container, which can run on a variety of hardware and software platforms allowing existing databases and applications to coexist with newly developed ones. EJBs can be developed to model various data sets important to the travel reservation business including information about customer, hotel, car rental agency, and other attributes.Data Storage & AccessData stored in existing applications can be accessed with specialized connectors. Integration and interoperability of these data sources is further enabled by the metadata repository that contains metamodels of the data contained in the sources, which then can be accessed and interchanged uniformly via the JMI API. These metamodels capture the essential structure and semantics of business components, allowing them to be accessed and queried via the JMI API or to be interchanged via XML. Through all of these processes, the J2EE infrastructure ensures the security and integrity of the data through transaction management and propagation and the underlying security architecture.To consolidate historical information for analysis of sales and marketing trends, a data warehouse is often the best solution. In this example, data can be extracted from the operational systems with a variety of Extract, Transform and Load tools (ETL). The metamodels allow EJBsdesigned for filtering, transformation, and consolidation of data to operate uniformly on datafrom diverse data sources as the bean is able to query the metamodel to identify and extract the pertinent fields. Queries and reports can be run against the data warehouse that contains information from numerous sources in a consistent, enterprise-wide fashion through the use of the JMI API (Mosher & Oh, 2007).Java in Industrial SettingsMany people know Java only as a tool on the World Wide Web that enables sites to perform some of their fancier functions such as interactivity and animation. However, the actual uses for Java are much more widespread. Since Java is an object-oriented language like C++, the time needed for application development is minimal. Java also encourages good software engineering practices with clear separation of interfaces and implementations as well as easy exception handling.In addition, Java's automatic memory management and lack of pointers remove some leading causes of programming errors. Most importantly, application developers do not need to create different versions of the software for different platforms. The advantages available through Java have even found their way into hardware. The emerging new Java devices are streamlined systems that exploit network servers for much of their processing power, storage, content, and administration.Benefits of JavaThe benefits of Java translate across many industries, and some are specific to the control and automation environment. For example, many plant-floor applications use relatively simple equipment; upgrading to PCs would be expensive and undesirable. Java's ability to run on any platform enables the organization to make use of the existing equipment while enhancing the application.IntegrationWith few exceptions, applications running on the factory floor were never intended to exchange information with systems in the executive office, but managers have recently discovered the need for that type of information. Before Java, that often meant bringing together data from systems written on different platforms in different languages at different times. Integration was usually done on a piecemeal basis, resulting in a system that, once it worked, was unique to the two applications it was tying together. Additional integration required developing a brand new system from scratch, raising the cost of integration.Java makes system integration relatively easy. Foxboro Controls Inc., for example, used Java to make its dynamic-performance-monitor software package Internet-ready. This software provides senior executives with strategic information about a plant's operation. The dynamic performance monitor takes data from instruments throughout the plant and performs variousmathematical and statistical calculations on them, resulting in information (usually financial) that a manager can more readily absorb and use.ScalabilityAnother benefit of Java in the industrial environment is its scalability. In a plant, embedded applications such as automated data collection and machine diagnostics provide critical data regarding production-line readiness or operation efficiency. These data form a critical ingredient for applications that examine the health of a production line or run. Users of these devices can take advantage of the benefits of Java without changing or upgrading hardware. For example, operations and maintenance personnel could carry a handheld, wireless, embedded-Java device anywhere in the plant to monitor production status or problems.Even when internal compatibility is not an issue, companies often face difficulties when suppliers with whom they share information have incompatible systems. This becomes more of a problem as supply-chain management takes on a more critical role which requires manufacturers to interact more with offshore suppliers and clients. The greatest efficiency comes when all systems can communicate with each other and share information seamlessly. Since Java is so ubiquitous, it often solves these problems (Paula, 1997).Dynamic Web Page DevelopmentJava has been used by both large and small organizations for a wide variety of applications beyond consumer oriented websites. Sandia, a multiprogram laboratory of the U.S. Department of Energy's National Nuclear Security Administration, has developed a unique Java application. The lab was tasked with developing an enterprise-wide inventory tracking and equipment maintenance system that provides dynamic Web pages. The developers selected Java Studio Enterprise 7 for the project because of its Application Framework technology and Web Graphical User Interface (GUI) components, which allow the system to be indexed by an expandable catalog. The flexibility, scalability, and portability of Java helped to reduce development timeand costs (Garcia, 2004)IssueJava Security for E-Business ApplicationsTo support the expansion of their computing boundaries, businesses have deployed Web application servers (WAS). A WAS differs from a traditional Web server because it provides a more flexible foundation for dynamic transactions and objects, partly through the exploitation of Java technology. Traditional Web servers remain constrained to servicing standard HTTP requests, returning the contents of static HTML pages and images or the output from executed Common Gateway Interface (CGI ) scripts.An administrator can configure a WAS with policies based on security specifications for Java servlets and manage authentication and authorization with Java Authentication andAuthorization Service (JAAS) modules. An authentication and authorization service can bewritten in Java code or interface to an existing authentication or authorization infrastructure. Fora cryptography-based security infrastructure, the security server may exploit the Java Cryptography Architecture (JCA) and Java Cryptography Extension (JCE). To present the user with a usable interaction with the WAS environment, the Web server can readily employ a formof "single sign-on" to avoid redundant authentication requests. A single sign-on preserves user authentication across multiple HTTP requests so that the user is not prompted many times for authentication data (i.e., user ID and password).Based on the security policies, JAAS can be employed to handle the authentication process with the identity of the Java client. After successful authentication, the WAS securitycollaborator consults with the security server. The WAS environment authentication requirements can be fairly complex. In a given deployment environment, all applications or solutions may not originate from the same vendor. In addition, these applications may be running on different operating systems. Although Java is often the language of choice for portability between platforms, it needs to marry its security features with those of the containing environment.Authentication & AuthorizationAuthentication and authorization are key elements in any secure information handling system. Since the inception of Java technology, much of the authentication and authorization issues have been with respect to downloadable code running in Web browsers. In many ways, this had been the correct set of issues to address, since the client's system needs to be protected from mobile code obtained from arbitrary sites on the Internet. As Java technology moved from a client-centric Web technology to a server-side scripting and integration technology, it required additional authentication and authorization technologies.The kind of proof required for authentication may depend on the security requirements of a particular computing resource or specific enterprise security policies. To provide such flexibility, the JAAS authentication framework is based on the concept of configurable authenticators. This architecture allows system administrators to configure, or plug in, the appropriate authenticatorsto meet the security requirements of the deployed application. The JAAS architecture also allows applications to remain independent from underlying authentication mechanisms. So, as new authenticators become available or as current authentication services are updated, system administrators can easily replace authenticators without having to modify or recompile existing applications.At the end of a successful authentication, a request is associated with a user in the WAS user registry. After a successful authentication, the WAS consults security policies to determine if the user has the required permissions to complete the requested action on the servlet. This policy canbe enforced using the WAS configuration (declarative security) or by the servlet itself (programmatic security), or a combination of both.The WAS environment pulls together many different technologies to service the enterprise. Because of the heterogeneous nature of the client and server entities, Java technology is a good choice for both administrators and developers. However, to service the diverse security needs of these entities and their tasks, many Java security technologies must be used, not only at a primary level between client and server entities, but also at a secondary level, from served objects. By using a synergistic mix of the various Java security technologies, administrators and developers can make not only their Web application servers secure, but their WAS environments secure as well (Koved, 2001).ConclusionOpen standards have driven the e-business revolution. As e-business continues to develop, various computing technologies help to drive its evolution. The Java programming language and platform have emerged as major technologies for performing e-business functions. Java programming standards have enabled portability of applications and the reuse of application components. Java uses many familiar concepts and constructs and allows portability by providing a common interface through an external Java Virtual Machine (JVM). Today, you can find Java technology in networks and devices that range from the Internet and scientific supercomputers to laptops and cell phones, from Wall Street market simulators to home game players and credit cards.Java has found a place on some of the most popular websites in the world. Java applications not only provide unique user interfaces, they also help to power the backend of websites. While Java technology has been used extensively for client side access and in the presentation layer, it is also emerging as a significant tool for developing scaleable server side programs.Since Java is an object-oriented language like C++, the time needed for application development is minimal. Java also encourages good software engineering practices with clear separation of interfaces and implementations as well as easy exception handling. Java's automatic memory management and lack of pointers remove some leading causes of programming errors. The advantages available through Java have also found their way into hardware. The emerging new Java devices are streamlined systems that exploit network servers for much of their processing power, storage, content, and administration.中文翻译:标题:Java的商业应用。
J2EE 外文翻译原文
Design and Implementation of Distribution Network SCADA System Based onJ2EE FrameworkZhao Qiang, Chen DanyanDepartment of Computer Science and Technology, North China Electric Power University (NCEPU), Beijing 102206, Chinazhaoqiang01@ABSTRACT: In this paper, the problems exposed by the thirdgeneration of SCADA (Supervisory Control And Data Acquisition) based on the C/S(Client/Server) mode are analyzed. Then, a new distribution network SCADA based on the four-tier architecture of J2EE platform is built. Because of poor information sharing and interoperability of CORBA (Common Object Request Broker Architecture) as the integration bus among application systems of power enterprises, the seamless integration between SCADA heterogeneous data platform which is based on standard IEC (International Electrical Commission) 61970, and other systems is achieved by means of Web services, and such integration is standard and open. The combination of EJB (Enterprise JavaBean) and Hibernate to implement the business logic and make data be persistent separately also makes the SCADA much more scalable and flexible. Because of its flexibility and extensibility, this new SCADA has great benefit to the automation course of electric power systems.KEYWORDS: J2EE framework; SCADA; standard IEC 61970; Web servicesI. I NTRODUCTIONDistribution network SCADA (Supervisory Control and Data Acquisition) includes not only the models and methods of data acquisition and supervisory control but the models and methods of power network topology. The power system models provided by SCADA are consistent, complete and can be used directly [1].With the expansion and market-oriented operation of the power network, the operating and failure modes begin to increase, so does the data needed to be monitored and analyzed. Especially when devices are running down or under emergency conditions, the analysis and decision-making tasks are so pressing and heavy that the operator often can’t accomplish them perfectly [2]. Therefore, they have to depend on the efficient SCADA. The problems of the third generation of SCADA based on the C/S (Client/Server) mode have gradually appeared, such as being short of flexibility, high install cost, being difficult to share data with other systems, etc. Power network SCADA in China has stepped into the fourth generation and its main characters includes standard IEC (International Electrical Commission) 61970 based, object-oriented and continuing to expand the integration between the SCADA system and other systems [3].J2EE platform, as the mainstream enterprise-class platform for distributed applications, is a component-basedand standards-based platform. Developing SCADA with advanced J2EE technologies can resolve a series of problems existing in the traditional SCADA. J2EE platform is the ideal platform to develop the fourth generation of SCADA system.II.T HE DESIGN OF DISTRIBUTION NETWORK SCADABASED ON J2EE PLATFORMAccording to J2EE architecture, this SCADA is designed Figure 1. SCADA system based on J2EE platform.The new SCADA is based on B/S (Browser/Server) and C/S mixed mode: on the one hand, the browser supplies the users with rich graphic display and user interaction functions, including sequence-of-event report, primary electric wiring diagram, etc., on the other hand, independent Java applications, which run directly on the client operating system(or Java Virtual Machine), can make full use of client resources and computing ability, and the result is that it will offer richer functions for the master side, e.g., analyzing the real-time or historical data, monitoring the devices, etc. The monitor screens of the system are realized by SVG (Scalable Vector Graphics) which is recommended by standard IEC 61970. The system reads static map metadata firstly to create SVG screen, and then reads the real-time data according to pre-defined refresh cycle to refresh the screen partially.JSP (JavaServer Pages) and Java Servlet in the Web layer respond to the requests from the client. Having received2009 International Forum on Information Technology and Application 2009 International Forum on Information Technology and Applicationsthose requests, Servlet calls the EJB (Enterprise JavaBean) components in the business layer via factory delegate class, and then returns the processing results to the client. For the purpose of realizing data sharing between SCADA and other power systems, e.g., GIS (Geographic Information System), some business methods are further wrapped and published as Web services according to standard IEC 61970.The business logic is implemented by EJB component. EJB is the core of the whole design and it enables the system to meet the diverse requirements of power enterprises. The detailed business logic in the early SCADA systems is wrapped by EJB component, that is to say Entity Bean is responsible for building dynamic mapping with the database storing historical data [4]. But in this system, such an old structure is discarded. It uses Hibernate framework instead to build dynamic mapping and then Session Bean realizes the business logic by calling the Hibernate. The business logic encapsulated includes recording sequence-of-even, analyzing failures, etc. Hibernate not only allows the mapping of mapped tables with the domain objects, but also provides data query and recovery mechanisms. Hibernate can replace Entity Bean in the J2EE applications to complete the important task of data persistence [5].The real-time database and the relational database are both adopted. The data from substations are written into the former by the data acquisition module, and then it stores the date needed to record into the latter. The data stored mainly involves telemetry, telesignalling and electrical measurement. III.T HE IMPLEMENTATION OF DISTRIBUTION NETWORKSCADArmation expression and multi-system integrationbased on standard IEC 61970This distribution network SCADA system follows standard IEC 61970 to accomplish the information exchange and interoperation among systems. The integration platform encompasses CIM (Common Information Model), database, import and export tool for CIM/XML (eXtensible Markup Language), CIS (Component Interface Specification) interface implementation and Web services integration bus, as illustrated in Fig. 2.The CIM database mainly used to manage and maintain CIM model data and build bi-directional interface with real-time database. The packages needed to be implemented consist of the core package, topology package, wire package, measuring package and other packages related with CIS service interfaces. The structure of CIM database is built automatically in light of mdl files by conversion tool and the data source comes from SCADA real-time database. The CIM/XML import/export tool will import XML files into CIM database if the whole grid model changes.The CIS interface implementation implements GDA (Generic Data Access) interface and HSDA (High Speed Data Access) interface. The former provides conditional and unconditional queries, writing ability while the latter is used to transfer massive data efficiently [6]. This system offers to read and write data synchronously and asynchronously, subscribe data, etc. Systems like GIS can develop new applications or transfer data flexibly by calling GDA and HSDA implementations on the Web service integration bus. For example, the client can get grid model data by calling GDA methods or get measuring values by calling HSDA methods.The following steps show how to get the whole gird model.1)Get “ResourceID”: Get “ResourceID” for each class by calling method “get_uris”.2)Get record values: Get all record values in the tables by calling method “get_filtered_extent_values”.The system uses the iterator to allow the client to get an arbitrary amount of resources in one time. If the iterator has no resource when the client won’t use it any more, it will be recycled automatically.The traditional integration solutions for heterogeneous system are private and complex, that is to say, different components can’t exchange data directly. In this system, we adopt loosely coupled Web services. It is of great significance in promoting power enterprises to achieve wider application integration.The CIS provided by standard IEC 61970 is identified by IDL (Interface Description Language), which is only for CORBA (Common Object Request Broker Architecture). If want to develop Web services [7], we have to transform IDL CIS into WSDL (Web Service Definition Language) CIS according to conversion rules. Then the CIS Web services server can be built by using the JAX-RPC (Java APIs for XML-Based Remote Procedure Call) server-side model. Here some tools, such as Axis, will be used to mapping WSDL CIS into Java classes.The method using Web services to establish integration bus improves the reusability of the SCADA system and achieves overall information sharing. The third party can visits the SCADA’s run information and grid model in a standard manner.B.Visiting EJB component with design patternsAll the instances created by the factory method pattern usually implement a same interface, where all methods owned by the instances are identified, and these methods always have different implementation in different implementing classes. The present system combines factory method pattern and singleton pattern when creating EJBdelegate factory class. The singleton pattern will provideglobal access point, and the result is that the cost of creatingand destroying Java objects will decrease. The steps for theEJB factory to get EJB remote interface by JNDI (Java Naming and Directory Interface) are as follows.1) Create an EJB factory class: Create an EJB factory class named RemoteFactory, and declare an instance of HashMap for caching EJB remote interface and a private andstatic instance of RemoteFactory which will be returned by asynchronous method. 2) Declaration: Declare the constructor of RemoteFactory to be private. 3) Create a lookup method: Create a lookup method whose return type is EJBObject. In this method, lookup the object of EJBObject in the above HashMap cache pool firstly.If it does exist, then return it. Otherwise, lookup all the homeinterfaces’ parent interface by JNDI in the context, and then a new object of EJBObject which will be put into the existing HashMap later will be created by the interface.After the factory class being created, the client just needsto call the lookup method of it and transfer concreteparameters. Such a universal method can avoid a largenumber of repeat lookups and calls for the method “create”from the client.C. The integration of EJB and HibernateAs the object-relational mapping solution of Java,Hibernate provides a convenient framework for the mapping from object-oriented domain model to the traditional relational database. On the merits of Hibernate, the system will integrate EJB and Hibernate. Hibernate provides the operation to the database and it will be deployed to the Weblogic application server, while Session Bean is responsible for calling Hibernate. The steps of the integration are as follows.1) Deploy Hibernate: Deploy Hibernate to the WeblogicApplication Server. After the deployment, then Weblogic will generate a JNDI for Hibernate. 2) Create a StartUp class: In order to ensure the pre-creating of Hibernate’s SessionFactory, the system needs to create a StartUp class which implements the Weblogic T3StartUpDef interface. This class will begin to run in thebackground when the application server starts. The coremethod is as follows.public String startup(String name, Hashtable args) throwsException {Configuration con = newConfiguration().configure("/hibernate.cfg.xml");SessionFactory sf = con.buildSessionFactory();}3) Call Hibernate: Session Bean can get the Hibernate SessionFactory through the above-mentioned Hibernate JNDI. After getting the instance, Session Bean can operate the database through Hibernate.Context ctx = new InitialContext(); SessionFactory sf = (SessionFactory) ctx.lookup("hibernate/session_factory"); D. Real-time Java TechnologyBecause of Java’s inherent uncertainty such as thread management, garbage collection, class loading, etc., the standard Java applications that run on general JVM (JavaVirtual Machine) can only meet soft real-time demand in a few hundred milliseconds.For a real-time system, predictable execution is critical.In the SCADA systems, when the fault accidents happen, SCADA system should give reaction timely, but the conventional Java thread uses the time slice rotation scheduling mechanism. The mechanism doesn’t provide any priority protections to threads.By using fixed priority scheduling strictly, real-time thread scheduling of RTSJ (Real Time Specification for Java) is perceptible. The class HighResolutionTime and Clock provide high resolution clocks for real-time systems and canbe accurate to nanosecond [8]. The mechanisms that RTSJprovides can meet the needs of the real-time SCADA system.To provide real-time functions, the SCADA systemrequires the underlying operating system to support real-time,for example, Solaris 10 has a real-time scheduler. Also theprogram needs to import the javax.realtime package beforewe use any functions provided by RTSJ implementation. Follow following steps can create and start a real-time thread. 1) Initialize parameters: Initialize related parameters of the constructor of real-time thread. A typical constructor is like this: RealtimeThread(SchedulingParameters scheduling, ReleaseParameters release, MemoryParameters memory, MemoryArea area, ProcessingGroupParameters group, ng.Runnable logic). 2) Instantiating the real-time thread: Instantiating a real-time thread object using above constructor. 3) Start the thread: Call the “start” method of the real-time thread.Generally in the system, the common RealtimeThread will be used in the mission that can tolerate delays caused by the garbage collector. High-priority NoHeapRealtimeThreadis rarely interrupted or occupied, so they will be used in the most demanding tasks which can’t tolerate delays. IV. C ONCLUSION This paper applies the four-layer J2EE architecture to the development of the distribution network SCADA system. After analyzing the architecture of existing SCADA systems, the new system gets a lot of improvements by using many new software technologies that sprang up in recent years. With introduction of the EJB component, SVG, real-time Java technology, standard IEC 61970 and Web services, practices have proved that the new distribution network SCADA system has greater flexibility and scalability than the old system. It will play an important role in thedistribution network automation systems.R EFERENCES[1]Chen Tang, Zhao Zukang, and Chen Xingying, Distribution NetworkSystems and Their Automation Technologies. Beijing: China Electric Power Press, 2004.[2]Du Junhong, Le Quanming, and Tenghuan, “Design of powerdispatching automation systems based on J2EE and CORBA,”Automation of Electric Power Systems. Nanjing, vol. 28, pp. 78-81, March 2004.[3]Ma Zhengwu, “Summarize of SCADA&RTU in the course ofrealizing the enterprise automation,” Program-mable Controller & Factory Automation. Shenzhen, pp. 18-20, August 2005.[4]Yang Jian, Lv You, and Bao Yinghao, “Research and design of powerSCADA system based on B/S three-tier structure,” Science Mosaic.Nanchang, pp. 45-47, September 2007. [5]Gan Shuman, Open Source Framework Technologies and PracticesBased on Eclipse. Beijing: Publishing House of Electronics Industry, 2007.[6]Pan Jianyue, Zhu Chunjie, and Xia Xiang, “Research and applicationof CIM in power utility,” Zhejiang Electric Power. Hangzhou, pp. 9-12, March 2004.[7]Zhang Shenming, Liu Guoding, “Introduction of standard IEC61970,” Automation of Electric Power Systems. Nanjing, vol. 26, pp.1-6, July 2002.[8]Peter C.Dibble, Real-Time Java Platform Programming, Beijing:Machinery Industry Press, 2003.。
java毕业设计外文文献原文及译文
毕业设计说明书英文文献及中文翻译学学 院:专指导教师:2014 年 6 月软件学院 软件工程Thinking in JavaAlthough it is based on C++, Java is more of a “pure” object-oriented C++ and Java are hybrid languages, but in Java the designers felt that the hybridization was not as important as it was in C++. A hybrid language allows multiple programming styles; the reason C++ is hybrid is to support backward compatibility with the C language. Because C++ is a superset of the C language, it includes many of that language’s undesirable features, which can make some aspects of C++ overly complicated. The Java language assumes that you want to do only object-oriented programming. This means that before you can begin you must shift your mindset into an object-oriented world (unless it’s already there). The benefit of this initial effort is the ability to program in a language that is simpler to learn and to use than many other OOP languages. In this chapter we’ll see the basic components of a Java program and we’ll learn that everything in Java is an object, even a Java program.Each programming language has its own means of manipulating data. Sometimes the programmer must be constantly aware of what type of manipulation is going on. Are you manipulating the object directly, or are you dealing with some kind of indirect representation (a pointer in C or C++) that must be treated with a special syntax?All this is simplified in Java. You treat everything as an object, using a single consistent syntax. Although you treat everything as an object, the identifier you manipulate is actually a “reference” to an object. You might imagine this scene as a television (the object) with your remote control (the reference). As long as you’re holding this reference, you have a connection to the television, but when someone says “change the channel” or “lower the volume,” what you’re manipulating is the reference, which in turn modifies the object. If you want to move around the room and still control the television, you take the remote/reference with you, not the television.Also, the remote control can stand on its own, with no television. That is, just because you have a reference doesn’t mean there’s necessarily an object connected to it. So if you want to hold a word or sentence, you create a String reference:But here you’ve created only the reference, not an object. If you decided to send a message to s at this point, you’ll get an error (at run time) because s isn’t actually attached to anything (there’s no television). A safer practice, then, is always to initialize a reference when you create it.However, this uses a special Java feature: strings can be initialized with quoted text. Normally, you must use a more general type of initialization for objectsWhen you create a reference, you want to connect it with a new object. You do so, in general, with the new keyword. The keyword new says, “Make me a new one of these objects.” So in the preceding example, you can say:Not only does this mean “Make me a new String,” but it also gives information about how to make the String by supplying an initial character string.Of course, String is not the only type that exists. Java comes with a plethora of ready-made types. What’s more important is that you can create your own types. In fact, that’s the fundamental activity in Java programming, and it’s what you’ll b e learning about in the rest of this bookIt’s useful to visualize some aspects of how things are laid out while the program is running—in particular how memory is arranged. There are six different places to store data: Registers. This is the fastest storage because it exists in a place different from that of other storage: inside the processor. However, the number of registers is severely limited, so registers are allocated by the compiler according to its needs. You don’t have direct control, nor do you see any evidence in your programs that registers even exist.The stack. This lives in the general random-access memory (RAM) area, but has direct support from the processor via its stack pointer. The stack pointer is moved down to create new memory and moved up to release that memory. This is an extremely fast and efficient way to allocate storage, second only to registers. The Java compiler must know, while it is creating the program, the exact size and lifetime of all the data that is stored on the stack, because it must generate the code to move the stack pointer up and down. This constraint places limits on the flexibility of your programs, so while some Java storage exists on the stack—in particular, object references—Java objects themselves are not placed on the stack. The heap. This is a general-purpose pool of memory (also in the RAM area) where all Java objects live. The nice thing about the heap is that, unlike the stack, the compiler doesn’t need to know how much storage it needs to allocate from the heap or how long that storage must stay on the heap. Thus, there’s a great deal of flexibility in using storage on the heap. Whenever you need to create an object, you simply write the code to create it by using new, and the storage is allocated on th e heap when that code is executed. Of course there’s a priceyou pay for this flexibility. It takes more time to allocate heap storage than it does to allocate stack storage (if you even could create objects on the stack in Java, as you can in C++). Static storage. “Static” is used here in the sense of “in a fixed location” (although it’s also in RAM). Static storage contains data that is available for the entire time a program is running. You can use the static keyword to specify that a particular element of an object is static, but Java objects themselves are never placed in static storage.Constant storage. Constant values are often placed directly in the program code, which is safe since they can never change. Sometimes constants are cordoned off by themselves so that they can be optionally placed in read-only memory (ROM), in embedded systems.Non-RAM storage. If data lives completely outside a program, it can exist while the program is not running, outside the control of the program. The two primary examples of this are streamed objects, in which objects are turned into streams of bytes, generally to be sent to another machine, and persistent objects, in which the objects are placed on disk so they will hold their state even when the program is terminated. The trick with these types of storage is turning the objects into something that can exist on the other medium, and yet can be resurrected into a regular RAM-based object when necessary. Java provides support for lightweight persistence, and future versions of Java might provide more complete solutions for persistenceOne group of types, which you’ll use quite often in your programming, gets special treatment. You can think of these as “primitive” types. The reason for the special treatment is that to create an object with new—especially a small, simple variable—isn’t very efficient, because new places objects on the heap. For these types Java falls back on the approach taken by C and C++. That is, instead of creating the variable by using new, an “automatic” variable is created that is not a reference. The variable holds the value, and it’s placed on the stack, so it’s much more efficient.Java determines the size of each primitive type. These sizes don’t change from one machine architecture to another as they do in most languages. This size invariance is one reason Java programs are portableJava编程思想“尽管以C++为基础,但Java是一种更纯粹的面向对象程序设计语言”。
Spring的web-MVC构架模式大学毕业论文外文文献翻译及原文
毕业设计(论文)外文文献翻译文献、资料中文题目:Spring的web MVC 构架模式文献、资料英文题目:Web MVC with the Spring Framework 文献、资料来源:文献、资料发表(出版)日期:院(部):专业:班级:姓名:学号:指导教师:翻译日期: 2017.02.14翻译文稿1、Spring的web MVC 构架模式Juergen Hoeller1.介绍:Spring 应用构架当你第一次看到Spring的时候,你一定会说:"哦不,又一种web 构架".这篇文章将告诉你Spring明显区别于其他轻量级application framework, 它将专注于web的支持,与struts 和 webwork有着明显的区别。
在和struts 和 webwork的对比上,Spring是一个服务于所有层面的application framework:提供了bean的配置基础,AOP的支持,JDBC的提取框架,抽象事务支持,等等。
它有一个非常显著的特点:在某个层面上如果你不需要Spring的支持,你就可以不使用String的class,只使用它的某一部分的功能。
从它的设计理念,你可以看到String 帮助你实现了真正的逻辑层和web层的分离:例如。
一个校验应用将不用依靠controllers,就可以实现。
这样的目标是更好的重用和易测:过分依靠不必要的容器和框架将不能实现这一点。
当然,Spring 的自己的web支持和通常框架模式的细致完整.然而,Spring 替换struts,webwork或者其他的web方案非常的容易.对于Spring的web支持或者不同的地方,Spring 允许你在web容器里面建立一个中间层,在测试环境或者标准独立的应用里面来设置重用你的商务逻辑.还有在J2EE环境里面,你的商务逻辑不必依靠容器提供的服务,像JTA ,EJB的支持.良好的构架的web应用可以运行在任何容器上,如,Tomcat 或者 Resin. 值得注意的是,Spring 不是和已经存在的解决方案进行竞争. 我们鼓励结合标准的技术,如, Servlet, JSP, JTA, JNDI, JDBC, and JDO, 和非常匹配的工具,如,Hibernate, Velocity, Log4J, and Caucho's Hessian/Burlap.这个框架的的设计思想是在你的应用需要改良的时候,你将会做一些技术的选择:例如,如果你需要分布式事务处理,你可能需要用Spring的Jta TransactionManager 来实现JTA服务.或者,用DataSourceTransactionManager or HibernateTransactionManager 来实现美妙完美的单个数据库交换。
Spring 框架简介外文翻译
xxxx大学xxx学院毕业设计(论文)外文文献翻译系部xxxx专业xxxx学生姓名xxxx 学号xxxx指导教师xxxx 职称xxxxIntroducing the Spring FrameworkThe Spring Framework: a popular open source application framework that addresses many of the issues outlined in this book. This chapter will introduce the basic ideas of Spring and dis-cuss the central “bean factory” lightweight Inversion-of-Control (IoC) container in detail.Spring makes it particularly easy to implement lightweight, yet extensible, J2EE archi-tectures. It provides an out-of-the-box implementation of the fundamental architectural building blocks we recommend. Spring provides a consistent way of structuring your applications, and provides numerous middle tier features that can make J2EE development significantly easier and more flexible than in traditional approaches.The basic motivations for Spring are:To address areas not well served by other frameworks. There are numerous good solutions to specific areas of J2EE infrastructure: web frameworks, persistence solutions, remoting tools, and so on. However, integrating these tools into a comprehensive architecture can involve significant effort, and can become a burden. Spring aims to provide an end-to-end solution, integrating spe-cialized frameworks into a coherent overall infrastructure. Spring also addresses some areas that other frameworks don’t. For example, few frameworks address generic transaction management, data access object implementation, and gluing all those things together into an application, while still allowing for best-of-breed choice in each area. Hence we term Spring an application framework, rather than a web framework, IoC or AOP framework, or even middle tier framework.To allow for easy adoption. A framework should be cleanly layered, allowing the use of indi-vidual features without imposing a whole worldview on the application. Many Spring features, such as the JDBC abstraction layer or Hibernate integration, can be used in a library style or as part of the Spring end-to-end solution.To deliver ease of use. As we’ve noted, J2EE out of the box is relatively hard to use to solve many common problems. A good infrastructure framework should make simple tasks simple to achieve, without forcing tradeoffs for future complex requirements (like distributed transactions) on the application developer. It should allow developers to leverage J2EE services such as JTA where appropriate, but to avoid dependence on them in cases when they are unnecessarily complex.To make it easier to apply best practices. Spring aims to reduce the cost of adhering to best practices such as programming to interfaces, rather than classes, almost to zero. However, it leaves the choice of architectural style to the developer.Non-invasiveness. Application objects should have minimal dependence on the framework. If leveraging a specific Spring feature, an object should depend only on that particular feature, whether by implementing a callback interface or using the framework as a class library. IoC and AOP are the key enabling technologies for avoiding framework dependence.Consistent configuration. A good infrastructure framework should keep application configuration flexible and consistent, avoiding the need for custom singletons and factories. A single style should be applicable to all configuration needs, from the middle tier to web controllers.Ease of testing. Testing either whole applications or individual application classes in unit tests should be as easy as possible. Replacing resources or application objects with mock objects should be straightforward.To allow for extensibility. Because Spring is itself based on interfaces, rather than classes, it is easy to extend or customize it. Many Spring components use strategy interfaces, allowing easy customization.A Layered Application FrameworkChapter 6 introduced the Spring Framework as a lightweight container, competing with IoC containers such as PicoContainer. While the Spring lightweight container for JavaBeans is a core concept, this is just the foundation for a solution for all middleware layers.Basic Building Blockspring is a full-featured application framework that can be leveraged at many levels. It consists of multi-ple sub-frameworks that are fairly independent but still integrate closely into a one-stop shop, if desired. The key areas are:Bean factory. The Spring lightweight IoC container, capable of configuring and wiring up Java-Beans and most plain Java objects, removing the need for custom singletons and ad hoc configura-tion. Various out-of-the-box implementations include an XML-based bean factory. The lightweight IoC container and its Dependency Injection capabilities will be the main focus of this chapter.Application context. A Spring application context extends the bean factory concept by adding support for message sources and resource loading, and providing hooks into existing environ-ments. Various out-of-the-box implementations include standalone application contexts and an XML-based web application context.AOP framework. The Spring AOP framework provides AOP support for method interception on any class managed by a Spring lightweight container.It supports easy proxying of beans in a bean factory, seamlessly weaving in interceptors and other advice at runtime. Chapter 8 dis-cusses the Spring AOP framework in detail. The main use of the Spring AOP framework is to provide declarative enterprise services for POJOs.Auto-proxying. Spring provides a higher level of abstraction over the AOP framework and low-level services, which offers similar ease-of-use to .NET within a J2EE context. In particular, the provision of declarative enterprise services can be driven by source-level metadata.Transaction management. Spring provides a generic transaction management infrastructure, with pluggable transaction strategies (such as JTA and JDBC) and various means for demarcat-ing transactions in applications. Chapter 9 discusses its rationale and the power and flexibility that it offers.DAO abstraction. Spring defines a set of generic data access exceptions that can be used for cre-ating generic DAO interfaces that throw meaningful exceptions independent of the underlying persistence mechanism. Chapter 10 illustrates the Spring support for DAOs in more detail, examining JDBC, JDO, and Hibernate as implementation strategies.JDBC support. Spring offers two levels of JDBC abstraction that significantly ease the effort of writing JDBC-based DAOs: the org.springframework.jdbc.core package (a template/callback approach) and the org.springframework.jdbc.object package (modeling RDBMS operations as reusable objects). Using the Spring JDBC packages can deliver much greater pro-ductivity and eliminate the potential for common errors such as leaked connections, compared with direct use of JDBC. The Spring JDBC abstraction integrates with the transaction and DAO abstractions.Integration with O/R mapping tools. Spring provides support classesfor O/R Mapping tools like Hibernate, JDO, and iBATIS Database Layer to simplify resource setup, acquisition, and release, and to integrate with the overall transaction and DAO abstractions. These integration packages allow applications to dispense with custom ThreadLocal sessions and native transac-tion handling, regardless of the underlying O/R mapping approach they work with.Web MVC framework. Spring provides a clean implementation of web MVC, consistent with the JavaBean configuration approach. The Spring web framework enables web controllers to be configured within an IoC container, eliminating the need to write any custom code to access business layer services. It provides a generic DispatcherServlet and out-of-the-box controller classes for command and form handling. Request-to-controller mapping, view resolution, locale resolution and other important services are all pluggable, making the framework highly extensi-ble. The web framework is designed to work not only with JSP, but with any view technology, such as Velocity—without the need for additional bridges. Chapter 13 discusses web tier design and the Spring web MVC framework in detail.Remoting support. Spring provides a thin abstraction layer for accessing remote services without hard-coded lookups, and for exposing Spring-managed application beans as remote services. Out-of-the-box support is included for RMI, Caucho’s Hessian and Burlap web service protocols, and WSDL Web Services via JAX-RPC. Chapter 11 discusses lightweight remoting.While Spring addresses areas as diverse as transaction management and web MVC, it uses a consistent approach everywhere. Once you have learned the basic configuration style, you will be able to apply it in many areas. Resources, middle tier objects, and web components are all set up using the same bean configuration mechanism. You can combine your entireconfiguration in one single bean definition file or split it by application modules or layers; the choice is up to you as the application developer. There is no need for diverse configuration files in a variety of formats, spread out across the application.Spring on J2EEAlthough many parts of Spring can be used in any kind of Java environment, it is primarily a J2EE application framework. For example, there are convenience classes for linking JNDI resources into a bean factory, such as JDBC DataSources and EJBs, and integration with JTA for distributed transaction management. In most cases, application objects do not need to work with J2EE APIs directly, improving reusability and meaning that there is no need to write verbose, hard-to-test, JNDI lookups.Thus Spring allows application code to seamlessly integrate into a J2EE environment without being unnecessarily tied to it. You can build upon J2EE services where it makes sense for your application, and choose lighter-weight solutions if there are no complex requirements. For example, you need to use JTA as transaction strategy only if you face distributed transaction requirements. For a single database, there are alternative strategies that do not depend on a J2EE container. Switching between those transac-tion strategies is merely a matter of configuration; Spring’s consistent abstraction avoids any need to change application code.Spring offers support for accessing EJBs. This is an important feature (and relevant even in a book on “J2EE without EJB”) because the use of dynamic proxies as codeless client-side business delegates means that Spring can make using a local stateless session EJB an implementation-level, rather than a fundamen-tal architectural, choice.Thus if you want to use EJB, you can within a consistent architecture; however, you do not need to make EJB the cornerstone of your architecture. This Spring feature can make devel-oping EJB applications significantly faster, because there is no need to write custom code in service loca-tors or business delegates. Testing EJB client code is also much easier, because it only depends on the EJB’s Business Methods interface (which is not EJB-specific), not on JNDI or the EJB API.Spring also provides support for implementing EJBs, in the form of convenience superclasses for EJB implementation classes, which load a Spring lightweight container based on an environment variable specified in the ejb-jar.xml deployment descriptor. This is a powerful and convenient way of imple-menting SLSBs or MDBs that are facades for fine-grained POJOs: a best practice if you do choose to implement an EJB application. Using this Spring feature does not conflict with EJB in any way—it merely simplifies following good practice.Introducing the Spring FrameworkThe main aim of Spring is to make J2EE easier to use and promote good programming practice. It does not reinvent the wheel; thus you’ll find no logging packages in Spring, no connection pools, no distributed transaction coordinator. All these features are provided by other open source projects—such as Jakarta Commons Logging (which Spring uses for all its log output), Jakarta Commons DBCP (which can be used as local DataSource), and ObjectWeb JOTM (which can be used as transaction manager)—or by your J2EE application server. For the same reason, Spring doesn’t provide an O/R mapping layer: There are good solutions for this problem area, such as Hibernate and JDO.Spring does aim to make existing technologies easier to use. For example, although Spring is not in the business of low-level transactioncoordination, it does provide an abstraction layer over JTA or any other transaction strategy. Spring is also popular as middle tier infrastructure for Hibernate, because it provides solutions to many common issues like SessionFactory setup, ThreadLocal sessions, and exception handling. With the Spring HibernateTemplate class, implementation methods of Hibernate DAOs can be reduced to one-liners while properly participating in transactions.The Spring Framework does not aim to replace J2EE middle tier services as a whole. It is an application framework that makes accessing low-level J2EE container ser-vices easier. Furthermore, it offers lightweight alternatives for certain J2EE services in some scenarios, such as a JDBC-based transaction strategy instead of JTA when just working with a single database. Essentially, Spring enables you to write appli-cations that scale down as well as up.Spring for Web ApplicationsA typical usage of Spring in a J2EE environment is to serve as backbone for the logical middle tier of a J2EE web application. Spring provides a web application context concept, a powerful lightweight IoC container that seamlessly adapts to a web environment: It can be accessed from any kind of web tier, whether Struts, WebWork, Tapestry, JSF, Spring web MVC, or a custom solution.The following code shows a typical example of such a web application context. In a typical Spring web app, an applicationContext.xml file will reside in the WEB-INF directory, containing bean defini-tions according to the “spring-beans” DTD. In such a bean definition XML file, business objects and resources are defined, for example, a “myDataSource” bean, a “myInventoryManager” bean, and a “myProductManager” bean. Spring takes care of their configuration, their wiring up, and their lifecycle.<beans><bean id=”myDataSource” class=”org.springframework.jdbc. datasource.DriverManagerDataSource”><property name=”driverClassName”> <value>com.mysql.jdbc.Driver</value></property> <property name=”url”><value>jdbc:mysql:myds</value></property></bean><bean id=”myInventoryManager” class=”ebusiness.DefaultInventoryManager”> <property name=”dataSource”><ref bean=”myDataSource”/> </property></bean><bean id=”myProductManager” class=”ebusiness.DefaultProductManager”><prop erty name=”inventoryManager”><ref bean=”myInventoryManager”/> </property><property name=”retrieveCurrentStock”> <value>true</value></property></bean></beans>By default, all such beans have “singleton” scope: one instance per context. The “myInventoryManager” bean will automatically be wired up with the defined DataSource, while “myProductManager” will in turn receive a reference to the “myInventoryManager” bean. Those objects (traditionally called “beans” in Spring terminology) need to expose only the corresponding bean properties or constructor arguments (as you’ll see later in this chapter); they do not have to perform any custom lookups.A root web application context will be loaded by a ContextLoaderListener that is defined in web.xml as follows:<web-app><listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class></listener>...</web-app>After initialization of the web app, the root web application context will be available as a ServletContext attribute to the whole web application, in the usual manner. It can be retrieved from there easily via fetching the corresponding attribute, or via a convenience method in org.springframework.web. context.support.WebApplicationContextUtils. This means that the application context will be available in any web resource with access to the ServletContext, like a Servlet, Filter, JSP, or Struts Action, as follows:WebApplicationContext wac = WebApplicationContextUtils.getWebApplicationContext(servletContext);The Spring web MVC framework allows web controllers to be defined as JavaBeans in child application contexts, one per dispatcher servlet. Such controllers can express dependencies on beans in the root application context via simple bean references. Therefore, typical Spring web MVC applications never need to perform a manual lookup of an application context or bean factory, or do any other form of lookup.Neither do other client objects that are managed by an application context themselves: They can receive collaborating objects as bean references.The Core Bean FactoryIn the previous section, we have seen a typical usage of the Spring IoC container in a web environment: The provided convenience classes allow for seamless integration without having to worry about low-level container details. Nevertheless, it does help to look at the inner workings to understand how Spring manages the container. Therefore, we will now look at the Spring bean container in more detail, starting at the lowest building block: the bean facto ry. Later, we’ll continue with resource setup and details on the application context concept.One of the main incentives for a lightweight container is to dispense with the multitude of custom facto-ries and singletons often found in J2EE applications. The Spring bean factory provides one consistent way to set up any number of application objects, whether coarse-grained components or fine-grained busi-ness objects. Applying reflection and Dependency Injection, the bean factory can host components that do not need to be aware of Spring at all. Hence we call Spring a non-invasive application framework.Fundamental InterfacesThe fundamental lightweight container interface is org.springframework.beans.factory.Bean Factory. This is a simple interface, which is easy to implement directly in the unlikely case that none of the implementations provided with Spring suffices. The BeanFactory interface offers two getBean() methods for looking up bean instances by String name, with the option to check for a required type (and throw an exception if there is a type mismatch).public interface BeanFactory {Object getBean(String name) throws BeansException;Object getBean(String name, Class requiredType) throws BeansException;boolean containsBean(String name);boolean isSingleton(String name) throws NoSuchBeanDefinitionException;String[] getAliases(String name) throws NoSuchBeanDefinitionException;}The isSingleton() method allows calling code to check whether the specified name represents a sin-gleton or prototype bean definition. In the case of a singleton bean, all calls to the getBean() method will return the same object instance. In the case of a prototype bean, each call to getBean() returns an inde-pendent object instance, configured identically.The getAliases() method will return alias names defined for the given bean name, if any. This mecha-nism is used to provide more descriptive alternative names for beans than are permitted in certain bean factory storage representations, such as XML id attributes.The methods in most BeanFactory implementations are aware of a hierarchy that the implementation may be part of. If a bean is not foundin the current factory, the parent factory will be asked, up until the root factory. From the point of view of a caller, all factories in such a hierarchy will appear to be merged into one. Bean definitions in ancestor contexts are visible to descendant contexts, but not the reverse.All exceptions thrown by the BeanFactory interface and sub-interfaces extend org.springframework. beans.BeansException, and are unchecked. This reflects the fact that low-level configuration prob-lems are not usually recoverable: Hence, application developers can choose to write code to recover from such failures if they wish to, but should not be forced to write code in the majority of cases where config-uration failure is fatal.Most implementations of the BeanFactory interface do not merely provide a registry of objects by name; they provide rich support for configuring those objects using IoC. For example, they manage dependen-cies between managed objects, as well as simple properties. In the next section, we’ll look at how such configuration can be expressed in a simple and intuitive XML structure.The sub-interface org.springframework.beans.factory.ListableBeanFactory supports listing beans in a factory. It provides methods to retrieve the number of beans defined, the names of all beans, and the names of beans that are instances of a given type:public interface ListableBeanFactory extends BeanFactory {int getBeanDefinitionCount();String[] getBeanDefinitionNames();String[] getBeanDefinitionNames(Class type);boolean containsBeanDefinition(String name);Map getBeansOfType(Class type, boolean includePrototypes,boolean includeFactoryBeans) throws BeansException}The ability to obtain such information about the objects managed by a ListableBeanFactory can be used to implement objects that work with a set of other objects known only at runtime.In contrast to the BeanFactory interface, the methods in ListableBeanFactory apply to the current factory instance and do not take account of a hierarchy that the factory may be part of. The org.spring framework.beans.factory.BeanFactoryUtils class provides analogous methods that traverse an entire factory hierarchy.There are various ways to leverage a Spring bean factory, ranging from simple bean configuration to J2EE resource integration and AOP proxy generation. The bean factory is the central, consistent way of setting up any kind of application objects in Spring, whether DAOs, business objects, or web controllers. Note that application objects seldom need to work with the BeanFactory interface directly, but are usu-ally configured and wired by a factory without the need for any Spring-specific code.For standalone usage, the Spring distribution provides a tiny spring-core.jar file that can be embed-ded in any kind of application. Its only third-party dependency beyond J2SE 1.3 (plus JAXP for XML parsing) is the Jakarta Commons Logging API.The bean factory is the core of Spring and the foundation for many other services that the framework offers. Nevertheless, the bean factory can easily be used stan-dalone if no other Spring services are required.Derivative:networkSpring 框架简介Spring框架:这是一个流行的开源应用框架,它可以解决很多问题。
Java、J2ee的Spring框架和大数据技术外文文献翻译
文献信息文献标题:Implementing and Analyzing Big Data Techniques with Spring Frame Work in Java & J2EE Based Application(基于Java/J2EE的Spring 框架实现和分析大数据技术)文献作者及出处:Saxena A, Kaushik N, Kaushik N. Implementing and Analyzing Big Data Techniques with Spring Frame Work in Java & J2EE Based Application[C]//Proceedings of the Second International Conference on Information and Communication Technology for Competitive Strategies. ACM, 2016:5.字数统计:英文2814单词,15570字符;中文4912汉字外文文献Implementing and Analyzing Big Data Techniques withSpring Frame Work in Java & J2EE Based ApplicationAbstract –In the time of big data techniques with spring framework on java, web servers or application server as the significant channel in big data should be updated to meet execution and force imperatives. Significant endeavors have been put resources into web server or application server conveyance and web storing procedures, but very few efforts have been paid to improve hardware-favored web type services. Big Data with spring framework in java is a promising business and computing model in web framework. Spring is the most popular open source Java application Framework. It combines all the industry-standard frameworks (for e.g. Struts and Hibernate) and approaches into one bundle. The expense and working costs of data centers have skyrocketed with the increase in computing capacity. Big data is a concept that defines the large volume of both structured and unstructured data – that inundates a business on a day-to-day environment. This research argues the need to provide novel method and tools to bolster programming engineers meaning toenhance vitality productivity and minimize the subsequent from outlining, creating, sending and running programming in Big Data with spring framework.Keywords –Java, J2ee, Hadoop Framework, spring, Big Data.I.INTRODUCTIONBig Data with spring framework based applications and innovation components are composed in java& J2ee. Java has inherent limitations that can keep endeavors from advancing execution and using vast in memory data sets. Organizations endeavor to work around these dormancy, versatility and memory size issues by utilizing separate caching frameworks or analyzing a subset of accessible data. Then again, this influences the quality and convenience of business choices and even lessens revenue.Objective of big data:•By giving a semantic end-to-end connection between clients and data sources.•Enabling clients to quickly define instinctive queries utilizing natural vocabularies and conceptualizations.•Seamlessly coordinating information spread over various distributed data sources, including streaming sources.•Exploiting gigantic parallelism for adaptability a long ways past traditional RDBMSs and along these lines lessening the turnaround time for information requests to minutes as opposed.Objectives for Spring Framework:•The potential favorable circumstances of utilizing Spring's dependency injection.•Dependency injection in XML, utilizing constructor.•Default scope for Spring beans.•How to declare an initialization method in a Spring bean.Java:Java is one of the most robust, mainly used and perfect programming languagefor creating enterprise applications. Over the years, Java development has evolved from applets run on a web browser (chrome, mozila) to large enterprise distributed applications run on multiple servers. Presently, Java has three different flavors, and each addresses certain programming requirements.Spring framework is the most well known application advancement structure for big business Java. A great many designers around the globe use Spring Framework to make high performing, effortlessly testable, reusable code.J2ee:J2ee utilizes a multi-level circulated application model. There are three levels in the commonplace J2EE application model: presentation tier, business logic tier and data tier.Framework:The framework is intended to streamline the full improvement cycle, from building, to sending, to looking after applications. it can be considered as an arrangement of capacities helping the designers in making the applications.II.Spring FrameworkSpring is a lightweight framework. It can be considered as a structure of systems in light of the fact that it gives backing to different structures, for example, Struts, Hibernate, Tapestry, EJB, JSF and so forth. The system, in more extensive sense, can be characterized as a structure where we discover arrangement of the different specialized issues.Features of SpringFramework:•Lightweight -Spring is lightweight as far as size and overhead. The whole spring system can be conveyed in a Jar file that weighs in at a little more than 1 MB.•Aspect-Oriented - Spring supports the features of aspect oriented programming approach that enables cohesive development.•Container -Spring is a compartment in light of the fact that it deals with the life cycle and configuration of application objects.•Framework -Spring accompanies MVC web application framework, based on core Spring functionality. This structure is profoundly configurable by means of methodology interfaces, and obliges various perspective innovations like JSP, Speed, Tiles.Aspect oriented programming:To permit clients to actualize custom perspectives, supplementing their utilization of OOP with AOP. Aspect oriented programming is regularly characterized as a programming strategy that advances partition of worries inside of a software framework. Frameworks are made out of a few parts, each in charge of a particular bit of usefulness.AOP gives you perspectives. Aspects empower modularization of concerns, for example, transaction management that cut across multiple types and objects.AOP is utilized as a part of theSpring Framework:•To give definitivedeclarative enterprise services, particularly as a substitution for EJB explanatory services. The most critical such service is explanatory transaction management.•To permit clients to actualize custom aspects, complementing their utilization of OOP with AOP.Inversion of Control:The IoC (Inversion of Control) pattern utilizes three diverse methodologies as a part of request to accomplish decoupling of control of services from your components:•Interface Injection : Your components expressly fit in with an arrangement of interfaces, with related setup metadata, keeping in mind the end goal to permit the system to oversee them accurately.•Setter Injection : External metadata is utilized to arrange how your segments can be cooperated with.•Constructor Injection: Your components are enrolled with the framework, including the parameters to be utilized when thecomponents are developed, and the structure gives instances of the component with the majority of the predeterminedfacilities applied.Dependency Injection:Dependency Injection (DI) is a design pattern that expels the dependency from the programming code with the goal that it can be anything but difficult to oversee and test the application. Dependency Injection makes our programming code inexactly coupled.III.Big DataBig Data is more and various types of data than is effectively taken care of traditional relational database management systems (RDBMSs). Another helpful point of view is to describe big data as having high volume, high speed, and high assortment.•High volume: the sum or amount of data.•High speed: the rate at which data is created.•High assortment: the distinctive sorts of data.Big Data is a technique that is utilized to portray data that is high volume and speed,requires new technologies and systems to catch, store, and analyze it; and is utilized to upgrade decision making, give understanding and disclosure, and bolster and advance technique. Normally, to analyze data, individuals used to make diverse data sets in view of one or more regular fields so examination turns out to be simple. Big data has numerous sources. For instance, each mouse event on a site can be caught in Web log files and examined keeping in mind the end goal to better comprehend customers' purchasing practices and to impact their shopping by powerfully suggesting products. Social media sources, for example, Facebook and Twitter create enormous measures of remarks and tweets. This data can be caught and broke down to comprehend, for instance, what individuals consider new item presentations. Machines, for example, savvy meters, produce data. These meters persistently stream information about power, water, or gas utilization that can be imparted to clients and consolidated with estimating arrangements to rouse clients to move some of their vitality utilization.Figure 1. Information flow of Big DataThis Figure 1shows different phases of Big Data Uses of Big Data.1.Fraud detection:In many cases, fraud is discovered long after the fact, and soon thereafter the harm has been done and all that is left is to minimize the harm and modify arrangements to keep it from happening once more. Big Data stages that can examine cases and exchanges continuously, recognizing huge scale designs crosswise over numerous exchanges or identifying abnormal conduct from an individual client, can change the fraud detection game.2.IT log analytics:IT arrangements and IT divisions create a colossal amount of logs and follow information. Without a Big Data arrangement, quite a bit of this information must go unexamined.3.Call center analyticsBig Data arrangements can distinguish repeating issues or client and staff conduct designs on the fly not just by comprehending time/quality determination measurements, additionally by catching and preparing call content itself.4.Social media analysisEveryone and their moms are on online networking nowadays, whether they're"preferring" organization pages on Facebook or tweeting protestations about items on Twitter. A Big Data arrangement fabricated to reap and analyze online networking movement, similar to IBM's Cognos Consumer Insights, a point arrangement running on IBM's BigInsights Big Data stage, can comprehend the jabber. Social mediacan give continuous experiences into how the business sector is reacting to items and battles. With those bits of knowledge, organizations can change their valuing, advancement, and battle arrangement on the fly for ideal results.Figure 2. Application area of Big DataCase of Big Data in Real world:•Consumer item organizations and retail associations are checking online networking like Facebook and Twitter to get an uncommon perspective into client conduct, inclinations, and item observation.•Manufacturers are observing moment vibration information from their hardware, which changes somewhat as it wears out, to foresee the ideal time to supplant or keep up.•Manufacturers are likewise observing informal organizations, however with an alternate objective than advertisers: They are utilizing it to identify reseller's exchangebolster issues before a guarantee disappointment turns out to be openly adverse.•The government is making information open at both the national, state, and city level for clients to grow new applications that can produce open great.•Financial Services associations are utilizing information mined from client connections to cut up their clients into finely tuned fragments.•Advertising and showcasing offices are following online networking to comprehend responsiveness to campaigns, advancements, and other promoting mediums.•Insurance organizations are utilizing Big Data investigation to see which home protection applications can be instantly prepared, and which ones need an approving in-individual visit from an operators.•By grasping social media, retail associations are drawing in brand promoters, changing the impression of brand rivals, and not with standing empowering eager clients to offer their items.•Hospitals are investigating medicinal information and patient records to predict those patients that are prone to look for readmission inside of a couple of months of release. The doctor's facility can then mediate with expectations of anticipating another expensive doctor's facility sit tight.•Web-based organizations are creating data items that consolidate information assembled from clients to offer additionally engaging proposals and more fruitful coupon programs.•Sports groups are utilizing information for following ticket deals and even for tracking team strategies.Figure 3. Architecture of Big DataThis figure 3 first extracts the social, archive, service data some part of operational data then transforms with new techniques then load in to server and finally Big Data analytic with latest technique.Figure 4. stages of Big DataThis figure 4 divides the data in to three stages.1.Data Acquisition form:this stage of data cover with streams, internet data, cloud data source, mobile data source, desktop data source and server data source.2.Data refining and processing form:this stage covers refining and processing the data of corporate Hub. Corporate data hub is combination of refining workloads and local workloads.3.Data Shipping form:this stage of architecture extract the data from different sources.IV.HADOOP ARCHITECTURESpring for Apache Hadoop streamlines providing so as to create Apache Hadoopa brought together design model and simple to utilize APIs for utilizing HDFS, MapReduce, Pig, and Hive. It likewise furnishes coordination with other Spring eco –system venture, for example, Spring Incorporation and Spring Cluster empowering you to create answers for enormous information ingest/fare and Hadoop work process organization.Apache Hadoop is a software patternfor preparing a lot of information over conceivably greatly parallel groups of servers. The key segment of Hadoop is the Hadoop Distributed File System,which deals with the data shared over the different servers. It is a direct result of HDFS that such a variety of servers can be overseen in parallel. HDFS is file based and does not require any data model to save and process data. It can store data of any structure, however is not a RDBMS. HDFS can deal with the capacity and access of an Web logs, XML documents type of data and the length of the data can be placed in a file and replicated into HDFS. The Hadoop base regularly runs MapReduce programs in parallel. MapReduce takes substantial datasets, extricates and changes valuable data, conveys the data to the different servers where handling happens, and amasses the outcomes into a smaller,easier-to-examine file. It doesn't perform analytics fundamentally; rather, it gives the system that controls the projects that perform the analytics. As of now, jobs can be run just a in batch, which restrains the utilization of Hadoop/MapReduce for real-time applications. In spite of the fact that Hadoop and MapReduce are talked about and regularly utilized together, they can be utilized independently. That is, Hadoop can be utilized without MapReduce and the other way around.Figure 5 outlines how process is carried out by using Hadoop/MapReduce. This is a basic process that should likewise be possible with SQL based query and a RDBMS, yet gives a decent sample of Hadoop/MapReduce handling. At the left is an information document with records containing Deer, Bear , River, and Car. The goal is to tally the quantity of times every word happens. The initial step is to part the records and then prepared by the clusters of servers, for example, Java and R language on the servers. The target in this case is to assemble the data by a split depending on the words. The MapReduce pattern then consolidations the mix/sort results for information to the reducer program, which thencalculates the number of times every word happens. This yield can then be input to an data warehouse where it might be consolidated with other information for analysis or accessed straight for wardly by different BI instruments .Figure 5. Hadoop ArchitectureV.RESULT AND DISCUSSIONBig data processing with spring framework results in distributed data store: spring framework enables resource and data aggregation on java. Java helps in improvement in execution efficiency by distributing application execution at different levels. Due to reducing costs of devices and networks data from real world is getting collected in data centres. A system that implements big data processing on spring framework is a combination of components like servers for judgment, accumulation and analysis to solve real life problems like traffic management and human resource management. Distributed parallel processing is required to perform statistical analysis of different vehicles at different or same place in one city or a comparison of different cities. In comparing with other distributed batch methods the performance increaseei ght times. Let us use this prototype to match any individual’s location and preference with product inventory of stores and malls and to generate the bills and deliver the product at the doorstep of customer in shortest possible time. The process shown in the figure can be explained in steps:Step 1: Individual’s location and preference is retrieved (Query 1)Step 2: Stores and malls details within a certain distance is retrieved (Query 2) Step 3: Individual’s information and store’s product information is matched (Query 3)Step 4: A bill is generated if they match.The processing load in step 2 and 3 is directly proportional to number of people. Dynamic load balancing by increasing dedicated servers reduces CPU usage and ensures high speed processing. Hence ensuring optimization of improvement in performance, resource efficiency and delivery synchronization.Figure 6. Architecture of big data with Spring FrameworkIn this figure 6 query 1, query 2, query 3 is based on spring framework of java that means all the query based code is stored in the given XML File, individual information is stored in oracle database. Finally coupon issued in the base of big data based query of spring framework of java and J2ee under the supervision Hadoop Architecture of Big Data follow in figure 7 shown below.Figure 7. Spring Framework with big dataVI. CONCLUSION AND FUTURE SCOPEIn this research article, we described the ongoing research to design and implement a big data with spring Framework.This model administers big data to ceaselessly trade asset cuts among machines, granting assets to those occupants requiring or qualified for additional, while having the capacity to figure out where the asset diminishment will be all the more financially compelling, i.e., will contribute in lesser degree to execution debasement.In future we have to implement big data with struts, spring and hibernate integration to reduce cost on infrastructure in java & J2ee base applications.中文译文基于Java/J2EE的Spring框架实现和分析大数据技术摘要—在JAVA Spring框架下的大数据技术时代,作为大数据中重要通道的Web服务器或应用服务器应该进行更新,以满足执行和强制要求。
Spring框架-毕业论文外文文献翻译
外文文献翻译SpringFrameworkSpring is an open source framework, and Spring was launched in 2003 as a lightweight Java development framework created by Rod Johnson.In a nutshell, Spring is a hierarchical, JavaSE/EEfull-stack (one-stop) lightweight open source framework.The powerful JavaBeans based configuration management using the Inversion of Control (IoC) principle makes application components faster and easier.1.facilitate decoupling and simplify developmentThrough the IoC container provided by Spring, we can control dependencies between objects by Spring, avoiding excessive program coupling caused by hard coding.With Spring, users do not have to write code for the bottom tier requirements of single instance schema classes, properties, file parsing, and so on, and can focus more on top tier applications.2.AOP programming supportThrough the Spring functionality provided by AOP, it is easy to implement face oriented programming, and many features that are not easily implemented with traditional OOP can be easily handled by AOP.3.declarative transaction supportIn Spring, we can extricate ourselves from tedious and tedious transaction management code and flexibly manage the transaction through declarative manner, so as to improve the efficiency and quality of development.4.convenience program testingAlmost all test work can be done in a non container dependent programming manner, and in Spring, testing is no longer expensive, but something to do.For example, Spring supports Junit4 and can easily test Spring programs by annotations.5.convenient integration of various excellent frameworkSpring does not exclude all kinds of excellent open source framework, on the contrary, Spring can reduce the difficulty of the use of Spring framework, provides a framework for a variety of excellent (such as Struts, Hibernate, Hessian, Quartz) directly support the.6.reduce the difficulty of using Java EE APISpring provides a thin layer of encapsulation for many difficult Java, EE, API (such as JDBC, JavaMail, remote calls, etc.), and the use of these Java EE API is greatly reduced through the simple package of Spring.7.Java source code is a classic example of learningSpring source code, clear structure, exquisite design originality, embodies the master of the Java design pattern and the flexible use of Java technology accomplishment.Spring framework source code is undoubtedly the best practice example of Java technology.If you want to quickly improve your Java skills and application development level in a short time, learning an.The role of MVC - Spring is integration, but not just integration, and the Spring framework can be seen as a framework for enterprise solution levels.The client sends a request, the server controller (implemented by DispatcherServlet) to complete the request forwarding, call a controller for mapping class HandlerMapping, the class is used to map requests to the corresponding processor to process the request.HandlerMapping will request is mapped to the corresponding processor Controller (equivalent to Action) in Spring if you write some processor components, the general implementation of the Controller interface in Controller, you can call Service or DAO to operate data from the DAO ModelAndView used to store the retrieved data, some data can also be stored in response to the view.If you want to return the result to the user, it also provides a view of ViewResolver component in Spring framework, the component labeled Controller returns according to, find the corresponding view, the response response back to the user.Each module (or component) that makes up the Spring framework can exist alone, or can be implemented in conjunction with one or more other modules.Each module has the following functions: 1, the core container: the core container provides the basic functionality of the Spring framework (Spring, Core).The main component of the core container is BeanFactory, which is implemented in factory mode.BeanFactory uses the control inversion (IOC) pattern to separate application configuration and dependency specifications from theactual application code.Spring框架Spring是一个开源框架, Spring是于2003 年兴起的一个轻量级的Java 开发框架, 由Rod Johnson创建。
javaweb英文参考文献
javaweb英文参考文献参考文献:1. Arora, P., & Sharma, S. (2017). An overview of Java web applications. International Journal of Advanced Research in Computer Science and Software Engineering, 7(6), 131-139.This paper provides an overview of Java web applications, highlighting their importance and benefits. It covers the basic concepts of Java web application development, such as servlets, JSP, MVC architecture, and database connectivity. The authors also discuss various frameworks and tools commonly used in Java web development, including Spring, Hibernate, and Apache Tomcat. This article is a good starting point for understanding the fundamentals of Java web applications.2. Reddy, S. R., & Reddy, R. M. (2018). A comparative study of Java web frameworks. International Journal of Engineering Science and Computing, 8(3), 17802-17807.This study compares and evaluates several popular Java web frameworks, including Spring, JSF, Play, and Struts. The authors analyze various aspects such as performance, scalability, ease of development, and community support. The article also provides practical examples and use cases for each framework. This comparative study is useful for developers who are trying to choose the most suitable Java web framework for their projects.3. Sharma, P., & Sharma, S. (2019). Security vulnerabilities and best practices in Java web development. International Journal ofComputer Sciences and Engineering, 7(6), 287-293.This paper focuses on security vulnerabilities and best practices in Java web development. It discusses common security threats, such as SQL injection, XSS attacks, and session hijacking, and provides guidelines on how to mitigate these risks. The authors also highlight best practices for secure coding, including input validation, session management, and secure communication. This article is valuable for developers who want to ensure the security of their Java web applications.4. Gao, P. & Zhang, D. (2020). A study on performance optimization techniques for Java web applications. Journal of Physics: Conference Series, 1496(1), 012045.This study investigates performance optimization techniques for Java web applications. The authors explore various approaches for improving the performance of Java web applications, such as caching, load balancing, and database optimization. They also discuss the impact of different factors on performance, such as network latency and server configuration. This article provides practical insights and recommendations for developers seeking to enhance the performance of their Java web applications.5. Wang, Y., & Gao, J. (2021). Machine learning in Java web applications. Journal of Big Data, 8(1), 1-13.This article explores the use of machine learning in Java web applications. The authors discuss various machine learning algorithms and techniques that can be applied to solve real-worldproblems in web development. They provide examples of how machine learning can be integrated into Java web applications for tasks such as recommendation systems, fraud detection, and sentiment analysis. This paper serves as a comprehensive guide for developers interested in incorporating machine learning capabilities into their Java web applications.。
MVC框架中英文对照外文翻译文献
中英文对照外文翻译文献(文档含英文原文和中文翻译)译文:Web 2.0下的Spring MVC框架摘要 - 当要建立丰富用户体验的WEB应用时,有大量的WED应用框架可以使用,却很少有该选择哪一种的指导。
WEB 2.0应用允许个体管理他们自己的在线网页,并能与其他在线用户和服务器共享。
这样分享需要访问控制器来实现。
然而,现有的访问控制器解决方案不是令人很满意。
因为在开放且由用户主导的WEB环境下,它满足不了用户的功能需求。
MVC框架是在所有的WEB开发框架中最受欢迎的。
模型-视图-控制器(MVC)是一种软件架构,如今被认为是一种体系结构在软件工程模式中使用。
该模式从用户界面(输入和演示)分离出了“领域逻辑”(基于用户的应用逻辑),它允许独立地开发,测试和维护每个分离的部分。
模型-视图-控制器(MVC)模型创建的应用分离为不同的层次应用,同时在每两者之间建立松散的耦合。
关键字 - Spring MVC, 结构, XStudio, SOA, 控制器I.绪论如何确切地定义一个网站为“WEB 2.0”的呢?关于这有着许多不同见解,使它很难精确地下一个确切的定论。
但当我们将所有的WEB开发框架过一遍之后它就会变得清晰了。
各种基于WEB开发的架构如下:●Ntier架构(Ntier Architecture)在软件工程中,多层架构(常被称为n-tier架构)是一种表示层,应用处理层和数据管理层在逻辑上分开处理的客户端-服务器架构。
例如,一个应用在用户与数据库之间使用中间件提供数据请求服务就用到了多层体系结构。
最为广泛应用的多层体系结构是三层架构。
N-tier 应用架构为开发者提供了用来创建了一个灵活且可复用的模型。
通过打破应用层次,开发者只需修改或添加一个特定的层,而不是要去重写一遍整个应用。
它需要有一个表示层,一个业务层或者数据访问层和一个数据层。
层(layer)和层(tier)之间的概念常常是可以互换的。
J2EE简介-毕业论文外文文献翻译
英文原文:J2EE synopsis:J2EE is a set is completely different in the traditional application development technical frame, contains many modules, mainly may simplify, and the standard application system's development and the deployment, then enhance the probability, the security and use the value again.The J2EE core is a group of technology standard and the guide, contains each kind of module, the service construction and the technical level, has the common standard and the specification, lets each kind rely on the J2EE construction between the different platform, has the good compatibility, between information product each other who the solution behind the enterprise used in the past is unable compatibly, the enterprise interior or exterior exchanged with difficulty predicament.At present, the Java 2 platforms have 3 editions, they are suitable for the bantam and smart card Java 2 platform Micro version (Java 2 Platform Micro Edition, J2ME), are suitable for the tabletop system's Java 2 platform standard edition (Java 2 Platform Standard Edition, J2SE), are suitable for the foundation server application procedure and the service Java 2 platform enterprise version (Java 2 Platform Enterprise Edition, J2EE).J2EE is one kind simplifies the enterprise solution using the Java 2 platforms the development, the deployment and the management related complex question architecture. The J2EE technology's foundation was the core Java platform or the Java 2 platform standard edition, J2EE has not only consolidated in standard edition many merits, for example " compiled one time, everywhere moved " the characteristic, convenience deposit database JDBC API, the CORBA technology as well as can in the Internet application protect data safe mode and so on, meanwhile has provided to EJB (Enterprise JavaBeans), Java Servlets API, JSP (Java Server Pages) as well as the XML technology comprehensive support. Its final goal is becomes one to be able to cause the enterprise exploiters to reduce largely puts in the market hour the architecture.The J2EE architecture provides the intermediate level integration frame to usefor not to need too many expenses satisfiedly and to need the high usability, the redundant reliability as well as the extendibility application demand. Through provided the unification the development platform, J2EE reduced the development multi-layer application expense and the complexity, simultaneously provided to the existing application procedure integrates the powerful support, supported Enterprise JavaBeans completely, had the good guide to support packs and deploys the application, the increase table of contents support, strengthened the safety mechanism, enhanced the performance.The J2EE to building have scalability, flexibility, easy maintenance business system provides a good mechanism:1. Retain existing IT assets: because enterprise must adapt to the new commercial demand, by means of the existing enterprise information system in investment, rather than re-enacted overall scheme is very important. So, a gradual (not radical, completely negative) way above the existing system established the server platform mechanism is not fair that the company needs. Can make full use of the user J2EE, as some of the original investment companies use the Tuxedo, IBM CICS BEA, IBM VisiBroker Inprise Encina,, and Netscape apply Server. This is possible because the J2EE extensive industry supported and some important 'enterprise computing' field supplier to participate. Each supplier to existing customer provides no abandoned existing investment into portable J2EE field upgrade path. Based on the J2EE platform because the product can almost in any operating system and hardware configurations to run on existing operating system and hardware can also be retained use.2. Efficient development: the J2EE allows companies to some generic, very tedious tasks to a server to complete the middleware vendors. So that developers can focus on how to create business logic, correspondingly shorten the development time. Senior middleware vendors provide the following these complex middleware services:。
Java技术外文翻译文献
Java技术外文翻译文献(文档含中英文对照即英文原文和中文翻译)外文:Core Java™ Volume II–Advanced Features When Java technology first appeared on the scene, the excitement was not about a well-crafted programming language but about the possibility of safely executing applets that are delivered over the Internet (see V olume I, Chapter 10 for more information about applets). Obviously, delivering executable applets is practical only when the recipients are sure that the code can't wreak havoc on their machines. For this reason, security was and is a major concern of both the designers and the users of Java technology. This means that unlike other languages andsystems, where security was implemented as an afterthought or a reaction to break-ins, security mechanisms are an integral part of Java technology.Three mechanisms help ensure safety:•Language design features (bounds checking on arrays, no unchecked type conversions, no pointer arithmetic, and so on).•An access control mechanism that controls what the code can do (such as file access, network access, and so on).•Code signing, whereby code authors can use standard cryptographic algorithms to authenticate Java code. Then, the users of the code can determine exactly who created the code and whether the code has been altered after it was signed.Below, you'll see the cryptographic algorithms supplied in the java.security package, which allow for code signing and user authentication.As we said earlier, applets were what started the craze over the Java platform. In practice, people discovered that although they could write animated applets like the famous "nervous text" applet, applets could not do a whole lot of useful stuff in the JDK 1.0 security model. For example, because applets under JDK 1.0 were so closely supervised, they couldn't do much good on a corporate intranet, even though relatively little risk attaches to executing an applet from your company's secure intranet. It quickly became clear to Sun that for applets to become truly useful, it was important for users to be able to assign different levels of security, depending on where the applet originated. If an applet comes from a trusted supplier and it has not been tampered with, the user of that applet can then decide whether to give the applet more privileges.To give more trust to an applet, we need to know two things:•Where did the applet come from?•Was the code corrupted in transit?In the past 50 years, mathematicians and computer scientists have developed sophisticated algorithms for ensuring the integrity of data and for electronic signatures. The java.security package contains implementations of many of these algorithms. Fortunately, you don't need to understand the underlying mathematics to use the algorithms in the java.security package. In the next sections, we show you how message digests can detect changes in data files and how digital signatures can prove the identity of the signer.A message digest is a digital fingerprint of a block of data. For example, the so-called SHA1 (secure hash algorithm #1) condenses any data block, no matter how long, into a sequence of 160 bits (20 bytes). As with real fingerprints, one hopes that no two messages have the same SHA1 fingerprint. Of course, that cannot be true—there are only 2160 SHA1 fingerprints, so there must be some messages with the same fingerprint. But 2160is so large that the probability of duplication occurring is negligible. How negligible? According to James Walsh in True Odds: How Risks Affect Your Everyday Life (Merritt Publishing 1996), the chance that you will die from being struck by lightning is about one in 30,000. Now, think of nine other people, for example, your nine least favorite managers or professors. The chance that you and all of them will die from lightning strikes is higher than that of a forged message having the same SHA1 fingerprint as the original. (Of course, more than ten people, none of whom you are likely to know, will die from lightning strikes. However, we are talking about the far slimmer chance that your particular choice of people will be wiped out.)A message digest has two essential properties:•If one bit or several bits of the data are changed, then the message digest also changes.• A forger who is in possession of a given message cannot construct a fake message that has the same message digest as the original.The second property is again a matter of probabilities, of course. Consider the following message by the billionaire father:"Upon my death, my property shall be divided equally among my children; however, my son George shall receive nothing."That message has an SHA1 fingerprint of2D 8B 35 F3 BF 49 CD B1 94 04 E0 66 21 2B 5E 57 70 49 E1 7EThe distrustful father has deposited the message with one attorney and the fingerprint with another. Now, suppose George can bribe the lawyer holding the message. He wants to change the message so that Bill gets nothing. Of course, that changes the fingerprint to a completely different bit pattern:2A 33 0B 4B B3 FE CC 1C 9D 5C 01 A7 09 51 0B 49 AC 8F 98 92Can George find some other wording that matches the fingerprint? If he had been the proud owner of a billion computers from the time the Earth was formed, each computing a million messages a second, he would not yet have found a message he could substitute.A number of algorithms have been designed to compute these message digests. The two best-known are SHA1, the secure hash algorithm developed by the National Institute of Standards and Technology, and MD5, an algorithm invented by Ronald Rivest of MIT. Both algorithms scramble the bits of a message in ingenious ways. For details about these algorithms, see, for example, Cryptography and Network Security, 4th ed., by William Stallings (Prentice Hall 2005). Note that recently, subtle regularities have been discovered in both algorithms. At this point, most cryptographers recommend avoiding MD5 and using SHA1 until a stronger alternative becomes available.The Java programming language implements both SHA1 and MD5. The MessageDigest class is a factory for creating objects that encapsulate the fingerprinting algorithms. It has a static method, called getInstance, that returns an object of a class that extends the MessageDigest class. This means the MessageDigest class serves double duty:•As a factory class•As the superclass for all message digest algorithmsFor example, here is how you obtain an object that can compute SHA fingerprints:MessageDigest alg = MessageDigest.getInstance("SHA-1");(To get an object that can compute MD5, use the string "MD5" as the argument to getInstance.)After you have obtained a MessageDigest object, you feed it all the bytes in the message by repeatedly calling the update method. For example, the following code passes all bytes in a file to the alg object just created to do the fingerprinting:InputStream in = . . .int ch;while ((ch = in.read()) != -1)alg.update((byte) ch);Alternatively, if you have the bytes in an array, you can update the entire array at once:byte[] bytes = . . .;alg.update(bytes);When you are done, call the digest method. This method pads the input—as required by the fingerprinting algorithm—does the computation, and returns the digest as an array of bytes.byte[] hash = alg.digest();The program in Listing 9-15 computes a message digest, using either SHA or MD5. You can load the data to be digested from a file, or you can type a message in the text area.Message SigningIn the last section, you saw how to compute a message digest, a fingerprint for the original message. If the message is altered, then the fingerprint of the altered message will not match the fingerprint of the original. If the message and its fingerprint are delivered separately, then the recipient can check whether the message has been tampered with. However, if both the message and the fingerprint were intercepted, it is an easy matter to modify the message and then recompute the fingerprint. After all, the message digest algorithms are publicly known, and they don't require secret keys. In that case, the recipient of the forged message and the recomputed fingerprint would never know that the message has been altered. Digital signatures solve this problem.To help you understand how digital signatures work, we explain a few concepts from the field called public key cryptography. Public key cryptography is based on the notion of a public key and private key. The idea is that you tell everyone in the world your public key. However, only you hold the private key, and it is important that you safeguard it and don't release it to anyone else. The keys are matched by mathematical relationships, but the exact nature of these relationships is not important for us.The keys are quite long and complex. For example, here is a matching pair of public and private Digital Signature Algorithm (DSA) keys.Public key:Code View:p:fca682ce8e12caba26efccf7110e526db078b05edecbcd1eb4a208f3ae1617ae01f35b91a47e6df 63413c5e12ed0899bcd132acd50d99151bdc43ee737592e17q: 962eddcc369cba8ebb260ee6b6a126d9346e38c5g:678471b27a9cf44ee91a49c5147db1a9aaf244f05a434d6486931d2d14271b9e35030b71fd7 3da179069b32e2935630e1c2062354d0da20a6c416e50be794ca4y:c0b6e67b4ac098eb1a32c5f8c4c1f0e7e6fb9d832532e27d0bdab9ca2d2a8123ce5a8018b8161 a760480fadd040b927281ddb22cb9bc4df596d7de4d1b977d50Private key:Code View:p:fca682ce8e12caba26efccf7110e526db078b05edecbcd1eb4a208f3ae1617ae01f35b91a47e6df 63413c5e12ed0899bcd132acd50d99151bdc43ee737592e17q: 962eddcc369cba8ebb260ee6b6a126d9346e38c5g:678471b27a9cf44ee91a49c5147db1a9aaf244f05a434d6486931d2d14271b9e35030b71fd73 da179069b32e2935630e1c2062354d0da20a6c416e50be794ca4x: 146c09f881656cc6c51f27ea6c3a91b85ed1d70aIt is believed to be practically impossible to compute one key from the other. That is, even though everyone knows your public key, they can't compute your private key in your lifetime, no matter how many computing resources they have available.It might seem difficult to believe that nobody can compute the private key from the public keys, but nobody has ever found an algorithm to do this for the encryption algorithms that are in common use today. If the keys are sufficiently long, brute force—simply trying all possible keys—would require more computers than can be built from all the atoms in the solar system, crunching away for thousands of years. Of course, it is possible that someone could come up with algorithms for computing keys that are much more clever than brute force. For example, the RSA algorithm (the encryption algorithm invented by Rivest, Shamir, and Adleman) depends on the difficulty of factoring large numbers. For the last 20 years, many of the best mathematicians have tried to come up with good factoring algorithms, but so far with no success. For that reason, most cryptographers believe that keys with a "modulus" of 2,000 bits or more are currently completely safe from any attack. DSA is believed to be similarly secure.Figure 9-12 illustrates how the process works in practice.Suppose Alice wants to send Bob a message, and Bob wants to know this message came from Alice and not an impostor. Alice writes the message and then signs the message digest with her private key. Bob gets a copy of her public key. Bob then applies the public key to verify thesignature. If the verification passes, then Bob can be assured of two facts:•The original message has not been altered.•The message was signed by Alice, the holder of the private key that matches the public key that Bob used for verification.You can see why security for private keys is all-important. If someone steals Alice's private key or if a government can require her to turn it over, then she is in trouble. The thief or a government agent can impersonate her by sending messages, money transfer instructions, and so on, that others will believe came from Alice.The X.509 Certificate FormatTo take advantage of public key cryptography, the public keys must be distributed. One of the most common distribution formats is called X.509. Certificates in the X.509 format are widely used by VeriSign, Microsoft, Netscape, and many other companies, for signing e-mail messages, authenticating program code, and certifying many other kinds of data. The X.509 standard is part of the X.500 series of recommendations for a directory service by the international telephone standards body, the CCITT.The precise structure of X.509 certificates is described in a formal notation, called "abstract syntax notation #1" or ASN.1. Figure 9-13 shows the ASN.1 definition of version 3 of the X.509 format. The exact syntax is not important for us, but, as you can see, ASN.1 gives a precise definition of the structure of a certificate file. The basic encoding rules, or BER, and a variation, called distinguished encoding rules (DER) describe precisely how to save this structure in a binary file. That is, BER and DER describe how to encode integers, character strings, bit strings, and constructs such as SEQUENCE, CHOICE, and OPTIONAL.译文:Java核心技术卷Ⅱ高级特性当Java技术刚刚问世时,令人激动的并不是因为它是一个设计完美的编程语言,而是因为它能够安全地运行通过因特网传播的各种applet。
三大框架外文翻译_
一种基于Hibernate、Struts和Spring的J2EE应用开发框架随着Java技术的逐渐成熟与完善,作为建立企业级应用的标准平台,J2EE平台得到了长足的发展。
借助于J2EE规范中包含的多项技术:Enterprise JavaBean(EJB)、Java Servlets(Servlet)、Java Server Pages(JSP)、Java Message Service(JMS)等,开发出了许多应用系统。
但是,在传统J2EE应用的开发过程中也出现了一些问题:(1)数据模型和逻辑模型之间的矛盾。
目前使用的数据库基本上都是关系型数据库,而Java本质上是一种面向对象的语言,对象在存储和读取时使用SQL和JDBC进行数据库操作,降低了编程的效率以及系统的可维护性;(2)传统的J2EE应用多采用基于EJB的重量级框架,这种框架适合于开发大型企业应用,但是使用EJB容器进行开发和调试需要耗费大量时间。
为了降低代码的耦合性,提高系统的开发效率,本文提出了一种基于Struts框架、Hibernate 框架和Spring框架的J2EE应用开发策略。
Hibernate 框架Hibernate是一个数据持久层框架,是一种实现对象和关系之间映射(O/R Mapping)的工具,它对JDBC进行了轻量级的对象封装,使程序员可以使用对象编程思想来操作数据库。
它不仅提供了从Java类到数据表的映射,也提供了数据查询和恢复机制。
相对于使用JDBC和SQL来操作数据库,使用Hibernate能大大的提高实现的效率。
Hibernate框架用配置文件的形式来定义Java对象和数据表之间的映射关系,同时在更深的层面将数据表之间的关系解释为Java对象之间的继承及包含等关系。
通过使用HQL语句将复杂的关系算法用对象的方式描述,在很大程度上简化了对数据的查询,加快了开发的效率。
在Hibernate中有一个简单而直观的API,用于对数据库所表示的对象执行查询。
j2ee外文翻译文献
j2ee外文翻译文献j2ee外文翻译Infrastructure for Automatic Dynamic DeploymentOf J2EE Application in Distributed EnvironmentsAnatoly Akkerman, Alexander T otok, and Vijay Karamcheti Abstract: in order to achieve such dynamic adaptation, we need an infrastructure for automating J2EE application deployment in such an environment. This need is quite evident to anyone who has ever tried deploying a J2EE application even on a single application server, which is a task that involves a great deal of configuration of both the system services and application components.Key words: j2ee; component; Distributed; Dynamic Deployment;1 IntroductionIn recent years, we have seen a significant growth in component-based enterprise application development. These applications are typically deployed on company Intranets or on the Internet and are characterized by high transaction volume, large numbers of users and wide area access. Traditionally they are deployed in a central location, using server clustering with load balancing (horizontal partitioning) to sustain user load. However, horizontal partitioning has been shown very efficient only in reducing application-related overheads of user-perceived response times, without having much effect on network-induced latencies. Vertical partitioning (e.g., running web tier and business tier in separate VMs) has been used for fault isolation and load balancing but it is sometimes impractical due to significant run-time overheads (even if one would keep the tierson a fast local-area network) related to heavy use of remote invocations. Recent work [14] in the context of J2EE component based applications has shown viability of vertical partitioning in wide-area networks without incurring the aforementioned overheads. The key conclusions from that study can be summarized as follows:Using properly designed applications, vertical distribution across wide-area networks improves user-perceived latencies.Wide-area vertical layering requires replication of application components and maintaining consistency between replicas.Additional replicas may be deployed dynamically to handle new requests.Different replicas may, in fact, be different implementations of the same component based on usage (read-only, read-write).New request paths may reus e components from previously deployed paths.Applying intelligent monitoring [6] and AI planning [2, 12] techniques in conjunction with the conclusions of that study, we see a potential for dynamic adaptation in industry-standard J2EE component-based applications in wide area networks Through deployment of additional application components dynamically based on active monitoring. However, in order to achieve such dynamic adaptation, we need an infrastructure for automating J2EE application deployment in such an environment. This need is quite evident to anyone who has ever tried deploying a J2EE application even on a single application server, which is a task that involves a great deal of configuration of both the system services and application components. For example one has to set up JDBC data sources, messaging destinations and other resource adapters before application components can beconfigured and deployed. In a wide area deployment that spans multiple server nodes, this proves even more complex, since more system services that facilitate inter-node communications need to be configured and started and a variety of configuration data, like IP addresses, port numbers, JNDI names and others have to be consistently maintained in various configuration files on multiple nodes.This distributed deployment infrastructure must be able to: address inter-component connectivity specification and define its effects on component configuration and deployment, address application component dependencies on applicati on server services, their configuration and deployment, provide simple but expressive abstractions to control adaptation through dynamic deployment and undeployment of components,enable reuse of services and components to maintain efficient use of network nodes’ resources,provide these facilities without incurring significant additional design effort on behalf of application programmers.In this paper we propose the infrastructure for automatic dynamic deployment of J2EE applications, which addresses all of the aforementioned issues. The infrastructure defines architecture description languages (ADL) for component and link description and assembly. The Component Description Language is used to describe application components and links. It provides clear separation of application components from system components. A flexible type system is used to define compatibility of component ports and links. A declaration and expression language for configurable component properties allows for specification of inter-component dependencies andpropagation of properties between components. The Component (Replica) Assembly Language allows for assembly of replicas of previously defined components into application paths byConnecting appropriate ports via link replicas and specifying the mapping of these component replicas onto target application server nodes. The Component Configuration Process evaluates an application path’s correctness, identifies the dependencies of application components on system components, and configures component replicas for deployment. An attempt is made to match and reuse any previously deployed replicas in the new path based on their configurations. We implement the infrastructure as a part of the JBoss open source Java application server [11] and test it on severalSample J2EE applications –Java Pets tore [23], Rubies [20] and TPC-W-NYU [32]. The infrastructure implementation utilizes the JBoss’s extendable micro-kernel architecture, based on the JMX [27] specification. Componentized architecture of JBoss allows incremental service deployments depending on the needs of deployed applications. We believe that dynamic reconfiguration of application servers through dynamic deployment and undeployment of system services is essential to building a resource-efficient framework for dynamic distributed deployment of J2EE applications. The rest of the paper is organized as follows. Section 2 provides necessary background for understanding the specifics of the J2EE component technology which are relevant to this study. Section 3 gives a general description of the infrastructure architecture, while section 4 goes deeper in describing particularly important and interesting internal mechanisms of the infrastructure. Section 5describes the implementation of the framework, and related work is discussed in section 6.2 J2EE Background2.1 IntroductionComponent frameworks. A component framework is a middleware system that supports applications consisting of components conforming to certain standards. Application components are “plugged” into the component framework, which establishes their environmental conditions and regulates the interactions between them. This is usually done through containers, component holders, which also provide commonly required support for naming, security, transactions, and persistence. Component frameworks provide an integrated environment for component execution, as a result significantly reduce the effort .it takes to design, implement, deploy, and maintain applications. Current day industry component framework standards are represented by Object Management Group’s CORBA Component Model [18], Sun Microsystems’ Java 2 Platform Enterprise Edition (J2EE) [25] and Microsoft’s .NET [17], wi th J2EE being currently the most popular and wide ly used component framework in the enterprise arena.J2EE. Java 2 Platform Enterprise Edition (J2EE) [25] is a comprehensive standard for developing multi-tier enterprise Java applications. The J2EE specification among other things defines the following:Component programming model,Component contracts with the hosting server,Services that the platform provides to these components,Various human roles,Compatibility test suites and compliance testing procedures.Among the list of services that a compliant application server must provide are messaging, transactions, naming and others that can be used by the application components. Application developed using J2EE adhere to the classical 3-Tier architectures –Presentation Tier, Business Tier, and Enterprise Information System (EIS) Tier (see Fig. 1). J2EE components belonging to each tier are developed adhering to theSpecific J2EE standards.1. Presentation or Web tier.This tier is actually subdivided into client and server sides. The client side hosts a web browser, applets and Java applications that communicate with the server side of presentation tier or the business tier. The server side hosts Java Servlet components [30], Java Server Pages (JSPs) [29] and static web content. These components are responsible for presenting business data to the end users. The data itself is typically acquired from the business tier and sometimes directly from the Enterprise Information System tier. The server side of the presentation tier is typically accessed through HTTP(S) protocol.2. Business or EJB tier.This tier consists of Enterprise Java Beans (EJBs) [24] that model the business logic of the enterprise application. These components provide persistence mechanisms and transactional support. The components in the EJB tier are invoked through remote invocations (RMI), in-JVM invocations or asynchronous message delivery, depending on the type of EJB component. The EJB specification defines several types of components. They differ in invocation style (synchronous vs. asynchronous, local vs. remote) and statefulness: completely stateless (e.g., Message-Driven Bean), stateful non-persistent(e.g., Stateful Session Bean), stateful persistent (e.g., Entity Bean). Synchronously invocable EJB components expose themselves through a special factory proxy object (an EJB Home object, which is specific to a given EJB), which is typically bound in JNDI by the deployer of the EJB. The EJB Home object allows creation or location of an EJBObject, which is a proxy to a particular instance of an EJB 1.3. Enterprise Information System (EIS) or Data tier.This tier refers to the enterprise information systems, like relational databases, ERP systems, messaging systems and the like. Business and presentation tier component communicate with this tier with the help of resource adapters as defined by the Java Connector Architecture [26].The J2EE programming model has been conceived as a distributed programming model where application components would run in J2EE servers and communicate with each other. After the initial introduction and first server implementations, the technology, most notably, the EJB technology has seen some a significant shift away from purely distributed computing model towards local interactions 2. There were very legitimate performance-related reasons behind this shift, however theDistributed features are still available. The J2EE specification has seen several revisions, the latest stable being version 1.3, while version 1.4 is going through last review phases 3. We shall focus our attention on the former, while actually learning from the latter. Compliant commercial J2EE implementations are widely available from BEA Systems [4], IBM [9], Oracle [21] and other vendors. Several open source implementations, including JBoss [11] and JOnAS [19] claimcompatibility as well. ARecent addition to the list is a new Apache project Geronimo[1].2.2 J2EE Component Programming ModelBefore we describe basic J2EE components, let’s first address the issue of defining what a component is a software component is a unit of composition with contractually specified interfaces and explicit context dependencies only. A software component can be deployed independently and is subject to composition by third parties [31].According to this definition the following entities which make up a typical J2EE application would be considered application components (some exceptions given below):EJBs (session, entity, message-driven),Web components (servlets, JSPs),messaging destinations,D ata sources,EJB and Web components are deployed into their corresponding containers provided by the application server vendor. They have well-defined contracts with their containers that govern lifecycle, threading, persistence and other concerns. Both Web and EJB components use JNDI lookups to locate resources or other EJB components they want to communicate with. The JNDI context in which these lookups are performed is maintained separately for each component by its container. Bindings messaging destinations, such as topics and queues, are resources provided by a messaging service implementation. Data sources are resources provided by the application server for data access by business components into the enterprise information services (data) tier, and most commonly are exemplified by JDBCconnection pools managed by the applicationServer. A J2EE programmer explicitly programs only EJBs and Web components. These custom-written components interact with each other and system services both implicitly and explicitly. For example, an EJB developer may choose explicit transaction demarcation (i.e., Bean-Managed Transactions) which means that the developer assumes the burden of writingexplicit programmatic interaction with the p latform’s Transaction Manager Service through well-defined interfaces. Alternatively, the developer may choose Container-Managed transaction demarcation, where transactional behavior of a component is defined through its descriptors and handled completely by the EJB container, thus acting as an implicit dependency of the EJB on the underlying Transaction Manager service.2.3 Links Between Components2.3.1 Remote InteractionsJ2EE defines only three basic inter-component connection types that can cross application server boundaries, in all three cases; communication is accomplished through special Java objects.Remote EJB invocation: synchronous EJB invocations through EJB Home and EJB Object interfaces.Java Connector outbound connection: synchronous message receipt, synchronous and asynchronous message sending, Database query using Connection Factory and Connection interfaces.Java Connector inbound connection: asynchronous message delivery into Message-Driven Beans (MDBs) only, utilizing Activation Spec objects. In the first two cases, an applicationcomponent developer writes the code that performs lookup of these objects in the component’s run-time JNDI context as well as code that issues method invocations or sends and receives messages to and from the remote component. The componen t’s run-time JNDI context is created for each deployment of the component.Bindings in the context are initialized at component deployment time by the deployed (usually by means of component’s deployment descriptors). These bin dings are assumed to be static, since the specification does not provide any contract between the container and the component to inform of any binding changes In the case of Java Connector inbound communication, Activation Spec object lookup and all subsequent interactions with it are done implicitly by the MDB container. The protocol for lookup has not been standardized, though it is reasonable to assume a JMX- or JNDI-based lookup assuming the underlying application server provides facilities to control each step of deployment process, establishment of a link between J2EE components would involve:Deployment of target component classes (optional for some components, like destinations),? C reation of a special Java object to be used as a target component’s proxy,Binding of this ob ject with component’s host naming service (JNDI or JMX),Start of the target component,Deployment of referencing component classes,Creation and population of referencing component’s run-time context in its host naming service,start of the refere ncing component.However, none of modern application servers allow detailedcontrol of the deployment process for all component types beyond what is possible by limited options in their deployment descriptors 4. Therefore our infrastructure will use a simplified approach that relies on features currently available on most application servers:Ability to deploy messaging destinations and data sources dynamically,Ability to create and bind into JNDI special objects to access messaging destinations and data sources,Ability to specify initial binding of EJB Home objects upon EJB component deployment,? Ability to specify a JNDI reference 5 in the referencing component’s run-time context to point to the EJB Home binding of the referenced EJB component. In our infrastructure which is limited to homogeneous application servers, these options are sufficient to control intercomponent links through simple deployment descriptor manipulation. However, in context of heterogeneous application servers, simple JNDI references and thus simple descriptor manipulation are insufficient due to cross-application-serverClassloading issues.2.3.2 Local InteractionsSome interactions between components can occur only between components co-located in the same application server JVM and sometimes only in the same container. In the Web tier, examples of such interactions are servlet-to-servlet request forwarding. In the EJB tier, such interactions are CMP Entity relations and invocations via EJB local interfaces. Such local deployment concerns need not be exposed at the level of a distributed deployment infrastructure other than to ensure collocation. Therefore, the infrastructure treats allcomponents requiring collocation as a single component.2.4 Deployment of J2EE Applications and System Services2.4.1 Deployment of Application ComponentsDeployment and undeployment of standard J2EE components has not yet been standardized (see JSR 88 [10] for standardization effort 6). Therefore, each application server vendor provides proprietary facilities for component deployment and undeployment. And while the J2EE specification does define packaging of standard components which includes format and location of XML-based deployment descriptors within the package, this package is not required to be deployable by an application server without proprietary transformation. Examples of such transformation areGeneration of additional proprietary descriptors that supplement or replace the standard ones,Code generation of application server-specific classes.In order to proceed with building a dynamic distributed deployment infrastructure capable of deploying in heterogeneous networks, we propose a universal unit of deployment to be a single XML-based deployment descriptor or a set of such,Bundled into an archive. The archive may optionally include Java classes that implement the component and any other resources that the component may need. Alternatively, the deployment descriptors may simply have URL references to codebases. We assume presence of a dynamic deployment/undeployment service on all compliant J2EE servers and a robust application server classloading architecture capable of repeated deployment cycles without undesired classloading-related issues. Most modern application servers (e.g., JBoss [11]and Geronimo [1]) do provide such facilities.2.4.2 Deployment of System Components (Services)While lacking only in the area of defining a clear specification of deployment and undeployment when it comes to application components, the J2EE standard falls much shorter with respect to system services. Not only a standardized deployment facility for system services is not specified, the specification, in fact, places no requirements even on life cycle properties of these services, nor does it address the issue of explicit specification of application component dependencies on the underlying system services. Instead it defines arole of human deploy who is responsible for ensuring that the required services are running based on his/her understanding of dependencies of application components on system services as implied by the nature of components and their deployment descriptors.References[1] Matt Bishop. Computer Security: Art and Science. New York, 2002[2] Matt Bishop. Vulnerabilities Analysis. Proceedings of the Second International Symposium on RecentAdvances in Intrusion Detection.Los Angeles 2006[3] Balasubra maniyan. An Architecture for Intrusion Detection using Autonomous Agents[M]. Department of Computer Sciences, Purdue University, 1998.。
J2EE Development Frameworks 外文翻译原文
J2EE Development FrameworksJava 2 Enterprise Edition has excelled at standardizing many important middleware concepts. For example, J2EE provides a standard interface for distributed transaction management, directory services, and messaging. In addition, Java 2 Standard Edition(J2SE),which underpins J2EE,provides a largely successful standard for Java interaction with relational databases.However, as the”J2EE’s Lack of Application Programming Support”sidebar explains, the platform has failed to deliver a satisfactory application programming model.Sun Microsystems and the large application server vendors have traditionally responded to this problem by advocating development tools as a way to hide J2EE’s complexity. However, tools for managing J2EE artifacts aren’t nearly as good as tools for working with the Java language, with their sophisticated refactoring capabilities, and J2EE tool support is generally inferior to that of the platform. Many J2EE tools are themselves complex, as is the code they generate.Many in the open source community, especially smaller vendors, have chosen the alternative of developing frameworks designed to simplify the experience of building J2EE applications. Popular frameworks such as Struts, Hibernate, and the Spring Framework play an important role in many of today’s J2EE development projects. WHY USE A FRAMEWORKA software framework is a set of classes that make up a reusable design for an application or, more commonly, one tier of an application. Whereas application code and thus manages the flow of control. This is often referred to as the Hollywood principle:”Don’t call us, we’ll call you.”The application developer writes code that the framework will then call at runtime.Designing a framework for use in a wide variety of unknown contexts is challenging. However, the framework approach is well adapted to the complexities of J2EE development because it can provide a simple, easy-to-use model for application programmers.Using a well-designed open source framework offers many advantages:* With a good framework, developers write only the code they need to write;They don’t get bogged down working directly with low infrastructure APIs. This is the key value proposition.* A well-designed framework can provide structure and consistency to an application. The structure will be clear to additional developers joining the project.* An easy-to-follow framework can promote best practice through examples and documentation.* Successful open source frameworks are better tested than in house code.* Frameworks usually become popular only if they have something to offer. In-house frameworks are often mandated, while a J2EE project is likely to adopt an open source framework only if it delivers clear benefits.J2EE itself defines several frameworks. For example, an Enterprise JavaBeans(EJB) container or Servlet engine relies on the Hollywood principle, with the J2EE runtime instantiating and invoking managed objects. Open source Web application frameworks such as Struts add their own framework over the standard Servlet framework. The emphasis is on frameworks above J2EE, which provide a simpler programming model or other benefits.OPEN SOURCE FRAMEWORKS EMERGEMost large J2EE projects have traditionally used in house frameworks to hide the platform’s complexity. Only recently has a consensus emerged about the generic problems that provide good generic solutions. There is now a clear trend for frameworks to “standardize”more of the infrastructure that formerly was developed on a per-project basis.One reason for J2EE frameworks’sudden popularity is the platform’s increased maturity. Developers now recognize areas in which the standard APIs are deficient and know from experience how difficult it is to write a good framework to fill the gap. In addition, many high-quality frameworks are now available that offer outstanding documentation and the support of a focused development team, without imposing licensing fees.StrutsThe trend toward open source frameworks began with Web applications. In 1999-2000, developers realized the deficiencies of the java Server Pages”Model 1”approach, in which JSP templates handled incoming requests as well as static template data. This meant that JSP often contained both business logic and complex HTML or other markup.With no standard framework in place J2EE specification support, developers responded with their own Front Controller implementations. These moved business logic to Java classes, thereby eliminating the need to maintain such hybrid artifacts.The Front Controller pattern is often referred to as Web MVC after the classic Model View Controller architecture pattern that is common to GUI development in object-oriented languages. (The name is somewhat misleading in that Web MVC views must pull information from the model, whereas in classic MVC, the model pushes events to views.)Initial Front Controller implementations varied greatly in quality. The Apache Software Foundation’s release of Struts in 2001-2002 changed all this. While not an ideal Web MVC framework, Struts worked well enough to quickly become the de facto standard.Struts demonstrated all the benefits of open source frameworks such as ease of recruiting personnel familiar with the structure it imposed. By late 2002, it was the natural choice for most J2EE Web applications, and every serious J2EE Web developer was familiar with it.The near-universal adoption of Struts commoditized an important chunk of the J2EE architectural stack. Even conservative organizations accepted its use in a prominent part of their software infrastructure and agreed to the Apache license’s terns.HibernateThe next domino to fall was persistence. J2EE “out of the box”provided two means for accessing persistent stores-most often, relational database: JDBC, the J2SE standard API for relational database management system access; and entity beans, an EJB component type dedicated to modeling a persistent entity.JDBC is error-prone programming model inhibited object-oriented design by forcing developers to work with relational concepts in Java code. Entity beans, despite hype from Sun and major J2EE vendors, likewise proved to be cumbersome: Initially, the technology was severely underspecified, not even taking into account management of relationships between persistent objects; it made applications difficult to test; and it offered an inadequate query language. By 2003, developers largely ignored entity beans despite enhancements in EJB 2.0 and 2.1.Early effortsSolutions to the persistence problem came in the form of object-relational mapping, which provides transparent persistence for plain old Java objects, a concept described in the sidebar, “The Noninvasive Framework: Power to the POJO.” Though not unique to Java, ORM is especially popular in the Java community-compared, for example, to .NET developers, who seem to regard it with suspicion.Commercial ORM tools such as Oracle’s TopLink were well established by the late1990s, but only a minority of projects used them because they were expensive, complex, and appeared to conflict with the Sun-sanctioned entity bean standard. Nevertheless, they usually achieved better results in practice than JDBC or entity beans, thus proving the case for POJO persistence.Java Data Objects, which appeared as a Java Community Process specification in 2001, offered generic POJO persistence to any persistent store (although implementations typically provided their best support for relational database). However, Sun’s lukewarm attitude toward JDO, coupled with J2EE vendors’ lack of interest in POJO persistence at that time, prevented the technology from achieving popularity.Hibernate arrivesRadical change came in 2002 for two reasons. First was widespread realization that entity beans had failed in practice, and that developers should ignore that part of J2EE specifications. By retarding rather than advancing the progress of ORM in Java, entity beans remain a prime example of how poor specifications can stifle development of superior technologies.The second factor was the arrival of Hibernate, the first popular, fully featured open source ORM solution. Hibernate offered fewer features than TopLink but delivered a robust implementation of the most desirable ones, and its focused development team aggressively sought improvements. Hibernate wasn’t particularly innovative, building on the extensive understanding of ORM, but it offered a more intuitive programming model than existing competitors and removed at one stroke cost and ease-of-use barriers to ORM.Around the same time, new commercial products offered highly efficient implementations of the JDO specification that targeted relational databases, givingdevelopers a rich choice. Meanwhile, TopLink remained a good option, with its license becoming friendlier to developers.ORM triumphsTogether, all these factors converged to make ORM the norm rather than the exception by 2003-2004. Although some projects still built their own persistence frameworks, the existence of Hibernate, TopLink, and leading JDO implementations made this extremely difficult undertaking unnecessary and indefensible.Another part of the application stack was now within the domain of popular frameworks, yet large gaps remained. For example, a typical Web application using Struts and Hibernate still lacked framework support for business logic. Although J2EE specifications address some of these issues, primarily through EJB, they don’t provide an adequate application programming model.SpringJ2EE frameworks have inexorably moved into application frameworks, which aim to provide consistent programming in all tiers and thereby integrate the application stack. The Spring Framework is the dominant product in this space, with adoption comparable to that of Hibernate.Spring essentially combines inversion of control and aspect-oriented programming (AOP)-both described in the sidebar, “The Noninvasive Framework: Power to the POJO”–with a service abstraction, to provide a programming model in which application code is implemented in POJO that are largely decoupled from the J2EE environment( and thus reusable in various environments). Spring also provides an alternative to EJB in many applications –for example, delivering declarative transaction management to any POJO. The Spring approach has proven to deliver excellent results in many kinds of projects, from small Web applications to large enterprise applications.Other products in the same space include HiveMind, which is conceptually to Spring but has a somewhat different take on IOC, and NanoContainer, which combines the Pico Container IOC container with services. Collectively, these products are referred to as lightweight containers to distinguish them from traditional J2EE approaches.By decoupling a POJO model from J2EE APIs, which are hard to stub at test time, lightweight containers greatly simplify unit testing. It’s possible to unit test in a plain J Unit environment, without any need to deploy code to an application server or to simulate an application server environment. Given the increased-and deserved-popularity of test-driven development, this has been a major factor in lightweight frameworks’ popularity.WHAT’S NEXT?Growing recognition and use of J2EE development frameworks is measurably reducing cost in many projects, as well as delivering better speed to market and higher maintainability. Today’s best frameworks offer excellent quality. Solid documentation, and numerous books and articles to support their use. Nevertheless, two areas in particular seem set for uncertainty in the J2EE space: the conflict between J2EE “standards” and open source innovation, and the growing importance of AOP.The open source versus standards conflict looms in two areas. In the presentation tier, JavaServer Faces, backed by Sun and some of the largest vendors, competes with entrenched open source solutions such as Struts. In the middle tier, EJB 3.0 offers a dependency injection capability reminiscent of a subset of Spring’s capabilities, mixed with liberal use of J2EE 5.0 annotations.In both areas, innovation has traditionally come from open source rather than specifications. However, JSP is somewhat indebted to , while the open source Tapestry project-a mature implementation of many of the same concepts-owes much to Apple’s commercial WebObjects.Likewise, EJB 3.0 seems to be attempting to standardize dependency injection, though it’s unclear what benefit this bring-especially if results in the loss of important features, which seems inevitable. EJB 3.0 also attempts a new departure in entering the application programming space: an area in which the J2EE specifications haven’t shone to date.Meanwhile, AOP is importance is steadily increasing within the J2EE community. While adoption isn’t yet widespread, certain uses of AOP, such as declarative transaction management, are declarative transaction management, are already popular. Solutions including Spring and dynaop, which offer what might be called “AOP with training wheels,”help to increase awareness of AOP. Full blown AOP technologies such as Aspect J will likely experience wider adoption in the next few years as well.Significantly, the Java Community Process shows no sign of any move to standardize AOP, although JBoss-which is overtly committed to working through the JCP with the EJB 3.0 specification-is vigorously pursuing proprietary AOP technology.The next-generation J2EE specifications as a whole are embracing a simpler, POJO programming model, similar to that already offered by combinations such as Spring and Hibernate. J2EE developers are sure to benefit from recent trends, which are driven more by practical experience than by marketing hype. This is a welcome change from the platform’s early days, when results often failed to live up to the promise held out by vendors.。
(完整word版)JAVA外文文献+翻译
Java and the InternetIf Java is, in fact, yet another computer programming language, you may question why it is so important and why it is being promoted as a revolutionary step in computer programming. The answer isn’t immediately obvious if you’re coming from a traditional programming perspective. Although Java is very useful for solving traditional stand-alone programming problems, it is also important because it will solve programming problems on the World Wide Web.1.Client-side programmingThe Web’s in itial server-browser design provided for interactive content, but the interactivity was completely provided by the server. The server produced static pages for the client browser, which would simply interpret and display them. Basic HTML contains simple mechanisms for data gathering: text-entry boxes, check boxes, radio boxes, lists and drop-down lists, as well as a button that can only be programmed to reset the data on the form or “submit” the data on the form back to the server. This submission passes through the Common Gateway Interface (CGI) provided on all Web servers. The text within the submission tells CGI what to do with it. The most common action is to run a program located on the server in a directory that’s typically called “cgi-bin.” (If you watch the address window at the top of your browser when you push a button on a Web page, you can sometimes see “cgi-bin” within all the gobbledygook there.) These programs can be written in most languages. Perl is a common choice because it is designed for text manipulation and is interpreted, so it can be installed on any server regardless of processor or operating system. Many powerful Web sites today are built strictly on CGI, and you can in fact do nearly anything with it. However, Web sites built on CGI programs can rapidly become overly complicated to maintain, and there is also the problem of response time. The response of a CGI program depends on how much data mustbe sent, as well as the load on both the server and the Internet. (On top of this, starting a CGI program tends to be slow.) The initial designers of the Web did not foresee how rapidly this bandwidth would be exhausted for the kinds of applications people developed. For example, any sort of dynamic graphing is nearly impossible to perform with consistency because a GIF file must be created and moved from the server to the client for each version of the graph. And you’ve no doubt had direct experience with something as simple as validating the data on an input form. You press the submit button on a page; the data is shipped back to the server; the server starts a CGI program that discovers an error, formats an HTML page informing you of the error, and then sends the page back to you; you must then back up a page and try again. Not only is this slow, it’s inelegant.The solution is client-side programming. Most machines that run Web browsers are powerful engines capable of doing vast work, and with the original static HTML approach they are sitting there, just idly waiting for the server to dish up the next page. Client-side programming means that the Web browser is harnessed to do whatever work it can, and the result for the user is a much speedier and more interactive experience at your Web site.The problem with discussions of client-side prog ramming is that they aren’t very different from discussions of programming in general. The parameters are almost the same, but the platform is different: a Web browser is like a limited operating system. In the end, you must still program, and this accounts for the dizzying array of problems and solutions produced by client-side programming. The rest of this section provides an overview of the issues and approaches in client-side programming.2.Plug-insOne of the most significant steps forward in client-side programming is the development of the plug-in. This is a way for a programmer to add new functionality to the browser by downloading a piece of code that plugs itself into the appropriate spot in the browser. It tells the browser “from now on you canpe rform this new activity.” (You need to download the plug-in only once.) Some fast and powerful behavior is added to browsers via plug-ins, but writing a plug-in is not a trivial task, and isn’t something you’d want to do as part of the process of building a particular site. The value of the plug-in for client-side programming is that it allows an expert programmer to develop a new language and add that language to a browser without the permission of the browser manufacturer. Thus, plug-ins provide a “back door” that allows the creation of new client-side programming languages (although not all languages are implemented as plug-ins).3.Scripting languagesPlug-ins resulted in an explosion of scripting languages. With a scripting language you embed the source code for your client-side program directly into the HTML page, and the plug-in that interprets that language is automatically activated while the HTML page is being displayed. Scripting languages tend to be reasonably easy to understand and, because they are simply text that is part of an HTML page, they load very quickly as part of the single server hit required to procure that page. The trade-off is that your code is exposed for everyone to see (and steal). Generally, however, you aren’t doing amazingly s ophisticated things with scripting languages so this is not too much of a hardship.This points out that the scripting languages used inside Web browsers are really intended to solve specific types of problems, primarily the creation of richer and more interactive graphical user interfaces (GUIs). However, a scripting language might solve 80 percent of the problems encountered in client-side programming. Your problems might very well fit completely within that 80 percent, and since scripting languages can allow easier and faster development, you should probably consider a scripting language before looking at a more involved solution such as Java or ActiveX programming.The most commonly discussed browser scripting languages are JavaScript (which has nothing to do with Java; it’s named that way just to grab some of Java’s marketing momentum), VBScript (which looks like Visual Basic), andTcl/Tk, which comes from the popular cross-platform GUI-building language. There are others out there, and no doubt more in development.JavaScript is probably the most commonly supported. It comes built into both Netscape Navigator and the Microsoft Internet Explorer (IE). In addition, there are probably more JavaScript books available than there are for the other browser languages, and some tools automatically create pages using JavaScript. However, if you’re already fluent in Visual Basic or Tcl/Tk, you’ll be more productive using those scripting languages rather than learning a new one. (You’ll have your hands full dealing w ith the Web issues already.)4.JavaIf a scripting language can solve 80 percent of the client-side programming problems, what about the other 20 percent—the “really hard stuff?” The most popular solution today is Java. Not only is it a powerful programming language built to be secure, cross-platform, and international, but Java is being continually extended to provide language features and libraries that elegantly handle problems that are difficult in traditional programming languages, such as multithreading, database access, network programming, and distributed computing. Java allows client-side programming via the applet.An applet is a mini-program that will run only under a Web browser. The applet is downloaded automatically as part of a Web page (just as, for example, a graphic is automatically downloaded). When the applet is activated it executes a program. This is part of its beauty—it provides you with a way to automatically distribute the client software from the server at the time the user needs the client software, and no sooner. The user gets the latest version of the client software without fail and without difficult reinstallation. Because of the way Java is designed, the programmer needs to create only a single program, and that program automatically works with all computers that have browsers with built-in Java interpreters. (This safely includes the vast majority of machines.) Since Java is a full-fledged programming language, you can do as much work as possible on the client before and after making requests of theserver. For example, you won’t need to send a request form across the Internet to discover that you’ve gotten a date or some other parameter wrong, and your client computer can quickly do the work of plotting data instead of waiting for the server to make a plot and ship a graphic image back to you. Not only do you get the immediate win of speed and responsiveness, but the general network traffic and load on servers can be reduced, preventing the entire Internet from slowing down.On e advantage a Java applet has over a scripted program is that it’s in compiled form, so the source code isn’t available to the client. On the other hand, a Java applet can be decompiled without too much trouble, but hiding your code is often not an important issue. Two other factors can be important. As you will see later in this book, a compiled Java applet can comprise many modules and take multiple server “hits” (accesses) to download. (In Java 1.1 and higher this is minimized by Java archives, called JAR files, that allow all the required modules to be packaged together and compressed for a single download.) A scripted program will just be integrated into the Web page as part of its text (and will generally be smaller and reduce server hits). This could be important to the responsiveness of your Web site. Another factor is the all-important learning curve. Regardless of what you’ve heard, Java is not a trivial language to learn. If you’re a Visual Basic programmer, moving to VBScript will be your fastest solution, and since it will probably solve most typical client/server problems you might be hard pressed to justify learning Java. If you’re experienced with a scripting language you will certainly benefit from looking at JavaScript or VBScript before committing to Java, since they might fit your needs handily and you’ll be more productive sooner.to run its applets withi5.ActiveXTo some degree, the competitor to Java is Microsoft’s ActiveX, although it takes a completely different approach. ActiveX was originally a Windows-only solution, although it is now being developed via an independent consortium to become cross-platform. Effectively, ActiveX says “if your program connects toits environment just so, it can be dropped into a Web page and run under a b rowser that supports ActiveX.” (IE directly supports ActiveX and Netscape does so using a plug-in.) Thus, ActiveX does not constrain you to a particular language. If, for example, you’re already an experienced Windows programmer using a language such as C++, Visual Basic, or Borland’s Delphi, you can create ActiveX components with almost no changes to your programming knowledge. ActiveX also provides a path for the use of legacy code in your Web pages.6.SecurityAutomatically downloading and running programs across the Internet can sound like a virus-builder’s dream. ActiveX especially brings up the thorny issue of security in client-side programming. If you click on a Web site, you might automatically download any number of things along with the HTML page: GIF files, script code, compiled Java code, and ActiveX components. Some of these are benign; GIF files can’t do any harm, and scripting languages are generally limited in what they can do. Java was also designed to run its applets within a “sandbox” of s afety, which prevents it from writing to disk or accessing memory outside the sandbox.ActiveX is at the opposite end of the spectrum. Programming with ActiveX is like programming Windows—you can do anything you want. So if you click on a page that downloads an ActiveX component, that component might cause damage to the files on your disk. Of course, programs that you load onto your computer that are not restricted to running inside a Web browser can do the same thing. Viruses downloaded from Bulletin-Board Systems (BBSs) have long been a problem, but the speed of the Internet amplifies the difficulty.The solution seems to be “digital signatures,” whereby code is verified to show who the author is. This is based on the idea that a virus works because its creator can be anonymous, so if you remove the anonymity individuals will be forced to be responsible for their actions. This seems like a good plan because it allows programs to be much more functional, and I suspect it will eliminate malicious mischief. If, however, a program has an unintentional destructive bugit will still cause problems.The Java approach is to prevent these problems from occurring, via the sandbox. The Java interpreter that lives on your local Web browser examines the applet for any untoward instructions as the applet is being loaded. In particular, the applet cannot write files to disk or erase files (one of the mainstays of viruses). Applets are generally considered to be safe, and since this is essential for reliable client/server systems, any bugs in the Java language that allow viruses are rapidly repaired. (It’s worth noting that the browser software actually enforces these security restrictions, and some browsers allow you to select different security levels to provide varying degrees of access to your system.) You might be skeptical of this rather draconian restriction against writing files to your local disk. For example, you may want to build a local database or save data for later use offline. The initial vision seemed to be that eventually everyone would get online to do anything important, but that was soon seen to be impractical (although low-cost “Internet appliances” might someday satisfy the needs of a significant segment of users). The solution is the “signed applet” that uses public-key encryption to verify that an applet does indeed come from where it claims it does. A signed applet can still trash your disk, but the theory is that since you can now hold the applet creator accountable they won’t do vicious things. Java provides a framework for digital signatures so that you will eventually be able to allow an applet to step outside the sandbox if necessary. Digital signatures have missed an important issue, which is the speed that people move around on the Internet. If you download a buggy program and it does something untoward, how long will it be before you discover the damage? It could be days or even weeks. By then, how will you track down the program that’s done it? And what good will it do you at that point?7.Internet vs. intranetThe Web is the most general solution to the client/server problem, so it makes sense that you can use the same technology to solve a subset of the problem, in particular the classic client/server problem within a company. With traditionalclient/server approaches you have the problem of multiple types of client computers, as well as the difficulty of installing new client software, both of which are handily solved with Web browsers and client-side programming. When Web technology is used for an information network that is restricted to a particular company, it is referred to as an intranet. Intranets provide much greater security than the Internet, since you can physically control access to the servers within your company. In terms of training, it seems that once people understand the general concept of a browser it’s much easier for them to deal with differences in the way pages and applets look, so the learning curve for new kinds of systems seems to be reduced.The security problem brings us to one of the divisions that seems to be automatically forming in the world of client-side programming. If your program is running on the Internet, you don’t know what platform it will be working under, and you want to be extra careful that you don’t di sseminate buggy code. You need something cross-platform and secure, like a scripting language or Java.If you’re running on an intranet, you might have a different set of constraints. It’s not uncommon that your machines could all be Intel/Windows platfor ms. On an intranet, you’re responsible for the quality of your own code and can repair bugs when they’re discovered. In addition, you might already have a body of legacy code that you’ve been using in a more traditional client/server approach, whereby you must physically install client programs every time you do an upgrade. The time wasted in installing upgrades is the most compelling reason to move to browsers, because upgrades are invisible and automatic. If you are involved in such an intranet, the most sensible approach to take is the shortest path that allows you to use your existing code base, rather than trying to recode your programs in a new language.When faced with this bewildering array of solutions to the client-side programming problem, the best plan of attack is a cost-benefit analysis. Consider the constraints of your problem and what would be the shortest path to your solution. Since client-side programming is still programming, it’s always a good idea to take the fastest development approach for your particular situation.This is an aggressive stance to prepare for inevitable encounters with the problems of program development.8.Server-side programmingThis whole discussion has ignored the issue of server-side programming. What happens when you make a request of a server? Most of the time the request is simply “send me this file.” Your browser then interprets the file in some appropriate fashion: as an HTML page, a graphic image, a Java applet, a script program, etc. A more complicated request to a server generally involves a database transaction. A common scenario involves a request for a complex database search, which the server then formats into an HTML page and sends to you as the result. (Of course, if the client has more intelligence via Java or a scripting language, the raw data can be sent and formatted at the client end, which will be faster and less load on the server.) Or you might want to register your name in a database when you join a group or place an order, which will involve changes to that database. These database requests must be processed via some code on the server side, which is generally referred to as server-side programming. Traditionally, server-side programming has been performed using Perl and CGI scripts, but more sophisticated systems have been appearing. These include Java-based Web servers that allow you to perform all your server-side programming in Java by writing what are called servlets. Servlets and their offspring, JSPs, are two of the most compelling reasons that companies who develop Web sites are moving to Java, especially because they eliminate the problems of dealing with differently abled browsers.9. separate arena: applicationsMuch of the brouhaha over Java has been over applets. Java is actually a general-purpose programming language that can solve any type of problem—at least in theory. And as pointed out previously, there might be more effectiveways to solve most client/server problems. When you move out of the applet arena (and simultaneously release the restrictions, such as the one against writing to disk) you enter the world of general-purpose applications that run standalone, without a Web browser, just like any ordinary program does. Here, Java’s strength is not only in its portability, but a lso its programmability. As you’ll see throughout this book, Java has many features that allow you to create robust programs in a shorter period than with previous programming languages. Be aware that this is a mixed blessing. You pay for the improvements through slower execution speed (although there is significant work going on in this area—JDK 1.3, in particular, introduces the so-called “hotspot” performance improvements). Like any language, Java has built-in limitations that might make it inappropriate to solve certain types of programming problems. Java is a rapidly evolving language, however, and as each new release comes out it becomes more and more attractive for solving larger sets of problems.Java和因特网既然Java不过另一种类型的程序设计语言,大家可能会奇怪它为什么值得如此重视,为什么还有这么多的人认为它是计算机程序设计的一个里程碑呢?如果您来自一个传统的程序设计背景,那么答案在刚开始的时候并不是很明显。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
文献信息文献标题:Implementing and Analyzing Big Data Techniques with Spring Frame Work in Java & J2EE Based Application(基于Java/J2EE的Spring 框架实现和分析大数据技术)文献作者及出处:Saxena A, Kaushik N, Kaushik N. Implementing and Analyzing Big Data Techniques with Spring Frame Work in Java & J2EE Based Application[C]//Proceedings of the Second International Conference on Information and Communication Technology for Competitive Strategies. ACM, 2016:5.字数统计:英文2814单词,15570字符;中文4912汉字外文文献Implementing and Analyzing Big Data Techniques withSpring Frame Work in Java & J2EE Based ApplicationAbstract –In the time of big data techniques with spring framework on java, web servers or application server as the significant channel in big data should be updated to meet execution and force imperatives. Significant endeavors have been put resources into web server or application server conveyance and web storing procedures, but very few efforts have been paid to improve hardware-favored web type services. Big Data with spring framework in java is a promising business and computing model in web framework. Spring is the most popular open source Java application Framework. It combines all the industry-standard frameworks (for e.g. Struts and Hibernate) and approaches into one bundle. The expense and working costs of data centers have skyrocketed with the increase in computing capacity. Big data is a concept that defines the large volume of both structured and unstructured data – that inundates a business on a day-to-day environment. This research argues the need to provide novel method and tools to bolster programming engineers meaning toenhance vitality productivity and minimize the subsequent from outlining, creating, sending and running programming in Big Data with spring framework.Keywords –Java, J2ee, Hadoop Framework, spring, Big Data.I.INTRODUCTIONBig Data with spring framework based applications and innovation components are composed in java& J2ee. Java has inherent limitations that can keep endeavors from advancing execution and using vast in memory data sets. Organizations endeavor to work around these dormancy, versatility and memory size issues by utilizing separate caching frameworks or analyzing a subset of accessible data. Then again, this influences the quality and convenience of business choices and even lessens revenue.Objective of big data:•By giving a semantic end-to-end connection between clients and data sources.•Enabling clients to quickly define instinctive queries utilizing natural vocabularies and conceptualizations.•Seamlessly coordinating information spread over various distributed data sources, including streaming sources.•Exploiting gigantic parallelism for adaptability a long ways past traditional RDBMSs and along these lines lessening the turnaround time for information requests to minutes as opposed.Objectives for Spring Framework:•The potential favorable circumstances of utilizing Spring's dependency injection.•Dependency injection in XML, utilizing constructor.•Default scope for Spring beans.•How to declare an initialization method in a Spring bean.Java:Java is one of the most robust, mainly used and perfect programming languagefor creating enterprise applications. Over the years, Java development has evolved from applets run on a web browser (chrome, mozila) to large enterprise distributed applications run on multiple servers. Presently, Java has three different flavors, and each addresses certain programming requirements.Spring framework is the most well known application advancement structure for big business Java. A great many designers around the globe use Spring Framework to make high performing, effortlessly testable, reusable code.J2ee:J2ee utilizes a multi-level circulated application model. There are three levels in the commonplace J2EE application model: presentation tier, business logic tier and data tier.Framework:The framework is intended to streamline the full improvement cycle, from building, to sending, to looking after applications. it can be considered as an arrangement of capacities helping the designers in making the applications.II.Spring FrameworkSpring is a lightweight framework. It can be considered as a structure of systems in light of the fact that it gives backing to different structures, for example, Struts, Hibernate, Tapestry, EJB, JSF and so forth. The system, in more extensive sense, can be characterized as a structure where we discover arrangement of the different specialized issues.Features of SpringFramework:•Lightweight -Spring is lightweight as far as size and overhead. The whole spring system can be conveyed in a Jar file that weighs in at a little more than 1 MB.•Aspect-Oriented - Spring supports the features of aspect oriented programming approach that enables cohesive development.•Container -Spring is a compartment in light of the fact that it deals with the life cycle and configuration of application objects.•Framework -Spring accompanies MVC web application framework, based on core Spring functionality. This structure is profoundly configurable by means of methodology interfaces, and obliges various perspective innovations like JSP, Speed, Tiles.Aspect oriented programming:To permit clients to actualize custom perspectives, supplementing their utilization of OOP with AOP. Aspect oriented programming is regularly characterized as a programming strategy that advances partition of worries inside of a software framework. Frameworks are made out of a few parts, each in charge of a particular bit of usefulness.AOP gives you perspectives. Aspects empower modularization of concerns, for example, transaction management that cut across multiple types and objects.AOP is utilized as a part of theSpring Framework:•To give definitivedeclarative enterprise services, particularly as a substitution for EJB explanatory services. The most critical such service is explanatory transaction management.•To permit clients to actualize custom aspects, complementing their utilization of OOP with AOP.Inversion of Control:The IoC (Inversion of Control) pattern utilizes three diverse methodologies as a part of request to accomplish decoupling of control of services from your components:•Interface Injection : Your components expressly fit in with an arrangement of interfaces, with related setup metadata, keeping in mind the end goal to permit the system to oversee them accurately.•Setter Injection : External metadata is utilized to arrange how your segments can be cooperated with.•Constructor Injection: Your components are enrolled with the framework, including the parameters to be utilized when thecomponents are developed, and the structure gives instances of the component with the majority of the predeterminedfacilities applied.Dependency Injection:Dependency Injection (DI) is a design pattern that expels the dependency from the programming code with the goal that it can be anything but difficult to oversee and test the application. Dependency Injection makes our programming code inexactly coupled.III.Big DataBig Data is more and various types of data than is effectively taken care of traditional relational database management systems (RDBMSs). Another helpful point of view is to describe big data as having high volume, high speed, and high assortment.•High volume: the sum or amount of data.•High speed: the rate at which data is created.•High assortment: the distinctive sorts of data.Big Data is a technique that is utilized to portray data that is high volume and speed,requires new technologies and systems to catch, store, and analyze it; and is utilized to upgrade decision making, give understanding and disclosure, and bolster and advance technique. Normally, to analyze data, individuals used to make diverse data sets in view of one or more regular fields so examination turns out to be simple. Big data has numerous sources. For instance, each mouse event on a site can be caught in Web log files and examined keeping in mind the end goal to better comprehend customers' purchasing practices and to impact their shopping by powerfully suggesting products. Social media sources, for example, Facebook and Twitter create enormous measures of remarks and tweets. This data can be caught and broke down to comprehend, for instance, what individuals consider new item presentations. Machines, for example, savvy meters, produce data. These meters persistently stream information about power, water, or gas utilization that can be imparted to clients and consolidated with estimating arrangements to rouse clients to move some of their vitality utilization.Figure 1. Information flow of Big DataThis Figure 1shows different phases of Big Data Uses of Big Data.1.Fraud detection:In many cases, fraud is discovered long after the fact, and soon thereafter the harm has been done and all that is left is to minimize the harm and modify arrangements to keep it from happening once more. Big Data stages that can examine cases and exchanges continuously, recognizing huge scale designs crosswise over numerous exchanges or identifying abnormal conduct from an individual client, can change the fraud detection game.2.IT log analytics:IT arrangements and IT divisions create a colossal amount of logs and follow information. Without a Big Data arrangement, quite a bit of this information must go unexamined.3.Call center analyticsBig Data arrangements can distinguish repeating issues or client and staff conduct designs on the fly not just by comprehending time/quality determination measurements, additionally by catching and preparing call content itself.4.Social media analysisEveryone and their moms are on online networking nowadays, whether they're"preferring" organization pages on Facebook or tweeting protestations about items on Twitter. A Big Data arrangement fabricated to reap and analyze online networking movement, similar to IBM's Cognos Consumer Insights, a point arrangement running on IBM's BigInsights Big Data stage, can comprehend the jabber. Social mediacan give continuous experiences into how the business sector is reacting to items and battles. With those bits of knowledge, organizations can change their valuing, advancement, and battle arrangement on the fly for ideal results.Figure 2. Application area of Big DataCase of Big Data in Real world:•Consumer item organizations and retail associations are checking online networking like Facebook and Twitter to get an uncommon perspective into client conduct, inclinations, and item observation.•Manufacturers are observing moment vibration information from their hardware, which changes somewhat as it wears out, to foresee the ideal time to supplant or keep up.•Manufacturers are likewise observing informal organizations, however with an alternate objective than advertisers: They are utilizing it to identify reseller's exchangebolster issues before a guarantee disappointment turns out to be openly adverse.•The government is making information open at both the national, state, and city level for clients to grow new applications that can produce open great.•Financial Services associations are utilizing information mined from client connections to cut up their clients into finely tuned fragments.•Advertising and showcasing offices are following online networking to comprehend responsiveness to campaigns, advancements, and other promoting mediums.•Insurance organizations are utilizing Big Data investigation to see which home protection applications can be instantly prepared, and which ones need an approving in-individual visit from an operators.•By grasping social media, retail associations are drawing in brand promoters, changing the impression of brand rivals, and not with standing empowering eager clients to offer their items.•Hospitals are investigating medicinal information and patient records to predict those patients that are prone to look for readmission inside of a couple of months of release. The doctor's facility can then mediate with expectations of anticipating another expensive doctor's facility sit tight.•Web-based organizations are creating data items that consolidate information assembled from clients to offer additionally engaging proposals and more fruitful coupon programs.•Sports groups are utilizing information for following ticket deals and even for tracking team strategies.Figure 3. Architecture of Big DataThis figure 3 first extracts the social, archive, service data some part of operational data then transforms with new techniques then load in to server and finally Big Data analytic with latest technique.Figure 4. stages of Big DataThis figure 4 divides the data in to three stages.1.Data Acquisition form:this stage of data cover with streams, internet data, cloud data source, mobile data source, desktop data source and server data source.2.Data refining and processing form:this stage covers refining and processing the data of corporate Hub. Corporate data hub is combination of refining workloads and local workloads.3.Data Shipping form:this stage of architecture extract the data from different sources.IV.HADOOP ARCHITECTURESpring for Apache Hadoop streamlines providing so as to create Apache Hadoopa brought together design model and simple to utilize APIs for utilizing HDFS, MapReduce, Pig, and Hive. It likewise furnishes coordination with other Spring eco –system venture, for example, Spring Incorporation and Spring Cluster empowering you to create answers for enormous information ingest/fare and Hadoop work process organization.Apache Hadoop is a software patternfor preparing a lot of information over conceivably greatly parallel groups of servers. The key segment of Hadoop is the Hadoop Distributed File System,which deals with the data shared over the different servers. It is a direct result of HDFS that such a variety of servers can be overseen in parallel. HDFS is file based and does not require any data model to save and process data. It can store data of any structure, however is not a RDBMS. HDFS can deal with the capacity and access of an Web logs, XML documents type of data and the length of the data can be placed in a file and replicated into HDFS. The Hadoop base regularly runs MapReduce programs in parallel. MapReduce takes substantial datasets, extricates and changes valuable data, conveys the data to the different servers where handling happens, and amasses the outcomes into a smaller,easier-to-examine file. It doesn't perform analytics fundamentally; rather, it gives the system that controls the projects that perform the analytics. As of now, jobs can be run just a in batch, which restrains the utilization of Hadoop/MapReduce for real-time applications. In spite of the fact that Hadoop and MapReduce are talked about and regularly utilized together, they can be utilized independently. That is, Hadoop can be utilized without MapReduce and the other way around.Figure 5 outlines how process is carried out by using Hadoop/MapReduce. This is a basic process that should likewise be possible with SQL based query and a RDBMS, yet gives a decent sample of Hadoop/MapReduce handling. At the left is an information document with records containing Deer, Bear , River, and Car. The goal is to tally the quantity of times every word happens. The initial step is to part the records and then prepared by the clusters of servers, for example, Java and R language on the servers. The target in this case is to assemble the data by a split depending on the words. The MapReduce pattern then consolidations the mix/sort results for information to the reducer program, which thencalculates the number of times every word happens. This yield can then be input to an data warehouse where it might be consolidated with other information for analysis or accessed straight for wardly by different BI instruments .Figure 5. Hadoop ArchitectureV.RESULT AND DISCUSSIONBig data processing with spring framework results in distributed data store: spring framework enables resource and data aggregation on java. Java helps in improvement in execution efficiency by distributing application execution at different levels. Due to reducing costs of devices and networks data from real world is getting collected in data centres. A system that implements big data processing on spring framework is a combination of components like servers for judgment, accumulation and analysis to solve real life problems like traffic management and human resource management. Distributed parallel processing is required to perform statistical analysis of different vehicles at different or same place in one city or a comparison of different cities. In comparing with other distributed batch methods the performance increaseei ght times. Let us use this prototype to match any individual’s location and preference with product inventory of stores and malls and to generate the bills and deliver the product at the doorstep of customer in shortest possible time. The process shown in the figure can be explained in steps:Step 1: Individual’s location and preference is retrieved (Query 1)Step 2: Stores and malls details within a certain distance is retrieved (Query 2) Step 3: Individual’s information and store’s product information is matched (Query 3)Step 4: A bill is generated if they match.The processing load in step 2 and 3 is directly proportional to number of people. Dynamic load balancing by increasing dedicated servers reduces CPU usage and ensures high speed processing. Hence ensuring optimization of improvement in performance, resource efficiency and delivery synchronization.Figure 6. Architecture of big data with Spring FrameworkIn this figure 6 query 1, query 2, query 3 is based on spring framework of java that means all the query based code is stored in the given XML File, individual information is stored in oracle database. Finally coupon issued in the base of big data based query of spring framework of java and J2ee under the supervision Hadoop Architecture of Big Data follow in figure 7 shown below.Figure 7. Spring Framework with big dataVI. CONCLUSION AND FUTURE SCOPEIn this research article, we described the ongoing research to design and implement a big data with spring Framework.This model administers big data to ceaselessly trade asset cuts among machines, granting assets to those occupants requiring or qualified for additional, while having the capacity to figure out where the asset diminishment will be all the more financially compelling, i.e., will contribute in lesser degree to execution debasement.In future we have to implement big data with struts, spring and hibernate integration to reduce cost on infrastructure in java & J2ee base applications.中文译文基于Java/J2EE的Spring框架实现和分析大数据技术摘要—在JAVA Spring框架下的大数据技术时代,作为大数据中重要通道的Web服务器或应用服务器应该进行更新,以满足执行和强制要求。