最新打算研究下 Apache Sling ,在此记录下过程~

官网地址

Apache Sling - Bringing Back the Fun! 带回快乐

Apache Sling™ is an innovative web framework that is intended to bring back the fun to web development.

Discussions about Sling happen on our mailing lists, see the Project Information page for more info.

Apache Sling in five bullets points

  • REST based web framework                              基于Rest
  • Content-driven, using a JCR content repository   内容驱动,使用JCR
  • Powered by OSGi        基于OSGI
  • Scripting inside, multiple languages (JSP, server-side javascript, Scala, etc.) 脚本支持,多语言
  • Apache Open Source project

Apache Sling in a hundred words  简介

Apache Sling is a web framework that uses a Java Content Repository, such as Apache Jackrabbit, to store and manage content.

Sling applications use either scripts or Java servlets, selected based on simple name conventions, to process HTTP requests in a RESTful way.

The embedded Apache Felix OSGi framework and console provide a dynamic runtime environment, where code and content bundles can be loaded, unloaded and reconfigured at runtime.

As the first web framework dedicated to JSR-170 Java Content Repositories, Sling makes it very simple to implement simple applications, while providing an enterprise-level framework for more complex applications.

Apache Sling 是一个使用Java内容仓库的web 框架;提供restful风格

内置Apache Felix提供osgi框架支持

是第一个实现JSR-170的仓库

News

  • New Release: Apache Sling Event 4.0.2 (April 4th, 2016)
  • New Release: Apache Sling Discovery Commons 1.0.12 (March 29th, 2016)
  • New Release: Apache Sling Scripting Sightly Engine 1.0.18 (March 18th, 2016)
  • New Release: Apache Maven Sling Plugin 2.1.8 (March 16th, 2016)
  • New Release: Apache Sling IDE Tooling for Eclipse 1.1.0 (March 14th, 2016)

Refer to the news archive for all news.

History

Sling started as an internal project at Day Software , and entered the Apache Incubator in September 2007. As of June, 17th, 2009 Apache Sling is a top level project of the Apache Software Foundation.

The name "Sling" has been proposed by Roy Fielding who explained it like this:

[The name is] Biblical in nature. The story of David: the weapon he uses to slay the giant Goliath is a sling. Hence, our David's [David Nuescheler, CTO of Day Software] favorite weapon.

It is also the simplest device for delivering content very fast.

Getting started

If you prefer doing rather than reading, please proceed to Discover Sling in 15 minutes or read through the recommended links in the Getting Started section, where you can quickly get started on your own instance of Sling.

Use Cases for Sling 使用场景

Wiki 百科

Day built a Wiki system on Sling. Each Wiki page is a node (with optional child nodes) in the repository. As a page is requested, the respective node is accessed and through the applying Component is rendered.

Thanks to the JCR Mapping and the resolution of the Component from the mapped Content, the system does not care for what actual node is addressed as long as there is a Content mapping and a Component capable of handling the Content.

Thus in the tradition of REST, the attachement of a Wiki page, which happens to be in a node nested below the wiki page node is easily accessed using the URL of the wiki page attaching the relative path of the attachement ode. The system resolves the URL to the attachement Content and just calls the attachement's Component to spool the attachement.

Digital Asset Management 数字资产管理

Day has implemented a Digital Asset Management (DAM) Application based on Sling. Thanks to the flexibility of the Content/Component combo as well as the service registration/access functionality offered by OSGi, extending DAM for new content type is merely a matter of implementing one or two interfaces and registering the respective service(s).

Again, the managed assets may be easily spooled by directly accessing them.

Web Content Management  web内容管理(CMS)

Last but not least, Sling offers itself very well to implementing a Web Content Management system. Thanks to the flexibility of rendering the output - remember: the system does not care what to render, as long as the URL resolves to a Content object for which a Component exists, which is called to render the Content - providing support for Web Content authors (not PHP programmers but users out in the field) to build pages to their likings can easily be done.

References

Apache Jackrabbit

The main purpose of Sling is to develop a content-centric Web Application framework for Java Content Repository (JCR) based data stores. Sling is implemented - with the notable exception of JCR Node Type management - purely in terms of the JCR API and as such may use any JCR compliant repository. The default implementation for Apache Jackrabbit is provided out of the box.

OSGi

Sling is implemented as a series of OSGi Bundles and makes extensive use of the OSGi functionality, such as lifecycle management and the service layer. In addition, Sling requires several OSGi compendium services to be available, such as the Log Service, Http Service, Configuration Admin Service, Metatype Service, and Declarative Services.

Apache Felix

While Sling does not require a specific OSGi framework implementation to run in, Sling is being developed using Apache Felix as the OSGi framework implementation. It has not been tested yet, but it is expected that Sling also operates perfectly inside other OSGi frameworks such as Equinox and Knopflerfish.

Apache Sling的更多相关文章

  1. apache基金会开源项目简介

    apache基金会开源项目简介   项目名称 描述 HTTP Server 互联网上首屈一指的HTTP服务器 Abdera Apache  Abdera项目的目标是建立一个功能完备,高效能的IETF ...

  2. AEM - Adobe CMS 扒坑记之始

    AEM是Adobe公司所出的商业内容管理系统,全称阿豆比体验管理系统(Adobe Experience Manager),其前身叫CQ,分别有CQ5 CQ6两个大版本.它提供了整套的网站内容管理系统解 ...

  3. ASF (0) - ASF Java 项目总览

    Apache .NET Ant Library This is a library of Ant tasks that help developing .NET software. It includ ...

  4. 使用Maven命令行快速创建项目骨架(archetype)

      > mvn archetype:generate 接下来就会输出一些列带索引变化的archetype项可供我们选择,然后提示我们选择一个编号,可以直接回车选择默认的编号(392),然后就跟着 ...

  5. jsp 预编译

    jspc-maven-plugin <?xml version="1.0" encoding="UTF-8"?> <project xmlns ...

  6. Apache执行Python脚本

    由于经常需要到服务器上执行些命令,有些命令懒得敲,就准备写点脚本直接浏览器调用就好了,比如这样: 因为线上有现成的Apache,就直接放它里面了,当然访问安全要设置,我似乎别的随笔里写了安全问题,这里 ...

  7. Apache Ignite之集群应用测试

    集群发现机制 在Ignite中的集群号称是无中心的,而且支持命令行启动和嵌入应用启动,所以按理说很简单.而且集群有自动发现机制感觉对于懒人开发来说太好了,抱着试一试的心态测试一下吧. 在Apache ...

  8. Apache Ignite高性能分布式网格框架-初探

    Apache Ignite初步认识 今年4月开始倒腾openfire,过程中经历了许多,更学到了许多.特别是在集群方面有了很多的认识,真正开始认识到集群的概念及应用方法. 在openfire中使用的集 ...

  9. Apache 与 php的环境搭建

    Apache和PHP的版本分别为: httpd-2.4.9-win64-VC11.zip php-5.6.9-Win32-VC11-x64.zip 下载地址: php-5.6.9-Win32-VC11 ...

随机推荐

  1. 关于ComboBox的控件事件CBN_SELCHANGE总是取到旧值的问题

    我发现复选框,选择以后,在这个事件函数中,总是取到旧值,读了这个朋友的文章,找到了解决方法. 下面是参考的文章: http://scorpiomiracle.iteye.com/blog/710511 ...

  2. oss对象云存储

    import qiniu import uuidimport config def qn_upload_voice(fileData): '''上传语音到七牛云 @arg: fileData - 编码 ...

  3. MySQL中链接查询inner join与left join使用

    连接查询其实就是对两个表记录做笛卡尔乘积.如果不指定连接条件的话,则会对每行都做笛卡尔乘积,这样最后返回的结果树就会是两个表记录数的乘积:如果指定则,则仅对符合列条件的行进行笛卡尔乘积,并返回结果.在 ...

  4. 【COCI 2015/2016 #3】Nekameleoni

    题目描述 “这好难啊,我有一个简单点的题,他们解决不了.” AKPAKP有一个长度为nn的线段,这个线段原来染有颜色,AKPAKP只认识kk种颜色.当然原来的颜色也包含在着kk种颜色之间. 可以进行m ...

  5. chinalife的经验

    1.当<img src="">时,浏览器会有生成border,可以使用css选择器,img[src=""] {/*设置样式*/}: 2.jquery ...

  6. java swing button和键盘监听冲突问题

    原因: 点击button会让jframe失去焦点,然后键盘监听不起作用 解决: 让jframe重新获取焦点就行了 jf.setFocusable(true); // JFrame jf = new J ...

  7. Linux网络编程学习(十一) ----- 五种I/O模式(第六章)

    1.五种I/O模式是哪几个? 阻塞I/O,非阻塞I/O,I/O多路复用,信号驱动I/O(SIGIO),异步I/O 一般来讲程序进行输入操作有两个步骤,一是等待有数据可读,二是将数据从系统内核中拷贝到程 ...

  8. NE76003单片机调试DS18B20 步骤

    一.硬件部分 GND脚接地: DQ脚接P03,外加4K7上拉电阻: VCC脚接3.3v供电: 二.软件部分 1.配置P03为准准双向 IO类型: void Init_power_gpio(void){ ...

  9. python学习Day5 几种数据类型的使用

    今日内容 数据类型分类: int | complex | float | str | bool | list | dict | tuple | set 3种数据类型的方法:(数字.字符串.列表 ) 可 ...

  10. cs架构与bs架构的对比

    主要区别: Client/Server是建立在局域网的基础上的.Browser/Server是建立在广域网的基础上的. 1.硬件环境不同 C/S 一般建立在专用的网络上, 小范围里的网络环境, 局域网 ...