Posts

Showing posts from May, 2020

Spring Boot MVC Application

Image
We can do multiple things in Spring Boot, here we are going to make CRUD application using Spring. To start with this project we need to have Spring Boot in our system. We can use spring io ( https://start.spring.io/ ) or directly use Spring Boot to create a project. Tools used: - Spring Boot - Maven Dependencies - Oracle / MySql as Database - Bootstrap as frontend We are going to use the MVC approach to make this CRUD Application. Project Structure as below: Now create a new project in Spring Boot. Step 1: Create a Spring Strater Project. Step 2: Add Project Name, Artifact, Version. Here you can change the version and packing of the project. Step 3: Add Maven dependencies - Select Spring Web Click on the finish. It will take some time to update the project and set up a blank project for you. Now we come to our project part to add some maven dependencies in pom.xml file. <?xml version="1.0" encoding="UTF-8"

Registration of new user in CodeIgniter 3 PHP Framework

Image
In this Part, we will see the Registration of new users. For Registration of new users, We need a Registration page where users can enter details and get registered. Registration page UI looks. Before going ahead we need to add a link on the login page where whenever the user clicks, it will redirect to the Registration page. Create a link for registration as below on the login page. <p>Don't have an account? <a href="<?php echo base_url('index.php/users/registration'); ?>">Register</a></p> On click this link it will call the "registration" function of the "users" controller. So we need to define registration function in users controller as below. Update Code in the controller file: CRUDProject\application\controllers\ Users.php In the registration function, we have added code-Igniter form level validations. - For email, we are validating if the entered email is a valid email and at t

User Login and Logout with the session

Image
Now we are going to do the Login and Logout session part for this Project. Login Page: We will go one by one in each file and update some Code-Igniter files. So I am considering my Project directory name is "CRUD Project". Open file : CRUDProject\application\config\autoload.php $autoload['libraries'] = array('database','session'); $autoload['helper'] = array('url'); Open file : CRUDProject\application\config\config.php - configure base url of the project $config['base_url'] = 'http://localhost:8089/CRUDProject/'; Open file : CRUDProject\application\config\database.php - Here you need to provide your database related credentials. $db['default'] = array( 'dsn' => '', 'hostname' => 'localhost', 'username' => 'root', 'password' => '', 'database' => 'crudsession', 'dbdriv

MVC directory and Database Structure in CRUD Project

Image
In this part, we will take a look at the project's directory structure and database structure. In the overall project, we are going to use Sublime Text 3 as an editor and Xampp server for the database and run the application. So I hope you have installed them in your system. As we have CodeIgniter running successfully in our system. We need to create the below files in the directory. You can see how many files we have in controllers, models, and views directory. Now we need to add a database table in MySQL. Open PHPMyAdmin and go inside the created database. Here you need to open SQL editor from your database. Create tables and insert values as given in the below query. Table structure for table product  CREATE TABLE product ( p_code varchar(255) NOT NULL, p_category varchar(255) DEFAULT NULL, p_party varchar(255) DEFAULT NULL, p_rate varchar(255) DEFAULT NULL, p_type int(11) NOT NULL, in_purchase float NOT NULL, in_sold float NOT NULL,

CRUD Application with Session in PHP Framework CodeIginter - 3

Image
Here we are going to develop an application with CRUD operation where we will maintain user login and logout session. Please go with end to end in all videos of the videos for the proper detailed application flow. Dashboard Snapshot as below for CRUD Application: Here we are going to this project in 11 parts, the same youtube videos link will be shared with you. Application Overview which we are going to develop. Download CodeIgniter 3 and Xampp Server. MVC Directory and Database structure. User Login and Logout with the session. Register user. Account Page with header user info. Add a new Product. Get all products on Account Page. Edit Product. Delete Product. Add logger in Application. Please find the Youtube video link below for Part 1 and Part 2. As we have only application Overview and Setup part in that. Part 1: Application Overview - CRUD Application with Session in CodeIgniter 3 Part 2: Download CodeIgniter 3 and Xampp Server