Real Time Calculator - Angular 2 JS Framwork, Java EE Backend, Rest Web API

preview_player
Показать описание
Hey, Guys.
This is a tutorial on how to build a real-time web calculator using Angular 2 JS
framework and Java EE.
so I have used Angular 2 as a frontend framework and Java EE(Maven build) as a
backend to create a rest web service.

Let's take a look.
This is a java ee backend rest web service running.
YOU CAN SEE THAT IT IS A QUERY STRING.
it is basically
running in the local host at port 8080.
It supports 5 operations.
+,-,/,*,% all in English language.
Why I chose English, not math operator because we can not pass '/' sign as
a address. It connects different path so if we supply our query with
'/' sign it means it creates a new branch in web api.
So i converted them into + = Add, - = Sub, * = Mul, /=Div, %=mod.
So if we want to pass
2+3-4, we should give our query string as 2ADD3SUB4.
It will be converted into 2+3-4 at backend and solved automatically.
yOU CAN SEE THE RESULT AS 1.
Now lets move to frontend.
This is a frontend which uses that service. Here we have to give the mathematical
string in that text box and it will be solved in real time as we pass the
strin
You can see that it is solving it in real time.
Now here we give the pure math string, what is happening is that
at frontend the string is converted into desired backend fomrat. i.e

2+3-4 is converted into 2ADD3SUB4 and passed to web api which is then reconverted
and solved.

Thanks guys for watching this.
Рекомендации по теме
Комментарии
Автор

is there a way i can have access to the source code

rahmanhafeezadewale
join shbcf.ru