Tuesday, July 21, 2015

Hybris - Some Information

Founded in 1997 in switzerland, hybris is one of the world's most popular large scale E-Commerce platforms.

Hybris is a single technology stack solution that provides customizable eCommerce solutions along with ->
1) Product Content Management
2) Web Content Management
3) Order Management

Hybris is built on Apache and Spring source components.

Hybris is compatible with third party applications.

Its model-driven and parallelized.

New features can be built into hybris with minimal efforts.

Availability of plugins for Endeca and Adobe.

Writing SQL queries is not overtly flexible, but the Full Text Search (FTS) technique allows examine all words in each document in your database rather that specifying the column names in the database table. Hybris ships with the FTS module based on the fast search engine Apache SOLR.

To work with hybris, you need to have good knowledge in Core JAVA, Springs and Hibernate.

80% of the code needed for eCommerce websites (Add to cart, Payment etc) comes in-built with hybris, you just have to mould it as per the customer needs.

Hybris is now owned by SAP.
 

Different ways to create an object in JAVA

There are 4 different ways to create an object in JAVA.


1) Using new keyword - This is the most common way to create an object in JAVA.
     Almost 99% of objects are created in this way.

     MyObject obj = new MyObject();


2) Using Class.forName() - Also known as dynamic/runtime object creation.

     MyObject obj = (MyObject) Class.forName("MyObject").newInstance();


3) Using clone() - Create a copy of an existing object.

     MyObject anotherObj = new MyObject();
     MyObject obj = anotherObj.clone();


4) Using object Deserialization - Create object from its serialized form.

    ObjectInputStream inStream = new  ObjectInputStream(aInputStream);
    MyObject obj = (MyObject) inStream.readObject();

 

Reflection in JAVA

Reflection is a very useful approach to deal with the Java class at runtime, it can be used to load the Java class and call any of its methods.

Sample.java

public class Sample
{
  public void display1()
  {
    System.out.println("Inside 1");
  }
 
  public void display2()
  {
    System.out.println("Inside 2");
  }
 
  public void display3()
  {
    System.out.println("Inside 3");
   }
}

Now we can load this class(Sample) and call each of its methods at runtime.


ReflectionTest.java

public class ReflectionTest
{
  public static void main(String[] args)
  {
     Class cls=Class.forName("Sample");
     Object obj=cls.newInstance();

     Method method = cls.getDeclaredMethod("display1");
     method.invoke(obj);

     Method method = cls.getDeclaredMethod("display2");
     method.invoke(obj);

     Method method = cls.getDeclaredMethod("display3");
     method.invoke(obj);
  }
} 

Springs framework also works on the principle of Reflection :)



 

JDBC Driver Types

The various types of JDBC drivers are based on the way it is implemented by various developers/coders.


1) Type 1 (JDBC-ODBC Bridge)

     JAVA -> Driver -> Microsoft Driver -> DB

2) Type 2 (Part nature)

     JAVA -> Driver -> DB Client -> DB

3) Type 3

     JAVA -> Driver -> Middleware -> DB

4) Type 4 (Thin)

    JAVA -> Java Driver -> DB

Synchronous communication between JAVA and HYBRIS

Contact me on maluskarhrishikesh@yahoo.com to know the details.

I will send you the documents which i have prepared.
Home