没有合适的资源?快使用搜索试试~ 我知道了~
首页Osgi in Action: Creating Modular Applications in Java Jun 2010
Osgi in Action: Creating Modular Applications in Java Jun 2010
5星 · 超过95%的资源 需积分: 10 87 下载量 120 浏览量
更新于2023-03-03
评论
收藏 3.78MB PDF 举报
Table of Contents 1. OSGi Revealed 2. Mastering Modularity 3. Learning Lifecycle 4. Studying Services 5. Delving Deeper into Modularity 6. Moving Toward Bundles 7. Managing Bundles and Applications 8. Testing Applications 9. Debugging Applications 10. Component Models 11. Launching and Embedding an OSGi Framework 12. Security 13. Web Applications and Services
资源详情
资源评论
资源推荐
Table of Contents
1. OSGi Revealed
2. Mastering Modularity
3. Learning Lifecycle
4. Studying Services
5. Delving Deeper into Modularity
6. Moving Toward Bundles
7. Managing Bundles and Applications
8. Testing Applications
9. Debugging Applications
10. Component Models
11. Launching and Embedding an OSGi
Framework
12. Security
13. Web Applications and Services
©Manning Publications Co. Please post comments or corrections to the Author Online forum:
http://www.manning-sandbox.com/forum.jspa?forumID=507
1
OSGi Revealed
The Java™ platform is an unqualified success story. It is used to develop applications for
small mobile devices to massive enterprise endeavors. This is a testament to its well thought
out design and continued evolution. However, this success has come in spite of the fact that
Java does not have explicit support for building modular systems beyond ordinary object-
oriented data encapsulation.
So, what does this mean to you? If Java is a success despite its lack of advanced
modularization support, then you might wonder if its absence is a problem. Most well
managed projects have to build up a repertoire of comparable, but project specific,
techniques to compensate for the lack of modularization in Java. These include:
Programming practices,
Tricks with multiple class loaders, and
Serialization between in-process components.
However these techniques are inherently brittle and error prone since they are not
enforceable via any specific compile-time or run-time checks. The end result has detrimental
impacts on multiple stages of an application's lifecycle:
Development – you are unable to clearly and explicitly partition development into
independent pieces.
Deployment – you are unable to easily analyze, understand, and resolve requirements
imposed by the collection of independently developed pieces that make up the
system.
Execution – you are unable to manage and evolve the constituent pieces of a running
system, nor minimize the impact of doing so.
It is definitely possible to manage these issues in Java, and lots of projects do so using
the custom techniques mentioned above, but it is much more difficult than it should be.
We're tying ourselves in knots to work around the lack of a fundamental feature. If Java had
explicit support for modularity, then you would be freed from such issues and could
©Manning Publications Co. Please post comments or corrections to the Author Online forum:
http://www.manning-sandbox.com/forum.jspa?forumID=507
concentrate on what you really want to do, which is developing the functionality of your
application.
Welcome to the OSGi™ Service Platform. The OSGi Service Platform is an industry
standard defined by the OSGi Alliance to specifically address the lack of support for
modularity in the Java platform. Additionally, it also introduces a new service-oriented
programming model, referred to by some as “SOA in a VM.” This chapter will give you an
overview of the OSGi Service Platform and the issues it is intended to address. Once we have
finished this chapter we will have enough background knowledge to start digging into the
details in chapter 2.
1.1 The what and why of OSGi
The sixty-four-thousand dollar question is, “What is OSGi?” The simplest answer to this
question is it is a modularity layer for the Java platform. Of course, the next question that
might spring to mind is, “What do you mean by modularity?” Here we use modularity more
or less in the traditional computer science sense, where the code of your software application
is divided into logical parts representing separate concerns as in Figure 1.1.1. If your
software is modular, then you can simplify development and improve maintainability by
enforcing the logical module boundaries; we will discuss more modularity details in Chapter
2.
The notion of modularity is not new. The concept actually became fashionable back in the
1970s. So, why is OSGi all the rage right now? To better understand what OSGi can do for
you, it is worthwhile to understand what Java is not doing for you with respect to modularity.
Once you understand that, then you can see how OSGi can help.
1.1.1 Java's modularity limitations
Java was never intended to support modular programming, so we admit that criticizing its
inability to do so is a little unfair. Java has been promoted as a platform for building all sorts
©Manning Publications Co. Please post comments or corrections to the Author Online forum:
http://www.manning-sandbox.com/forum.jspa?forumID=507
Figure 1.1.1 Modularity refers to the logical
decomposition of a large system into smaller
collaborating pieces
Module
A
Module
B
Module
C
uses
uses
uses
uses
剩余508页未读,继续阅读
godghdai
- 粉丝: 7
- 资源: 79
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- 27页智慧街道信息化建设综合解决方案.pptx
- 计算机二级Ms-Office选择题汇总.doc
- 单链表的插入和删除实验报告 (2).docx
- 单链表的插入和删除实验报告.pdf
- 物联网智能终端项目设备管理方案.pdf
- 如何打造品牌的模式.doc
- 样式控制与页面布局.pdf
- 武汉理工Java实验报告(二).docx
- 2021线上新品消费趋势报告.pdf
- 第3章 Matlab中的矩阵及其运算.docx
- 基于Web的人力资源管理系统的必要性和可行性.doc
- 基于一阶倒立摆的matlab仿真实验.doc
- 速运公司物流管理模式研究教材
- 大数据与管理.pptx
- 单片机课程设计之步进电机.doc
- 大数据与数据挖掘.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论4