teleren/devto huggingface dataset:
Monoliths vs Microservices
Tags: architecture, monoliths, microservices, docker
Published: 2021-04-25 20:44:59

#MONOLITHS
Monolithic application architecture consists of one system, where business logic, codebase and all other parts are interconnected and dependent on each other. 
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ee5wnvuhe7btzg1y84x7.png)


#MICROSERVICES
Microservices application architecture  consists of individual services that function independently. Each service is responsible for a specific business goal, have their own logic and database, while working together as a distributed system with API-driven inter-process communication. 
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gklqtkni03aojdvth780.png)

   
##Advantages of Monolithic Architecture

####Easy to develop and monitor
Initial development of monolithic architecture is fast because it is built with the mindset that all parts should be interconnected and dependent on each other.

####High performance
Unlike microservice applications, monoliths don't require API for communication between components, enabling higher performance.  


##Advantages of Microservices Architecture

####Increased Scalability 
Since microservices are independent of one another, new components can easily be added with out downtime. 

####Autonomy 
Microservices enable independent, cross-functional teams dedicated for each business goal, since the deployment/actions of one team won't affect other services. This increases the rate at which new updates and features can be deployed. 


##Disadvantages of Monolithic Architecture

####Low Flexibility 
Due to the high interdependence between services and elements, any change is likely to affect the entire network. Making updates, upkeep and additions time-consuming and the need to be carefully coordinated.  

####Difficulty in Scaling
Monolithic architecture prevents scaling individual components, instead you have to scale the entire app.


##Disadvantages of Microservices Architecture

####High resource requirement
The initial deployment and development of a microservices architecture requires a high number of resources and can take time. Since there needs to be seamless integration of the varying individual components. 

####Difficulty in testing 
Due to the complexity of this architecture, testing can prove to be difficult, especially in terms of the interactions between services. 


#Docker Deployment Videos

##Part 1 
[![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qc5kikd69css62mojb7f.png )](https://youtu.be/eZB-pdYRGCU)

##Part 2
[![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uu9wnln90ek1x1nt68ap.png)](https://youtu.be/3JKBe-5wHlU)
I wrote an online iframe editor in React
Tags: typescript, react, javascript, webdev
Published: 2021-04-25 20:12:41

---
title: I wrote an online iframe editor in React
published: true
description: online iframe editor
tags: typescript, react, javascript, webdev
//cover_image: https://direct_url_to_image.jpg
---

Earlier this month, when I was writing my first blog post on this platform, I wanted to edit one of the iframes I was trying to embed in my blog. I was very surprised to see I couldn't find any dedicated online tool to test or edit the iframe. I ended up being annoyed by this idea.

So, I wrote an online iframe editor. Check it out [iframe-editor](https://www.iframeeditor.com/)

Check it out on github [online-iframe-editor](https://github.com/Rakhisharma/online-iframe-editor)

It provides the following functionalities:
- Test your iframe
- Edit your iframe
- Build your own iframe


![online-iframe-editor-gif](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6f725br59i16nkbuu8sk.gif)


If you would like to contribute or have any suggestion checkout the guidelines [here](https://github.com/Rakhisharma/online-iframe-editor)
Shell Tips
Tags: shell, bash
Published: 2021-04-25 20:03:58



### Extract File name in bash:-

You can use `basename` to Strip directory and suffix from filenames

```
for i in /tmp/files/*/*; do
 key=$(basename $i)
```

### Add Date in File or folder Name:-
In case you have requirement of adding date in your file or folder name

```
now=$(date +"%m-%d-%Y")
printf "%s\n" $now
```

### User Input:-
`read` command can be used to take input from user.

```
read -p "Please input $inp? [yn]" answer
if [[ $answer = y ]] ; then
  # run the command
  echo "Yes"
fi

```
### Use set -x to watch execution 
By default, after the script is executed, it only displays the results. You can use `set -x` to output the executed command line before its execution result.

```
root@bd92bbce2f7d:/# cat dummy.sh
#!/usr/bin/env bash
set -x
echo Step 1
echo Step 2


root@bd92bbce2f7d:/# sh dummy.sh
+ echo Step 1
Step 1
+ echo Step 2
Step 2
```

I will keep updating this post, if I find something useful. Thanks
How to run multiple commands in Docker Container
Tags: devops, docker, container
Published: 2021-04-25 20:02:27

There can be scenarios in which you may have to run/execute commands using a container to get something done.  

`docker run <your container> /bin/bash -c "command1; command2"`


```
arun@mymachine:~ sudo docker run singharunk/dev /bin/bash -c "date; whoami"
Sun Apr 25 19:58:50 UTC 2021
root
```

-------------------------------------------------------------
Creating an Accordion | HTML, CSS, JavaScript | Tutorial
Tags: javascript, tutorial, programming
Published: 2021-04-25 19:52:37

In this tutorial I show you, step by step, how can build a fully functioning accordion using HTML, CSS, and JavaScript.

It's the perfect tutorial for any beginner since I'll show my thought process and we'll end up with a functioning accordion that opens one tab at a time!

Check out the video here
{% youtube 4w2bcqb25VQ%}
Day 1: Cloud Resume Challenge.  It's on!
Published: 2021-04-25 19:39:19

There are defining moments in life when an event changes your life and you are left wondering "How did I function without this?"

That is how I feel about AWS.

There are too many whys: its easier, its cheaper, it makes sense...

I don't ever want to go back to the non-cloud way.   

While doing the challenge, I am also studying in for the AWS Architect Associate.   Hoping that I can sit for it in July.

Day 1 Down.  
Created my HTML and CSS documents.
Flexbox Equal height columns and leftover elements!
Tags: html, css, beginners, ux
Published: 2021-04-25 18:57:57

Flexbox Equal height columns and leftover elements!

Demo == > https://codepen.io/Bilal1909/pen/bGgzerV?editors=1000

<img src="https://i.postimg.cc/q7dCZtyc/flex.png">
What is MVC?
Tags: csharp, webdev, html
Published: 2021-04-25 18:28:05

You've heard it all around the internet talking about programs,  MVC is a common topic.  Understanding this topic is key to progressing into more advanced web development and moving away from simple single page apps.  

# What is MVC?
MVC stands for **Model View Controller** and describes the 3 components of your server-side web app.  It is different from a single page app not only because it runs on the server instead of the user's machine, but the code is generally a bit more organized as well.  

# Model
The model holds that data used by the application.  Its usually defined by a class in object oriented languages like C# or Java, but it can be a database like MongoDB or SQLite.  Only one model is supplied per page, but it may have other models nested within, depending on what the page needs.

# View
The view is rendered on the server and returned to the user.  This is generally an HTML template filled with data (data which comes from the model) by the controller.  

# Controller
The controller handles receiving requests from the user, performing logical operations, combining those with the model of the data, and returning the proper view to the user. 

# What are the advantages?
The biggest advantage of MVC framework is the ability to separate logic between display logic and business/application logic.  This results in cleaner, more organized code that is not only easier to manage and navigate, but also easier to debug and improve.  Another advantage is security.  Separating your scripts from the visual part of the data can prevent malicious entities from interfering with your code.  

How do you think about MVC frameworks?  What do you use to organize your code?
Tips For Building Long-standing Websites
Tags: websites, webdev, cms, wordpress
Published: 2021-04-25 18:20:29

As tech has evolved, nowadays it's common to not build websites from scratch with usual web stacks like HTML, CSS, and JS. The most popular website builder is WordPress, one of its benefits is that it offers a way to add a custom code in order to get any preferable website look. With that being said, let's see the best way of adding maintainable and unbreakable custom code to your WordPress and why it is very important to the developer who builds the website and to the customer.

The best practice is to avoid adding custom code in the frontend part of the website using widgets. This prevents long debugging hours in case the customer accidentally makes any change in the code in the widget that could break working functionalities.
Therefore it is highly advisable to make custom changes on the backend where programming skills and tools are required. This approach will reduce all those tiny mistakes that could mess up the website. 

Moreover, the other technical advantage of using the backend side is the flexibility to add scalable code that works on all wordpress themes regardless of their different behaviors and customization options. On a side note, regarding adding the custom design to your WordPress, I would suggest using CSS frameworks like bootstrap mainly due to some benefits like responsive styles, fewer cross-browser bugs, and customizable.  

In conclusion, in order to build a long-standing website, it better to apply all possible options that lower the chances of breaking working functionalities by using the backend side of the website. Certainly, the customer will without risk add content to his website, less maintenance cost will be guaranteed, and a good reputation for the developer will be assured.
Day 65
Tags: 100daysofcode, programming, react
Published: 2021-04-25 17:43:00

Day 65/100 of #100DaysOfCode

I'm learning React JS from Learn with Sumit. And today's topics, State, Lifecycle in Class Component, Handling Events, detect & control unnecessary re-renders. And problem-solving on codewars using JavaScript.

Hours coded: 2.6 + 1
Lines of code: 213
Keystrokes: 1991

Happy Coding! :)

via @software_hq
Another Awesome Week
Tags: awesomitylab, codeofafrica
Published: 2021-04-25 17:42:45

Hello again from the taskforce.

So today marks the end of the week before the last in the TaskForce program. This week has been as always very educational as I'm always learning something new.

We kicked it off with the feedback session which was helpful to me mainly in regards to my blog writing skills. It helped me think about more attention to the details and the reader's perspective so that was a win right there. I'm applying it to this blog right now.

One other major highlight of the week was the client presentation, which was as I talked about in the last post, about being able to change the logo for a specific page only in wordpress. My teammate and I managed to come up with a solution even though it wasn't "the" solution. And we got some helpful feedback and pointers from the client's IT Lead on ways we can improve it even better and that was cool.

Also, currently we just started working on our graduation project and as always it brings new concepts and challenges which we are ready to tackle head on. It's a cool social media type app with tons of cool features which I for one am excited to see when we get them working and one more thing is that this may very well be my first app on the app store so that's cool too.

Finally we closed the week off with the old fashioned Friday presentation. I say this because if you read my previous posts, we do this almost every Friday. It's a fun way to make our minds focus on something else that isn't development related for a while. This week we did what I would call CHARADES WITH ALIENS. Basically what 3 symbols we'd use to describe Awesomity Lab and Code of Africa if we had to describe them to aliens who didn't read or speak our language.

So, long story short, that was this last week. It was packed with new and interesting things, most of which I couldn't mention for the sake of the length of this post but it was another awesome week.
Discussing the Cloud with Chris Architecture and GitHub setup
Tags: devops, architecture, github, azure
Published: 2021-04-25 17:39:56

![Cover Image of Karl Cooke and Chris Reddington](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0h9r41wefu09vopl0twe.jpg)

In this session, Chris is joined by Karl Cooke - Implementation Specialist at Action Point Technology Group, Blogger at [https://irishtechie.com](https://irishtechie.com). Chris and Karl talk all about the CloudWithChris.com architecture and the decisions surrounding the GitHub setup that drive the deployment and management of CloudWithChris.com.

{% youtube okaSk5QxeJk %}
How to use Intercepting Job Execution in Spring Batch
Tags: springbatch, springboot, intercepting, job
Published: 2021-04-25 17:39:28

https://grokonez.com/spring-framework/spring-batch/use-intercepting-job-execution-spring-batch

How to use Intercepting Job Execution in Spring Batch

For <strong>Intercepting Job Execution</strong> feature, Spring Batch provides an interface called <strong>JobExecutionListener</strong> to notify events in a Job lifecycle. So in the tutorial, <strong>JavaSampleApproach</strong> will guide how to configure <strong>Intercepting Job Execution</strong> with <strong>JobExecutionListener</strong>.

Related Posts: 
1. <a href="https://grokonez.com/spring-framework/spring-boot/start-spring-batch-using-spring-boot" target="_blank">How to start with Spring Batch using Spring Boot – Java Config</a>
2. <a href="https://grokonez.com/spring-framework/spring-batch/spring-batch-xml-config-spring-boot" target="_blank">Spring Batch XML Config by Spring Boot</a>
3. <a href="https://grokonez.com/spring-framework/spring-boot/use-spring-batch-inheritance-function">How to use Spring Batch Inheritance function</a>

<!--more-->
<div id="tuttoc" class="jsa-toc"></div>

<div id="tutcontents">
<h2>I. Technologies</h2>
– Java 1.8
– Maven 3.3.9
– Spring Tool Suite – Version 3.8.1.RELEASE
– Spring Boot: 1.5.1.RELEASE
- MySQL Database 1.4
<h2>II. Intercepting Job Execution</h2>
For Intercepting Job Execution, Spring Batch provides an interface <strong>JobExecutionListener</strong>:
<pre><code class="language-java">public interface JobExecutionListener {

    void beforeJob(JobExecution jobExecution);
    void afterJob(JobExecution jobExecution);

}</code></pre>

Function <code>void beforeJob(JobExecution jobExecution)</code>:  is invoked before a job executes.
Function <code>void afterJob(JobExecution jobExecution)</code>: is invoked after completion of a job.

https://grokonez.com/spring-framework/spring-batch/use-intercepting-job-execution-spring-batch

How to use Intercepting Job Execution in Spring Batch
CoinSwitch Kuber App Review in Hindi 2021
Tags: coinswitch, cryptocurrency, review
Published: 2021-04-25 17:23:11

हेलो दोस्तों, आज हम इस आर्टिकल में हम बात करने वाले हैं coinswitch kuber App के बारे में, आपकी जानकारी के लिए बता दे की coin switch 2017 में स्थापित किया गया था, लेकिन इसे भारत में June 2020 क्रिप्टोकरेंसी एक्सचेंज मोबाइल एप्लिकेशन के तोर पर लॉन्च किया गया था और इस एप्लीकेशन को १ मिलियन से भी जयादा बार डाउनलोड किया गया है

###Cryptocurrency क्या है?###
Cryptocurrency एक digital money है क्यूंकि ये केवल Online ही उपलब्ध है इसका कोई फिजिकल प्रारूप नहीं है दुसरे currencies जैसे की भारत में Rupees, USA में Dollar, Europe में Euro इत्यादि इनका फिजिकल प्रारूप होता है इन currencies को सरकार पूरे देश में लागू करती हैं और इस्तमाल में लायी जाती हैं ठीक उसी प्रकार इन currencies को भी पुरे दुनिया में इस्तमाल में लाया जाता है. लेकिन इन Cryptocurrencies के ऊपर Government का कोई भी हाथ नहीं होता है क्यूंकि ये Decentrallized Currency होती हैं

Digital money ( Cryptocurrency ) ब्लॉकचेन तकनीक पर आधारित हैं क्रिप्टोकोर्रेंसी एक्सचेंज करने के लिए किसी प्लेटफार्म की आवश्यकता पड़ती है | Coinswitch Kuber App उन्ही प्लेटफार्म में से एक है

Read Also:- <a href="https://smartphonescompare.in/article/bhaarat-mein-jald-launch-hone-vaala-hai-oppo-a74-5g/">भारत में जल्द Oppo A74 5G लॉन्च होने वाला है</a>

###Coinswitch Kuber App क्या है?###
यह एक cryptocurrency exchange app हैं इसकी मदद से हम आसानी से किसी भी cryptocurrency को खरीद या बेच सकते हैं। इसकी सबसे अच्छी बात यह है कि इसमें हम मिनमम १०० रूपये से ट्रेडिंग शुरू कर सकते है

###Coinswitch Kuber App कैसे Download करें?###
इस App को बड़ी आसानी से डाउनलोड किया जा सकता है क्युकी Coinswitch App playstore पर उपलब्ध है जिसके कारण हमें अन्य किसी भी वेबसाइट पर नहीं जाना पड़ता है | हमने Coinswitch Kuber App की official वेबसाइट का लिंक दिया है वहाँ आप Android या IOS दोनों प्लेटफॉर्म के लिए डाउनलोड कर सकते हो

***अगर आपको यह जानकारी पसंद आयी है। तो लेख  पूरा पढ़ने के लिए निचे दिए गये लिंक पर क्लिक करे***
###<a href="https://smartphonescompare.in/article/coinswitch-kuber-app-review-in-hindi-2021/">CoinSwitch Kuber</a>###
Gson to convert Java Object to/from Json
Tags: gson, java, json
Published: 2021-04-25 17:19:50

https://grokonez.com/json/gson-converting-java-object-tofrom-json

Gson to convert Java Object to/from Json

The tutorial guides you how to convert Java Object to Json and vice-versa by Gson.

Related Articles:
- <a href="https://grokonez.com/java/java-advanced/jackson-converting-java-object-tofrom-json-string" target="_blank">Jackson to convert Java Object to/from Json String</a>
- <a href="https://grokonez.com/spring-framework/spring-boot/convert-java-object-intofrom-xml-spring-boot" target="_blank">How to convert Java Object into/from XML – with Castor & Spring Boot</a>

<!--more-->
<div id="tuttoc" class="jsa-toc"></div>

<div id="tutcontents">
<h2>A. Concepts</h2>
2 important concepts need introduce: <strong>json</strong> & <strong>gson</strong>

<h3>I. Json</h3>
- JSON: JavaScript Object Notation.
- A lightweight data-interchange format.
- It is easy for machines to parse and generate.
- JSON is a text format that is completely language independent
Example:
<pre><code class="language-html">
{"id":1,"firstname":"John","lastname":"Kennedy"}
</code></pre>

<h3>II. Gson library</h3>
Gson is a Java library for converting Java Objects into their JSON. Provide 2 methods:<strong> toJson()</strong> and <strong>fromJson()</strong> methods to convert Java objects to JSON and vice-versa.

https://grokonez.com/json/gson-converting-java-object-tofrom-json

Gson to convert Java Object to/from Json
Easy way to make text gradient color css
Tags: html, css, background
Published: 2021-04-25 17:11:45

---
title: Easy way to make text gradient color css
published: true
description: 
tags: html,css, background
//cover_image: https://direct_url_to_image.jpg
---
I was browsing a website and got the point to make a text gradient color, it's just a simple post.

for HTML text


```
<h1> Hello World </h1>

```

and CSS

```
h1{
  background: linear-gradient(red 30%, green, blue) center/cover no-repeat;
  color: white;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

```


2 new css property is 
```
-webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
```

Thanks.
Quick-start SQL Server 2019 in Docker
Tags: sql, docker
Published: 2021-04-25 17:04:07

It's not any kind of magic, but every time I have to do it, I find myself googling for the exact command again and again, So I decided to just save it here - for me, later, and for anyone else who want to paste a command into the terminal and be done with it.

I assume that you already have Docker installed, but in case you don't, there is a great tutorial for Windows [here](https://docs.docker.com/docker-for-windows/install/), or for Ubuntu [here](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-20-04) on how to do it. 

```bash
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=<YourStrong@Passw0rd>" \
   -p 1433:1433 --name YourContainerName -h ContainerHostname \
   -d mcr.microsoft.com/mssql/server:2019-latest
```

If you need any additional information, check out [this page](https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-docker?view=sql-server-ver15&pivots=cs1-bash) for details about arguments and passed values. 

REMEMBER: Password has to be compliant with SQL Server default password policy: 

> By default, the password must be at least 8 characters long and contain characters from three of the following four sets: Uppercase letters, Lowercase letters, Base 10 digits, and Symbols

To check if your container works properly, see it's status using this command:

```bash
docker ps
```

If you can't see it, run it with "-a" argument to see if it's shut down.

```bash
docker ps -a
```

If you have any trouble starting the image, you can see container log by running this command:

```bash
docker logs YourContainerName 
```
Integrate Spring RestAPIs with @JsonView
Tags: springboot, restapi, jsonview
Published: 2021-04-25 17:01:11

https://grokonez.com/java-integration/integrate-spring-restapis-jsonview

Integrate Spring RestAPIs with @JsonView

In the previous <a href="https://grokonez.com/spring-framework/spring-boot/use-jsonview-serializede-serialize-customize-json-format-java-object">post</a>, We had learned how to use <code>@JsonView</code> to serialize/de-serialize Java objects. Now we go to next step, <strong>JavaSampleApproach</strong> shows you how to integrate Spring RestAPIs with <code>@JsonView</code> to customize views and resolve infinity loop problem.

Related posts:
- <a href="https://grokonez.com/spring-framework/spring-boot/use-jsonview-serializede-serialize-customize-json-format-java-object">How to use @JsonView to serialize/de-serialize and customize JSON format from Java Object.</a>
- <a href="https://grokonez.com/spring-framework/spring-boot/resolve-json-infinite-recursion-problems-working-jackson">How to resolve Json Infinite Recursion problems when working with Jackson</a>

<!--more-->
<h2>I. Technologies</h2>
– Java: 1.8
– Maven: 3.3.9
– Spring Tool Suite: Version 3.8.4.RELEASE
– Spring Boot: 1.5.4.RELEASE
– Jackson library
– Json library
<h2>II. Integrate Spring RestAPIs with @JsonView</h2>
For the tutorial, We create 2 models <strong>Company</strong> & <strong>Product</strong> which have <strong>one-to-many</strong> relationship.

- <strong>Company</strong>

<pre><code class="language-java">
public class Company {
	private int id;
	
    private String name;
 
    private List<Product> products;
	
	...
</code></pre>

– <strong>Product</strong>

https://grokonez.com/java-integration/integrate-spring-restapis-jsonview

Integrate Spring RestAPIs with @JsonView
Activate WE TV
Tags: digibharata, wetv, firetv, appletv
Published: 2021-04-25 17:00:37

Do you want to [Activate WE TV](https://digibharata.com/activate-we-tv/) on your Apple TV, Fire TV, and Roku TV? It is one of the most famous American TV channels. The best thing about We TV is you can see unscripted, raw shows which are very connecting and natural. You can start We TV on various devices as well. In this article, we share all methods. Must check.
🚀Lauching JS-Interview Bot on Twitter
Tags: javascript, twitter, beginners, interview
Published: 2021-04-25 16:58:38

Interviews frighten me 😖😖😖😖 


 .....So...

I had this idea to make a bot on twitter which asks questions  and someone like me can answer them in 280 words. 

So i made this bot which will send 2tweets/day. Question that will be asked will be of non-code type, more based on understanding the concept of Javascript programming language.

You just have to reply with explanation/answer in 280 words. 

If you are someone who wants to up their interview game Or just want to Learn javascript. 


Follow here.
### https://twitter.com/JSInterviewBot