-
Full Stack Developer (Spring Boot, Angular 2)
Job Description
Skill Sets Required:Javascript, PHP, HTML5, JQUERY, CSS, MYSQL, CSS3 WEBSITE DEVELOPMENT
Programming / Scripting Languages: Java 7, JavaScript, SQL, PL/SQL
J2EE Technologies: Spring Boot
UI Technologies: HTML5, CSS3, JavaScript, Bootstrap, Ajax, JSON
JavaScript Frameworks: Angular JS
Databases: MySQL 5.7, MS SQL
Versioning Tools: GitHub, SVN
Operating Systems: Windows,
Skills Required: JavaScript, Java, J2EE, HTML, MySQL -
-
Nest.png
Nowadays we use JavaScript not only for front-end applications but also for server-side applications with the help of node.js. There are lots of popular frameworks out there for node.js. Express is the most popular framework so far. but there are other frameworks like Meteor, Koa, Sails, Hapi, Loopback, etc. Nest.js is also a server-side node.js framework built by Kamil Mysliwiec and the community, In the past 2 years nest.js become the fastest-growing node.js technology, and currently, it has 35.9K GitHub stars.As I mentioned before Node.js (for the server-side) has plenty of great libraries, But none of them solves the main problem of architecture. Nest provides an out-of-the-box application architecture that allows developers and teams to create highly testable, scalable, loosely coupled, and easily maintainable applications. The architecture is heavily inspired by Angular.
What so special about this framework?
Nest JS is an open-source framework for building efficient, scalable Node.js server-side applications.
Built-in typescript support. (yet still enables developers to code in pure JavaScript).
Combines elements of Object-Oriented Programming, Functional Programming, and Reactive Programming.
Nest.js provides a similar kind of architecture to other server-side applications like .NET Core, Java Spring Boot, etc.
Under the hood, Nest makes use of robust HTTP Server frameworks like Express (the default) and optionally can be configured to use Fastify as well.
Let’s create a “Hello World” app with Nest JS.
First of all you need to install Node.js. Click here to download Node.js for your operating system.
Then You need Nest-CLI. This helps you to initialize and develop your applications. Open the command line and execute this command.
npm install -g @nestjs/cli Now you can generate a new project using this command. Replace “my-nest-project” with your project name. nest new my-nest-project Go to the project directory and execute the below command to start the application. npm run start:devThat's it, Now In your browser, open http://localhost:3000 to see a new application running. The app will automatically recompile and reload when you change any of the source files.
You can easily learn lots of things by referring to Nest JS documentation. The Nest JS documentation is well-maintained and contains a lot of information with real examples. https://docs.nestjs.com/
Read my original post on medium - https://dlbnprabath.medium.com/introduction-to-nest-js-a-progressive-node-js-framework-for-backend-acd76a018681
Happy Coding :)
-
-
-
Laravel walata payhere payment gateway checkout api eka integration karapu kenek innawada?
Mama mulinma checkout ekdi payhere checkout click karaham products data controller eken db eke payhere table ekata save karanawa, ita passe controller eken return redirect karanawa
//up more codes for db and etc $post = array( 'merchant_id' => '1213296', 'return_url' => 'http://kali/return', 'cancel_url' => 'http://kali/cancel', 'notify_url' => 'http://kali/notify', 'order_id' => 'ItemNo12345', 'items' => 'Door bell wireless', 'currency' => 'LKR', 'amount' => '1000', 'first_name' => 'Saman', 'last_name' => 'Perera', 'email' => '[email protected]', 'phone' => '0771234567', 'address' => 'No.1, Galle Road', 'city' => 'Colombo', 'country' => 'Sri Lanka' ); return redirect('https://sandbox.payhere.lk/pay/checkout')->with('post', $post);data db ekata gihilla sandbox url ekata redirect wenawa but sandbox ekedi man pass karana data mukut gahanne na merchant error enawa
payhere.jpeg
-
logo.jpg
image is taken from www.syncfusion.com
In the previous article, I explained the basics of .Net Core web API, How to create a project and run it using .Net CLI. You can read it here.
Today as I promised, we gonna take a look at the project files that we have given out of the box and what responsible for getting us the result we saw in the previous article.
Program.cs
program.png
“Program.cs” is the most important file. because it is the starting point of our application. It contains a method called Main. When we hit the “dotnet run” command in the CLI, it’s looking for the “Main ”method in the “Program.cs” class and executes it. In the “Main ”method, it’s calling another method called “CreateHostBuilder” which you can see below the Main method and this responsible for configuring the webserver which is “Kestral ” with some default configurations. The configurations are read from appSettings.json / appsettings.Development.json files and we also provide some additional configurations inside a class called “Startup”.
“Kestral” is an open-source cross-platform web server for Asp.Net Core.
appSettings.json / appsettings.Development.json
appSettings.png
We can give our application some configurations inside the “ appsettings.json” file or we can use “ appsettings.Development.json” for development mode.
Startup.cs
Startup.png
In the Startup class, we can see a constructer with configurations injected into that. So that we can read configurations we defined in appsettings.json.
There are another two methods called “ConfigureServices ”and “Configure”.
The “ConfigureServices ” method is our dependency injection container. We can create and add our own services to this. I’ll explain what is dependency injection and how to write our own services and add those into our application via dependency injection in another article.“Configure” is the place where we add middleware. I’ll also explain the use of middleware with another article.
Controllers
controller.png
There is a file called “WeatherForecastController.cs” in the controllers' folder. It is the default controller that comes with the .Net Core web API. What controllers does is, When we start our application it’s going to map all of our endpoints in our controllers so that our API knows where to send the request to.
launchsettings.json
launchsettings.png
There is another JSON file called “launchsettings.json”. When we start the application it also takes a look inside this file for any options. We have our application URL, environment variables, etc.
These are the main files you need to know. To understand these things I will guide you on how to create our own API endpoints and services in upcoming articles.
find me on medium - https://dlbnprabath.medium.com/
-
main.png
image from https://raygun.com/
This .Net Core Web API beginners guide is for the software engineering students, self-thought programmers, or anyone who wants to learn the basics of .Net Core Web API.
.Net Core is a free and opensource framework to develop applications for Windows, Mac, or Linux and It is the successor of the good old .Net Framework. Nowadays there are lots of programming languages and web frameworks to learn. So should I learn .Net Core? Is it worth it? Okay let’s see,
.Net Core is now cross-platform which means if you are using Windows, Linux, or Mac, you can simply develop and run the applications with.Net Core.
You can develop a wide variety of applications with .Net Core like REST APIs, web applications, mobile backends, IoT applications, etc.
Fully featured Development IDEs, tools such as visual studio can be used to develop desktop, cloud, and mobile applications. You can even use vs code :)
We can use C# for development. which is a great OOP language.
There are a lot more advanced features than this available with .Net Core. since this article is for beginners I’m not gonna go into that level. So enough intro right? Let’s do some coding.
First of all, you need to download and install the .Net Core SDK. Go to this link and download and install the latest .Net Core 3.1 SDK for your operating system.
Note that the next major release of .Net Core is gonna be .NET 5 and they are removing the Core name from the framework to avoid confusion with those using the .Net Framework which is currently on version 4 and .Net Core currently on version 5. Don’t think about this for now. I’ll explain this with a separate article. :)
.net web.png
We are using dotnet CLI to do all the things.
Now open the command line and type “dotnet — version”. If you successfully installed the .Net Core SDK it’ll show the installed version. If you're seeing this we’re good to go :)
dotnet -v.png
The code editor I’m using is vs code because it’s a cross-platform and an excellent editor. With some extensions installed, We can do lots of things with it. Download from here https://code.visualstudio.com/
For a better C# development experience install the C#, C# Extensions for vs code, and for our icons look better if you install material icon theme :)
mt icon ext.png c# ext2.png C# ext.png
Download the Postman client from this link to test the APIs.
Open your command line and create a new directory. mkdir hellowebapihellowebapi.png
Now go to the directory using the cd command like below.
cd hellowebapi Now let’s create the solution file and template for web API using dotnet CLI. dotnet new slnnew sln.png
If we don’t give any options sln will take the name of the folder which will be ok for our purpose.
dotnet new webapi -o APInewwebapi.png
Now we need to add the API project to our solution. let’s go ahead and do that.
dotnet sln add API/slnadd.png
Let’s open the project using vs code.openinvscode.png
It’ll take a few seconds to download dependencies. If you are using vs code a pop-up msg will appear to install the required assets. click yes.
buildrases.png
After that, we can run the project using dotnet CLI. Open the terminal in vs code using Ctrl + ~ on Windows and Cmd + `on a mac.
Cd into the API project and run the project using the below commands.
cd API dotnet rundotnetrun.png
Now you can see a project is running on https://localhost:5001
Now let’s check the default weather forecast endpoint with the postman.
First, we need to disable SSL in the postman. postmanssl.png
Then we can check the default endpoint
https://localhost:5001/WeatherForecastpostmanendpoint.png
Hola... Now we get the response is back from the server.
Wait a minute. I know what you’re thinking. If you’re an absolute beginner you may not have any idea what’s going on. This article is just to get started with the .net core web API. In part 02 I’ll explain what’s all this and what’s happening behind the scenes in detail. Until then feel free to play with this :)
Find my original article on medium: - https://medium.com/@dlbnprabath
-
Rapid Development Using Azure Spring Cloud
Webinar session hosted by Microsoft in partnership with PALO IT | 🔴 Live Recording -
මම API එකකින් response එක ගන්නවා. එකේන්, මේ පහල විධියට arrays 2ක් එක්ක response එක එනව.
routesOutput: [{origin_iata: "CMB", destination_iata: "IST",…}, {origin_iata: "CMB", destination_iata: "SAW",…}] 0: {origin_iata: "CMB", destination_iata: "IST",…} 1: {origin_iata: "CMB", destination_iata: "SAW",…} schedulesOutput: [{departure_iata: "CMB", arrival_iata: "MLE",…}, {departure_iata: "MLE", arrival_iata: "IST",…},…] 0: {departure_iata: "CMB", arrival_iata: "MLE",…} 1: {departure_iata: "MLE", arrival_iata: "IST",…}මේකේ, routesOutput කියන array එක ඇතුලේ weekly කියල තව array එකක් තියෙනව. ඒක ඇතුලේ flight_ids කියල එකක් තියෙනව. මේ පහල විධියට.
routesOutput[0].schedules.weekly[0].flights.flight_ids routesOutput: [{origin_iata: "CMB", destination_iata: "IST",…}, {origin_iata: "CMB", destination_iata: "SAW",…}] schedules: {updated: {}, weekly: [{routing_id: "159058258847310869390999", frquency: [1, 1, 0, 1, 1, 0, 1],…},…]} weekly: [{routing_id: "159058258847310869390999", frquency: [1, 1, 0, 1, 1, 0, 1],…},…] 0: {routing_id: "159058258847310869390999", frquency: [1, 1, 0, 1, 1, 0, 1],…} technical_stops: "MLE" flights: {flight_ids: ["159058258847310869501898", "159058258847310869627899"]} flight_ids: ["159058258847310869501898", "159058258847310869627899"] 0: "159058258847310869501898" 1: "159058258847310869627899"ඒ වගේම, schedulesOutput කියන array එක ඇතුලේත් flight_ids කියල තියේනව. මේ පහල විධියටම.
schedulesOutput[0].flights.flight_ids schedulesOutput: [{departure_iata: "CMB", arrival_iata: "MLE",…}, {departure_iata: "MLE", arrival_iata: "IST",…},…] 0: {departure_iata: "CMB", arrival_iata: "MLE",…} flights: [{flight_ids: "159058258847310869501898", operating_iata: "TK",…},…] 0: {flight_ids "159058258847310869501898", operating_iata: "TK",…} flight_ids: "159058258847310869501898":මම for loops පාවිච්චි කරල , ඒවා loop කරල, arrays 2ම එක සමාන flight_ids තියේන ඒවා අරගෙන, ඒවා එක array එකකට push කරා. නමුත්, routesOutput[0].schedules.weekly[0].flights.flight_ids[0] හා [1] එකම element එකකට push කරන්න තමයි මට ඕන.
මෙහම තමයි මට ලැබුනේ.
[ { "ori_sub_origin": "CMB", "ori_sub_desti": "MLE" }, { "desti_sub_origin": "MLE", "desti_sub_desti": "IST" }, ]මේ විධියටයි මට ඕන වෙන්නේ.
[ { "ori_sub_origin": "CMB", "ori_sub_desti": "MLE", "desti_sub_origin": "MLE", "desti_sub_desti": "IST" } ]මෙන්න මගේ කෝඩ් එක.
for(i = 0; i < routes_with_weekly.length; i++) { let test_one = routes_with_weekly[i].flights.flight_ids[0]; let test_one_desti = routes_with_weekly[i].flights.flight_ids[1]; for(j = 0; j < schedulesOutput_let.length; j++) { if(schedulesOutput_let[j].flights[j] != undefined) { let test_two = schedulesOutput_let[j].flights; for(v = 0; v < test_two.length; v++) { let test_three = test_two[v].flight_ids; if(test_one == test_three) { let ori_all_data = { "ori_sub_origin" : schedulesOutput_let[j].departure_iata, "ori_sub_desti" : schedulesOutput_let[j].arrival_iata }; all_data_arr.push(ori_all_data); // break; } } } } } //desti for(r = 0; r < routes_with_weekly.length; r++) { let test_one = routes_with_weekly[r].flights.flight_ids[1]; for(t = 0; t < schedulesOutput_let.length; t++) { if(schedulesOutput_let[t].flights[t] != undefined) { let test_two = schedulesOutput_let[t].flights; for(b = 0; b < test_two.length; b++) { let test_three = test_two[b].flight_ids; if(test_one == test_three) { let desti_all_data = { "desti_sub_origin" : schedulesOutput_let[t].departure_iata, "desti_sub_desti" : schedulesOutput_let[t].arrival_iata }; all_data_arr.push(desti_all_data); // break; } } } } } console.log(JSON.stringify(all_data_arr , null, 2)) -
-
මගේ repository එකක් තියෙනවා Bitbucket වල. cPanel තියෙන VPS එකක් එක්ක connect කරන්නේ කොහොමද automatically deploy වෙන්න.
දැනට repository එක SSH වලින් clone කරලා තියෙන්නේ cPanel එකේ. Local changes Bitbucket එකට push කරලා. cPanel SSH වලින් pull කරනවා.
Bitbucket වලට push කරහම cPanel එකට auto deploy වෙන්න ක්රමයක්?
-
-
10 Web Development YouTube Channels You Probably Didn't Know About
2582acfc-6a8c-4f4b-a7c0-6ce0f3b585bd-image.png
If you are a web developer who is constantly searching for tutorials on YouTube, you’ve definitely come across Traversy Media, Dev Ed, The Net Ninja and some other cool instructors creating awesome content for web developers. However, there are a few more you probably didn’t know about.
Of course, most of these channels may not presently be as popular as the ones mentioned above, but the content they create is truly informative. So, let’s have a look at some of these:
This channel by John Smilga features a whole bunch of high quality tutorials on various topics such as Bootstrap, CSS, React, ES6, etc. Instead of simply talking about the syntax, John actually walks you through the entire process of building projects using various web technologies.
Created by Dom, a web developer from Australia, the channel has 100s of awesome tutorials on technologies like JavaScript, Rust, PHP, CSS and many more. Make sure to check out the JavaScript playlist that has over 180 videos for beginners, intermediate and experts.
The channel has some great content related to HTML, CSS, JavaScript, SASS, React.js and Node.js to name a few. Jesse, the owner of the channel has the right teaching skills to make complicated concepts look simple. He also has a few 'Learn X in Y minutes' styled videos that are worth checking out.
Want to learn how to build a complete responsive website using Bootstrap? Drew Ryan has some amazing tutorials in store for you. You can also check out his premium courses on Udemy.
This is without a doubt, one of my go-to channels to learn React. Not just React, the channel has a lot of great content related to CSS, Vue.js, mongoDB, Node.js, etc. At the time of writing this post, the channel has over 180 thousand subscribers and definitely deserves a lot more than that.
If a CSS Ninja is what you aspire to be, ‘Online Tutorials’ is a channel you should be subscribing to right away. An interesting thing about the channel is that the tutorials contain no audio explanation. However, the instructor walks you through the entire project from scratch, ensuring that the pace is right, so that you are able to code along.
One of the best ways to move from being a JavaScript beginner to an intermediate is to build apps. If you are looking for code-along video tutorials on how to build fancy JavaScript apps, check out Code Explained. Apart from helping you build a To-do list, a budget app or a calculator, the instructor also show you how to create complex games such as the Flappy Bird, Ping Pong and Tetris.
If building JavaScript games is what excites you the most, this channel is sure to further add up to your excitement. Minesweeper, Tetris, Candy Crush, Pac Man and of course, the classic snake game, this channel can help you build all of these. Apart from games, the channel also has short videos on various concepts related to Vanilla JavaScript and React.js.
Apart from web development, the channel also has a good number of videos on how to design user interfaces in Adobe XD. Moreover, you can also find some beginner-friendly Photoshop tutorials on the channel.
Finally let's talk a bit about WordPress. If you've just got a client who urgently needs a website, WordPress comes at your rescue. However, if you haven't worked with WordPress before, a few tutorials can definitely help get started. On this channel, Tyler Moore shows you how to build beautiful looking WordPress websites step by step with no step skipped.
-
-
docker,
docker කියන්නේ , ඔයාගේ entire software එක package කරලා easily deploy කරන්න පුළුවන් solution එකක්.අපි locally development කරද්දී හොදට වැඩ කරන app එක, server එකට දැම්මට පස්සේ ඒක වැඩ කරන්නේ නැතිව යනවා. එතොකොට එක fix කරන්න අපිට ටිකක් වෙලා යනවා. එකට ගොඩක් හේතුව වෙන්නේ, අපෙ local environment එකයි server environment එකයි වෙනස් නිසා.
හැබැයි අපිට පුළුවන් docker use කරලා මේ problem එක solve කරන්න. එකට හේතුව locally docker ඇතුලේ app එක වැඩ කරනවනම්, docker run වෙන ඕන server එකක අපේ app එක වැඩ.
how docker works,
docker කියන්නේ containerization platform එකක්.
containerization එක්ක ලගින්ම යන අනිත් එක තමා virtualization කියන්නේ. අපි බලමු මොකක්ද මේ දෙකේ වෙනස කියල.alt text
virtualization (2nd image ) කියන්නේ සරලව, host os එක උඩ hypervisor software එකක් run කරලා, එක uda virutal machines හදාගන්න එක.
එතොකොට ඒ හැම virtual machine ekak ඇතුලේම entire os එකක් run වෙනවා.
ex - virtual box කියන්නේ open source hyperviosr එකක්. අපිට windows os එකක් උඩ linux install කරන්න පුලූවන් dual boot කරන්නේ නැතුව.එතකොට docker engine එක වැඩ කරන්නේ ?,
අපේ host os එක උඩ docker engine එක run කරනවා, ඊට පස්සේ docker වලට පුළුවන් isolated process හදන්න්න. මේ අපි හදන එක process එකකට කියනවා container එකක් කියල. ඇත්තටම container එකක තියෙන්නේ මොකක් හරි එක process එකක්. ex: apache server, mysql server..
එක lightweight, අනිත් process එක්ක isolated, ඒ වගේම host OS එකේ kernel එක තමා මෙ හැම container එකක්ම share කරගන්නේ.ඒ වගේම virtual machine එකකට වඩා fast. එකට හේතුව virtual machine එකක් restart කරනවා කියන්නේ entire OS එකම restart වෙනවා කියන එක. හැබැයි container එකක් restart වෙනව කියන්නේ, දැනටමත් run වෙන host OS එකේ process එකක් restart වෙනවා කියන එක විතරයි.
basic terms of docker
container - isolated process එකක් (මොකක් හරි එක task එකක් , etc mysql server, nginx server )
image - container එකක් run කරන්න ඕන application library, system tools, configuration files වල එකතුවක්. ඒවගේම අපිට මේ එක image එකකින් multiple containers හදාගන්න පුළුවන්.
dockerfile - docker image එකක් create කරන්න ඕන instructions තමා අපි මේකේ ලියන්නේ. ex - environment variables, port mapping, මොන toolsද install වෙන්න ඕන කියල මේ file එකේ ලියන්න පුළුවන්.
docker registry - docker image එක store කරන්න පුළුවන් place එකක්.
docker hub - මේක docker ලගේ official images store කරන්න තියන registry එකක්. free වගේම paid version එකක් තියනව. aws ecr - aws lage paid solution එකක් docker images store කරන්න තියෙන
ex: අපි git එක්ක github වගේ remote reporsitory එකක් තියාගන්නවා වගේ වැඩක්.
.හරි දැන් අපි docker වලින් container එකක් හදල බලමු,
මුලින් ඔය docker install කරගන්න ඔයාගේ os එක අනුව.
https://docs.docker.com/get-docker/check docker installed, then it will show the help menu
dockerpull mysql docker image from docker hub
docker pull mysql:5.7view downloaded docker images
docker images REPOSITORY TAG IMAGE ID CREATED SIZE mysql 5.7 a4fdfd462add 5 days ago 448MBcreate a docker container from docker image
docker run --name my_db -p 9000:3306 -e MYSQL_ROOT_PASSWORD=123 -d mysql:5.7--name used for container name (අපිට කැමති නමක් දෙන්න පුළුවන් )
-i ඔයාට container එකේ input outputs shell එකෙන් බලාගන්න පුළුවන්. ඔය ඒ shell එක close කරෝතින් container එක stop වෙනවා -d container එක run වෙන්නේ background process එකක් විදිහට.
-e used for environment variables
-i or -d used for running mode,
container එකක් run වෙන විදී දෙකක් තියනව.-p used for port mapping,
අපි මුලින් කිවා container එකක් කියන්නේ process එකක් කියල, එකියන්නේ සරලව container එක මොකක්හරි port එකක run වෙනව කියන එකයි . mysql ගත්තොත් එයා default port number 3306 එකේ run වෙනවා.එකියන්නේ container eka athule අපේ mysql server එක port 3306 run wenawa. හැබැයි අපිට තාම අපේ host OS එකේ idan container එකට connect wenna බැහැ. මොකද host os එක මේ process eka ගැන දන්නේ නැති නිසා.
එනිසා අපිට සිද්ද වෙනවා container port එක ape host OS එකේ port එකකට map කරන්න. මං මේකේ 3306 කියන container eke run වෙන port එක 9000 kiyana host OS එකේ port එකකට map karala තියෙන්නේ.
check running containers
docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 3788c9366954 mysql:5.7 "docker-entrypoint.s…" 2 minutes ago Up About a minute 33060/tcp, 0.0.0.0:9000->3306/tcp my_dbnow you can connect to the running container
mysql -h 127.0.0.1 -P 9000 -uroot -p123 mysql: [Warning] Using a password on the command line interface can be insecure. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 12 Server version: 5.7.30 MySQL Community Server (GPL) Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>to stop running container,
docker ps # list running containers CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES d3d87881b0ce mysql:5.7 "docker-entrypoint.s…" About an hour ago Up About an hour 33060/tcp, 0.0.0.0:9000->3306/tcp my_db docker stop d3d87881b0ce # cotaniner idget all containers (running or stopped)
docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 3788c9366954 mysql:5.7 "docker-entrypoint.s…" 5 minutes ago Up 11 seconds 33060/tcp, 0.0.0.0:9000->3306/tcp my_db c9142a5d1251 char:latest "/bin/bash ./run.sh" 8 days ago Exited (1) 8 days ago pensive_shtern 8266e6f237e2 5c8c4e171da6 "/bin/bash ./run.sh" 8 days ago Exited (1) 8 days agoමේක docker වල basic overview එකක් විතරයි. තව ගොඩක් concepts තියනවා ඉගෙන ගන්න. මං ඒවත් ඉස්සරහට දාන්නම්.
-
-
This topic is deleted!
• adi.justdev -
This topic is deleted!
• BuddhikaNelum