Giter VIP home page Giter VIP logo

rent-a-car's Introduction

TOBETO Java - React Fullstack Rent a Car Projesi

Spring ve pgAdmin kurulumları yapıldı. Ardından spring ile 'code first' prensibi doğrultusunda entitys, tablolar, kolonlar ve tabloların ilişkisi oluşturuldu. Sonrasında database bağlantısı gerçekleştirildi.

Katmanlı mimariye uyum sağlamak için 'repositories' ve 'controllers' packages oluşturuldu. Repositories içerisinde her bir entity için Interface oluşturuldu ve içlerinde 'JpaRepository' sayesinde database bağlantıları daha kolay ve işlevsel hale getirildi.

Sonrasında her bir entity için 'controllers' katmanı oluşturuldu ve ekleme, düzenleme, silme, id' ye göre getirme işlemleri için methodlar yazıldı.

Swagger UI kurulumu gerçekleştirildi. Böylece API erişimi daha kolay hale getirildi.

Önceki workshop' da oluşturduğum 'controllers' katmanını Request - Response pattern uyumlu hale getirdim. Bunun için 'dtos' adında bir package oluşturdum. Her bir entity için Request - Response işlemlerini gerçekleştirdim. Böylece controller katmanında direk entityler ile bağlantı kurmak yerine, neyi gösterip neyi göstermeyeceğimi ayarlayabildiğim bir yapı oluşturdum.

Bu workshop' da 'services' katmanını projeme ekledim. Bu projede kötü koddan iyi koda doğru gidildiği için 'controllers' katmanında yazdığım kontrolleri 'services' katmanında yazmam gerektiğini öğrendim. Bunun için Service adıyla Interfaceler oluşturdum. Bu interfaceleri, Manager adıyla java classlarına implement ettim. Sonrasında controllerda yazdığım kodları 'services' katmanına aktarmış oldum. Böylece kullanıcıyı entities ile direk teması aradan kaldırmış oldum. Bunu da Manager classlarında mapping yaparak sağladım.

Bu workshop' da projeme her bir entitynin repositorysinde 'Derived' ve 'JPQL Query' sorgu örnekleri ekledim. Sonrasında 'services' katmanında değişikliklerini uyguladım ve 'controllers' katmanında CRUD işlemlerini uyguladım. Böylece 'Derived' ve 'JPQL Query' sorgularını öğrenmiş oldum.

Bu workshop' da projemin add requestlerine validation ve business rule ekledim. Ardından projeme 'core katmanı' ekleyip global exception handling oluşturdum.

rent-a-car's People

Contributors

rdvngrsy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.