teleren/devto huggingface dataset:
Asp.Net : Code first or Database first ?
Tags: dotnet, codefirst, databasefirst, csharp
Published: 2022-11-10 05:12:43

In database related programming, we can hear about 2 key words "code first - database first" when we start to design backend architecture. So, what is code/database first? Is it important in coding ?


The answer is yes, it helps you easily control model database and manages owner resource better. 


## **Code-first** 
We will not create the tables under the database first, but rely on the classes/models on C# to create the database. Net supports Entity Framework Core -  is an Object/Relational Mapping (O/RM) framework. It is an enhancement to ADO.NET that gives developers an automated mechanism for accessing & storing the data in the database.
The neweset EF core version is 7.0. Find out more in: https://learn.microsoft.com/en-us/ef/core/what-is-new/

In the code-first approach, EF Core API creates the database and tables using migration based on the conventions and configuration provided in your domain classes. It creates the database based on the parameter passed in the base constructor of your context class- using DB context.


## **Database-first** 
Otherwise, we already have tables under the database and we just need to create C# classes to map those tables. We also use EF build a data object model and the complete application for you with very little code.

Example:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rxdxkxshr8eueul0s3bf.png)

In short, the code-database first technique in backend system design is extremely necessary for users. You will understand what system architecture you need and what is important in backend design.
Getting Started with the Vue Signature Pad Component
Tags: webdev, vue
Published: 2022-11-10 04:29:08

Learn how easily you can create and configure Vue Signature component of Syncfusion using the Vue CLI command. This video also explains how to configure a few of the control’s basic features like changing the background color, stroke color, velocity, minimum and maximum stroke width, and applying a background image. You can also learn how to save a signature as an image and clear the image. 

_Download an example from GitHub_: https://github.com/SyncfusionExamples/getting-started-with-the-vue-signature-pad-component

_Refer to the following documentation_: https://ej2.syncfusion.com/vue/documentation/signature/getting-started/

_Check out this online example_: https://ej2.syncfusion.com/vue/demos/#/bootstrap5/signature/default.html

{% youtube F6m9h5mKOcQ %}
Godrej Ananda - Bagalur location project for residential purpose opened for pre booking
Tags: godrej, godrejhome, godrejapartment
Published: 2022-11-10 04:09:49

**[Godrej Ananda ](https://www.godrej-ananda.net.in/)**Location has excellent connectivity & it is located at the crux of BK Halli Road very close to Bagalur Aerospace Park, Gummanahalli, Bagalur near existing and upcoming communities & facilities.
Some of the 25+ Amenities at Godrej Ananda include a fully equipped clubhouse, landscaped gardens, gymnasium, swimming pool, recreation rooms, outdoor sports courts, children’s play area, AV Room, party hall, and meticulously planned with utmost importance to state-of-the-art 24/7 securities.
Specifications - Godrej Ananda
General

Flooring & Dado
Foyer, living, dining, kitchen and bedrooms - vitrified tiles 600x600
Toilets, balcony & utility floor tile - anti-skid tiles / Matt finish tiles | Toilet dado - Ceramic tiles
Railing
MSs railings for balcony

False Ceiling in toilets
Gypsum laminated tile ceiling

Windows
UPVC window with mosquito mesh provision only

CP & Sanitary Fittings
American standard/Jaquar/equivalent in toilets

For more info:
https://www.godrej-ananda.net.in/
https://www.reddit.com/user/godrejanandahome
https://blogcircle.jp/user/Anandagodrej
https://anyflip.com/kwlbg/jace/
https://cloodo.com/project/godrej-ananda-project
Code Smell 178 - Subsets Violation
Tags: webdev, javascript, beginners, programming
Published: 2022-11-10 03:43:46

*Invisible objects have rules we need to enforce in a single point*

> TL;DR: Create Small objects and restrict your domain.

# Problems

- [Bijection](https://dev.to/mcsee/the-one-and-only-software-design-principle-3086) Fault 

- [Fail fast principle violation](https://dev.to/mcsee/fail-fast-48dm)

- [Repeated Code](https://dev.to/mcsee/code-smell-46-repeated-code-4iib) validation

# Solutions

1. Create small objects and validate the domain.

# Context

This is a primitive obsession smell.

*EmailAddresses* are a subset of *string*.

*Valid Ages* are a subset of *Real*.

*Ports* are a subset of *Integers*.

A *wordle word* is a subset of String.

# Sample Code

## Wrong

[Gist Url]: # (https://gist.github.com/mcsee/6fedc83479a0894ca2467247ecd5e85c)
```java
destination = "destination@example.com"
  
destination = "destination.example.com"
// No error thrown
```

## Right

[Gist Url]: # (https://gist.github.com/mcsee/51ea6966c13b5aa25c34437218eef5b8)
```java
public class EmailAddress {
    public String emailAddress;

    public EmailAddress(String address) {
        string expressions = @"^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$";
        if (!Regex.IsMatch(email, expressions) {
          throw new Exception('Invalid address');
        }
        this.emailAddress = address;
    }
}

destination = new EmailAddress("destination@example.com");
```

Not to be confused with the anemic [Java version](http://officedev.github.io/ews-java-api/docs/releases/api-2.0/apidocs/microsoft/exchange/webservices/data/property/complex/EmailAddress.html)

# Detection

[X] Manual

This is a semantic smell.

# Tags

- Primitive Obsession

# Conclusion

We need to be loyal to the bijection of the real world. 

Subsets are very important for early validations and fail fast principle.

# Relations

{% post https://dev.to/mcsee/code-smell-122-primitive-obsession-4a55 %}

# More Info

{% post https://dev.to/mcsee/fail-fast-48dm %}

# Disclaimer

Code Smells are just my [opinion](https://dev.to/mcsee/i-wrote-more-than-90-articles-on-2021-here-is-what-i-learned-1n3a).

# Credits

Photo by [Mona Eendra](https://unsplash.com/@monaeendra) on [Unsplash](https://unsplash.com/s/photos/boxed?)  

* * *

> Every craftsman starts his or her journey with a basic set of good-quality tools.

_Andrew Hunt_

{% post https://dev.to/mcsee/software-engineering-great-quotes-26ci %}

* * *

This article is part of the CodeSmell Series.

{% post https://dev.to/mcsee/how-to-find-the-stinky-parts-of-your-code-1dbc %}
Hello Developers, I'm Steph
Published: 2022-11-10 03:27:16

This is my first post on dev.to and I am planning to write my daily progress here. I am choosing Java for learning and making things. 
My plan is to learn Basic syntax. After Basic syntax I would be focusing on DSA and then some OOPS concepts.
Let's see if i could achive this target or not.
Any correction and feedback is highly appreciated.
Still Searching!
Tags: beginners, opensource, career, codenewbie
Published: 2022-11-10 03:05:24

Hello Everyone!

As November begins, I want to share my progress with you all. I have experienced so much through my participation in hacktoberfest2022. Contributing to open-source is an incredible part of the programming/coding community. I have learned so much, from new technologies to critical problem solving, hacktoberfest will test every aspect of your programming abilities. I was very fun to challenge myself even in languages I am not super familiar with, to try and contribute to any projects that I could.

Now I want to set the goals for November. During this month I want to finish and deploy my portfolio website, get more comfortable and build a project with Python, and get an interview. Lucky, I am already off to a great start with these goals. Today I was lucky enough to be contacted by a company I applied for. I spoke with someone over the phone and we had a bit of an impromptu interview/introduction. I am very happy that it went well for me and the person I spoke with was very kind. They told me that I will be hearing back from them so I hope to return will good news there. I am so grateful that they reached out to me as I have been in such a rut with my job search. I will do my best to keep this fire going and achieve all my goals for this month. I wish everyone the best of luck with their job search and goals to make November a break-through month!

If you have any advice or opportunities that you would like to share with me, please don't be afraid to reach out! Thank you for stopping by and have a great day!
A very late-coming reflect for Hacktober 2022 event
Published: 2022-11-10 02:29:57

Time flies, Hacktoberfest 2022 has now already been over within a blink of an eye. However, being short in time does not make it less significant to me, on the contrary, it has helped me to gain a new perspective about how I should collaborate with people who I don’t know from all over the world, and also it helped me to overcome the world-wide difficulty, which is being involved. On top of that, as a former Android developer who has 4 years of work experience working, I have used many open-source projects on GitHub, which saved my life countless times, but never had I once done something in return. Luckily, I had Hacktoberfest pushing me out of my comfort zone, I am proud of myself that I can finally pay back to the GitHub community. 

## What I have done in Hacktoberfest 2022 and what have I learned?
During Hacktoberfest 2022, I made 5 PRs in total, although having 4 PRs was required for marking it as finished, I still wanted to do one extra because the last issue was connected to my previous issue and I wanted to make my fix complete. The Pull Requests that I love the most were the ones I created for [Catima]([https://github.com/CatimaLoyalty/Android](https://github.com/CatimaLoyalty/Android)), because during these 2 PRs, I  had my back-and-forth interactions which I really enjoyed with the repository owner, what is more important is that through this interaction, we both shared and learned lots of knowledge about Android Development, and this was the scenario I pictured in my mind about how the interaction on GitHub would be, I’m so glad this could really happen to me.
Let alone those wonderful interactions I had with repository maintainers, I now also learned that when I create an issue, I should always follow a certain format to make clear every aspect of the issue I want to submit, this includes the description of the issue, the replication method of the proposed bug, also don't forget to attach the log of when the bug happens. From the repository maintenance perspective, I also learned how it would actually be to maintain a repository that has actual users. Now I know I should always thoroughly test my code to cover as many corner cases as possible and when I finished coding, I should always run the unit test, integrate test and linter to check and fix the potential issues in my code. Although the steps may vary from repository to repository, always reading contributing.md is very important for knowing what tests the repository maintainers do expect before submitting Pull Request when finished coding.
## At the end
Hacktoberfest for 2022 has indeed come to an end, but my contribution to GitHub will not stop there. I will try to make more contributions along the way to not only put my expertise into practice but also make it grow even bigger.
Vue2的v-bind.sync
Published: 2022-11-10 02:29:57

1. **This is the parent component!**
```
<template>    
<div>    　　
  <children v-bind:title.sync="title"/>    
</div>
</template>
<script>
export default {
　　data(){
　　　　return{
　　　　　　　title:"学习vue2"
　　　  }　　
    }
}
</script>
```


**2.This is the children component!We all know that the props that a parent component sends to a child cannot be changed. However, using this method you can change the props that a parent component sends to a child!**

```
<template>
    <div>
        <span>标题:{{title}}</span>
        <el-button @click="update">点击修改</el-button>
    </div>
</template>
<script>
    export default {
        name:"children",
        data(){
            return{}
        },
        props:{
            title:String
        },
        methods:{
            update(){
                this.$emit("update:title",'发生改变')
            }
        }
    }
</script>
<style></style>

```
However, this api was deprecated at vue3！^_^
Quickly Testing your Custom Spectral Rules
Tags: webdev, api, testing, javascript
Published: 2022-11-10 02:15:23

I recently started playing with [Spectral](https://github.com/stoplightio/spectral) for validating OpenAPI & AsyncAPI specifications against a common set of rules.

Whilst Spectral is a very powerful tool, the experience of actually writing the rules (and getting them correct) had a steep learning curve.

I found a lot of code based testers and validators that did help, but there was no open source online editor to help write and validate your rules - so I built one!

![Governance Rules Playground](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ouvcfbldsexphkif89vh.png)

Check out my Governance Rules Playground here - https://governance-rules-playground.postmansolutions.com/

Have a look and let me know if you find it useful in writing your Spectral rules.

Github Repo: https://github.com/postman-solutions-eng/governance-rules-playground
How my coding journey began
Tags: webdev, challenge, excitement
Published: 2022-11-10 01:45:12

**Background story:**
In the middle of 2022 it all started with a conversation with a friend and somehow we started talking about 'Tech' and 'Coding'. I thought to myself "What is coding?". 

On that same night I began to watch Youtube videos that were related to code and "A day in a life of a Software Engineer" kind of videos. By this time I was hooked, and it was only a Monday (and btw I had an exam the next day but couldn't get my mind off code!). As I looked into the vast IT career paths that were standing before me, one caught my eye... Software development. I quickly picked up free resources like FreeCodeCamp and The Odin Project and instantly loved it. I turned my Windows 10 OS on my laptop to Ubuntu and thought I was hacking but really all I did was change directories and made new folders... but it was cool! From here, the snowball effect began to gain momentum.

After having a crack at a few tech companies (4 months in to my coding journey), getting interviewed and being rejected, I was more motivated than ever as these experiences were like a sign to me that I was getting closer to where I wanted to be in the future (It really does sound counterintuitive).

Now, I have set my eyes on a software engineering role by the end of 2023 and would want to document my journey from here on.

If you're reading this, I would like to thank you for your time in doing so!

Also, if you're on a similar journey as I am, please don't stop! Passion trumps anything else!
API EXAMPLE - Fetch Your Top 5 Favorite Movies with Joomla! 4.x Web Services and OMDb Movie Api
Tags: blog
Published: 2023-02-09 13:34:30

---
title: API EXAMPLE - Fetch Your Top 5 Favorite Movies with Joomla! 4.x Web Services and OMDb Movie Api
published: true
date: 2022-11-10 01:31:34 UTC
tags: Blog
canonical_url: https://alexandree.io/blog-joomla-specialist/joomla-4x-webservices-omdb-movie-api
---

![](https://alexandree.io//images/behzad-ghaffarian-hello-unsplash_7dc86.jpg)

Hello Super Joomlers!  
  
Today we are trying OMDb Movie Api. Mashing up Joomla! Web Services with OMDb The Open Movie Database Api  
Fetch your favorite movies and turn them into a Joomla! article. Don't forget to delete the articles when you see the demo working as expected.  
Our intention here is not to scrape the whole internet but to showcase what is possible with Joomla! Web Services mashup.  
You can now do all that using a single self-contained php script in about 300loc.  
  
Here is the screenshot of the result:  

[Read More …](https://alexandree.io/blog-joomla-specialist/joomla-4x-webservices-omdb-movie-api)
Local Storage In Javascript
Tags: webdev, javascript, beginners, programming
Published: 2022-11-10 01:23:35

HTML5 provides a feature to store data locally in end user’s browser. Data is stored in the browser as key-value pair. Unlike cookie it has average space of 5 MB. This storage comes in 2 different type sessionStorage and localStorage.

`localStorage`: it stores data with no expiration date.
`sessionStorage` : it stores data withan expiration date.

`Which one is the main Storage interface?`
`window.Storage() `is the main interface from where the localStorage and sessionStorage are implemented. This interface has the below definition.

interface Storage {
readonly attribute unsigned long length;
DOMString? key(unsigned long index);
getter DOMString? getItem(DOMString key);
setter creator void setItem(DOMString key, DOMString value); deleter void removeItem(DOMString key);
void clear();
}
`setItem(key,value) `: This methods stored the value in storage using key-value pair.
`getItem(key)` : This method retrieves the stored object using the key.
`removeItem(key)` : This methods removes the stored item based on the key.
`clear()` : Deletes all the items from the storage. length : This property returns the length of the storage, no of elements inside the storage.
`key(position)` : This method returns the key for the value in the given numeric position.

`How to store and retrieve an object in local storage? `

Local storage provides setItem() and getItem() for storing and retrieving an object from
the storage. setItem(key, value) method takes 2 input parameter to store the object. The
getItem(key) method retrieves the value using key as input parameter. Below code shows
the storing “Neeraj Kumar” string in “myName” key and then retrieves this string
place it in a HTML element.

```
<!DOCTYPE html>
<html>
<body>
<div id=“resultContainer”>
</div>
<script>
var container =
document.getElementById(“resultContainer”);
localStorage.setItem(“myName”, “Neeraj kumar”); 
container.innerHTML =localStorage.getItem(“myName”); 
</script>
</body>
</html>
```
`How to attach an event to a local storage?`
When local storage objects get modified a storage event is fired. A callback method can be
attached to window object using addEventListener() or attachEvent() method.

Both storage objects provide same methods and properties:
`
setItem(key, value) – store key/value pair.
getItem(key) – get the value by key.
removeItem(key) – remove the key with its value.
clear() – delete everything.
key(index) – get the key on a given position.
length – the number of stored items.
`As you can see, it’s like a Map collection (setItem/getItem/removeItem), but also allows access by index with key(index).
W3c Activitypub Protocol
Tags: todayilearned, w3c, activitypub
Published: 2022-11-10 14:48:58

---
title: W3c Activitypub Protocol
published: true
date: 2022-11-10 00:52:56 UTC
tags: 
- todayilearned
- w3c
- activitypub
canonical_url: https://cantillo.dev/til/w3c-activitypub-protocol/
---

## ActivityPub protocol

The protocol describes a decentralized "social network"; it relies heavily on JSON+LD schemes to describe `activities` performed by `actors.` The protocol comprises a set of interfaces for `server-to-server` and `client-to-server` connections. You can find more information in the [W3C ActivityPub](https://www.w3.org/TR/activitypub/#Overview) page

## How does it works?

In the following diagram, you can see Alice and Bob interacting with the AcitityPub protocol. Alice wants to post something that could be a Tweet-like message, a video, or a note; Bob should be able to read it.

![ActivityPub sequence diagram](https://diagrams.cantillo.dev/activitypub/how-activitypub-works/how-activitypub-works.svg "How activity pub works")

A service discovery protocol is the base of ActivityPub. The representation of all actors, Alice and Bob, and the messages have URLs in the attributes pointing to the counterpart server. The service discovery definition uses JSON+LD as the default format.


Those URLs tell where a server or a client must fulfill an activity such as Publish or Like. In the previous example, Alice wants to publish a post. She already knows the Outbox URL to create a Post; in this case, the action is "Create." 



## My take on this proposal

I used to be a PropTech entrepreneur. I implemented the Real Estate Transaction Standards (RETS) for the web application. The Multiple Listing Services (MLS) uses RETS to describe properties and actions performed over it. Those standards or, better, a new version may benefit from this kind of protocol.
The Deep Blue Sky
Tags: devops, github, writing
Published: 2022-11-10 00:44:55

Well, it was blue at one time. Remember laying in the yard on a mid-summer afternoon and looking up in the sky, blue, sunshine and not a cloud in site?

Microsoft doesn't. Azure, which means a dark blue clear sky, has now cluttered it with clouds, big and small, all different shapes, and length. 


Instead of looking at the clouds and seeing faces, animals, and other imaginative views that puts fantasy in our mind, Microsoft has replaced our imagination, with Active Directory schemas, file share servers, shared storage blobs, web servers, user ID's, billions of lines of code.

Maybe we should have kept everything onsite after all.

Just a little rambling as I spin up another Windows app server with Docker installed. 

Cheers, 
Node77

   _
ReactJs Responsive AppBar MaterialUI (v5) React Router(v6)
Tags: frontend, react, beginners, materialui
Published: 2022-11-10 00:38:14

You can find the repository [here](https://github.com/b4ldous/responsivebar.git)
a live version [here](https://codesandbox.io/p/github/b4ldous/responsivebar/responsive-MUIappBar?file=%2FREADME.md&workspace=%257B%2522activeFileId%2522%253A%2522claac812u000il0f5enp71n9c%2522%252C%2522openFiles%2522%253A%255B%2522%252FREADME.md%2522%255D%252C%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522gitSidebarPanel%2522%253A%2522COMMIT%2522%252C%2522sidekickItems%2522%253A%255B%257B%2522type%2522%253A%2522PREVIEW%2522%252C%2522taskId%2522%253A%2522start%2522%252C%2522port%2522%253A3000%252C%2522key%2522%253A%2522claac8uyb007t2069xkhabkyr%2522%252C%2522isMinimized%2522%253Afalse%252C%2522path%2522%253A%2522%252Fabout%2522%257D%252C%257B%2522type%2522%253A%2522TASK_LOG%2522%252C%2522taskId%2522%253A%2522start%2522%252C%2522key%2522%253A%2522claac8sxs005v2069n2aecla8%2522%252C%2522isMinimized%2522%253Afalse%257D%255D%257D)

1. Basic layout for routing (client side)
2. Integrating Material UI responsive AppBar