The Brijframework is a lightweight and open source framework. It was developed by Ram Kishor in 2015. Brij framework makes the easy development of JavaEE application. it provides support to various frameworks. can be defined as a structure where we find solution of the various technical problems.
The Brijframework comprises several modules such as Model, Bean, Context, JDBC, DAO, ORM, WEB MVC, WEB REST etc
Java is great for declaring object, but it falters when we try to use it for declaring dynamic manipulation properties in object. Brijframework lets you extend Java vocabulary for your application. The resulting environment is extraordinarily expressive, readable, and quick to develop.
Many frameworks deal with Java shortcomings by either abstracting away Java by providing an imperative way for manipulating the Object. Neither of these address the root problem that Java was not designed for dynamic object manipulating.
Brijframework is a toolset for building the framework most suited to your application development. It is fully extensible and works well with other libraries. Every feature can be modified or replaced to suit your unique development workflow and feature needs. Read on to find out how.
Context is a mechanism to launch the module and bootstrap component. Its responsible to start and stop the module.
The interface provides a common protocol for launching container for the factories. It provides methods to start and stop in an orderly manner.
There are two type of context.
Bootstrap Context responsible to launch all related module context
Module Context responsible to launch all related container and there factories
Container is a mechanism to store component globally for application. Its responsible to launch all related factories.
The interface provides a common protocol for launching the factories. It provides methods to load and build in an orderly manner.
Model is a mechanism for accessing an object's properties indirectly, using keys to identify properties, rather than through invocation of an accessor method or accessing them directly through instance variables.
The interface provides a common protocol for all objects for implementing key value coding. It provides methods to set and get property values in an orderly manner without getter setter methods of the class explicitly
No Requirement of setter/ getter to access the property of objects
public class Address implements ModelBean{ private String addressLine; private String city; private long zipcode; // no setter getter }
No Requirement of setter/ getter to access the relative property of objects
public class Employee implements ModelBean{ private String id; private String name; private long rollNo; private Address address; // no setter getter }
public class EmployeeTest{ public static void main(Sring[] args){ Employee emp = new Employee(); emp.setProperty("id","emp1"); emp.setProperty("name","Rahul"); emp.setProperty("rollNo",10101); String id=emp.getProperty("id"); String name=emp.getProperty("name"); long rollNo=emp.getProperty("rollNo"); System.out.println("Employee id is : "+id); System.out.println("Employee name is : "+name); System.out.println("Employee rollNo is : "+rollNo); } } Output => Employee id is : emp1 Employee name is : Rahul Employee rollNo is : 10101
public class EmployeeTest{ public static void main(Sring[] args){ Employee emp = new Employee(); Address address= new Address(); //Note: this is optional emp.setProperty("address",address); //Note: this is optional emp.setProperty("address.addressLine","Noida"); emp.setProperty("address.city","Delhi"); emp.setProperty("address.zipcode","201512"); String addressLine=emp.getProperty("address.addressLine"); String city=emp.getProperty("address.city"); String zipcode=emp.getProperty("address.zipcode"); System.out.println("Employee Address is : " +emp.getProperty("address")); System.out.println("Employee Address is : " +addressLine+" "+city+" +zipcode); } } Output => Employee Address is : Address@201540 Employee Address is : Noida Delhi 201512
public class Employee implements ModelBean{ private String id; private String name; private long rollNo; } public class EmployeeTest{ public static void main(Sring[] args){ Employee emp = new Employee(); emp.setProperty("name", "Test"); Object value=emp.getProperty("name"); System.out.println("Value is : "+value); } } Output => Value is : Test
ModelBean is a mechanism for accessing an object's properties indirectly, using keys to identify properties, rather than through invocation of an accessor method or accessing them directly through instance variables.
public class Address implements ModelBean{ private String addressLine; private String city; private long zipcode; } public class Employee implements ModelBean{ private String id; private String name; private long rollNo; private Address address; } public class EmployeeTest{ public static void main(Sring[] args){ Employee emp=new Employee(); emp.setProperty("address.addressLine", "Jss Pan"); Object addressLine=emp.getProperty("address.addressLine"); System.out.println("addressLine is : "+addressLine); } } Output => addressLine is : Jss Pan
ModelBean is a mechanism for accessing an object's properties indirectly, using keys to identify properties, rather than through invocation of an accessor method or accessing them directly through instance variables.
public class Employee implements ModelBean{ public String id; private String name; private long rollNo; private Map address; } public class EmployeeTest{ public static void main(Sring[] args){ Employee emp=new Employee(); emp.setProperty("address.addressLine", "Jss Pan"); Object addressLine=emp.getProperty("address.addressLine"); System.out.println("addressLine is : "+addressLine); } } Output => addressLine is : Jss Pan
ModelBean is a mechanism for accessing an object's properties indirectly, using keys to identify properties, rather than through invocation of an accessor method or accessing them directly through instance variables.
public class Address implements ModelBean{ private String addressLine; private String city; private long zipcode; } public class Employee implements ModelBean{ private String id; private String name; private long rollNo; private Collection <Address> addressList; } public class EmployeeTest{ public static void main(Sring[] args){ Employee emp = new Employee(); emp.setProperty("addressList[0].addressLine", "Jss Pan"); String addressLine=emp.getProperty("addressList[0].addressLine"); System.out.println("addressLine is : "+addressLine); } } Output => addressLine is : Jss Pan
public class Employee { private String id; private String name; private long rollNo; } public class EmployeeTest{ public static void main(Sring[] args){ Employee emp = new Employee(); ModelBuilder builder=ModelBuilder.getBuilder(emp); builder.setProperty("name", "Test"); Object value=builder.getProperty("name"); System.out.println("Value is : "+value); } } Output => Value is : Test
ModelBean is a mechanism for accessing an object's properties indirectly, using keys to identify properties, rather than through invocation of an accessor method or accessing them directly through instance variables.
public class Address { private String addressLine; private String city; private long zipcode; } public class Employee { private String id; private String name; private long rollNo; private Address address; } public class EmployeeTest{ public static void main(Sring[] args){ Employee emp=new Employee(); ModelBuilder builder=ModelBuilder.getBuilder(emp); builder.setProperty("address.addressLine", "Jss Pan"); Object addressLine=builder.getProperty("address.addressLine"); System.out.println("addressLine is : "+addressLine); } } Output => addressLine is : Jss Pan
ModelBean is a mechanism for accessing an object's properties indirectly, using keys to identify properties, rather than through invocation of an accessor method or accessing them directly through instance variables.
public class Employee implements ModelBean{ public String id; private String name; private long rollNo; private Map address; }
public class EmployeeTest{ public static void main(Sring[] args){ Employee emp=new Employee(); ModelBuilder builder=ModelBuilder.getBuilder(emp); builder.setProperty("address.addressLine", "Jss Pan"); Object addressLine=builder.getProperty("address.addressLine"); System.out.println("addressLine is : "+addressLine); } } Output => addressLine is : Jss Pan
ModelBean is a mechanism for accessing an object's properties indirectly, using keys to identify properties, rather than through invocation of an accessor method or accessing them directly through instance variables.
public class Address implements ModelBean{ private String addressLine; private String city; private long zipcode; } public class Employee implements ModelBean{ private String id; private String name; private long rollNo; private Collection <Address> addressList; } public class EmployeeTest{ public static void main(Sring[] args){ Employee emp = new Employee(); ModelBuilder builder=ModelBuilder.getBuilder(emp); builder.setProperty("addressList[0].addressLine", "Jss Pan"); String addressLine=builder.getProperty("addressList[0].addressLine"); System.out.println("addressLine is : "+addressLine); } } Output => addressLine is : Jss Pan