WebDevPro #6: Creating a C# Chatbot With ChatGPT, Must-have CSS Tools, Rust CRUD Rest API with Docker
Hi,
Welcome to the _webdevpro! Today's edition offers curated web dev community discussions on Creating a C# Chatbot With ChatGPT, Must-have CSS Tools, Rust CRUD Rest API with Docker and a comparison between HTTP/1 vs HTTP/2 vs HTTP/3.
Want to understand state in React? Our React with TypeScript tutorial will lead the way! Don't miss our repository of curated tools to help you boost your web development.
We have listened to the _webdevpro readership and we think this is something you have been searching for. If you liked this installment in our new series, fill in our survey below and win a free Packt credit. We're committed to bringing our readers exactly what they want, so help us make the right choices.
Take the Survey and Win a Free Packt Credit!
Thanks,
Apurva Kadam
Editor-in-Chief, Packt
Web Developer Community Insights
Creating a C# Chatbot With ChatGPT - In this guide, you will dive into the process of building a chatbot using ChatGPT and C#. It covers everything from setting up ChatGPT API access to deploying your chatbot. Let’s get started!
HTTP/1 vs HTTP/2 vs HTTP/3 - You use it every day. You're using it right now. But do you really know how the HTTP protocol works, and do you know the difference between HTTP1, 2 and 3? This article compares all 3, and explain the pros & cons, differences, and how HTTP/3 is starting to become more popular. Check out the comparison between the protocols here.
Rust CRUD Rest API with Docker - Wondering how to create a Rust CRUD Rest API with Docker? Then this tutorial is for you! With this tutorial, you will learn how to create a REST API with Rust, Serde, Postgres and Docker. You can find the code in this Github repository. Explore the tutorial here.
Must-have CSS Tools - CSS is a fundamental part of front-end web development and having access to the right CSS tools can make a significant difference in the productivity and creativity of a developer. There are always new and exciting CSS tools and libraries to explore that can help you streamline your workflow and create stunning designs. This article covers the hottest CSS tools available to developers today, including frameworks, libraries, and utilities, to take your CSS skills to the next level.
Bye-bye ChatGPT: AI Tools as Good as ChatGPT - Over the past months, ChatGPT has gained a lot of users because it’s so good at writing emails, blogs, code, and more. However, there are other tools that use the model behind ChatGPT to go beyond what ChatGPT can do. In this article, you will find a list of tools that are better than ChatGPT because they offer extra features, can be customized, and were built for specific use cases using GPT-3.5/GPT-4. Explore the ChatGPT alternatives here.
How to Add In-App Notifications to Any Web App! - Notifications make any app better by providing real-time updates and keeping users engaged. They help increase user retention by providing a medium of communication between an app and its users. In this article, you'll learn how to add a notification system to any app in just a few simple steps! Read more.
Web Development Motivation
"Web development is not just about creating pretty layouts. It's about understanding the marketing goal behind your website, creating a user-friendly experience, and designing a platform that is easily maintainable for years to come."
- Brad Frost, Author of Atomic Design.
Food for Thought...
Brad Frost's quote highlights the importance of not only creating visually appealing websites but also considering the marketing goals and user experience when designing a website. In today's competitive online landscape, it's essential to create a website that is both user-friendly and easily maintainable for years to come. As such, web developers and designers should strive to create websites that not only look great but also effectively serve their intended purpose. Frost's expertise and contributions to the web design community have made him a respected authority on responsive web design and design systems.
WebDev Resources
Web development tools are software applications or programs that help web developers in designing, developing, testing, and debugging their web applications. These tools are designed to make the development process more efficient, effective, and less time-consuming. Here is a list of Web Dev tools to supercharge your development:
Check Domain and Whois
https://whois.net/
https://who.is/
https://webramz.com/
IP to Location
https://www.iplocation.net/
Website Traffic Statistics
https://www.alexa.com/
https://siterankdata.com/
https://similarweb.com/
SEO Checker
https://www.woorank.com/
https://www.seoptimer.com/
https://sitechecker.pro/
https://www.seotesteronline.com/
https://webpagetest.org/
https://seositecheckup.com/
https://www.site-analyzer.com/
Rank Checker
React Web Development Tutorial
Understanding state
There isn’t a predefined list of states; we define what’s appropriate for a given component. Some components won’t even need any state; for example, the App and Alert components in our CodeSandbox project haven’t required state for the requirements so far.
However, state is a key part of making a component interactive. When a user interacts with a component, the component’s output may need to change. For example, clicking on a component may need to make an element in the component invisible. A change to a component state causes the component to refresh, more often referred to as re-rendering. So, a user could click on a component causing a state change, resulting in an element in the component becoming invisible.
State is defined using a useState function from React. The useState function is one of React’s hooks. React hooks were introduced to React in version 16.8 and give function components powerful capabilities such as state. There is a whole chapter on React hooks in Chapter 4, Using React Hooks.
The syntax for useState is as follows:
const [state, setState] = useState(initialState);Here are the key points:
The initial state value is passed into
useState. If no value is passed, it will initially beundefined.useStatereturns a tuple containing the current state value and a function to update the state value. The tuple is destructured in the preceding code snippet.The state variable name is
statein the preceding code snippet, but we can choose any meaningful name.We can also choose the state setter function name, but it is common practice to use the same name as the state variable preceded by
set.Multiple states can be defined by defining multiple instances of
useState. For example, here are definitions for loading and error states:
const [loading, setLoading] = useState(true);
const [error, setError] = useState();Next, we will implement state in the alert component to determine whether it is visible or not ...read more.
What's Happening in Web Dev?
Angular
Angular v16 is here! - This is the biggest release since the initial rollout of Angular; making large leaps in reactivity, server-side rendering, and tooling. All this comes with dozens of quality-of-life improvements across feature requests, with over 2,500 combined thumbs up on GitHub!
Lavarel
Laravel 10.10 Released - The latest release of Laravel, version 10.10, brings many exciting new features and enhancements. With each release, Laravel continues to push the boundaries of what's possible in web development. In this version, notable contributions include features such as the Sleep class, the hashed model cast, and the ability to mark commands as "isolatable."
Statamic 4 Released - Statamic 4 is now finally available. This release focuses on two things in particular, an improved user experience in the Control Panel and continued modernization of our code base.
React
React Canaries: Enabling Incremental Feature Rollout Outside Meta - The React community will now have an option to adopt individual new features as soon as their design is close to final, before they’re released in a stable version—similar to how Meta has long used bleeding-edge versions of React internally. This will be possible with a new officially supported Canary release channel. It lets curated setups like frameworks decouple adoption of individual React features from the React release schedule.
See you next week!

