Monday 19 August 2013

JBOSS EAP6 extension,subsystems and profiles

                              JBOSS EAP6 extension,subsystems and profiles

Jboss eap 6 application server default is very lightweight and extremely fast.you can start default standalone server instance more or less than in 3 sec.

For understanding jboss eap6 it is very important to understand extension,subsystems and profiles.

so let start with extensions..

Extensions

In simple terms extension are modules that extends core capabilities of EAP.
Java EE capabilities, clustering, transactions, security and logging are all extensions of the EAP core.

An extension is added using the <extension> tag in the beginning of the EAP configuration file. (standalone.xml or domain.xml)

Subsystems 

A subsystem is the set of capabilities added by an extension.It defines how it will be used and configured. It is also defined in the EAP configuration file (standalone.xml or domain.xml) using the <subsystem> tag under a profile.

                             For every extension added in an EAP instance, the  capabilities and attributes of that extension are configured with the <subsystem> element. If no setting is required then you may simply leave the element empty. (e.g. <subsystem xmlns=”urn:jboss:domain:ee:1.0″/>)

Profiles

A profile is defined in the EAP configuration file using the <profile> element.It is  a collection of subsystems, along with the details of each subsystem’s configuration.

                     Profile is a set of subsystems combined for different purposes. For domain-mode, four profiles are defined by default. (default, ha, full, full-ha) For standalone-mode, an un-named profile is set.

Tuesday 13 August 2013

Difference between JSON and XML

                                Difference between JSON and XML


JSON's concise syntax makes it very light and compact. It is also easier to parse from JavaScript, and that’s one of the main reasons it’s preferred for browser-based client-side applications (note that JSON stands for JavaScript Object Notation, it’s just natural). If you want to work with XML from JavaScript, you'll need to use an extra library for that. With JSON, you can just parse the message (let’s say with JSON.Parse() ) and work directly with js objects.


JSON.parse('{"name":"ram"}');

Difference between SOAP and REST

                                Difference Between soap and REST

SOAP

- A service architecture
- XML based
- Runs on HTTP but envelopes the message
- Slower than REST
- Very mature, a lot of functionality
- Not suitable for browser-based clients

REST

- A service architecture (resource-oriented)
- Uses the HTTP headers to hold meta information (although it is protocol-agnostic)
- Can be used with XML, JSON or whatever necessary
- Usually used with JSON due to the easily parsable content
- Faster than SOAP
- It uses semantic media types


The Representational State Transfer (REST) is another architectural pattern (resource-oriented), an alternative to SOAP. Unlike SOAP, RESTful applications use the HTTP build-in headers (with a variety of media-types) to carry meta information and use the GET, POST, PUT and DELETE verbs to perform CRUD operations. REST is resource-oriented and uses clean URLs (or RESTful URLs). 

 
For example :
http://www.developingthefuture.com/index.php?page=foo

 
becomes
 
http://www.developingthefuture.com/foo

 
This kind of URLs syntax greatly improves both visibility and usability. It doesn’t use any query strings, and it also provides certain SEO benefits (the crawlers just love plain text). The body of the REST message can be XML, JSON or any other format, although JSON is usually the preferred choice. On the other hand, you can’t use JSON with SOAP. Or at least not entirely, because SOAP uses XML by definition for it’s envelope. It should also mentioned that REST is, by design, protocol-agnostic, although it is usually used with HTTP