From aebee9b3a349b72e523d4c34b857622415efd5f1 Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Sat, 14 Jan 2023 00:58:45 +0400 Subject: [PATCH] Add json-ld schema to the backend roadmap and refactor --- src/components/FAQs/FAQs.astro | 25 ++- src/pages/[roadmapId]/index.astro | 10 +- src/roadmaps/backend/faqs.astro | 179 ++++-------------- src/roadmaps/frontend/faqs.astro | 18 +- src/roadmaps/postgresql-dba/postgresql-dba.md | 6 +- 5 files changed, 73 insertions(+), 165 deletions(-) diff --git a/src/components/FAQs/FAQs.astro b/src/components/FAQs/FAQs.astro index 13d7e2b0e..cd6a54f89 100644 --- a/src/components/FAQs/FAQs.astro +++ b/src/components/FAQs/FAQs.astro @@ -1,8 +1,21 @@ --- +import Answer from './Answer.astro'; +import Question from './Question.astro'; + export type FAQType = { question: string; answer: string[]; }; + +export interface Props { + faqs: FAQType[]; +} + +const { faqs } = Astro.props; + +if (faqs.length === 0) { + return ''; +} ---
@@ -12,7 +25,17 @@ export type FAQType = {
- + { + faqs.map((faq, questionIndex) => ( + + + {faq.answer.map((answer, index) => ( +

{answer}

+ ))} +
+
+ )) + }
diff --git a/src/pages/[roadmapId]/index.astro b/src/pages/[roadmapId]/index.astro index faaf24ac9..681558bab 100644 --- a/src/pages/[roadmapId]/index.astro +++ b/src/pages/[roadmapId]/index.astro @@ -1,5 +1,6 @@ --- import CaptchaScripts from '../../components/Captcha/CaptchaScripts.astro'; +import FAQs from '../../components/FAQs/FAQs.astro'; import InteractiveRoadmap from '../../components/InteractiveRoadmap/InteractiveRoadmap.astro'; import MarkdownRoadmap from '../../components/MarkdownRoadmap.astro'; import RoadmapHeader from '../../components/RoadmapHeader.astro'; @@ -22,7 +23,7 @@ interface Params extends Record { const { roadmapId } = Astro.params as Params; const roadmapFile = await import(`../../roadmaps/${roadmapId}/${roadmapId}.md`); -const questions = await import(`../../roadmaps/${roadmapId}/faqs.astro`); +const { faqs: roadmapFAQs = [] } = await import(`../../roadmaps/${roadmapId}/faqs.astro`); const roadmapData = roadmapFile.frontmatter as RoadmapFrontmatter; let jsonLdSchema = []; @@ -41,8 +42,8 @@ if (roadmapData.schema) { ); } -if (questions.faqs) { - jsonLdSchema.push(generateFAQSchema(questions.faqs)); +if (roadmapFAQs.length) { + jsonLdSchema.push(generateFAQSchema(roadmapFAQs)); } --- @@ -84,6 +85,7 @@ if (questions.faqs) { {roadmapData.isUpcoming && } - + + diff --git a/src/roadmaps/backend/faqs.astro b/src/roadmaps/backend/faqs.astro index 914dca680..75da47cd7 100644 --- a/src/roadmaps/backend/faqs.astro +++ b/src/roadmaps/backend/faqs.astro @@ -1,140 +1,43 @@ --- -import Answer from '../../components/FAQs/Answer.astro'; -import FAQs from '../../components/FAQs/FAQs.astro'; -import Question from '../../components/FAQs/Question.astro'; - -const salaryLink = - 'https://www.glassdoor.com/Salaries/united-states-backend-developer-salary-SRCH_IL.0,13_IN1_KO14,31.htm'; +import type { FAQType } from '../../components/FAQs/FAQs.astro'; + +export const faqs: FAQType[] = [ + { + question: 'What is Backend Development', + answer: [ + 'Backend web development is the part of web development that deals with the server-side of a web application. This includes creating and managing the server-side logic, connecting the application to a database, creating server-side APIs, handling user authentication and authorization, and processing and responding to user requests. It often involves the use of programming languages such as Python, Java, Ruby, PHP, JavaScript (Node.js), and .NET languages.', + 'A backend developer is responsible for the development of server-side components of a web application i.e. working with databases, handling requests, creating server-side APIs that can be consumed by frontend developers to retrieve and manipulate data, ensuring the scalability of the systems i.e. making sure that the backend can handle a high volume of traffic and is performant, integrating external services like payment gateways, message queues, cloud services, etc.', + ], + }, + { + question: 'How to become a Backend Developer?', + answer: [ + "If you are a complete beginner who is just getting started, you can start by learning a backend programming language such as Python, Ruby, Java, Go etc. Once you have got the basic to intermediate understanding of the language, learn about the package manager for that language and learn how to install and use external packages into your applications. Learn the basics of some relational database e.g. PostgreSQL and learn how to run simple CRUD operations. Optionally, you can pick up and learn a web framework for the language of your choice as well. Learn how to build a simple RESTful API and implement simple Authentication/Authorization into it. While you are learning all the items mentioned above, don't forget to learn about Git and GitHub as well.", + 'After following all the instructions above, you can start applying for the entry level backend developer jobs. Also, look at the backend developer roadmap above to get an idea about the landscape and see what else you are missing. A degree in computer science or related field is not always necessary but networking, building a portfolio and actively seeking internships, junior developer positions or consulting can help to start and advance a career as a backend developer.', + "Note: remember to make a lot of projects while you are learning to solidify your understanding of the concepts. Also, it's important to have the attitude of continuous learning to improve your skills and be prepared for the fast-paced technology evolution in the industry.", + ], + }, + { + question: 'How long does it take to become a Backend Developer?', + answer: [ + 'The amount of time it takes to become a backend developer can vary depending on several factors, such as your learning pace, previous experience and the amount of time you are able to dedicate to learning.', + 'If you have a background in computer science or a related field, and have experience with programming, you may be able to become a backend developer relatively quickly, potentially within a few months. However, if you are starting with little or no prior experience or education in computer science, it may take longer to develop the necessary skills and gain the experience needed to be a proficient backend developer. It could take anywhere from 6 months to 2 years.', + ], + }, + { + question: 'What are the Backend Developer salaries?', + answer: [ + 'Backend developer salaries can vary depending on factors such as location, experience, and company size. According to data from Glassdoor, the average base salary for a backend developer in the United States is around $92,000 per year. However, this number can vary greatly depending on location, with the highest-paying cities such as San Francisco, Seattle and New York having an average salary of $120,000 to $135,000 per year.', + "It's important to keep in mind that these are just averages, and salaries can vary greatly depending on factors such as experience level, specific skills, and the company you work for. With more experience and specific skills relevant to the job you are applying for you can expect to earn more.", + 'It is worth looking at a range of resources, including salary surveys, and job boards to get a general understanding of the current market in your location and experience level. Also try reaching out to other professionals in the field and getting an understanding of their own experience and salary ranges.', + ], + }, + { + question: 'Should I learn everything listed on the Backend Roadmap?', + answer: [ + "This roadmap contains everything that you might encounter while working as a Backend Developer. You may not need everything listed on this roadmap to get into the industry; every job is different and most of the jobs will require a subset of the items on the roadmap. However, knowing what you don't know is as important as knowing things, so you can use this roadmap to get an idea of what you are missing as well.", + 'If you are a beginner who is just getting started, don\'t feel overwhelmed by looking at this roadmap. Look at the answer to the FAQ "How to become a Backend Developer?"', + ], + }, +]; --- - - - - -

- Backend web development is the part of web development that deals with - the server-side of a web application. This includes creating and - managing the server-side logic, connecting the application to a - database, creating server-side APIs, handling user authentication and - authorization, and processing and responding to user requests. It often - involves the use of programming languages such as Python, Java, Ruby, - PHP, JavaScript (Node.js), and .NET languages. -

-

- A backend developer is responsible for the development of server-side - components of a web application i.e. working with databases, handling - requests, creating server-side APIs that can be consumed by frontend - developers to retrieve and manipulate data, ensuring the scalability of - the systems i.e. making sure that the backend can handle a high volume - of traffic and is performant, integrating external services like payment - gateways, message queues, cloud services, etc. -

-
-
- - - -

- If you are a complete beginner who is just getting started, you can - start by learning a backend programming language such as Python, Ruby, Java, Go etc. Once you have got the basic to intermediate - understanding of the language, learn about the package manager for that language and learn how to install and use external packages into - your applications. Learn the basics of some relational database e.g. PostgreSQL and learn how to run simple CRUD operations. Optionally, - you can pick up and learn a web framework for the language of your choice as well. Learn how to build a simple RESTful API and implement simple Authentication/Authorization into it. While you are - learning all the items mentioned above, don't forget to learn about Git and GitHub as well. -

- -

- After following all the instructions above, you can start applying for - the entry level backend developer jobs. Also, look at the backend - developer roadmap above to get an idea about the landscape and see what - else you are missing. A degree in computer science or related field is - not always necessary but networking, building a portfolio and actively - seeking internships, junior developer positions or consulting can help - to start and advance a career as a backend developer. -

- -

- Note: remember to make a lot of projects while you are learning to - solidify your understanding of the concepts. Also, it's important to - have the attitude of continuous learning to improve your skills and be - prepared for the fast-paced technology evolution in the industry. -

-
-
- - -

- The amount of time it takes to become a backend developer can vary - depending on several factors, such as your learning pace, previous - experience and the amount of time you are able to dedicate to learning. -

-

- If you have a background in computer science or a related field, and - have experience with programming, you may be able to become a backend - developer relatively quickly, potentially within a few months. However, - if you are starting with little or no prior experience or education in - computer science, it may take longer to develop the necessary skills and - gain the experience needed to be a proficient backend developer. It - could take anywhere from 6 months to 2 years. -

-
-
- - -

- Backend developer salaries can vary depending on factors such as - location, experience, and company size. According to data from - Glassdoor, the average base salary for a backend developer in the United - States is around $92,000 per year. However, this number can vary greatly - depending on location, with the highest-paying cities such as San - Francisco, Seattle and New York having an average salary of $120,000 to - $135,000 per year. -

- -

- It's important to keep in mind that these are just averages, and - salaries can vary greatly depending on factors such as experience level, - specific skills, and the company you work for. With more experience and - specific skills relevant to the job you are applying for you can expect - to earn more. -

- -

- It is worth looking at a range of resources, including salary surveys, - and job boards to get a general understanding of the current market in - your location and experience level. Also try reaching out to other - professionals in the field and getting an understanding of their own - experience and salary ranges. -

-
-
- - - -

- This roadmap contains everything that you might encounter while working - as a Backend Developer. You may not need everything listed on this - roadmap to get into the industry; every job is different and most of the - jobs will require a subset of the items on the roadmap. However, knowing - what you don't know is as important as knowing things, so you can use - this roadmap to get an idea of what you are missing as well. -

-

- If you are a beginner who is just getting started, don't feel - overwhelmed by looking at this roadmap. Look at the answer to the FAQ - "How to become a Backend Developer?" -

-
-
-
diff --git a/src/roadmaps/frontend/faqs.astro b/src/roadmaps/frontend/faqs.astro index 8a4f2d897..54a1b1002 100644 --- a/src/roadmaps/frontend/faqs.astro +++ b/src/roadmaps/frontend/faqs.astro @@ -1,7 +1,5 @@ --- -import Answer from '../../components/FAQs/Answer.astro'; -import FAQs, { FAQType } from '../../components/FAQs/FAQs.astro'; -import Question from '../../components/FAQs/Question.astro'; +import type { FAQType } from '../../components/FAQs/FAQs.astro'; export const faqs: FAQType[] = [ { @@ -48,17 +46,3 @@ export const faqs: FAQType[] = [ }, ]; --- - - - { - faqs.map((faq, questionIndex) => ( - - - {faq.answer.map((answer, index) => ( -

{answer}

- ))} -
-
- )) - } -
diff --git a/src/roadmaps/postgresql-dba/postgresql-dba.md b/src/roadmaps/postgresql-dba/postgresql-dba.md index cae5c0e5f..669f53b36 100644 --- a/src/roadmaps/postgresql-dba/postgresql-dba.md +++ b/src/roadmaps/postgresql-dba/postgresql-dba.md @@ -215,8 +215,4 @@ Get involved to Postgres community and contribute to Postgres; be a useful membe - pgsql-hackers - pgsql-bugs - Reviewing patches -- Writing patches, attending in [Commitfests](https://commitfest.postgresql.org/) - -
-
-
+- Writing patches, attending in [Commitfests](https://commitfest.postgresql.org/) \ No newline at end of file