Skip to content

VonHumbolt/BreakingNewsProject

Repository files navigation

Breaking News MVC Project

  • Simple Spring Mvc Project written by Java
  • Brief

    Breaking News App is simple Java Spring Mvc project. In this project, all news are listed in the home page. User can go to the details of the news by clicking on the read more text. Also, The person can search within the news according to the news titles and content. In the detail page, user can display all content of the news. The user can view all the news of the author or news source by clicking on their names.

    Technologies

    In this project, MVC design pattern was used with Spring. For database and its connection, Spring JDBC and Mysql was used. Mysql database created via Docker. All necessary configurations to create the database were written in the docker-compose file.

    At the view side, bootstrap and css was used to design. There are 2 jsp view file in this project. These jsp files are in /src/webapp/WEB-INF/view locations.

    Layers And Files

    1. Config Layer
    2. Dispatcher Servlet initialization and Servlet Config class are in this layer. Jsp files locations and database connections codes are in servlet config class.

    3. Controller Layer
    4. Controller classes which are annotated with @Controller annotations are here. Controller classes receive the requests from the client. Then, After the process, it can return view which is a jsp file.

    5. Model Layer
    6. Project model classes which are represented in the database as a table are in this class. Dto classes which are used getting request and sending response is here.

    7. Repository Layer
    8. For database access, all necessary interfaces and classes are here. Sql queries which are necessary for data processing are written in this layer.

    9. Service Layer
    10. Business codes are written in this layer. From this layer, project repositories are communicated with dependency injection.

    11. Util Layer
    12. Helper classes such as RowMappers are here. NewDtoRowMapper class allows the dto object to match the database table.

    13. Docker Compose File
    14. Docker compose file for running the mysql database.

    15. database.properties File
    16. Properties file for database configurations. Database username, password, database url and driver class name are in this file.

    Project Images

  • Home Page
  • News Detail Page
  • Search Results