Sunday, 17 May 2015

Introduction of Vaadin

Developing application specially web application require skills of other technologies like HTML , CSS, JavaScript, Web Application architecture and  plus many  other tools and technologies ; which directly effect developer productivity ,time frame and project budget / cost.  Vaadin provide the solution all of these obstacle.While traditional web programming is a fun way to spend your time learning new web technologies,you probably want to be productive and concentrate on the application logic. The server-side Vaadin framework takes care of managing the user interface in the browser and the AJAX communications between the browser and the server. With the Vaadin approach, you do not need to learn and deal directly with browser technologies, such as HTML or JavaScript.
Vaadin is a web application development framework that allow you to build web application traditionally similar with desktop application like AWT or SWING.
In Vaadin all user interaction with server by event driven (Observer Design Pattern) using AJAX support in vaadin by creating rich internet application(RIA).

Vaadin support both a server side and client side development model. In server side application architecture consist of  server side framework and client side engine. Engine run in browser as a JavaScript code , rendering the user interface and delivering the user interaction to the server with any need of plugin.The client-side development model allows building new client-side widgets and user interfaces with the GWT toolkit included in Vaadin. The widgets can be integrated with server-side component counterparts to enable using them in server-side applications. You can also make pure client-side

UIs, which can communicate with a back-end service.

Example
@Title(“My Vaadin UI”)
public class HelloWorld extends com.vaadin.UI {
     @Override
     protected void init(VaadinRequest request) {
           // Create the content root layout for the UI
           VerticalLayout content = new VerticalLayout();
           setContent(content);
           // Display the greeting
           content.addComponent(new Label(“Hello World!”));
     }
  }
A Vaadin application has one or more UIs that extend the com.vaadin.ui.UI class. A UI is a part of the web page in which the Vaadin application runs. An application can have multiple UIs in the same page, especially in portals, or in different windows or tabs. A UI is associated with a user session, and a session is created for each user who uses the application. In the context of our Hello World UI, it is sufficient to know that the underlying session is created when the user first accesses the application by opening the page, and the init() method is invoked at that time. 






Saturday, 16 May 2015

What is Design Pattern

Design Pattern are the best practice approach used by experienced Object Oriented Software developer. Design pattern give tested solution's of repeatedly general problem that software engineer faced during development.
This prevent the developer for to changes in code due to client requirement  ; simply design pattern save time and code reusable.  

Simple definition is 
"Design Pattern are generic solutions of all repeatably problem that encounter in object oriented software application".
It's based on the relationship between classes and object with defined responsibilities that behave act like that away us from error prone programming in future.

Advantages of design pattern are

  1. Code Readability 
  2. Provide Robust Architecture
  3. Solutions from experienced Developer
  4. Code re-usability
  5. Overcome Rapid Changes 



There are many different design pattern are  

  1. Factory Design Pattern
  2. Observer Design Pattern
  3. Singleton Design Pattern
  4. Strategy Design Pattern
  5. MVC Design Pattern
  6. Composite Design Pattern
  7. Memento Design Pattern
  8. Decorator Design Pattern
  9. Proxy Design Pattern
  10. Iterator Design Pattern

Sunday, 22 February 2015

What is Spring

Spring is the part of Java Enterprise Edition and was developed by Rod Johnson in 2003 and Spring framework is an open source Java platform and Spring is a "Framework" that contains many framework like Hibernate/ JPA (Data Persist-ency), JSF , JMS , EJB and many other framework  and these all makes the easy development of JavaEE application.


What is Framework?

Framework is a collection of API or structure that help you in technical problem and make your work smooth and faster.Framework take the headache of workload from your self into own self for 60% to 70%.

Overview Of Spring

Basically Spring is a framework of 


Modules In Spring

The Spring Framework consists of features organized into about 20 modules. These modules are grouped into Core Container, Data Access/Integration, Web, AOP (Aspect Oriented Programming), Instrumentation, Messaging, and Test, as shown in the following diagram.



http://docs.spring.io/spring/docs/current/spring-framework-reference/html/overview.html


Feature Of Spring

  1. Dependency Injection: 
    Dependency Injection is a design pattern that promotes loose coupling between java objects. This is an extension of the Factory pattern where-in objects do not resolve their dependencies themselves but let an external container (like Spring) take the responsibility of resolving the dependencies. 
    The benefits of using dependency injection is that any object of appropriate type can be injected just by changing the spring configuration. This makes the objects loosely coupled to other objects and promotes 'coding to interface' rather than hardcoding dependencies. 
    Dependency Injection is the back-bone of Spring framework.
  2. Support for Aspect Oriented Programming (a.k.a. AOP): 
    Aspect Oriented Programming is a style of programming used to factor out cross-cutting concerns across many java objects and keep the code for handing the cross-cutting concern in just one place. Examples of cross-cutting concerns could be logging, method tracing, auditing etc. Using AOP, we need not pollute numerous java classes with the same code for handing cross-cutting concerns thereby promoting high cohesion among java classes.
  3. Integration technology for easier integration with other Java libraries: 
    Spring uses Dependency Injection and AOP to provide integration facility for many java libraries for access database (e.g. JDBC, Hibernate, myBatis, etc.), queues (JMS based queue integration), web access (e.g. Servlets, Struts, etc.) and to virtually all J2EE technologies. 
    Spring has emerged as the de-facto integration technology for the Java/J2EE stack.



Dependency Injection (DI) is a design pattern and Dependency Injection design pattern allows us to remove the hard-coded dependencies and make our application loosely coupled, extendable and maintainable.DI can help make your code architecturally pure.