I understand J2EE and .NET

xiaoxiao2021-03-06  93

Introduction ==== Two months ago, another development group of the company prepared to re-develop the original system based on the J2EE (BEA WebLogic) platform, at the selection, I will consult various problems in the development of enterprises. BEA's technicians, because I don't have the development experience based on the J2EE platform, so it can only be aimed at the development experience and experience in .NET, I will ask for support for similar infrastructure in J2EE, of course, this is after all It is two different development platforms, it is impossible to have something to correspond, but it is equally an enterprise-level development platform. In fact, I think it is approaching from the perspective of architecture, and its development framework should be substantially the same. The following is some of the experience I got after I participated in the selection consultation, because I understand the Java platform understanding, there is more omissions and biased, please refer to the reader.

1. EJB has too many similarities to COM EJB and COM , all based on specific binary protocols RMI and DCOM are distributed components technology. Because they need to complete the same functional requirements, they determine how much they have, need container management, context status, transaction model, serialization technology, object instance management, thread, remote call, message queue, security and role, etc. Whether it is a conversation bean or an entity bean, no matter whether it is BMP or CMP, you can find similar concepts in COM . In short, they are like a pair of brothers. EJB is a standard of norms, while com , more people think it is a product, maybe this is Microsoft gives people, because we can choose different EJB container server products, there are BEA, IBM or other open source And COM is only one. But in fact, COM / DCOM / COM is also a specification or standard, just like EJB, you can register as a COM component as long as you minimize some of the interfaces in the COM specification, and write a COM in Visual Basic 6. Components are very easy.

2, JDBC is some similar to ADO JDBC and ADO, but it seems unfair to adobe with ADO.NET. After all, ADO.NET is later. In the data object, I am most concerned about the processing and caching of the data. I have used the three-story / multi-layer application architecture mode for a long time. Therefore, the processing and remote of the data set / result set. Transmission must be the problem we first face. In a three-layer application based on an ADO.Recordset recordset, people usually transmit these sustainable data objects via the DCOM / CORBA protocol, and the data layer is passed through these records after accepting the data objects after the client modified. The metadata included to map into associated SQL operations, in the enterprise application of multi-layer architecture, this remote transfer, client cache data set, and broken data operation mode technology are critical. The RESULTSET in JDBC is unable to do this, which may be a variety of data processing, mapping EJB components, and techniques like Hibernate in the Java platform throme!

3, O / R mapping In fact I am not a supporter of type data object or object relationship mapping (O / R mapping) technology, at least in this stage. For ObjectSpace (it is said to release this technology in ADO.NET 2) or Hibernate in Java, I think O / R mapping is not as beautiful as it promotes, I am more willing to use ADO.NET Dataset. " Table Module "[See" Enterprise Application Architecture Mode "Martin Fowler] technology to deliver and operate data, usually use attributes in O / R mapping to map fields, they claim that such pre-binding techniques can be checked out during compilation The detection of errors and value types named in the field, and may provide more convenient encoding features in the development environment of the IDE (such as listed classes), but this will increase development tasks and difficulty, and you may need a lot of such mapping classes. To map and manipulate the table in the database, I prefer to use a universal data store class to extract and store all tables in the database, all need to pack the required XML (such as ADO.NET's Dataset). Table data (including associations, constraints, etc.) between these tables, which simplifies data storage and mapping and provides sufficient flexibility. What kind of data model is the choice, this is not easy, there is a special explanation of this issue "Enterprise Application Architecture Mode" (Chapter 2). "Table Module" has a flattening based on workload and complexity, in view of "whether to apply 'table module' depends on the support of the environment on the universal recordset. If the development environment has a lot of records The set tool (such as .NET or Visual Studio), 'table module' is very attractive. "[See" Enterprise App Structure "P22] and past experience, I always entangled when I just started to contact JDBC In the confusion between "Table Modules" and other modes, because I can't understand why there is no ready-made standard for "table modules" in J2EE. After doubting for dozens of days, I saw "Structure-oriented power (Butler introduction)", finally stunned: The original Java camp is also very interested in "Table Module" model! I believe this will have a very positive role in promoting the development of Java applications.

4, Web Services / SOAP Microsoft is undoubtedly advocating and vigorous promoters of XML and Web Services. Some people think that Microsoft's admiration for Web Services even presses the development of their own Remoting technology, but the industry's prospects and support for Web Services are unprecedented and intensive. The SOAP protocol based on XML standard has made everyone a clearer and clear future, which is undoubtedly exciting and encouraging. On the support of Web Service. Net has unbesented advantages, whether it is in terms of web services development efficiency and scalability, in Microsoft released WSE (Web Service Enhancement) 2.0 development packages more .NET Advantages in this regard. The remote delivery and cache of the data object in the enterprise application are all basis. If the data object is unable to be very valuable based on XML specification, unfortunately, in this commercial society full of interest, ADO.NET DataSet is also JDO in Java, Hibernate is currently unable to handle, although it may be used to convert, but build a more unified communication criteria is always our good wishes. Finally, it is worth amazing that Microsoft's strong support for Web Services in development tools and development technologies, as we can develop and deploy our latest enterprise application products so fast and efficiently. Whether it is a simple and fast ASMX Web Services development model or a powerful WSE development method, we have more choices and a variety of different pleasure experience! 5. User interface and report user interface technology seems to be a strong term, Java camp seems to be mainly mainly browser client technology, and .Net is now more popular and respected is a fat client's SmartClient technology, these two technologies Each has excellent, but relatively complex enterprise applications I am more biased to use the interface technology of the fat client. In fact, the GUI interface in Java is also getting better, such as OpenOffice project is a good proof, and ASP.NET in .NET is also very innovative, especially asp.net 2.0 is more expected. In terms of these .NET technology, Microsoft's speed and strength is a respectable, while the power of Java communities and open source has also made them gaining the amazing progress and results. In user interface technology, there is a very cool function to "bind" technology. In .NET you can easily bind one of the objects of any object to an attribute of a GUI component, and you can also perform self-conversion and performance on the binding process, no need to worry about multi-level Tied data synchronization display, etc., the cumbersome details, because you only need to invoke the data source. In the data operation mode using the "Table Module", the binding technology will greatly reduce the complexity of interface processing, more amazing, I will no longer think that the data operation interface is a depressed thing.

There seems to be standard in J2EE. In terms of report printing, Crystal Report seems to have always been the first choice for these two platforms, but friends who have been developed by Crystal Report will have more complaints for Crystal Report's product defects and Chinese support, while Microsoft also achieves product bundles with Crystal Report. But in fact, Microsoft has never given up its efforts to develop report engine / services, but he has not achieved great results in this regard, and we have only used Crystal Report to develop production. Report. Reporting Service really encouraged me to be encouraged by its RDL (Report Definition Language), I hope that one day, we can exchange and express report data for each system by standardizing XML-based report definition languages! 6, other Microsoft always designs and implements a hand-wrap-up office, which is also based on these products, and the products and technologies are limited to the Windows platform as much as possible, which hinders the addition of other implementors. However, it consolidates Microsoft's control of technology platforms, which may be Microsoft's strategic decision. Just like .NET's propaganda slogan "a platform, multiple languages", the Windows operating system is always their core, and it is obvious that this is two very different from the "one language, multiple platforms" in Java. Strategic thinking. Some people say that the smart client (SmartClient) technology that is now in Microsoft is hoping to promote the role of the client to enhance the dependence on the Windows operating system, but I am not fully agreeable.

Talking about .NET, I always can't help but pay attention to this exciting open source project. I am more eager to run our business applications in different platforms, and this is also more common and strong requirements of customers (customers in government departments, in China, corporate customers are also more stringent in copyright control. It is necessary to ask more platform to choose to reduce system costs), although I can choose the platform like J2EE to develop enterprise applications to achieve cross-platform purposes, however, I have a love and fascination with the .Net, it is difficult to abandon it [just like Miguel (Miguel DE ICAZA, one of the founders of Gnome, Ximian and Mono) said that "When Microsoft launches .Net, we started MONO at first sight, this kind of love is undoubtedly contradictory and painful, Therefore, Mono's emergence and formal release is very exciting to us! Currently, we first intend to use Mono to make our business application WebService and data access layers on Linux, and support Oracle, PostgreSQL, with Mono's development, when the WinForms is funded It's great! ! ! And this is what is expectation!

Finally, in this article, I try to avoid excessive differences in the design and development details in these two platforms (in fact, I can't do this. ^ OO ^), nor does it want to see the support of both sides Some of the extensive opponents produced.

转载请注明原文地址:https://www.9cbs.com/read-95703.html

New Post(0)