Tell
Tell
Lets start with backend, so first I will tell you an overview about how spring boot
works. first of all spring boot is microservice based framework, it means in simple
words each component works independently of each other for example here in service
you can see doctor service, patient, email everything is written seperately.
From ui we get the code, it is called request layer, next we have service layer
where we write our whole logic, next data layer here we give database connection.
So controller is where we get all our requests from UI, like if we click any button
then that api requests will be served here. so the entire logic of controller is
written in service layer and that is where everything happens and third layer is
repository and that is where the whole data gets saved in database.
So coming to the file structure, pom.xml is where we write all the dependencies to
import, so majority of these are already predifined so we no need to write
everything.
Next HmsApplication is like the mail file that is like the starting point of the
entre application, there we have @Springboot annotation right so that tells us that
the whole application is springboot ani.
So we declare the database in entity, so everything present here are like tables,
so like for example in appointmententity, see we wrote here @entity and @table
right so springboot automatically detects that this is a table and it automatically
creates everything for us we just need to provide the schema.
Coming to dto, these are similar to entity, dto means data transfer object, it is
basically like frontend objects like front end lo we write data kada that is saved
in this format, like basically differenciation between frontend and backend, its
basically like transfering data drom frontend to server, basically it only contains
schema and there will be no declaration.
Frontend
First tell commands
First this is the file structure and src is the main file anatu, so first we have
package.json here we keep all the packages that we use like flex layout is used
responsive, forms for forms, angular material for ui like navbar and we have
commands as well.
next routing anatu in app-routing.module.ts this file is used for routing ante
moving between the pages anatu for ex in app.component.html lo toolbar undi kada it
will not chnage but kinda page will chnage so we need to mention that anatu which
shoulbe be displayed anatu so if nothing is given first the home page will be
displayed, next home/doctor-login ante doctor login page ki veltadi ala inka.
so basic ga angular lo enti ante we will have communication between html and ts
file anatu give example of home.component.ts lo form
Doubts
1) Appointment lo what is getappointment by id.