Latest Posts

Friday, April 24, 2020

What is REST API ? | Web Service

imzi
If you have been in the Web Development you might have heard about REST API. It doesn't matter what technology you are working with it may be Java, Ruby, PHP or Python you must have heard this topic REST API.




What exactly this REST mean?  
Lets get started !!!

Let assume we are creating a Whether Reporting App (Android App). 

In order to create the app we need weather data. Hold on!!! where you will get this data? You can give static data, But it will never changed let say in Colombo 33 Celsius and Badulla 20 Celcius but weather keep changes according to the time. Other than that if you have a sensor to find weather you can find the climate that where are you at the moment, But if you need climate data around Colombo you need to fix sensors all over the area and If you need the climate data around the world you need to fix weather sensor all over the Globe πŸ™† (That will cost you Billions of Dollars πŸ’ΈπŸ’Έ)..    So we never do this. That means you need these data from somewhere.. OK from where???

Luckily we are so fortunate that we already have some web-services available in the internet. 

Let see What is web-services?




It simply means that there is a dynamic server which have all the data you need. You will request to the server and the server belongs to some company they have weather data.  And they are ready to give you that data what you have to do is just need to call them. So there is an API to do the work.
( API is something which will connect you and the server  )

How will you generate data from the server?

Let see with a java example πŸ”




You have to create a servelet that is how we generate data! and client will send you a request and the servelet will give the data. But a question can arise 
what servelet returns? It will be a html web page but here we don not need any web page just we need data. 

So the client will ask through the browser to the sever for the data and the server will give the data in two formats either XML format or JSON format. You might be thinking Why XML or JASON? because whenever returns some data, the data should have some structure 

The XML structure as following

<country>
  <city>
    <temp>32</temp>
    <humidity>40</humidity>
  </city>

</country>  

but most of the people do not like XML πŸ‘ŽπŸ‘Ž

So JSON is work worth, JSON structure as following.

{"country";{
              "city";{
               "temp":32
               "humidity":40
                       }
                 }
}

But the data return from the serverlet is overhead and bulky. To replace this we need a simple solution. That simple solution is REST API using any technology such as JAVA, Python or Ruby... 

If you want to return some data, Simply create object of that on the server side and just return the values of the object itself. Here we are sending the sate of the object not the object directly.   


We just create the object in the server side and return XML/JSON format data. That will be converting the object in to a state. That is call REpresentational State Transfer (REST). So finally you are sending the state of the object not the object that is REST.

That's all What is REST mean...

In REST API we are using HTTP Methods to achieve CRUD operation as following

  • Create - POST
  • Read - GET
  • Update - PUT
  • Delete - DELETE
That's how REST API Works... 
We will clearly talk about CRUD operation in REST in another article

I hope you like this article. Keep Sharing with other. 
Thank you 
  


What is Software Testing?

imzi


Software testing is a phase in Software Development Life Cycle (SDLC). 
Let see what do we do in testing...

We can simply say we ensure the product we are making is right and we are making a right product. That mean Verification and Validation. Verification means are we building the product right ( What ever we are doing, It should work above all it should work correctly without any bug). In other hand Validation is What we are building is should match with the client requirement. 

There are two types in software testing

  1. Manual Testing
  2. Automation Testing
Manual testing 


Manual Testing is a type of Software Testing where Testers manually execute test cases without using any automation tools. Manual Testing is the most primitive of all testing types and helps find bugs in the software system. Any new application must be manually tested before its testing can be automated. In manual testing we manually give inputs and check with the outputs.

Automation Testing

 Automation Testing means using an automation tool to execute your test case suite. We write scripts to automate the testing. For example in Java using JUnit we write JUnit test cases in other languages we right test cases as the automation testing tools. 

Another Classification of  software testing is consist of 

  1. Functional Testing 
  2. Non Functional Testing

Functional Testing


Functional Testing is defined as a type of testing which verifies that each function of the software application operates in conformance with the requirement specification.

This testing involves checking of User Interface, APIs, Database, security, client/ server applications and functionality of the Application Under Test. The testing can be done either manually or using automation.

Non Functional Testing

Non-functional testing is defined as a type of Software testing to check non-functional aspects (performance, usability, reliability, etc) of a software application. It is designed to test the readiness of a system as per nonfunctional parameters which are never addressed by functional testing.


How do the Software Testing?

Basically there are two techniques 
  1. Black Box Testing
  2. White Box Testing


Black Box Testing


It is a software testing method in which the internal structure/design/implementation of the item being tested is not known to the tester. These tests can be functional or non-functional, though usually functional.

For example If we buy a Mobile phone we only see the Battery life, performance of the phone, How the touch screen is working and so on, But we never see how the Micro chips in the phones are connected with the sensors of the phone. This is what we call as Black Box Testing. Just we give the input and  check the outputs we never go through the processing.

White Box Testing

It is a software testing method in which the internal structure/design/implementation of the item being tested is known to the tester.

In here we check the not only the input and the out also we check whole process of the system.

There are some levels of  Testing in Software testing 

  1. Unit Testing
  2. Integration Testing
  3. System Testing
  4. Acceptance Testing


Unit Testing

Unit Testing is defined as a type of software testing where individual units/ components of a software are tested. Unit Testing is usually performed by the developer.

Example Tools: Jtest, Junit, Nunit, JMockit, EMMA, PHPUnit and etc.

Integration Testing

Integration Testing is defined as a type of testing where software modules are integrated logically and tested as a group.

System Testing

System Testing is the testing of a complete and fully integrated software product. System Testing is actually a series of different tests whose sole purpose is to exercise the full computer-based system.

Acceptance Testing

Acceptance is defined as a type of testing performed by the Client to certify the system with respect to the requirements that was agreed upon. This testing happens in the final phase of testing before moving the software application to the Market or Production environment.

Thursday, April 23, 2020

How to Install Java on Windows 10

imzi



Hi everyone,

In this tutorial I'm going to teach you how to install JAVA JDK(13) in your windows 10 operating system (OS).
Installing Java JDK on windows is really easy, just follow the steps as follows:
Now see the Step by step installation process,

1. First of all you must check  whether your windows 10 OS have JAVA JDK or not
Open your Command Prompt (CMD) (Go to start menu and just type CMD) and type the following code in the CMD it self.
java -version
or
javac -version
the above both code should return something like
'java'  is not recognized as an internal or external command, operable program or batch file.
otherwise you may have Java in your system or it may be any other problem.

2. Open your favorite web browser and go to following web address
https://www.oracle.com/java/technologies/javase-jdk13-downloads.html  (This link for only JDK 13, If you need any other version please select particular version from the web site and download it)
(Search in google 'Download Java JDK', Google will guide you to download the latest version of JDK)
Select your preferred download method (Preferred is Windows x64 Installer)  accept Oracle Licence agreement and Download it.

3. Then go to download location and run the .exe file that you have downloaded and follow the following steps carefully
Select 'Yes'

Select 'Next'

This is the place we are going to select where the JDK has to be installed, If you do not have any valid reason to change it keep it as it is. and click 'Next'
Click 'close', That's all we have installed Java JDK successfully.

Above all the important thing is setting the Environment variable

4. Set Environment variable
First go to the bin folder where you have installed the Java JDK. (It should similar to following: C:\Program Files\Java\jdk13.0.2\bin )

Copy the folder URL 
Go to start menu -> Select Settings -> Search for 'Environment' ->  Select 'Edit the System environment variables'
And Next Click Environment variables in the System properties window, Then in the Environment variables Go to System variables -> select 'Path' -> Click 'Edit..' 
After that Past the URL (C:\Program Files\Java\jdk13.0.2\bin) that you have copied in the Edit environment variables menu and Click 'Ok' to save your settings

5. Next we need to set JAVA_HOME (In order to develop java based applications)
Again go to Environment variable menu and in the System variable section click the 'New' button
Then the following window will appear, in that window Type following command as Variable name
JAVA_HOME
and as Variable value type the previous folder URL without the bin folder (C:\Program Files\Java\jdk13.0.2)

That's all we have set the Environment variable

6. Finally we make sure that the all work has done successfully
Type the following command in the Command prompt (CMD) to check the Java version
java -version 
Other than that If you need to check the Java home path use the following command
echo %JAVA_HOME%

Hope it works fine..

Thank you :)

Our Team

  • Syed Faizan AliMaster / Computers
  • Syed Faizan AliMaster / Computers
  • Syed Faizan AliMaster / Computers
  • Syed Faizan AliMaster / Computers
  • Syed Faizan AliMaster / Computers
  • Syed Faizan AliMaster / Computers