In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the relevant knowledge of "how to develop a high-quality J2EE system". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
J2EE can be said to refer to the implementation of Java in the database information system. The database information system has developed from the early dBase, Delphi/VB and other Cpact S structure to the Browser S (Browser browser / Server server) structure, while J2EE mainly refers to the implementation of the Bhand S structure.
J2EE is also a framework and standard, framework is similar to the concept of API, library, but beyond them. If you need to learn more about the framework, you can start with design patterns.
J2EE is a virtual big concept. The J2EE standard mainly has three sub-technical standards: WEB technology, EJB technology and JMS. When it comes to J2EE, it should be said that it should be implemented on these three sub-concepts.
Each of these three technologies involves two parts: the container part and the application part. Web container also refers to Jsp/Servlet container. If you want to develop a Web application, whether it is compiling or running, you must have Jsp/Servlet library or API support (in addition to JDK/J2SE).
In addition to Jsp/Servlet technology, Web technology also requires JavaBeans or JavaClass to achieve some functions or package to carry data, so Web technology is initially referred to as Jsp/Servlet+JavaBeans system.
When it comes to JavaBeans technology, it involves component component technology (component), which is the core and basic part of Java. Many software design concepts (design patterns) are realized through JavaBeans.
JavaBeans is not part of the J2EE concept. If a JavaBeans object is called by Web technology (that is, Jsp/Servlet), then JavaBeans runs in J2EE's Web container; if it is called by EJB, it runs in the EJB container.
EJB (Enterprise JavaBeans) is a kind of promotion and specification of ordinary JavaBeans, because the development of enterprise information system needs a scalable performance, transaction and security mechanism, which can ensure the smooth development of enterprise system, rather than replacing a set of software system on a scale.
At this point, after the development of JavaBeans components to EJB, it does not mean that the previous form of JavaBeans has disappeared, which naturally leads to two JavaBeans technologies: EJB and POJO,POJO are completely different from the concept of EJB, referring to ordinary JavaBeans, and this JavaBeans is not attached to a certain framework, or it can simply be said: this JavaBeans is developed and created separately for this application.
There are many J2EE application development tools: such as JBuilder, Eclipse, etc. These IDE are first of all Java development tools, that is to say, their first basic function is to develop JavaBeans or Javaclass, but if you want to develop a J2EE system, you have to implement either Web technology or EJB technology, then you may need some specialized module functions (for example, eclipse requires lomboz plug-ins), most importantly Because the J2EE system is divided into two parts: the container and the application, you need to specify a J2EE container to develop J2EE in any development tool.
J2EE containers are divided into WEB containers and EJB containers. Tomcat/Resin is a Web container; JBoss is an EJB container + Web container, etc., in which the Web container is directly implemented using Tomcat. So the Web application you develop can run in the above two containers, while the Web+EJB application you develop can only run on the JBoss server, commercial products such as Websphere/Weblogic and JBoss belong to the same nature.
J2EE containers are also known as J2EE servers, and most of the time their concepts are the same.
If the database connection of your J2EE application system is obtained through JNDI, that is to say, from the container, then your J2EE application system basically has nothing to do with the database. If you couple the database JDBC-driven configuration in your J2EE application system, then your J2EE application system has the concept of database. As a mature J2EE application system that needs to be promoted, coupling with specific databases is not recommended. Of course, how to ensure the performance of J2EE applications reflects your design level.
How to develop a high quality J2EE system
The standard to measure the level of design and development of J2EE application system is: decoupling; can the functions of your application system be completely separated? Whether it is not dependent on each other, and only in this way can the software design goal of maintainability and extensibility be realized.
In order to achieve this goal, various framework concepts are born. The J2EE framework standard divides a system into the main parts of WEB and EJB. Of course, sometimes we do not distinguish by this specific technology, but are abstracted into presentation layer, service layer and persistence layer from the design. These three levels separate the J2EE from a height to achieve the purpose of decoupling.
Therefore, in actual programming, we should also rely on our functions to these three levels, so that the general direction is clear and distinct, but it is not easy to do this without technical constraints, so we still have to use J2EE specific technology to achieve it. At this time, you can use EJB specification to achieve the service layer and persistence layer, and Web technology to achieve the presentation layer.
Why EJB can separate the service layer from Jsp/Servlet, because it has mandatory constraints on JavaBeans coding, there is now a weak constraint on JavaBeans, implemented using the Ioc pattern (of course, EJB3.0 also takes this way). Before the birth of the Ioc pattern, it is generally through the factory pattern to constrain the JavaBeans to form a service layer, which is also one of the design principles of the open source forum like Jive.
As a result, there are two architectural options for separating the service layer from the presentation layer: the management of ordinary JavaBeans (POJO) frameworks (such as Spring, JdonFramework) and the management of EJB EJB framework, because EJB is not only a framework, but also a standard, and standards can be extended and developed, so these two differences may be blurred and incorporated into the same standard in the future. However, personally, I think: standard-setting is for a certain purpose, and some have to be sacrificed for others, so these two architectures coexist for a long time.
The difference between these two architectures has also given birth to a new term: a complete POJO system is also known as a lightweight system (lightweight). In fact, the term itself does not have a strict definition, but is more of an attractive signboard. Does lightweight mean easy to learn and easy to use? According to this definition, lightweight systems such as Spring are not easy to learn; and can the future system of EJB3.0 (still called EJB) be called lightweight?
Previously talked about the service layer framework, using the service layer framework can separate the JavaBeans from the Jsp/Servlet, while using the presentation layer framework can completely separate the remaining JavaBeans in the Jsp, this part of JavaBeans is mainly responsible for display correlation, generally achieved through the tag library (taglib), different frameworks have their own tag libraries, Struts is a widely used presentation layer framework.
In this way, the separation of the presentation layer and the service layer is achieved through two frameworks, and the rest is the persistence layer framework, which separates the database storage from the service layer through the persistence layer framework. The persistence layer framework has two directions: directly writing SQL statements such as JDBC (such as iBatis); Hibernate and JDO technology using O/RMapping technology; and, of course, entity Bean technology in EJB.
Persistent layer framework currently presents a hundred flowers blossom, each has its own advantages and disadvantages, so just like the presentation layer framework, there is not a framework designated as a standard framework, of course, the presentation layer framework now comes out a JSF, which represents the concept of page components is a new direction of development, but the complex implementation is somewhat forgettable and daunting.
In all these J2EE technologies, although SUN has played a great role, generally speaking: there is such an evaluation on the network: SUN's theory is invincible; SUN's products are used to hit a wall; for beginners, especially those who try to pass or have passed SUN certification, quickly get rid of the shadow of SUN, immediately run away, and use open source products to achieve their own applications.
Finally, if your J2EE application is implemented in the framework of the presentation layer, service layer and persistence layer mentioned above, you can basically develop a high-quality application system without a deep grasp of design patterns.
It should also be noted that the development of a high-quality J2EE system also requires a correct understanding of business requirements, then domain modeling provides a more feasible and correct understanding of business requirements, and the relevant detailed knowledge can be understood from the perspective of UML.
Of course, if you want to design your own industry framework, then the first step starts from the design pattern, because the design pattern provides you with a reference implementation method to achieve JavaBeans or decoupling between classes, when you learn the basic unit of the system JavaBean or decoupling between classes, then you may master the decoupling between system modules, and then you can achieve the refinement of the industry framework, which is another direction of development.
This is the end of the content of "how to develop a High quality J2EE system". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.