0% found this document useful (0 votes)
50 views46 pages

News Portal Report

The document is a project report for the development of an Online News Portal as part of the Bachelor of Computer Application program at Panjab University. It outlines the objectives, tools, and technologies used in the project, including PHP, MySQL, HTML, JavaScript, and CSS, as well as the system development life cycle and feasibility study. The project aims to provide a user-friendly platform for accessing news online, catering to users who prefer digital media over traditional newspapers.

Uploaded by

tckillermano
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views46 pages

News Portal Report

The document is a project report for the development of an Online News Portal as part of the Bachelor of Computer Application program at Panjab University. It outlines the objectives, tools, and technologies used in the project, including PHP, MySQL, HTML, JavaScript, and CSS, as well as the system development life cycle and feasibility study. The project aims to provide a user-friendly platform for accessing news online, catering to users who prefer digital media over traditional newspapers.

Uploaded by

tckillermano
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

lOMoARcPSD|53892018

News Portal Report

Bachelour of Computer Application (Panjab University)

Scan to open on Studocu

Studocu is not sponsored or endorsed by any college or university


Downloaded by MANO Mano (akboysp90l@gmail.com)
lOMoARcPSD|53892018

NEWS PORTAL
A PROJECT REPORT
A project report submitted in the partial
fulfilment of the requirement for the award of degree of
Bachelor of Computer Application

(2021-2023)

Submitted By:-
Submitted To:- Akash Singh(20051247)
Dr.Pradeep Kaur Akash Saini (20051246)
Aditya Singh (20051245)

D.A.V. College, Hoshiarpur


AFFILIATED TO

Panjab University
(2021- 2023)

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

ACKNOWLEDGEMENT
With immense please we arepresenting "ONLINE NEWS SYSTEM" Project report as a part of
the curriculum of ‘B.C.A 6th Sem’. We wish to thank all the people who gave usunending support.

We express our profound thanks to our Head of Department "Mr. Sushil Kumar"and
Project Guide and Project In-charge"Dr. Pradeep Kaur" and all those who have indirectly guided and
helped us towards development of this project.

Akash Singh (20051247)


Akash Saini (20051246)
Aditya Singh (20051245)

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

CERTIFICATE
Certified that this project report “ NEWS PORTAL WEBSITE”
is the Bonafede work of “ AKASH SINGH AND AKASH SAINI ” who
carried out the project work under my supervision.

Dr.Pradeep Kaur Mr.Sushil Kumar Mr.Kapil Chopra


Guide Head of department Principal

Bachelor of Computer Application

D.A.V. College, Hoshiarpur

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

DECLARATION
We Akash Singh (20051247), Akash Saini (20051246) hereby declare that this report
entitled "NEWS PORTAL WEBSITE" submitted in the partial fulfillment of the requirements for
the award of the degree of Bachelor of Computer Application, in the college of
DAV COLLEGE, Hoshiarpur. is my own work. This matter embodied in this report has not been
submitted in part or full to any other university or an institute for the award of a degree.

Date:- 19/04/2023

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

1.Introduction and Objectives

1.1 Introduction

Now-a-days we live in age of Information Communication and Technology (ICT). We can’t

think a single moment without technology. From morning to night, we need help of the

technology. This is the revolutionary time of computer technology. Most of the works depends

on web application. For this reason, anytime, anywhere, anyone can access a website by internet

at low cost and we can find our expectable and most update information from website. At

present information is one the most valuable resource of the current world. We have developed

our project so that we can aware the people.

The online news portal has been developed to override the problems prevailing in the practicing

manual system. The main purpose of the project is intended to develop a portal for management

of Web based news. The portal provides a suitable and easy display for which large population

around the world can learn or will have the knowledge about the world. No formal knowledge is

needed to use this portal.

The portal has basically two user parts where one is user who can view, add comment, can

have subscribe the newsletters or games and another is administrator who will manage or

control the website and other user can only view ,search and can add comments if name and

email is given, but with the approval of administrator.

The website consists of basic pages from which the user can view and know the relevant

information according to various categories which administrator given. In other case, the

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

administrator manages all the relevant actions for which the users can view properly and also

make reports.

1.2 Objectives

 The objective of this project is to develop a web application for Online News Paper

website that can aware the people.

 The objective of this project is to provide the daily news.

 Those people who don’t have time to read the news paper and always linked with

internet can get more information.

 Anytime, anywhere, anyone can know about the news or information by internet at low

cost.

 Dynamically provides facility.

 Once a news item is put on the internet, it becomes instantly available for use round

the globe without additional variable cost.

 You don’t have to wait for newspaper in morning.

 Money and time will also save.

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

1.3 Tools/ Platform Hardware & Software Requirements

Hardware:

Processor : Intel core 2 Duo or above

Memory : 2 GB RAM or above

Cache Memory : 128 KB or above

Hard Disk : 30 GB or above [at least 3 MB free space required]

Software:

Language Used : PHP

Database : MySql

User Interface Design : HTML, JavaScript

Web Browser : Google chrome, Mozilla Firefox, Opera

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

1.4 Project Category

This is an RDBMS web based project which is currently using MySQL for all the transaction

statements and PHP as the front end. This project also uses Javascript and CSS for the user

friendly view.

RDBMS

A Relational DataBase Management System (RDBMS) is a software that −

 Enables you to implement a database with tables, columns and indexes.

 Guarantees the Referential Integrity between rows of various tables.

 Updates the indexes automatically.

 Interprets an SQL query and combines information from various tables.

MySQL

MySQL is a fast, easy-to-use RDBMS being used for many small and big businesses. MySQL

is developed, marketed and supported by MySQL AB, which is a Swedish company. MySQL is

becoming so popular because of many good reasons −

 MySQL is released under an open-source license. So you have nothing to pay to use it.

 MySQL is a very powerful program in its own right. It handles a large subset of the

functionality of the most expensive and powerful database packages.

 MySQL uses a standard form of the well-known SQL data language.

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

 MySQL works on many operating systems and with many languages including PHP,

PERL, C, C++, JAVA, etc.

 MySQL works very quickly and works well even with large data sets.

 MySQL is very friendly to PHP, the most appreciated language for web development.

 MySQL supports large databases, up to 50 million rows or more in a table. The default

file size limit for a table is 4GB, but you can increase this (if your operating system can

handle it) to a theoretical limit of 8 million terabytes (TB).

 MySQL is customizable. The open-source GPL license allows programmers to modify

PHP

PHP started out as a small open source project that evolved as more and more people found out

how useful it was. Rasmus Lerdorf unleashed the first version of PHP way back in 1994.

 PHP is a recursive acronym for "PHP: Hypertext Preprocessor".

 PHP is a server side scripting language that is embedded in HTML. It is used to manage

dynamic content, databases, session tracking, even build entire e-commerce sites.

 It is integrated with a number of popular databases, including MySQL, PostgreSQL,

Oracle, Sybase, Informix, and Microsoft SQL Server.

 PHP is pleasingly zippy in its execution, especially when compiled as an Apache module

on the Unix side. The MySQL server, once started, executes even very complex queries

with huge result sets in record-setting time.

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

 PHP supports a large number of major protocols such as POP3, IMAP, and LDAP. PHP4

added support for Java and distributed object architectures (COM and CORBA), making

n-tier development a possibility for the first time.

 PHP is forgiving: PHP language tries to be as forgiving as possible.

 PHP Syntax is C-Like.

Common uses of PHP are ;

 PHP performs system functions, i.e. from files on a system it can create, open, read,

write, and close them.

 PHP can handle forms, i.e. gather data from files, save data to a file, through email you

can send data, return data to the user.

 You add, delete, modify elements within your database through PHP.

 Access cookies variables and set cookies.

 Using PHP, you can restrict users to access some pages of your website.

 It can encrypt data.

HTML

HTML is the standard markup language for creating Web pages.

 HTML stands for Hyper Text Markup Language

 HTML describes the structure of Web pages using markup

 HTML elements are the building blocks of HTML pages

 HTML elements are represented by tags

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

 HTML tags label pieces of content such as "heading", "paragraph", "table", and so on

 Browsers do not display the HTML tags, but use them to render the content of the page

JavaScript

JavaScript is a dynamic computer programming language. It is lightweight and most commonly

used as a part of web pages, whose implementations allow client-side script to interact with the

user and make dynamic pages. It is an interpreted programming language with object-oriented

capabilities.

CSS

Cascading Style Sheets, fondly referred to as CSS, is a simple design language intended to

simplify the process of making web pages presentable.

CSS handles the look and feel part of a web page. Using CSS, you can control the color of the

text, the style of fonts, the spacing between paragraphs, how columns are sized and laid out,

what background images or colors are used, layout designs, and variations in display for

different devices and screen sizes as well as a variety of other effects.

CSS is easy to learn and understand but it provides powerful control over the presentation of an

HTML document. Most commonly, CSS is combined with the markup languages HTML or

XHTML.

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

2.System Study

2.1 Preliminary Investigation

In this process, the development team visits investigate the need for possible software

automation in the given system. By the end of Preliminary Investigation, the team furnishes a

document that holds the different specific recommendations for the candidate system. It also

includes the personnel assignments, costs, project schedule, and target dates. Main Tasks of the

preliminary investigation phase are:

 Investigate the present system and identify the functions to be performed

 Identify the objectives of the new system. In general, an information system benefits a

business by increasing efficiency, improving effectiveness, or providing a competitive

advantage.

 Identify problems and suggest a few solutions

 Identify constraints, i.e. the limitations placed on the project, usually relating to time,

money and resources

 Evaluate feasibility - whether the proposed system promises sufficient benefit to invest

the additional resources necessary to establish the user requirements in greater detail.

2.2. System Development Life Cycle

System Development Life Cycle (SDLC) is a conceptual model which includes policies and

procedures for developing or altering systems throughout their life cycles.

SDLC is used by analysts to develop an information system. SDLC includes the following

activities −

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

 requirements

 design

 implementation

 testing

 deployment

 operations

 maintenance

Phases of SDLC

Systems Development Life Cycle is a systematic approach which explicitly breaks down the

work into phases that are required to implement either new or modified Information System.

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

2.3. Feasibility Study

A feasibility study aims to objectively and rationally uncover the strengths and weaknesses of an

existing business or proposed venture, opportunities and threats present in the natural

environment, the resources required to carry through, and ultimately the prospects for success. In

its simplest terms, the two criteria to judge feasibility are cost required and value to be attained.

A well-designed feasibility study should provide a historical background of the business or

project, a description of the product or service, accounting statements, details of the operations

and management, marketing research and policies, financial data, legal requirements and tax

obligations. Generally, feasibility studies precede technical development and project

implementation.

A feasibility study evaluates the project's potential for success; therefore, perceived objectivity is

an important factor in the credibility of the study for potential investors and lending institutions.

It must therefore be conducted with an objective, unbiased approach to provide information upon

which decisions can be based.

2.3.1 Technical feasibility

This assessment is based on an outline design of system requirements, to determine whether the

company has the technical expertise to handle completion of the project. When writing a

feasibility report, the following should be taken to consideration:

 A brief description of the business to assess more possible factors which could affect the

study

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

 The part of the business being examined

 The human and economic factor

 The possible solutions to the problem

At this level, the concern is whether the proposal is both technically and legally feasible

(assuming moderate cost).

The technical feasibility assessment is focused on gaining an understanding of the present

technical resources of the organization and their applicability to the expected needs of the

proposed system. It is an evaluation of the hardware and software and how it meets the need of

the proposed system.

The system is developed using XAMPP running on Windows platform. MySQL, which is a

powerful RDBMS is used as backend. So this system is technically feasible. If the budget is a

serious constraint then the project is judged technically feasible.

2.3.2 Operational feasibility

Operational feasibility is the measure of how well a proposed system solves the problems, and

takes advantage of the opportunities identified during scope definition and how it satisfies the

requirements identified in the requirements analysis phase of system development.

The operational feasibility assessment focuses on the degree to which the proposed development

project fits in with the existing business environment and objectives with regard to development

schedule, delivery date, corporate culture and existing business processes.

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

To ensure success, desired operational outcomes must be imparted during design and

development. These include such design-dependent parameters as reliability, maintainability,

supportability, usability, producibility, disposability, sustainability, affordability and others.

These parameters are required to be considered at the early stages of design if desired operational

behaviours are to be realised. A system design and development requires appropriate and timely

application of engineering and management efforts to meet the previously mentioned parameters.

A system may serve its intended purpose most effectively when its technical and operating

characteristics are engineered into the design. Therefore, operational feasibility is a critical

aspect of systems engineering that needs to be an integral part of the early design phases.

No doubt the proposed system is fully GUI based that is very user friendly and all inputs to be

taken all self –explanatory even to a layman. Besides, a proper training has been conducted to let

know the essence of the system to the users so that they feel comfortable with new system.

2.3.3 Economic feasibility

Economic analysis is the most frequently used method for evaluating the effectiveness of a

candidate system. More commonly known as cost/benefit analysis, the procedure is to determine

the benefits and savings that are expected from a candidate system and compare them with cost.

If benefits outweigh cost, then the decision is made to design and implement the system

Otherwise, further justification or alternations in the proposed system will have to be made if it

has a chance of being approved.

The project uses the technology based on minimum possible cost factor. The project is

economically feasible since its benefits exceed the costs.

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

3. System Analysis

Systems development is systematic process which includes phases such as planning, analysis,

design, deployment, and maintenance.

System analysis is a process of collecting and interpreting facts, identifying the problems, and

decomposition of a system into its components.

System analysis is conducted for the purpose of studying a system or its parts in order to

identify its objectives. It is a problem solving technique that improves the system and ensures

that all the components of the system work efficiently to accomplish their purpose. Analysis

specifies what the system should do.

During analysis , data collected on various files, decision points and transactions handled by the

present system. The commonly used tools are data flow diagram, interviews etc. Training

,experience and common sense are required for the collection of relevant information needed to

develop the system. The success of the system depends largely on how clearly the problem is

defined , thoroughly investigated and properly carried out through the choice of solution.

3.1 Existing System

The existing system is fully manual. Each person has to wait for the newspaper to arrive.

There is a payment for each day newspaper. A user will have to spend more time browsing to

find the updates of particular news. This may lead to wastage of time, if the page containing the

information is unknown to the user. The main disadvantage is that there will be lot of difficulties

for the user to find the specified news updates for his/her choice of category.

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

3.2 Proposed System

By computerizing the news, the administrator can easily add the information, edit or even delete

the information if it is irrelevant. By the admin approval of comment facility , it is even scrutiny

of social issue comments.

This project has several advantages :-

 User friendly interface

 Fast access to database

 No extra charge levied

 Less error

 More storage capacity

 Search facility

 Look and feel environment

 Quick transaction

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

4. Systems Design

System design is the phase that bridges the gap between problem domain and the existing

system in a manageable way. This phase focuses on the solution domain, i.e. “how to

implement?”

It is the phase where the SRS document is converted into a format that can be implemented and

decides how the system will operate.

In this phase, the complex activity of system development is divided into several smaller sub-

activities, which coordinate with each other to achieve the main objective of system

development.

System design takes the following inputs −

 Statement of work

 Requirement determination plan

 Current situation analysis

 Proposed system requirements including a conceptual data model, modified DFDs, and

Metadata (data about data).

System design gives the following outputs −

 Infrastructure and organizational changes for the proposed system.

 A data schema, often a relational schema.

 Metadata to define the tables/files and columns/data-items.

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

 A function hierarchy diagram or web page map that graphically describes the program

structure.

 Actual or pseudocode for each module in the program.

 A prototype for the proposed system.

4.1 Entity Relationship Diagram

The ER model defines the conceptual view of a database. It works around real-world entities

and the associations among them. At view level, the ER model is considered a good option for

designing databases.

Entity:-

An entity can be a real-world object, either animate or inanimate, that can be easily identifiable.

For example, in a school database, students, teachers, classes, and courses offered can be

considered as entities. All these entities have some attributes or properties that give them their

identity.

An entity set is a collection of similar types of entities. An entity set may contain entities with

attribute sharing similar values. For example, a Students set may contain all the students of a

school; likewise a Teachers set may contain all the teachers of a school from all faculties. Entity

sets need not be disjoint.

Entities are represented by means of rectangles. Rectangles are named with the entity set they

represent. Eg:

Category

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

Attributes:-

Entities are represented by means of their properties, called attributes. All attributes have

values. For example, a student entity may have name, class, and age as attributes.

There exists a domain or range of values that can be assigned to attributes. For example, a

student's name cannot be a numeric value. It has to be alphabetic. A student's age cannot be

negative, etc.

Attributes are represented by means of ellipses. Every ellipse represents one attribute and is

directly connected to its entity (rectangle).

CategoryId
Category CategoryDetails

CategoryName

Types of Attributes

 Simple attribute − Simple attributes are atomic values, which cannot be divided further.

For example, a student's phone number is an atomic value of 10 digits.

 Composite attribute − Composite attributes are made of more than one simple attribute.

For example, a student's complete name may have first_name and last_name.

 Derived attribute − Derived attributes are the attributes that do not exist in the physical

database, but their values are derived from other attributes present in the database. For

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

example, average_salary in a department should not be saved directly in the database,

instead it can be derived. For another example, age can be derived from data_of_birth.

 Single-value attribute − Single-value attributes contain single value. For example −

Social_Security_Number.

 Multi-value attribute − Multi-value attributes may contain more than one values. For

example, a person can have more than one phone number, email_address, etc.

These attribute types can come together in a way like −

 simple single-valued attributes

 simple multi-valued attributes

 composite single-valued attributes

 composite multi-valued attributes

Relationship:-

The association among entities is called a relationship. For example, an employee works_at a

department, a student enrolls in a course. Here, Works_at and Enrolls are called relationships.

Relationships are represented by diamond-shaped box. Name of the relationship is written inside

the diamond-box. All the entities (rectangles) participating in a relationship, are connected to it

by a line.

Category has Sub category

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

UserId LoginId
Username

User Has Login UserName


Email

Password Password

Manage
CategoryId
PostId CategoryName

Post Category

PostTitle Description

Has CreatedDate
Description

SubId
CreatedDate Subcategory

Description SubName

ER Diagram for Online News Portal

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

User Category
Management Management

Posts Online Subcategory


Management Management
News Portal

Comments Login
Management Management

Level 0 : Data Flow Diagram

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

Category Generate Category


Management Report

Login Check User


Management Login Details

Subcategory Generate
Management Subcategory Report
Online News
Portal

Posts Generate Post


Management Report

Comments Generate
Management Comments Report

Level 1 : Data Flow Diagram

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

Admin

Login to Check roles Manage


system of access Category Details

Manage Sub
category Details
Check Manage
credentials modules
Manage Posts
Details

Manage
Comments Details

Level 2 : Admin Data Flow Diagram

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

User

Login to Check roles Manage


system of access Register Details

View News
Check Manage
credentials modules
Search News

Password Change
Recovery Password

Level 2 : User Data Flow Diagram

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

6. System Development

6.1. Coding :

The objective of coding phase for a given design is to implement the design in best way possible.

In this phase design of the system is translated into code in a programming language. The coding

phase affects the maintenance and testing phase of the system development life cycle process.

Testing and maintenance effort reduces if the code is well written.

Since the testing and maintenance cost of software are much expensive than the coding cost, the

goal of coding should be to reduce the testing and maintenance effort. Hence, during coding the

emphasis must be on developing programs which are easy to write. Simplicity and clarity should

be achieved, during the coding phase.

In this project HTML & JavaScript codes are used.


HTML : -
<!doctype html>
<html lang="en">

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<link rel="stylesheet" href="style.css">
<title>News Website</title>
</head>

<body class="m-0 p-0">

<div class="container-fluid m-0 p-0">

<!-- navbar -->


<div>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">

<a class="navbar-brand text-warning" href="#">The Headliners


</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse"
data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

<li class="nav-item">
<a class="nav-link" href="#entertainment" id="entertainment">Entertainment</a>
</li>
<li class="nav-item">
<a class="nav-link" style="color:white;font-size: 20px;font-weight:600;" aria-current="page" href="/login.html" id="lo
</li>
</ul>
<form class="d-flex">
<input class="form-control me-2" type="text" id="newsQuery" placeholder="Search news">
<button class="btn btn-outline-warning" type="button" id="searchBtn">Search</button>
</form>

</div>
</div>
</nav>
</div>

<!-- News -->


<div>
<div class="row m-3" id="newsType"></div>
<div class="row me-2 ms-2" id="newsdetails"></div>
</div>

<!-- footer -->


<div class="mt-5">
<div>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark mt-4">
<div class="container-fluid m-0 p-0">
<h5 class="text-white me-auto ms-auto">Code<span class="text-warning">Logic</span></h5>
</div>
</nav>
</div>
</div>

</div>

<script src="index.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin="anonymous"></script>
</body>

</html>

JavaScript:-
// variables
const generalBtn = document.getElementById("genral");
const businessBtn = document.getElementById("business");
const sportsBtn = document.getElementById("sport");
const entertainmentBtn = document.getElementById("entertainment");
const technologyBtn = document.getElementById("technology");
const searchBtn = document.getElementById("searchBtn");
const newsQuery = document.getElementById("newsQuery");
const newsType = document.getElementById("newsType");
const newsdetails = document.getElementById("newsdetails");

// Array
var newsDataArr = [];

// apis
const API_KEY = "bc1dd8fb9ebc4a66a539f329bcff14e4";
const HEADLINES_NEWS = "https://newsapi.org/v2/top-headlines?country=in&apiKey=";
const GENERAL_NEWS = "https://newsapi.org/v2/top-headlines?country=in&category=general&apiKey=";
const BUSINESS_NEWS = "https://newsapi.org/v2/top-headlines?country=in&category=business&apiKey=";
const SPORTS_NEWS = "https://newsapi.org/v2/top-headlines?country=in&category=sports&apiKey=";
const ENTERTAINMENT_NEWS = "https://newsapi.org/v2/top-headlines?country=in&category=entertainment&apiKey=";
const TECHNOLOGY_NEWS = "https://newsapi.org/v2/top-headlines?country=in&category=technology&pageSize=8&apiKey=";
const SEARCH_NEWS = "https://newsapi.org/v2/everything?q=";

window.onload = function() {
newsType.innerHTML="<h4>Headlines</h4>";
Downloaded by MANO Mano (akboysp90l@gmail.com)
lOMoARcPSD|53892018

fetchHeadlines();
(!function(){
if(sessionStorage.getItem('login')==='true'){
document.querySelector('#login').innerText=sessionStorage.getItem('person');
document.querySelector('#login').removeAttribute('href');

}
}());
};

generalBtn.addEventListener("click",function(){
newsType.innerHTML="<h4>General news</h4>";
fetchGeneralNews();
});

businessBtn.addEventListener("click",function(){
newsType.innerHTML="<h4>Business</h4>";
fetchBusinessNews();
});

sportsBtn.addEventListener("click",function(){
newsType.innerHTML="<h4>Sports</h4>";
fetchSportsNews();
});

entertainmentBtn.addEventListener("click",function(){
newsType.innerHTML="<h4>Entertainment</h4>";
fetchEntertainmentNews();
});

technologyBtn.addEventListener("click",function(){
newsType.innerHTML="<h4>Technology</h4>";
fetchTechnologyNews();
});

searchBtn.addEventListener("click",function(){
newsType.innerHTML="<h4>Search : "+newsQuery.value+"</h4>";
fetchQueryNews();
});

const fetchHeadlines = async () => {


const response = await fetch(HEADLINES_NEWS+API_KEY);
newsDataArr = [];
if(response.status >=200 && response.status < 300) {
const myJson = await response.json();
newsDataArr = myJson.articles;
} else {
// handle errors
console.log(response.status, response.statusText);
newsdetails.innerHTML = "<h5>No data found.</h5>"
return;
}

displayNews();
}

const fetchGeneralNews = async () => {


const response = await fetch(GENERAL_NEWS+API_KEY);
newsDataArr = [];
if(response.status >=200 && response.status < 300) {
const myJson = await response.json();
newsDataArr = myJson.articles;
} else {
// handle errors
console.log(response.status, response.statusText);
newsdetails.innerHTML = "<h5>No data found.</h5>"
return;
}

displayNews();
}

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

const fetchBusinessNews = async () => {


const response = await fetch(BUSINESS_NEWS+API_KEY);
newsDataArr = [];
if(response.status >=200 && response.status < 300) {
const myJson = await response.json();
newsDataArr = myJson.articles;
} else {
// handle errors
console.log(response.status, response.statusText);
newsdetails.innerHTML = "<h5>No data found.</h5>"
return;
}

displayNews();
}

const fetchEntertainmentNews = async () => {


const response = await fetch(ENTERTAINMENT_NEWS+API_KEY);
newsDataArr = [];
if(response.status >=200 && response.status < 300) {
const myJson = await response.json();
console.log(myJson);
newsDataArr = myJson.articles;
} else {
// handle errors
console.log(response.status, response.statusText);
newsdetails.innerHTML = "<h5>No data found.</h5>"
return;
}

displayNews();
}

const fetchSportsNews = async () => {


const response = await fetch(SPORTS_NEWS+API_KEY);
newsDataArr = [];
if(response.status >=200 && response.status < 300) {
const myJson = await response.json();
newsDataArr = myJson.articles;
} else {
// handle errors
console.log(response.status, response.statusText);
newsdetails.innerHTML = "<h5>No data found.</h5>"
return;
}

displayNews();
}

const fetchTechnologyNews = async () => {


const response = await fetch(TECHNOLOGY_NEWS+API_KEY);
newsDataArr = [];
if(response.status >=200 && response.status < 300) {
const myJson = await response.json();
newsDataArr = myJson.articles;
} else {
// handle errors
console.log(response.status, response.statusText);
newsdetails.innerHTML = "<h5>No data found.</h5>"
return;
}

displayNews();
}

const fetchQueryNews = async () => {

if(newsQuery.value == null)
return;

const response = await fetch(SEARCH_NEWS+encodeURIComponent(newsQuery.value)+"&apiKey="+API_KEY);


newsDataArr = [];
if(response.status >= 200 && response.status < 300) {
const myJson = await response.json();
newsDataArr = myJson.articles;
} else {
Downloaded by MANO Mano (akboysp90l@gmail.com)
lOMoARcPSD|53892018

//error handle
console.log(response.status, response.statusText);
newsdetails.innerHTML = "<h5>No data found.</h5>"
return;
}

displayNews();
}

function displayNews() {

newsdetails.innerHTML = "";

// if(newsDataArr.length == 0) {
// newsdetails.innerHTML = "<h5>No data found.</h5>"
// return;
// }

newsDataArr.forEach(news => {

var date = news.publishedAt.split("T");

var col = document.createElement('div');


col.className="col-sm-12 col-md-4 col-lg-3 p-2 card";

var card = document.createElement('div');


card.className = "p-2";

var image = document.createElement('img');


image.setAttribute("height","matchparent");
image.setAttribute("width","100%");
image.src=news.urlToImage;

var cardBody = document.createElement('div');

var newsHeading = document.createElement('h5');


newsHeading.className = "card-title";
newsHeading.innerHTML = news.title;

var dateHeading = document.createElement('h6');


dateHeading.className = "text-primary";
dateHeading.innerHTML = date[0];

var discription = document.createElement('p');


discription.className="text-muted";
discription.innerHTML = news.description;

var link = document.createElement('a');


link.className="btn btn-dark";

link.setAttribute("target", "_blank");
link.href = news.url;
link.innerHTML="Read more";
link.addEventListener('click',function(){
if(sessionStorage.getItem('login')==='true'){
return;
}else{
window.location.pathname='/login.html';
}
});

cardBody.appendChild(newsHeading);
cardBody.appendChild(dateHeading);
cardBody.appendChild(discription);
cardBody.appendChild(link);
card.appendChild(image);
card.appendChild(cardBody);
col.appendChild(card);
newsdetails.appendChild(col);
});

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

7. Testing

7.1 Testing

System testing is actually a series of different whose primary purpose is to fully exercise the

computer based system. Software testing is critical element of software quality assurance and

represent the ultimate review of the specification, design and coding. System testing makes a

logical assumption that all the part of the system is correct; the goal will be successfully

achieved. Testing is the final verification and validation activity within the organization itself.

During testing the major activities are concerned on the examinations and modification of the

source code.

Testing objectives are:

Testing is a process of executing a program with the intend of finding an error. A good test is one

that uncovers an as yet undiscovered error.

 Unit testing

 Integration testing

 System testing

 Validation testing

 User acceptance testing

Unit Testing

This type of testing is performed by developers before the setup is handed over to the testing

team to formally execute the test cases. Unit testing is performed by the respective developers

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

on the individual units of source code assigned areas. The developers use test data that is

different from the test data of the quality assurance team.

The goal of unit testing is to isolate each part of the program and show that individual parts are

correct in terms of requirements and functionality.

Unit testing enables a programmer to detect error in coding. A unit test focuses verification of

the smallest unit of software design. This testing was carried out during the coding itself. In this

testing step, each module is going to be work satisfactorily as the expected output from the

module.

Limitations of Unit Testing:

 Testing cannot catch each and every bug in an application. It is impossible to evaluate

every execution path in every software application. The same is the case with unit

testing.

 There is a limit to the number of scenarios and test data that a developer can use to

verify a source code. After having exhausted all the options, there is no choice but to

stop unit testing and merge the code segment with other units.

Project aspect: The front-end design consists of various forms. They were tested for data

acceptance. Similarly, the back-end also tested for successful acceptance and retrieval of data.

Integration Testing

Through each program work individually, they should work after linking together. This is

referred to as interfacing. Data may be lost across the interface; one module can have adverse

effect on the other. Subroutines after linking may not do the desired function expected by the

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

main routine. Integration testing is the systematic technique for constructing the program

structure while at the same time conducting test to uncover errors associated with the interface.

Using integrated test plan prepared in the design phase of the system development as a guide, the

integration test was carried out. All the errors found in the system were corrected for the next

testing step.

Integration testing is defined as the testing of combined parts of an application to determine if

they function correctly. Integration testing can be done in two ways: Bottom-up integration

testing and Top-down integration testing.

o Bottom-up integration: This testing begins with unit testing, followed by tests of

progressively higher-level combinations of units called modules or builds.

o Top-down integration: In this testing, the highest-level modules are tested first and

progressively, lower-level modules are tested thereafter.

In a comprehensive software development environment, bottom-up testing is usually done first,

followed by top-down testing. The process concludes with multiple tests of the complete

application, preferably in scenarios designed to mimic actual situations.

Project aspect: After connecting the back-end and the front-end as whole module, the data

entered in the front-end once submitted were successfully entered in the database. On request,

data were successfully retrieved in to forms.

System Testing

After performing the integration testing, the next step is output testing of the proposed system.

No system could be useful if it doesn’t produce the required output in a specified format. The

output generated are displayed by the system under consideration and then tested by comparing

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

with the format require by the user. Here the output format is considered in to two ways, one in

on-screen and other in printed format.

System testing tests the system as a whole. Once all the components are integrated, the

application as a whole is tested rigorously to see that it meets the specified Quality Standards.

This type of testing is performed by a specialized testing team.

System testing is important because of the following reasons −

 System testing is the first step in the Software Development Life Cycle, where the

application is tested as a whole.

 The application is tested thoroughly to verify that it meets the functional and technical

specifications.

 The application is tested in an environment that is very close to the production

environment where the application will be deployed.

 System testing enables us to test, verify, and validate both the business requirements as

well as the application architecture.

Project aspect: The entire project was tested and found successful.

Validation testing

Validation Testing ensures that the product actually meets the client's needs. It can also be

defined as to demonstrate that the product fulfills its intended use when deployed on appropriate

environment. The user has to work with the system and check whether the project meets his

needs. In the validation checking, the user works with the beta version of the software.

Project aspects: User enters the appropriate data and results was checked and validated

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

User Acceptance Testing

User acceptance of a system is a key factor of the success of any system. The system under

consideration was tested for user acceptance by running a prototype of the software.

This is arguably the most important type of testing, as it is conducted by the Quality Assurance Team who

will gauge whether the application meets the intended specifications and satisfies the client’s requirement.

The QA team will have a set of pre-written scenarios and test cases that will be used to test the

application.

More ideas will be shared about the application and more tests can be performed on it to gauge its

accuracy and the reasons why the project was initiated. Acceptance tests are not only intended to point out

simple spelling mistakes, cosmetic errors, or interface gaps, but also to point out any bugs in the

application that will result in system crashes or major errors in the application.

By performing acceptance tests on an application, the testing team will reduce how the application will

perform in production. There are also legal and contractual requirements for acceptance of the system.

Project aspects: An alpha version is demonstrated to the users. Their suggestions are recorded.

7.2 Test Cases

A test case is a document, which has a set of test data, preconditions, expected results and

postconditions, developed for a particular test scenario in order to verify compliance against a

specific requirement.

Test Case acts as the starting point for the test execution, and after applying a set of input

values, the application has a definitive outcome and leaves the system at some end point or also

known as execution postcondition.

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

Test cases involve a set of steps, conditions, and inputs that can be used while performing

testing tasks. The main intent of this activity is to ensure whether a software passes or fails in

terms of its functionality and other aspects. There are many types of test cases such as

functional, negative, error, logical test cases, physical test cases, UI test cases, etc.

Furthermore, test cases are written to keep track of the testing coverage of a software.

Generally, there are no formal templates that can be used during test case writing.

The primary objectives of test case design methods are to derive a set of test that has of highest

likelihood of uncovering the defects. To accomplish this objective, two categories of test case

design techniques are used, Black box testing and White box testing.

White Box Testing

White box testing is a test case design method that uses the control structure of the procedural

design to derive test cases. White-box testing is the detailed investigation of internal logic and

structure of the code. White-box testing is also called glass testing or open-box testing. In order

to perform white-box testing on an application, a tester needs to know the internal workings of

the code.

The tester needs to have a look inside the source code and find out which unit/chunk of the code

is behaving inappropriately. Using white box testing methods, we can derive test cases that;

 Guarantee that all independent paths within a module have been exercised at least once

 Exercise all logical decisions on their true and false sides

 Execute all loops at their boundaries and within their operational bounds

 Exercise internal data structures to ensure their validity.

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

Black Box Testing

The technique of testing without having any knowledge of the interior workings of the

application is called black-box testing. The tester is oblivious to the system architecture and does

not have access to the source code. Typically, while performing a black-box test, a tester will

interact with the system's user interface by providing inputs and examining outputs without

knowing how and where the inputs are worked upon.

Black box testing methods focus on the functional requirements if the software. That is, black

box testing enables us to derive sets of input conditions that will fully exercise all functional

requirements of the program. Black box testing attempts to find errors in the following

categories:

 Incorrect or missing functions

 Interface errors

 Errors in data structure or external database access

 Performance errors

 Initialization and termination errors

7.3 Verification and validation

Verification is intended to check that a product, service, or system (or portion thereof, or set

thereof) meets a set of design specifications. In the development phase, verification procedures

involve performing special tests to model or simulate a portion, or the entirety, of a product,

service or system, then performing a review or analysis of the modeling results. In the post-

development phase, verification procedures involve regularly repeating tests devised specifically

to ensure that the product, service, or system continues to meet the initial design requirements,

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

specifications, and regulations as time progresses. It is a process that is used to evaluate whether

a product, service, or system complies with regulations, specifications, or conditions imposed at

the start of a development phase. Verification can be in development, scale-up, or production.

This is often an internal process.

Validation is intended to ensure a product, service, or system (or portion thereof, or set thereof)

results in a product, service, or system (or portion thereof, or set thereof) that meets the

operational needs of the user. For a new development flow or verification flow, validation

procedures may involve modeling either flow and using simulations to predict faults or gaps that

might lead to invalid or incomplete verification or development of a product, service, or system

(or portion thereof, or set thereof) . A set of validation requirements (as defined by the user),

specifications, and regulations may then be used as a basis for qualifying a development flow or

verification flow for a product, service, or system (or portion thereof, or set thereof). Additional

validation procedures also include those that are designed specifically to ensure that

modifications made to an existing qualified development flow or verification flow will have the

effect of producing a product, service, or system (or portion thereof, or set thereof) that meets the

initial design requirements, specifications, and regulations; these validations help to keep the

flow qualified. It is a process of establishing evidence that provides a high degree of assurance

that a product, service, or system accomplishes its intended requirements. This often involves

acceptance of fitness for purpose with end users and other product stakeholders. This is often an

external process.

This project is undergone all verification and validation procedure so that it can be used by the

end user. This meets all the set of design specifications and is tested properly using the test cases.

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

7.4 Debugging

It is a systematic process of spotting and fixing the number of bugs, or defects, in a piece of

software so that the software is behaving as expected. Debugging is harder for complex systems

in particular when various subsystems are tightly coupled as changes in one system or interface

may cause bugs to emerge in another.

Debugging is a developer activity and effective debugging is very important before testing

begins to increase the quality of the system. Debugging will not give confidence that the system

meets its requirements completely but testing gives confidence.

This project has been undergone all testing and has fix the errors that is reported while testing in

the developing phase itself.

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

Input and Output Screens

Sports News -

Business News -

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

Technology News -

Login Portal -

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

9.Implementation of the security for the software developed

Security, as part of the software development process, is an ongoing process involving people

and practices, and ensures application confidentiality, integrity, and availability. Secure software

is the result of security aware software development processes where security is built in and thus

software is developed with security in mind.

Security is most effective if planned and managed throughout every stage of software

development life cycle (SDLC), especially in critical applications or those that process sensitive

information.

This project Online News Portal has two users; User and Administrator. Both are secured with

MD5 secured passwords. The MD5 message-digest algorithm is a very widely used hash

function producing a 128-bit hash value. Each time the user logins to system, it is checked with

the corresponding table detail in the database and verify whether it is the correct user or not.

Downloaded by MANO Mano (akboysp90l@gmail.com)


lOMoARcPSD|53892018

10.Limitations

 This system is not hosted on any internet server.

 The registered user now has only options of searching and viewing the news, change

password and recover forgotten password.

 Game facility is not implemented for registered user.

 Newsletter is not implemented

11. Conclusion and Scope of Future Application

After processing through all phases of the system development life cycle, the news portal is

developed. In future it will be hosted on the internet server which will be accessed by all people

in the world and can view the site and learn as much as news and information about the world.

The Administrator or editor who will be assigned for editing or managing or controlling will be

given the secure login information and will change or modify the website as per the

requirements. New facility can also implemented in this system like online games for registered

users, quizzes etc .

Downloaded by MANO Mano (akboysp90l@gmail.com)

You might also like