Every successful man in eclipse, equinox, and osgi has a great woman. Every successful product has a strong architecture behind it-Question
Many Java programmers have a crush on Eclipse (sun, which is the name of eclipse and IBM). In JBuilder's popularity and mainstream memory configurations, after I successfully run eclipse for the first time, I took JBuilder out of my computer's hard drive. Yes, this is the charm of Elipse.
As a programmer, after feeling the many benefits brought by ECLIPSE, strong curiosity drove me to ask: Where did the charm of eclipse come from. Just as we are talking about why a beauty is so beautiful, there are many factors that contribute to beauty (Zhou Xun is a beauty in the last interview with people, A photographer also uses a ruler to measure the distance from Zhou Xun's nose to his chin ). Among the many notable factors of Eclipse, its open plug-in architecture is undoubtedly the strongest.
Developing a plug-in for eclipse is not as complicated as you think. Using eclipse's rich client platform to develop your own software interface is also easy to use. What brings such magic to Elipse is equinox (eclipse) (http://eclipse.org/equinox ). What is the relationship between osgi, osgi, and equinox? A long term and a simple understanding is equivalent to the relationship between JBoss and EJB specification, or the relationship between Tomcat and servlet specification.
One core concept in osgi is bundles.
For equinox, bundles is a self-described JAR file, which is described as follows:
-------------------
Bundle-symbolicname: org. Eclipse. Equinox. Registry
Bundle-version: 3.2.100.v20060918
Bundle-Name: Eclipse extension Registry
Bundle-vendor: eclipse.org
Bundle-classpath :.
Bundle-Activator: org. Eclipse. Core. Internal. Registry. osgi. Activator
Export-package: org. Eclipse. Equinox. Registry
Import-package: javax. xml. parsers,
Org. xml. Sax,
Org. osgi. Framework; version = 1.3
Require-Bundle: org. Eclipse. Equinox. Common; bundle-version = "[3.2.0, 4.0.0 )"
Bundle-requiredexecutionenvironment: CDC-1.0/Foundation-1.0, J2SE-1.3
------------------
Although Equinox is a great solution, it is nothing special if it is simply a plug-in mechanism. What surprised me most is his "inclusive" ability. In the original article, we can say: "There are two main approaches; embedding equinox In the servlet container or embedding the servlet container in
Equinox ".
Let's take a look at the three figures below:
Figure 1: traditional Web Application Server Structure
Figure 2: embedding equinox in an existing application container
Figure 3: embedding an application container in equinox
From high cohesion and low coupling to design patterns, from IOC and spring frameworks to SOA, we abstract and separate them step by step. Obviously, we need a flexible and rigorous architecture and a product with strong functionality rather than daunting. Fortunately, software science is such a science, he can always join more middle layers to better solve the problem.
Original article:
Http://www.theserverside.com/tt/articles/article.tss? L = eclipseequinoxosgi
Http://www.theserverside.com/news/thread.tss? Thread_id = 43696