Friday, 19 April 2013

ZK MVVM Form Binding CRUD with Spring and Hibernate

In this series of articles, we will see examples for various concept of ZK Framework.

About the application
This is a small application to store the users information such as first name, last name, email, login id , password, etc. We will have the listing screen which will display all the users in the database. And from this listing screen, we will be able to add new users and edit the existing users in the database.

MySQL table structure.

CREATE TABLE `userprofile` (
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
`firstname` VARCHAR(50) NOT NULL,
`lastname` VARCHAR(50) NOT NULL,
`middlename` VARCHAR(2) DEFAULT NULL,
`userAccountNumber` VARCHAR(50) NOT NULL,
`DOB` DATE DEFAULT NULL,
`SSN` VARCHAR(50) DEFAULT NULL,
`address1` VARCHAR(200) NOT NULL,
`address2` VARCHAR(200) DEFAULT NULL,
`city` VARCHAR(100) NOT NULL,
`state` VARCHAR(2) NOT NULL,
`zipcode` VARCHAR(12) NOT NULL,
`email` VARCHAR(100) NOT NULL,
`userloginid` VARCHAR(20) NOT NULL,
`password` VARCHAR(50) NOT NULL,
`system` INT(11) DEFAULT '0',
`theme` VARCHAR(300) DEFAULT NULL,
`userPhoto` LONGBLOB,
PRIMARY KEY (`id`)
) ENGINE=INNODB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1


Insert some records in the database for the above table

Technologies Used
    1. ZK 6.5.2 CE Version
    3. Hibernate Core Version 4.1.10 Final
    4. Spring ORM Version 3.2.0
    5. MySQL version 5
    6. Maven 3

First let us setup the development environment. Download this document and follow the step by step instruction to install the necessary software’s.

Part 1: This post explain how to create ZK Maven project in eclipse IDE as step by step.
Part 2: This post talks about creating Domain, DAO and Service Layer.
Part 3: Spring Integration with Hibernate
Part 4: Presentation Layer
Part 5: Change the look and feel.
Part 6: Spring security 3 integration with hibernate 4
Part 7: More features such as Data filter, etc..
Part 8: ZK Theme customization for each user
Part 9: Bug Fixing Cycle :)
Part 10: jQuery integration with ZK Framework
Part 11: Store image in the database.
Part 12 : Validation using Hibernate Validator
Part 13 : More Validation using Hibernate Validator


You can download the source here.  and You can download the war file here 
If you are not able to download the source, please drop a email to vbsenthilinnet@gmail.com





Well, You have learned the basics of ZK Framework and now you are ready to go to develop a Complete commercial Application or Sample Application. But how to start ? You might be end with lot of questions such as “Is there any template available ?”, “any support available for the project template”?, etc.

Here it is. I have developed a small Project start up kit with the following features


1. Menus are Dynamic for N Level support. What does it mean ? Well, in the modern Web application, you might want to visible/invisible Menu by each users type (aka Dynamic Menu). This template has that option . All the Menu caption and levels are Stored in MySQL Database and after login , it will retrieve the menus assigned only for the user.

2. Apart from Menu, You might be interested in giving permission to add/delete/edit for CRUD Based screens. Using this template, you can also control by each user.

3. For all the CRUD Based screens, Export to Excel option template is provided.

4. Sample CRUD Screen are Provided to ready to start.

5. Integrated with Spring Security

6. Integrated with Spring Hibernate Security.

7. Base DAO and DAO implementation classes are provided.

8. Utilising ZK's MVVM databinding.

9. Project comes with 5 different themes . So you can set theme by each user and after login, the selected theme will be applied.

Apart from the above, the Most important option is “ Support!!!!!!!”. Users who buying this kit, unlimited support will be provided to help them to understand the structure. If you are interested in buying this start up kit, please email to me at vbsenthilinnet@gmail.com




Video Demo






Screen shots

image





image




image

No comments:

Post a Comment