Saturday, 14 February 2015

What is OSGi? What is the benefit of OSGi? What is Felix?

OSGi is a framework which allows modular development of applications using java.
A large application can be constructed using small reusable components(called bundles in terms of OSGi) each of which can be independently started, stopped, and also can be configured dynamically while running without requiring a restart.
Consider a scenario where you have a large application which uses a logging framework. This logging framework can be deployed as an OSGi Bundle, which can be managed independently. Therefore, it can be started when required by our application and can be stopped when not in use. Also the OSGi container makes these bundles available as services, which can be subsribed by other parts of application.
The main advantages of using OSGi :
1)    reduces the complexity of the system.
2)    Makes the components loosely couples and easy to manage.
3)    Increases the performance of the system, since parts of application which are not in use,need not to be loaded in the memory(although there is not a drastic change in performance and also some people argue that running an OSGi container itself takes huge memory).

The OSGi Framework is made up of three layers -- Module, Lifecycle, and Services -- that define how extensible applications are built and deployed. The responsibilities of the layers are:
Module --- Defines how a module, or a Bundle in OSGi-speak, is defined. Basically, a bundle is just a plain old JAR file, whose manifest file has some defined entries. These entries identify the bundle with a symbolic name, a version and more. In addition there are headers which define what a bundle provides Export-Package and what a bundle requires to be operative Import-Package and Require-Bundle.
Lifecycle --- The lifecycle layer defines the states a bundle may be in and describes the state changes. By providing a class, which implements the BundleActivator interface and which is named in the Bundle-Activator manifest header, a bundle may hook into the lifecycle process when the bundle is started and stopped.
Services --- For the application to be able to interact, the OSGi Core Specification defines the service layer. This describes a registry for services, which may be shared.

What is Adobe CQ5? What is CQ5? What is a Content Management System?

CQ5 is a java based content management system from adobe, previously Day CQ5.

1.  It is based on a content repository(i.e it uses a content repository to store the content of a website) and use JCR(java content repository) specification to access the content repository.
2.  It uses RESTful Apache Sling framework to map request url to the corresponding node in content repository
3.  it uses powerful OSGi framework internally to allow modular application development. It means individual pieces of your application(called bundles in terms of OSGi) can be independently started and stopped. CQ5 uses Apache Felix as the OSGi container. Therefore different parts of cq5 can be independently started and stopped.
Coming to why a content management system is required? Some websites are very dynamic in nature, content needs to be updated frequently, so it is easier to manage the content of such websites using a CMS. Adobe CQ5 platform allows you to build compelling content-centric applications that combine Web Content Management, Workflow Management, Digital Asset Management and Social Collaboration. The product has been completely redesigned from Communiqué 4, allowing Adobe to use new architecture and technologies, thus increasing functionality while reducing complexity. Extensive use of standards helps ensure long-term stability. Adobe CQ5 is geared specifically for large companies and corporations with substantial -and often global- infrastructures. It combines web content management, digital asset management, and social collaboration to deliver a solution that allows large companies to manage incredible amounts of information, multiple internal and external websites, a myriad of media assets, and detailed workflow

what is REST ?, RESTfull Service, Representational State Transfer

REST stands for Representational State Transfer.
According to the REST architecture, there are 6 constrainst which should be followed:

Client-Server
There should be a clear separation between a client and server.

Stateless
The client-Server communication is further constrained by no client context being stored on the server between requests. Each request from any client contains all of the information necessary to service the request, and any session state is held in the client. The server can be stateful

Cacheable
As on the World Wide Web, clients can cache responses. Responses must therefore, implicitly or explicitly, define themselves as cacheable, or not, to prevent clients reusing stale or inappropriate data in response to further requests. Well-managed caching partially or completely eliminates some client–server interactions, further improving scalability and performance. One more thing which differentiates as RESTful framework from other web-development frameworks is that generally all web-development frameworks rely heavily only on HTTP Get and Post Requests. While a restful leverages the maximum of http protocol. It uses all the types of http request(HEAD,GET,POST,PUT,DELETE).

For example - consider a scenario where you want to delete a product from a product list with product_id=111; The server side code for the same will be somewhat like this if a HTTP GET request is sent from client-browser with product_id=111 appended to the url.

public void doGet(HttpServletRequest request, HttpServletResponse response) {
       String prod_id = req.getParameter(“product_id”);
       Connection con = DBConnection.getConnection();
       Statement st = con.createStatement();
       st.executeQuery(“delete * from product where product_id=’”+product_id+”’”);
}
As you can see In the above piece of code, we are using a GET request to perform a delete operation on a resource. Therefore we are not using the real power of HTTP protocol. According to REST principles, the same could have been done by sending a HTTP DELETE request from client browser and at server side.
public void doDelete(HttpServletRequest request, HttpServletResponse response) {
      String prod_id = req.getParameter(“product_id”);
      Connection con = DBConnection.getConnection();
      Statement st = con.createStatement();
      st.executeQuery(“delete * from product where product_id=’”+product_id+”’”);
}
Similarly to read a resource – use GET – scenario – get product details create a new resource – POST – scenario – add a new product update a resource – PUT - scenario – update an existing product details get product meta information – use HEAD – scenario – reading the meta-information of products (say inventory information).


REST

REST is nothing but using the current features of the “Web” in a simple and effective way. If you see, some of the amazing features of the Web are:
40 years old matur

ed and widely accepted HTTP protocol.
Standard and Unified methods like POST, GET, PUT and DELETE.
Stateless nature of HTTP protocol.
Easy to use URI (Uniform resource identifier) format to locate any web resource.
REST leverages these amazing features of the web with some constraints.

Let’s define REST in official words, REST is an architectural style built on certain principles using the current “Web” fundamentals.

There are 5 basic fundamentals of web which are leveraged to create REST services.

Principle 1: Everything is a Resource

Internet is all about getting data. This data can be in a format of web page, image, video, file, etc. It can also be a dynamic output like get customers who are newly subscribed. The first important point in REST is start thinking in terms of resources rather than physical files.

Below are some examples of resources with URI:

  • www.questpond.com/image/logo.gif (Image resource)
  • www.questpond.com/Customer/1001 (Dynamically pulled resource)
  • www.questpond.com/videos/v001 (Video resource)
  • www.questpond.com/home.html (Static resource)


So the first thing is, visualize everything as resource.

Principle 2: Every Resource is Identified by a Unique Identifier

The old web identifies all resources by a URI. For instance, if you want to display customer with their orders, you can use www.questpond.com/DisplayCustomerandOrder.aspx. In REST, we add one more constraint to the current URI, every URI should uniquely represent every RESOURCE data.
For instance, you can see the below unique URI format for customer and orders fetched.


Customer data URI
Get Customer details with name “Shiv” http://www.questpond.com/Customer/Shiv
Get Customer details with name “Shiv” http://www.questpond.com/Customer/Shiv
Get Customer details with name “Raju” http://www.questpond.com/Customer/Raju
Get orders placed by customer "Shiv" http://www.questpond.com/Customer/Shiv/Orders
Get orders placed by customer “Raju” http://www.questpond.com/Customer/Raju/Orders


Principle 3: Use Simple and Uniform Interfaces 

Simplification is the way to success and that’s what exactly the goal of uniform interfaces is. When external clients are interacting with web resources, they expect simplified interfaces. For instance, let’s say you have exposed customer and orders data / resource on the web. Let’s assume below are the methods / function names by which external clients can communicate to your application.

  • AddCustomer
  • InsertOrders
  • SelectCustomer
  • getOrders
  • DeleteCustomer
  • RemoveOrders
  • UpdateCustomers

Do the above method names look inconsistent and difficult to remember? Yes they do. Now what REST says is keep your interfaces uniform and simple. This can be achieved by using the uniform methods of HTTP protocol and combining the same with your resource operation.
Below is the list of HTTP methods for getting, creating, updating and deleting a resource on the web.

Methods Description
GET Get a resource
PUT Create and Update a resource
DELETE           Deletes a resource
POST Submits data the resource

Now by combining the standard HTTP methods and your resource names, you can have uniform interfaces and thus leading to simplified communication. You can see from the below table how we have created uniform REST URL using standard HTTP methods.

Normal Method names       HTTP methods          REST Uniform URL
AddCustomer PUT Customer/Shiv
InsertOrders PUT Orders/1001
SelectCustomer GET Customer/Shiv
getOrders GET Customer/Shiv/Orders
DeleteCustomer DELETE Customer/Shiv
RemoveOrders DELETE Customer/Shiv
UpdateCustomers PUT Customer/Shiv

Principle 4: Communication is Done by Representation

When you send any request or you get any response, you are actually sending representations.
For example, let’s say you want to create a new customer record, you would send some kind of representation as shown below using HTTP PUT.

<Customer>
   <Name>Questpond.com</Name>
   <Address>Mulund Mumbai</Address>
</Customer>

Once the resource is created, you would get a representation as shown below. The below representation says the customer questpond has been successfully created and if you wish, you can use “http://www.questpond.com/Customer/Questpond/Orders” defined in the “Next” tag to create orders for the “questpond” customer.

<Customer>
   <Name>Questpond.com</Name>
   <Next>http://www.questpond.com/Customer/Questpond/Orders</Next>
</Customer>

The above representation was in XML format. If you wish, you can also send and receive other presentations like JSON. For instance, below is a simple JSON snippet for creating a new customer record with name and address.

{Customer :{ Name:'Questpond.com', Address:'Mulund Mumbai'}}

Principle 5: Be Stateless

Every request should be an independent request so that we can scale up using load balancing techniques. Independent request means with the data also send the state of the request so that the server can carry forward the same from that level to the next level.
For instance, below are two simple representations, the first representation is sent for logging in.

<Login>
   <Name>Questpond.com</Name>
   <Password>sdkj#43445</Password>
</Login>

If you are logged in successfully you receive the below representation.

<Login>
   <Success>true</Success>
</Login>

If you want to search for customer, you would send him the below representation stating that you are in a state of successful logging in and would like to search all customers.

<Customer>
   <Filter>All</Filter>
   <Success>true</Success>
</Customer>

In other words, every request is independent and the server does not need to remember your previous request and states.

Thursday, 5 February 2015

Content repository, features of Content repository, Advantages of Content repository

Content Repository :

A content repository is a store of digital content with an associated set of data management, search and access methods allowing application-independent access to the content, rather like a digital library, but with the ability to store and modify content in addition to searching and retrieving.
A content repository thus typically forms the technical underpinning of an application such as a Content Management System or a Document Management System. It functions as the logical storage facility for content.
















Advantages provided by repositories :
Common rules for data access allow many applications to work with the same content without interrupting the data. They give out signals when changes happen, letting other applications using the repository know that something has been modified, which enables collaborative data management. Developers can deal with data using programs that are more compatible with the desktop programming environment. The data model is scriptable when users use a content repository. 


Content repository features :
A content repository may provide the following functionality:
·         Add/edit/delete content
·         Hierarchy and sort order management
·         Query / search
·         Versioning
·         Access control
·         Import / export
·         Locking
·         Life-cycle management
·         Retention and holding / records management
This is not necessarily a complete list.


Commonly known Content Applications / Content Management Systems :
·         Content Management System
·         Digital Asset Management
·         Source Code Management
·         Web Content Management System
·         Document Management System
·         Social collaboration

·         Records Management

Day CQ, History of Day CQ, Versions of CQ

About CQ :

Day Software was an enterprise content management software company headquartered in Basel, Switzerland and Boston, Massachusetts. Day Software was founded in 1993 in Basel, Switzerland.

Day creates content management infrastructure software in the Day CRX product line and enterprise content management applications in the Day Communiqué product line. Its most important product is Day Communiqué WCM, a Web content management system that is used for public-facing websites and intranets of large corporations such as McDonald's, Avanza and Daimler.

Day is engaged in the content repository API for Java standardization process and contributes to open source software projects such as Apache Jackrabbit and Apache Sling.

Day Software was acquired by Adobe Systems on 28 July 2010 for US$240 million.
Product history of Adobe CQ

Date
Product
2002
Day CQ 3.5
2005
Day CQ 4.0
2006
Day CQ 4.1
2008
Day CQ 4.2
2008
Day CQ 5.0
2009
Day CQ 5.2
2010
Day CQ 5.3
2011
Adobe CQ 5.4
2012
Adobe CQ 5.5
2013
Adobe Experience Manager (AEM) 5.6
2014
Adobe Experience Manager (AEM) 6.0






crxde eclipse version, crxde desktop version, crxde



Download CRXDE:
Operating System Flavour Download Link
Microsoft Windows 32bit crxde-1.0.1.win32.win32.x86.zip
Microsoft Windows 64bit crxde-1.0.1.win32.win32.x86_64.zip
Apple Mac OS X 10.4 - 10.5 Carbon 32bit crxde-1.0.1.macosx.carbon.x86.zip
Apple Mac OS X 10.5+ Cocoa 32bit crxde-1.0.1.macosx.cocoa.x86.zip
Apple Mac OS X 10.6+ Cocoa 64bit crxde-1.0.1.macosx.cocoa.x86_64.zip
Linux GTK+/Gnome 32bit crxde-1.0.1.linux.gtk.x86.zip
Linux GTK+/Gnome 64bit crxde-1.0.1.linux.gtk.x86_64.zip
Linux Motif crxde-1.0.1.linux.motif.x86.zip

WCMS, Web Content Management System, Content Management System,Types of WCMS,WCMS Types, Capabilities of WCMS

Web content management system (WCMS) :


A web content management system (WCMS) is a software system that provides website authoring, collaboration, and administration tools designed to allow users with little knowledge of web programming languages or markup languages to create and manage website content with relative ease.
A web content management system (WCMS) is a software system that provides website authoring, collaboration, and administration tools designed to allow users with little knowledge of web programming languages or markup languages to create and manage website content with relative ease. A robust Web Content Management System provides the foundation for collaboration, offering users the ability to manage documents and output for multiple author editing and participation.


Most systems use a content repository or a database to store page content, metadata, and other information assets that might be needed by the system. A presentation layer (template engine) displays the content to website visitors based on a set of templates, which are sometimes XSLT files. Most systems use server side caching to improve performance. This works best when the WCMS is not changed often but visits happen regularly. Administration is also typically done through browser-based interfaces, but some systems require the use of a fat client. A WCMS allows non-technical users to make changes to a website with little training. A WCMS typically requires a systems administrator and/or a web developer to set up and add features, but it is primarily a website maintenance tool for non-technical staff.


Capabilities of  Web content management system (WCMS) :

          A web content management system is used to control a dynamic collection of web material, including HTML documents, images, and other forms of media.[3] A CMS facilitates document control, auditing, editing, and timeline management. A WCMS typically has the following features:
  • Automated templates
  • Access control
  • Scalable expansion
  • Easily editable content
  • Scalable feature sets
  • Web standards upgrades
  • Work-flow management
  • Collaboration
  • Delegation
  • Document management
  • Content virtualization
  • Content syndication
  • Multilingual
  • Versioning
Automated templates

             Create standard output templates (usually HTML and XML) that can be automatically applied to new and existing content, allowing the appearance of all content to be changed from one central place.

Access control

            Some WCMS systems support user groups. User groups allow you to control how registered users interact with the site. A page on the site can be restricted to one or more groups. This means an anonymous user (someone not logged on), or a logged on user who is not a member of the group a page is restricted to, will be denied access to the page.

Scalable expansion

            Available in most modern WCMSs is the ability to expand a single implementation (one installation on one server) across multiple domains, depending on the server's settings. WCMS sites may be able to create microsites/web portals within a main site as well.
Easily editable content
             Once content is separated from the visual presentation of a site, it usually becomes much easier and quicker to edit and manipulate. Most WCMS software includes WYSIWYG editing tools allowing non-technical users to create and edit content.

Scalable feature sets

            Most WCMS software includes plug-ins or modules that can be easily installed to extend an existing site's functionality.

Web standards upgrades

              Active WCMS software usually receives regular updates that include new feature sets and keep the system up to current web standards. 

Workflow management

              workflow is the process of creating cycles of sequential and parallel tasks that must be accomplished in the CMS. For example, one or many content creators can submit a story, but it is not published until the copy editor cleans it up and the editor-in-chief approves it. 

Collaboration

                CMS software may act as a collaboration platform allowing content to be retrieved and worked on by one or many authorized users. Changes can be tracked and authorized for publication or ignored reverting to old versions. Other advanced forms of collaboration allow multiple users to modify (or comment) a page at the same time in a collaboration session.

Delegation
                Some CMS software allows for various user groups to have limited privileges over specific content on the website, spreading out the responsibility of content management.

Document management
              CMS software may provide a means of collaboratively managing the life cycle of a document from initial creation time, through revisions, publication, archive, and document destruction.

Content virtualization
                       CMS software may provide a means of allowing each user to work within a virtual copy of the entire web site, document set, and/or code base. This enables changes to multiple interdependent resources to be viewed and/or executed in-context prior to submission.

Content syndication
                     CMS software often assists in content distribution by generating RSS and Atom data feeds to other systems. They may also e-mail users when updates are available as part of the workflow process.

Multilingual
              Ability to display content in multiple languages.

Versioning

            Like document management systems, CMS software may allow the process of versioning by which pages are checked in or out of the WCMS, allowing authorized editors to retrieve previous versions and to continue work from a selected point. Versioning is useful for content that changes over time and requires updating, but it may be necessary to go back to or reference a previous copy.


Types of WCMS

There are three major types of WCMS:

  •  offline processing
  • online processing
  • hybrid systems
These terms describe the deployment pattern for the WCMS in terms of when presentation templates are applied to render web pages from structured content.

Offline processing
These systems, sometimes referred to as "static site generators", pre-process all content, applying templates before publication to generate web pages. Since pre-processing systems do not require a server to apply the templates at request time, they may also exist purely as design-time tools.

Online processing
These systems apply templates on-demand. HTML may be generated when a user visits the page or it is pulled from a web cache. Most open source WCMSs have the capability to support add-ons, which provide extended capabilities including forums, blog, wiki, web stores, photo galleries, contact management, etc. These are often called modules, nodes, widgets, add-ons, or extensions. Add-ons may be based on an open-source or paid license model.

Hybrid systems

Some systems combine the offline and online approaches. Some systems write out executable code (e.g., JSP, ASP, PHP, ColdFusion, or Perl pages) rather than just static HTML, so that the CMS itself does not need to be deployed on every web server. Other hybrids operate in either an online or offline mode.

How CMS Works can be Shown Diagrammatically :


How CMS Works



Sunday, 1 February 2015

Wlecome

Hi Guys Welcome to the CQ Tutorials Blog This is meant for you People you can post the things what ever the things you want ....

           
            
 

My Blog List

Who is Online


Site Info

Followers

CQTutorials Copyright © 2009 Blogger Template Designed by Bie Blogger Template