blog
blog

THE BLOG

Recent Posts

Vebhook VS So'rovnoma (Polling)

April 25, 2025Shokhruh

Vebhook VS So'rovnoma (Polling)

share

So'rovnoma (polling) uzi nima ? Vebhook chi?Xozir shu blogda tepadagi savolga jovob topishga xarakat qilamizSo'rovnoma (Polling)Restoranda ovqatga buyurtma berayotganda, ofitsiantdan buyurtmangiz tayyor yoki yo'qligini doimiy ravishda so'rash maqsadga muvofiq emas va uyatli ham dur.Ushbu stsenariy so'rovning(polling) samarasizligini ko'rsatadi, bu usul mijoz oldindan belgilangan vaqt oralig'ida serverdan ma'lumotlarni qayta-qayta so'raydi.So'rov (polling) bir xizmat yangi ma'lumotlarni tekshirish uchun boshqa xizmatga takroriy so'rovlar yuborishni o'z ichiga oladi.So'rovning asosiy xususiyatlari:Takroriy so'rovlar: So'rovda mijoz muntazam ravishda serverga yangi ma'lumotlar mavjudligini so'rab so'rovlar yuboradi. Bu yondashuv doimiy ravishda "Men uchun yangi narsa bormi?" kabi so'rovlar junatadi.Resursga talabgor: so‘rovlar resurslarni ko‘p va samarasiz ketishidur. U yangilanishlar mavjud bo'lmagan taqdirda ham tarmoqni kengligi va server resurslarini sarflaydi.O'tkazib yuborilgan yangilanishlar: so'rovnoma real vaqtda yangilanishlarni o'tkazib yuborishga olib kelishi mumkin. Mijoz yangilanishlarni oldindan belgilangan vaqt oralig'ida tekshirganligi sababli, u ma'lumotlar mavjud bo'lganda darhol bilmasligi mumkin.VebhooklarVebhooklar so'rovga(polling) yanada samaraliroq va real vaqtda alternativa taklif qiladi. Vebhuklar qanday ishlaydi:Callback URL-manzil: Vebhuk yordamida siz bir tizim yangi ma'lumotlar mavjud bo'lganda boshqa tizimni xabardor qilish uchun foydalanadigan qayta qo'ng'iroq URL manzilini o'rnatasiz. Ushbu yondashuv o'rnatilgan bildirishnoma tizimiga o'xshaydi, u erda server "biror narsa sodir bo'lganda sizga xabar beraman" deb aytadi.Ma'lumotlarni yetkazib berish: Vebhook ma'lumotlarni real vaqt rejimida yangilanishini ta'minlab, ular mavjud bo'lishi bilanoq qabul qiluvchi xizmatiga yuboradi. Bu vebhuklarni o'z vaqtida bildirishnomalar kerak bo'ladigan stenariylar uchun qo'l keladi.Samaradorlik va real vaqtda yangilanishlar: Vebhuklar so'rovdan ko'ra samaraliroqdir, chunki ular takroriy so'rovlarga bo'lgan ehtiyojni yo'q qiladi. Ular real vaqt rejimida yangilanishlarni ta'minlaydi, bu ularni to'lov tizi, CI/CD platformalari va zudlik bilan yangilashni talab qiladigan boshqa xizmatlar kabi ilovalar uchun ayni qo'l keladi.So'rov va Vebhuklardan qachon foydalanish kerakHar bir yondashuv o'z foydalanish holatlariga ega:So'rov:Ma'lumotlarni tez-tez yangilash: Agar real vaqtda ma'lumotlarni yangilash kerak bo'lmasa va ma'lumotlar tez-tez yangilanib tursa, so'rov bunga yechim bo'la oladi. Har bir hodisa uchun veb-huklarni yuborish resurs talab qilishi mumkin. Misol uchun, foydalanuvchi bazasi haqida xabar bermoqchi bo'lgan ijtimoiy media ilovasi, agar ko'p foydalanuvchilar ketma-ket ro'yxatdan o'tgan bo'lsa, vebhuklarga to'lib ketishi mumkin.Moslashuvchanlik: Sinxronlash chastotasini yangilangan maʼlumotlarga qanchalik tez-tez kerakligi asosida sozlashingiz mumkin.Veb-huklar:Haqiqiy vaqtda yangilanishlar: Vebhook real vaqtda yangilanishlar muhim bo'lgan stsenariylar uchun juda mos keladi. Masalan, toʻlov bildirishnomalari, chat ilovalari va darhol bildirishnomalarni talab qiladigan har qanday xizmat.Resurslardan samarali foydalanish: Vebhook so'rovga qaraganda resurslardan foydalanish nuqtai nazaridan samaraliroq. Ular ma'lumotlarning takroriy so'rovlarsiz real vaqt rejimida yetkazilishini ta'minlaydi.Xo'sh, siz ilovangizda So'rov yoki Vebhook-dan foydalanganmisiz?

webhooks polling networking
 Top State Management Tools for React (Next.js) in 2025

April 25, 2025Developer

Top State Management Tools for React (Next.js) in 2025

share

State management is at the core of every modern React application. Whether you're building a small personal project or a complex enterprise dashboard, choosing the right tool can drastically improve your code maintainability, performance, and developer experience.In this post, I’ll break down the top state management solutions for React and Next.js in 2025 — including when to use each one.🔹 1. React Context API (Built-in, Minimal)Best for: Simple global state like theme, language, or auth user.React’s built-in Context API is great when your state is minimal and doesn’t change often. But for larger or performance-sensitive apps, it can lead to unnecessary re-renders.✅ Pros:No extra dependenciesPerfect for small, static state⚠️ Cons:Performance issues with frequent updatesCan get messy without proper structure💡 Tip: Pair it with useReducer to better handle complex logic.🔹 2. Zustand (Minimal, Modern, Powerful)Best for: Medium to large apps that need a simple yet scalable solution.Zustand is a small, fast, and scalable state management library built by the creators of Jotai and React-Three-Fiber. It works great with both React and Next.js — even in SSR.✅ Pros:Super simple API (create() stores)No Provider neededSupports partial updates, async actions, middleware⚠️ Cons:You’ll still need something like React Query for data fetching/state sync// Example Zustand store const useStore = create((set) => ({ count: 0, increase: () => set((state) => ({ count: state.count + 1 })), })); 🔹 3. Redux Toolkit (Battle-Tested, Structured)Best for: Large-scale apps or teams that need strict architecture and dev tools.Redux got a major revamp with Redux Toolkit, which simplifies setup, reduces boilerplate, and offers great TypeScript support. Still widely used in enterprise apps.✅ Pros:Predictable, scalableStrong ecosystem (Redux DevTools, middleware, etc.)Good TypeScript support⚠️ Cons:More boilerplate than Zustand or JotaiOverkill for small/medium apps🔹 4. Jotai (Atomic, Fine-grained)Best for: Component-level, fine-grained reactivity without global bloat.Jotai is a modern state management library based on atomic state. It lets you manage deeply nested or reactive state in a clean, minimal way.✅ Pros:Atomic updates = high performanceGreat for local or scoped stateFull SSR support⚠️ Cons:Smaller ecosystemMay require a mindset shift from global stores🔹 5. React Query (or TanStack Query)Best for: Remote data synchronization (API fetching, caching, and mutations).React Query is technically not a state manager — it's a server-state manager. It’s perfect for apps where the main state lives on the server (APIs, databases).✅ Pros:Automatic caching, refetching, paginationBuilt-in loading/error statesExcellent DevTools⚠️ Cons:Not for UI state (use Zustand or Context for that)🔚 Final ThoughtsEvery app has different needs. Here’s a quick cheat sheet:Use CaseBest ToolSmall, simple stateReact ContextMid-sized app, local/global mixZustand or JotaiLarge app with strict structureRedux ToolkitRemote data fetchingReact QueryIf you're working with Next.js, all of these tools can be used effectively — just make sure to account for SSR/SSG where necessary.Which one are you using in your current project? I’ve personally leaned toward Zustand + React Query for most of my recent work. Clean, flexible, and efficient.Let me know if you want a deep dive on any of these!

webfront-endreact
Tekinga Resume qilisa boadigan websitlar(Free Resume builder)

April 23, 2025Developer

Tekinga Resume qilisa boadigan websitlar(Free Resume builder)

share

📄 Bepul Resume Tayyorlash Sayti – Ish Qidiruvchilar Uchun Ajoyib YechimBugungi kunda yaxshi tayyorlangan rezume (CV) ish topishda eng muhim vositalardan biridir. Ko‘pchilik yoshlar yoki tajribasiz mutaxassislar o‘zlari haqida professional ko‘rinishda CV yozishda qiynaladi. Shu sababli, internetda mavjud bo‘lgan bepul resume tuzuvchi saytlar sizga katta yordam bo‘lishi mumkin.🛠️ Canva – Eng oson va zamonaviy resume tayyorlashCanva – bu bepul dizayn platformasi bo‘lib, unda siz CV, vizitkalar, bannerlar va boshqa ko‘plab dizaynlarni yaratishingiz mumkin. Ayniqsa CV dizayn shablonlari juda ko‘p va foydalanuvchilar uchun qulay.🧑‍💼 Nima uchun Canva?TekinJuda ko‘p shablonlarMobil qurilmalarda ham ishlaydi📌 Resume.io – Oddiy va TezResume.io foydalanuvchilar uchun juda qulay va soddaligi bilan mashhur. Siz o‘zingiz haqingizda ma’lumot kiritishingiz bilan sayt avtomatik tarzda tayyor shablonlarga joylashtirib beradi.🧑‍💼 Nima uchun Resume.io?Juda ko‘p shablonlarTekin(lekin faqat bir marotaba va cheklanga shablonda)🧰 Cvcons.com/buildercvcons.com/builder bu ozim sheriklikda qilgan website va bu tekin webiste xoxlagan shblonda resume qilsa boladi va pdf shaklida yuklab olsa boladi lekin bu hali mvp bolib kamchiliklar bor lekin resume qilsa boladi va pellik tariflari bor xozirda u beta bolib hali toliq ishga tushmagan🧑‍💼 Nima uchun cvcons.com/builder?tekinATS-friendlybu shunchaki men ishlatgan resume builder websitlar bolib bundan ham yaxshiroqlari bolishi mumkin ,bu websitlarni tajribamdan kelib chiqib aytyapman va oxirgi aytgan resume builder bu shunchaki reklama maqsadida yozdim🤣(lekin ishlatsa boladi).

resumejobapplication
Kompaniyadagi Eng zerikarlik ishlarimdan biri (Korean Company)

April 21, 2025Developer

Kompaniyadagi Eng zerikarlik ishlarimdan biri (Korean Company)

share

2025-04-16 boshlab Shu paytgacha bolgan eng zerikarlik ish qildim yani Boshqa developerni code ni refactor qildim , Bir paytlar oylardim qiziqarli bolsa kerak code refactoing lekin endi bildim juda zerikarli ish ekan 🤣. Lekin majburman Team Lead tomonidan berilgan ishQanaqa project?Bu 5 oy oldin yangi kirgan developerga bergan butun boshli katta project edi va U kirgan developer entry level developer edi 🤣. Shuni bildimki Start-up kompaniyalarda Developerni ish stajiga qaramasdan katta va jiddiy ishlar beravardikan( bu meni shaxsiy fikrim va tajribamdan kelib chiqqan xulosam va bu koreada) va bu yaxshi narsa va osish yaxshi boladigan omillardan biri lekin unga yolyoriq korsatib tursagin (lekin ozimni tajribamdan kelib chiqib shuni aytamanki shu paytgacha hech korea companiyasida bunaqa developerni uchratmadim .bu shaxsiy va shunchaki fikrm).Va bu loyha Educational platform edi va anchagina yaxshi tajriba osa boladigan loyha edi.lekin bu normal xolat deb oylayman hechkim bir zumda zor kod yozib ketolmaydi hamma ham xato qiladim va ozim ham yaxshi code yozman deb oylamayman lekin noiloji qilishga majbur boldim.Nimalar ishlatilgan?Bu fullstack loyha bolib Front-endga : "dependencies": { "@nextui-org/modal": "^2.0.41", "axios": "^1.7.7", "dayjs": "^1.11.13", "next": "14.2.13", "react": "^18", "react-daum-postcode": "^3.1.3", "react-icons": "^5.3.0", "zod": "^3.23.8", "zustand": "^5.0.2" }, //next.js app routeshular ishlatilganBack-end uchun "dependencies": { "@grpc/grpc-js": "^1.12.6", "@grpc/proto-loader": "^0.7.13", "@nestjs/common": "^11.0.1", "@nestjs/core": "^11.0.1", "@nestjs/jwt": "^11.0.0", "@nestjs/microservices": "^11.0.9", "@nestjs/passport": "^11.0.5", "@nestjs/platform-express": "^11.0.1", "@nestjs/swagger": "^11.0.3", "@types/passport-jwt": "^4.0.1", "passport-jwt": "^4.0.1", "reflect-metadata": "^0.2.2", "rxjs": "^7.8.1", "shared-prisma": bu shunchaki prisma },shular ishlatilgan.Front-endni refaktor qilish uchun road mapbirimchi orinda Atomic Design degan pattern dan foydalandimva hamma codelarni bolib chiqdim.va loyha javascriptda kotarilgan edi men uni Typescriptda kotarib chiqyapman chunki typescriptsz code yozish xato deb bilaman😁.va back end ga keladigan bolsak backend ni ozim qilganedmi va uni refacktor qilishga xojatyoq deb bilaman (chunki ozimi codim 🤣) va back end uchun SAGA patterndan foydalanganman qiziqqanlar bisa shu linkdan kirib korish mumkinhttps://www.baeldung.com/cs/saga-pattern-microservicesA developerning codidan misollarbu code ozgina qism va shunchaki korib tushuncha hosil qilsh uchun ulashdim(va ulashishdan hechqanday yomon maqsad yoq va ozimham kuchli developermasman shunchaki qolimdan kelganicha togirlashga harakat qilayapman)export async function createSchedule(token, data) { const url = `${server}/calendar/create-schedules`; try { return await axios .post(url, data, { headers: { Authorization: `Bearer ${token}` } }) .then((res) => res.data.schedule_id); } catch (error) { console.log("스케쥴 생성 에러러러", error); } } /////// export async function getMySchedules(token, id) { const url = `${server}/calendar/schedules/${id}`; try { return await axios .get(url, { headers: { Authorization: `Bearer ${token}` } }) .then((res) => res.data); } catch (error) { console.log("스케쥴 가져오기 에러러러", error); } } ///////////////// export async function getASchedule(token, id) { const url = `${server}/calendar/get-schedule/${id}`; try { return await axios .get(url, { headers: { Authorization: `Bearer ${token}` } }) .then((res) => res.data); } catch (error) { console.log("스케쥴 가져오기 에러러러", error); } } //////////////////////// export async function deleteScheduleById(token, id, schoolId) { const url = `${server}/calendar/schedules/${id}`; console.log("test", token, schoolId, id); console.log("test", url); try { const response = await axios.delete(url, { headers: { Authorization: `Bearer ${token}`, }, data: { school_id: schoolId }, }); console.log("Successfully deleted schedule:", response.data); } catch (error) { console.error("Error in deleteSchedule:"); } } //////////////////////////////////// export async function patchSchedule(token, data,id) { const url = `${server}/calendar/schedules/${id}`; try { return await axios .patch(url, data, { headers: { Authorization: `Bearer ${token}` } }) .then((res) => res.data.schedule_id); } catch (error) { console.log('스케쥴 생성 에러러러', error); } }Bu code haqidan nima deb oylaysizlar va commentda ozingizni fikirlaringizni qoldirishinglar mumkinMeni fikrim =>har bitta Apiga maxsus fil yaratardim va serverside fetch qilinishi kerak bolgan va clientda fetch qilinishi kerak bolgan apilarni ajratib olib har bittasiga alohida fayl yaratmochiman chunki ertaga ozragtish kerak bolsa osongina topib ozgartirishga qulay va clean turadi keyin client side da fetch qilish uchun react-query dan foydalanmoqchiman chunki bu juda zor libray ozi kop narsalarni handle qilib beradi.css ni orniga styled-component ni ishlatmoqchi bolgan edim kodni kopligini korib cssni ozida qolishga qaror qildm🤣.keyin yana xatoliklardan biri errorlar handle qilinmagan va loading statelar handle qilinmagan va website juda sekin edi sababi oylashimcha bilmasdan hamma datalarni serversideda fetch qilgan b websiteni juda sekinlashtirib yuborgan.chunki hamma narsani ham serverda fetch qilish xato deb oylayman.Va xullas qiladigan ish kop va oylshimcha yana bir hafta cha vaqt ketadiganga oxshaydi 😒.bu blogni yozishimdan maqsadim shunchaki korea companylardangi tajribalarimni va muhitni ulashish.[by Isroiljon].

next.jskoreadevelopment

All blog posts

Exploring Python: The Versatile Language for Developers

April 20, 2025Alex

Exploring Python: The Versatile Language for Developers

share

Python is one of the most popular and versatile programming languages in the world today. With its clear syntax, powerful libraries, and wide range of applications, Python has become the language of choice for many developers, data scientists, engineers, and web developers.What is Python?Python is an interpreted, high-level programming language designed with an emphasis on simplicity and readability. Created by Guido van Rossum and first released in 1991, Python has steadily gained popularity due to its clean and easy-to-understand syntax, which makes it beginner-friendly while also being robust enough for professionals.Why Python?Python stands out for several reasons:Readable Syntax: Python was created with readability in mind. Its clean and readable syntax makes it easy to write and understand code, even for beginners. The use of indentation (rather than curly braces or keywords) for defining code blocks is one of its distinguishing features.Cross-Platform: Python is cross-platform, meaning that code written on one operating system (Windows, macOS, Linux) can be easily run on another without modification.Large Community and Ecosystem: Python has a massive and active community of developers contributing to a vast ecosystem of libraries and frameworks. This makes it easy for developers to find solutions, share knowledge, and access tools that suit a variety of applications.Extensive Libraries: Python comes with a rich standard library and supports a wide range of external libraries for various tasks, such as data manipulation, web development, machine learning, and more. Popular libraries include NumPy, Pandas, TensorFlow, Flask, and Django.Versatile Applications: Python’s flexibility makes it suitable for a wide range of applications, from web development to data science, machine learning, automation, game development, network programming, and more. Python is also commonly used for scripting, where it automates repetitive tasks.Open-Source: Python is open-source, meaning that anyone can use, modify, and distribute the language for free. This has contributed significantly to its widespread use and community-driven development.Key Features of PythonDynamically Typed: Python is dynamically typed, meaning that variable types do not need to be declared explicitly. This leads to more flexible and concise code, though it also means type errors can arise during runtime if the types are misused.# Dynamically typed x = 10 # Integer x = "Hello" # String (No need to declare type)Interpreted Language: Unlike compiled languages like C++ or Java, Python is an interpreted language, meaning the Python code is executed line-by-line by the Python interpreter. This allows for more rapid development and testing but may lead to slower performance compared to compiled languages.Garbage Collection: Python automatically manages memory allocation and deallocation through garbage collection, which means developers don't have to manually free memory. This reduces the likelihood of memory leaks and improves development efficiency.Object-Oriented: Python supports object-oriented programming (OOP), allowing developers to create classes and objects. This allows for better code organization, reusability, and maintainability.Extensive Documentation: Python has an extensive set of documentation available, making it easy for both beginners and advanced users to find solutions and examples for almost any problem.Common Uses of PythonWeb Development: Python is widely used for web development. Frameworks like Django and Flask provide powerful tools to build robust and scalable web applications quickly. Django, in particular, is a high-level framework that follows the "batteries-included" philosophy, providing everything you need to build a web app.Example of web development using Flask:from flask import Flask app = Flask(__name__) @app.route('/') def hello(): return "Hello, World!" if __name__ == "__main__": app.run()Data Science and Machine Learning: Python is the go-to language for data science and machine learning due to its extensive libraries like Pandas (for data manipulation), NumPy (for numerical operations), Matplotlib (for data visualization), and Scikit-learn (for machine learning).Example of using Pandas to load and analyze data:import pandas as pd # Load dataset df = pd.read_csv('data.csv') # Show the first 5 rows print(df.head())Automation and Scripting: Python is often used for automating repetitive tasks. Whether it's web scraping, file handling, or system administration, Python’s simplicity and wide range of libraries make it ideal for automation.Example of web scraping using BeautifulSoup:import requests from bs4 import BeautifulSoup response = requests.get('https://example.com') soup = BeautifulSoup(response.text, 'html.parser') print(soup.title)Game Development: Python also finds use in game development. Libraries like Pygame help developers create 2D games with ease. While Python is not as fast as languages like C++ for game development, it is still popular for simple games and prototypes.Network Programming: Python offers tools for network programming, making it useful for tasks like building servers, creating network protocols, and automating network tasks.Scientific Computing: With libraries like SciPy, SymPy, and Matplotlib, Python is commonly used in scientific computing to solve mathematical, engineering, and physics-related problems.Advantages of PythonEase of Learning: Python's simple and readable syntax makes it a great choice for beginners.Productivity: Python's high-level nature and large standard library make it a highly productive language, enabling developers to get more done with fewer lines of code.Cross-Domain Usage: From web development to data science, Python is versatile and applicable to many domains.Community Support: With a vast and active community, Python developers can easily find tutorials, documentation, and support.Challenges of PythonPerformance: As an interpreted language, Python can be slower than compiled languages like C or Java. For high-performance applications, developers may need to use optimized libraries or implement parts of their code in other languages.Mobile Development: While Python is great for desktop and server-side applications, it is not widely used for mobile app development. However, there are frameworks like Kivy and BeeWare that allow Python developers to create mobile applications.Threading: Python's Global Interpreter Lock (GIL) can be a bottleneck in multi-threaded applications, limiting the performance of multi-core CPUs.The Future of PythonPython’s future looks incredibly bright. As technology evolves, Python continues to adapt and grow. With its strong presence in the realms of AI, data science, and web development, Python is set to remain one of the most important languages in the tech world for years to come.ConclusionPython’s simplicity, readability, and broad range of applications make it an essential language for developers. Whether you’re building web applications, analyzing data, or automating repetitive tasks, Python provides the tools you need to get the job done efficiently and effectively. With its continued growth and an ever-expanding ecosystem, Python is undoubtedly one of the most important languages in the world of programming today.

PythonProgramming
Kompaniyadagi Eng zerikarlik ishlarimdan biri (Korean Company)

April 21, 2025Developer

Kompaniyadagi Eng zerikarlik ishlarimdan biri (Korean Company)

share

2025-04-16 boshlab Shu paytgacha bolgan eng zerikarlik ish qildim yani Boshqa developerni code ni refactor qildim , Bir paytlar oylardim qiziqarli bolsa kerak code refactoing lekin endi bildim juda zerikarli ish ekan 🤣. Lekin majburman Team Lead tomonidan berilgan ishQanaqa project?Bu 5 oy oldin yangi kirgan developerga bergan butun boshli katta project edi va U kirgan developer entry level developer edi 🤣. Shuni bildimki Start-up kompaniyalarda Developerni ish stajiga qaramasdan katta va jiddiy ishlar beravardikan( bu meni shaxsiy fikrim va tajribamdan kelib chiqqan xulosam va bu koreada) va bu yaxshi narsa va osish yaxshi boladigan omillardan biri lekin unga yolyoriq korsatib tursagin (lekin ozimni tajribamdan kelib chiqib shuni aytamanki shu paytgacha hech korea companiyasida bunaqa developerni uchratmadim .bu shaxsiy va shunchaki fikrm).Va bu loyha Educational platform edi va anchagina yaxshi tajriba osa boladigan loyha edi.lekin bu normal xolat deb oylayman hechkim bir zumda zor kod yozib ketolmaydi hamma ham xato qiladim va ozim ham yaxshi code yozman deb oylamayman lekin noiloji qilishga majbur boldim.Nimalar ishlatilgan?Bu fullstack loyha bolib Front-endga : "dependencies": { "@nextui-org/modal": "^2.0.41", "axios": "^1.7.7", "dayjs": "^1.11.13", "next": "14.2.13", "react": "^18", "react-daum-postcode": "^3.1.3", "react-icons": "^5.3.0", "zod": "^3.23.8", "zustand": "^5.0.2" }, //next.js app routeshular ishlatilganBack-end uchun "dependencies": { "@grpc/grpc-js": "^1.12.6", "@grpc/proto-loader": "^0.7.13", "@nestjs/common": "^11.0.1", "@nestjs/core": "^11.0.1", "@nestjs/jwt": "^11.0.0", "@nestjs/microservices": "^11.0.9", "@nestjs/passport": "^11.0.5", "@nestjs/platform-express": "^11.0.1", "@nestjs/swagger": "^11.0.3", "@types/passport-jwt": "^4.0.1", "passport-jwt": "^4.0.1", "reflect-metadata": "^0.2.2", "rxjs": "^7.8.1", "shared-prisma": bu shunchaki prisma },shular ishlatilgan.Front-endni refaktor qilish uchun road mapbirimchi orinda Atomic Design degan pattern dan foydalandimva hamma codelarni bolib chiqdim.va loyha javascriptda kotarilgan edi men uni Typescriptda kotarib chiqyapman chunki typescriptsz code yozish xato deb bilaman😁.va back end ga keladigan bolsak backend ni ozim qilganedmi va uni refacktor qilishga xojatyoq deb bilaman (chunki ozimi codim 🤣) va back end uchun SAGA patterndan foydalanganman qiziqqanlar bisa shu linkdan kirib korish mumkinhttps://www.baeldung.com/cs/saga-pattern-microservicesA developerning codidan misollarbu code ozgina qism va shunchaki korib tushuncha hosil qilsh uchun ulashdim(va ulashishdan hechqanday yomon maqsad yoq va ozimham kuchli developermasman shunchaki qolimdan kelganicha togirlashga harakat qilayapman)export async function createSchedule(token, data) { const url = `${server}/calendar/create-schedules`; try { return await axios .post(url, data, { headers: { Authorization: `Bearer ${token}` } }) .then((res) => res.data.schedule_id); } catch (error) { console.log("스케쥴 생성 에러러러", error); } } /////// export async function getMySchedules(token, id) { const url = `${server}/calendar/schedules/${id}`; try { return await axios .get(url, { headers: { Authorization: `Bearer ${token}` } }) .then((res) => res.data); } catch (error) { console.log("스케쥴 가져오기 에러러러", error); } } ///////////////// export async function getASchedule(token, id) { const url = `${server}/calendar/get-schedule/${id}`; try { return await axios .get(url, { headers: { Authorization: `Bearer ${token}` } }) .then((res) => res.data); } catch (error) { console.log("스케쥴 가져오기 에러러러", error); } } //////////////////////// export async function deleteScheduleById(token, id, schoolId) { const url = `${server}/calendar/schedules/${id}`; console.log("test", token, schoolId, id); console.log("test", url); try { const response = await axios.delete(url, { headers: { Authorization: `Bearer ${token}`, }, data: { school_id: schoolId }, }); console.log("Successfully deleted schedule:", response.data); } catch (error) { console.error("Error in deleteSchedule:"); } } //////////////////////////////////// export async function patchSchedule(token, data,id) { const url = `${server}/calendar/schedules/${id}`; try { return await axios .patch(url, data, { headers: { Authorization: `Bearer ${token}` } }) .then((res) => res.data.schedule_id); } catch (error) { console.log('스케쥴 생성 에러러러', error); } }Bu code haqidan nima deb oylaysizlar va commentda ozingizni fikirlaringizni qoldirishinglar mumkinMeni fikrim =>har bitta Apiga maxsus fil yaratardim va serverside fetch qilinishi kerak bolgan va clientda fetch qilinishi kerak bolgan apilarni ajratib olib har bittasiga alohida fayl yaratmochiman chunki ertaga ozragtish kerak bolsa osongina topib ozgartirishga qulay va clean turadi keyin client side da fetch qilish uchun react-query dan foydalanmoqchiman chunki bu juda zor libray ozi kop narsalarni handle qilib beradi.css ni orniga styled-component ni ishlatmoqchi bolgan edim kodni kopligini korib cssni ozida qolishga qaror qildm🤣.keyin yana xatoliklardan biri errorlar handle qilinmagan va loading statelar handle qilinmagan va website juda sekin edi sababi oylashimcha bilmasdan hamma datalarni serversideda fetch qilgan b websiteni juda sekinlashtirib yuborgan.chunki hamma narsani ham serverda fetch qilish xato deb oylayman.Va xullas qiladigan ish kop va oylshimcha yana bir hafta cha vaqt ketadiganga oxshaydi 😒.bu blogni yozishimdan maqsadim shunchaki korea companylardangi tajribalarimni va muhitni ulashish.[by Isroiljon].

next.jskoreadevelopment
🌍 Why Learning to Code is Like Learning a Superpower

April 19, 2025Developer

🌍 Why Learning to Code is Like Learning a Superpower

share

In today’s digital world, coding is no longer just for engineers or Silicon Valley startups — it’s becoming a core skill like reading or writing. Whether you're building websites, automating tasks, or analyzing data, code is the invisible force powering modern life.Learning to code gives you the ability to create instead of just consume. Want to build a website for your art? Done. Automate boring daily reports? Easy. Create a game? Go for it.What’s most exciting is how coding changes how you think. You become better at breaking down problems, thinking logically, and solving things step-by-step — skills that apply far beyond your computer screen.And here’s the best part: anyone can learn. With thousands of free resources online and a community that loves to share, the hardest part is just starting. So go ahead — try it. Because once you start seeing what’s possible, you won’t want to stop.🚀 The Journey from Beginner to BuilderWhen you first start coding, it can feel like learning a new language — and that’s because it is. At the beginning, things like semicolons, curly braces, and cryptic error messages might seem overwhelming. But the truth is: every developer starts there. The difference between a beginner and an expert is simply time, curiosity, and persistence.The internet is full of playgrounds for you to explore:Want to build something visual? Try HTML, CSS, and JavaScript.Interested in AI or data? Dive into Python.Love making apps? Learn React Native or Flutter.Dreaming of backend systems? Explore Node.js, Django, or FastAPI.The key is to start small. Build a personal project. A to-do list. A portfolio site. A mini-blog. Each one builds confidence and helps you grow from a learner into a creator.💡 Code is CreativePeople often think programming is cold or robotic — but it’s actually a deeply creative act. You're building things from nothing. Solving problems. Designing experiences. Just like writing, music, or art, coding gives you the tools to express yourself.The feeling of solving a bug after hours of trying? Magical. Watching your app come to life for the first time? Addictive. Sharing something you built with others? Incredibly rewarding.🌱 Final ThoughtsLearning to code is one of the best investments you can make in yourself — not just for your career, but for how you understand and shape the world around you.So whether you're building for fun, for freedom, or for your future — keep going.The world runs on code. Why not help write it?

Web developmentApiPython
Vebhook VS So'rovnoma (Polling)

April 25, 2025Shokhruh

Vebhook VS So'rovnoma (Polling)

share

So'rovnoma (polling) uzi nima ? Vebhook chi?Xozir shu blogda tepadagi savolga jovob topishga xarakat qilamizSo'rovnoma (Polling)Restoranda ovqatga buyurtma berayotganda, ofitsiantdan buyurtmangiz tayyor yoki yo'qligini doimiy ravishda so'rash maqsadga muvofiq emas va uyatli ham dur.Ushbu stsenariy so'rovning(polling) samarasizligini ko'rsatadi, bu usul mijoz oldindan belgilangan vaqt oralig'ida serverdan ma'lumotlarni qayta-qayta so'raydi.So'rov (polling) bir xizmat yangi ma'lumotlarni tekshirish uchun boshqa xizmatga takroriy so'rovlar yuborishni o'z ichiga oladi.So'rovning asosiy xususiyatlari:Takroriy so'rovlar: So'rovda mijoz muntazam ravishda serverga yangi ma'lumotlar mavjudligini so'rab so'rovlar yuboradi. Bu yondashuv doimiy ravishda "Men uchun yangi narsa bormi?" kabi so'rovlar junatadi.Resursga talabgor: so‘rovlar resurslarni ko‘p va samarasiz ketishidur. U yangilanishlar mavjud bo'lmagan taqdirda ham tarmoqni kengligi va server resurslarini sarflaydi.O'tkazib yuborilgan yangilanishlar: so'rovnoma real vaqtda yangilanishlarni o'tkazib yuborishga olib kelishi mumkin. Mijoz yangilanishlarni oldindan belgilangan vaqt oralig'ida tekshirganligi sababli, u ma'lumotlar mavjud bo'lganda darhol bilmasligi mumkin.VebhooklarVebhooklar so'rovga(polling) yanada samaraliroq va real vaqtda alternativa taklif qiladi. Vebhuklar qanday ishlaydi:Callback URL-manzil: Vebhuk yordamida siz bir tizim yangi ma'lumotlar mavjud bo'lganda boshqa tizimni xabardor qilish uchun foydalanadigan qayta qo'ng'iroq URL manzilini o'rnatasiz. Ushbu yondashuv o'rnatilgan bildirishnoma tizimiga o'xshaydi, u erda server "biror narsa sodir bo'lganda sizga xabar beraman" deb aytadi.Ma'lumotlarni yetkazib berish: Vebhook ma'lumotlarni real vaqt rejimida yangilanishini ta'minlab, ular mavjud bo'lishi bilanoq qabul qiluvchi xizmatiga yuboradi. Bu vebhuklarni o'z vaqtida bildirishnomalar kerak bo'ladigan stenariylar uchun qo'l keladi.Samaradorlik va real vaqtda yangilanishlar: Vebhuklar so'rovdan ko'ra samaraliroqdir, chunki ular takroriy so'rovlarga bo'lgan ehtiyojni yo'q qiladi. Ular real vaqt rejimida yangilanishlarni ta'minlaydi, bu ularni to'lov tizi, CI/CD platformalari va zudlik bilan yangilashni talab qiladigan boshqa xizmatlar kabi ilovalar uchun ayni qo'l keladi.So'rov va Vebhuklardan qachon foydalanish kerakHar bir yondashuv o'z foydalanish holatlariga ega:So'rov:Ma'lumotlarni tez-tez yangilash: Agar real vaqtda ma'lumotlarni yangilash kerak bo'lmasa va ma'lumotlar tez-tez yangilanib tursa, so'rov bunga yechim bo'la oladi. Har bir hodisa uchun veb-huklarni yuborish resurs talab qilishi mumkin. Misol uchun, foydalanuvchi bazasi haqida xabar bermoqchi bo'lgan ijtimoiy media ilovasi, agar ko'p foydalanuvchilar ketma-ket ro'yxatdan o'tgan bo'lsa, vebhuklarga to'lib ketishi mumkin.Moslashuvchanlik: Sinxronlash chastotasini yangilangan maʼlumotlarga qanchalik tez-tez kerakligi asosida sozlashingiz mumkin.Veb-huklar:Haqiqiy vaqtda yangilanishlar: Vebhook real vaqtda yangilanishlar muhim bo'lgan stsenariylar uchun juda mos keladi. Masalan, toʻlov bildirishnomalari, chat ilovalari va darhol bildirishnomalarni talab qiladigan har qanday xizmat.Resurslardan samarali foydalanish: Vebhook so'rovga qaraganda resurslardan foydalanish nuqtai nazaridan samaraliroq. Ular ma'lumotlarning takroriy so'rovlarsiz real vaqt rejimida yetkazilishini ta'minlaydi.Xo'sh, siz ilovangizda So'rov yoki Vebhook-dan foydalanganmisiz?

webhooks polling networking
Tekinga Resume qilisa boadigan websitlar(Free Resume builder)

April 23, 2025Developer

Tekinga Resume qilisa boadigan websitlar(Free Resume builder)

share

📄 Bepul Resume Tayyorlash Sayti – Ish Qidiruvchilar Uchun Ajoyib YechimBugungi kunda yaxshi tayyorlangan rezume (CV) ish topishda eng muhim vositalardan biridir. Ko‘pchilik yoshlar yoki tajribasiz mutaxassislar o‘zlari haqida professional ko‘rinishda CV yozishda qiynaladi. Shu sababli, internetda mavjud bo‘lgan bepul resume tuzuvchi saytlar sizga katta yordam bo‘lishi mumkin.🛠️ Canva – Eng oson va zamonaviy resume tayyorlashCanva – bu bepul dizayn platformasi bo‘lib, unda siz CV, vizitkalar, bannerlar va boshqa ko‘plab dizaynlarni yaratishingiz mumkin. Ayniqsa CV dizayn shablonlari juda ko‘p va foydalanuvchilar uchun qulay.🧑‍💼 Nima uchun Canva?TekinJuda ko‘p shablonlarMobil qurilmalarda ham ishlaydi📌 Resume.io – Oddiy va TezResume.io foydalanuvchilar uchun juda qulay va soddaligi bilan mashhur. Siz o‘zingiz haqingizda ma’lumot kiritishingiz bilan sayt avtomatik tarzda tayyor shablonlarga joylashtirib beradi.🧑‍💼 Nima uchun Resume.io?Juda ko‘p shablonlarTekin(lekin faqat bir marotaba va cheklanga shablonda)🧰 Cvcons.com/buildercvcons.com/builder bu ozim sheriklikda qilgan website va bu tekin webiste xoxlagan shblonda resume qilsa boladi va pdf shaklida yuklab olsa boladi lekin bu hali mvp bolib kamchiliklar bor lekin resume qilsa boladi va pellik tariflari bor xozirda u beta bolib hali toliq ishga tushmagan🧑‍💼 Nima uchun cvcons.com/builder?tekinATS-friendlybu shunchaki men ishlatgan resume builder websitlar bolib bundan ham yaxshiroqlari bolishi mumkin ,bu websitlarni tajribamdan kelib chiqib aytyapman va oxirgi aytgan resume builder bu shunchaki reklama maqsadida yozdim🤣(lekin ishlatsa boladi).

resumejobapplication
An Introduction to Three.js: Creating Stunning 3D Visualizations for the Web

April 20, 2025Dev_01

An Introduction to Three.js: Creating Stunning 3D Visualizations for the Web

share

In the world of web development, making rich, interactive 3D graphics is no longer reserved for specialized software. Thanks to Three.js, developers can now create stunning 3D visuals right in the browser using JavaScript. Whether you're building games, interactive simulations, or just adding some flair to your website, Three.js offers a powerful, yet easy-to-use, framework for bringing 3D experiences to life on the web.In this blog, we’ll take a closer look at Three.js, explore its capabilities, and walk through a simple example to help you get started.What is Three.js?Three.js is an open-source JavaScript library that simplifies the process of creating and rendering 3D graphics in the browser. Built on top of the WebGL API, which is responsible for rendering 3D graphics in browsers, Three.js abstracts away many of the complexities of working with WebGL directly. This makes it easier for developers to create 3D scenes, animations, and interactive visualizations without deep knowledge of lower-level graphics programming.Core Features of Three.jsThree.js offers a wide range of features for developers, some of which include:3D Geometry: Easily create 3D objects like cubes, spheres, and complex meshes.Lights and Shadows: Add realistic lighting to your scene, and configure different shadow effects.Materials and Textures: Apply materials (like basic, Lambert, and Phong) and textures to objects for a more realistic look.Camera and Viewports: Control the camera position, field of view, and other parameters to view the 3D world.Animation: Create animations for objects and scenes, including keyframe animation and tweening.Interactivity: Add interactivity using mouse and touch input, allowing users to interact with 3D objects.Post-processing: Apply special effects like bloom, depth of field, and more after rendering the scene.These features, combined with an active community, extensive documentation, and examples, make Three.js a fantastic choice for anyone looking to build 3D experiences on the web.How Does Three.js Work?Three.js simplifies the process of rendering 3D scenes by handling the complex parts of WebGL for you. The library provides an easy-to-understand API for working with scenes, cameras, objects, and renderers. Here’s a breakdown of the key components:Scene: The environment that contains all your objects, lights, and cameras.Camera: The viewpoint from which the scene is viewed. Three.js provides multiple camera types (e.g., perspective and orthographic) to suit different needs.Renderer: The engine that renders the scene to the browser’s canvas using WebGL or other rendering methods like CSS3D.Object3D: The basic building block for any 3D object in Three.js. This can be a simple object like a cube or a more complex 3D mesh.Lights: Different types of light (ambient, point, directional) can be used to illuminate the objects in the scene.Materials and Textures: Materials define how objects react to light, and textures add detail to these materials, giving them a more realistic appearance.Basic Example: A Rotating CubeLet’s go through a simple example to help you get started with Three.js. This example will render a rotating cube in the browser.Set up your project: First, you need to include Three.js in your project. You can download it from Three.js’s official website or use a CDN link. Here's an example using a CDN:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Three.js Example</title> <style> body { margin: 0; overflow: hidden; } canvas { display: block; } </style> </head> <body> <script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script> <script> // 1. Create scene const scene = new THREE.Scene(); // 2. Create camera const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000); // 3. Create renderer const renderer = new THREE.WebGLRenderer(); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); // 4. Create cube geometry const geometry = new THREE.BoxGeometry(); const material = new THREE.MeshBasicMaterial({ color: 0x00ff00 }); const cube = new THREE.Mesh(geometry, material); scene.add(cube); // 5. Set camera position camera.position.z = 5; // 6. Animation loop function animate() { requestAnimationFrame(animate); // Rotate cube cube.rotation.x += 0.01; cube.rotation.y += 0.01; // Render scene renderer.render(scene, camera); } animate(); </script> </body> </html>Explanation of the Code:Scene Creation: const scene = new THREE.Scene(); initializes the scene where all 3D objects will be added.Camera Setup: const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000); sets up the camera with a field of view (FOV) of 75 degrees, and a near and far plane of 0.1 and 1000 units respectively.Renderer: const renderer = new THREE.WebGLRenderer(); sets up the WebGL renderer to display the scene in the browser.Cube Creation: We create a cube using THREE.BoxGeometry and apply a basic green material using THREE.MeshBasicMaterial.Animation: The animate function continuously rotates the cube around its x and y axes and renders the updated scene every frame using requestAnimationFrame.Advanced Use Cases for Three.jsWhile the above example is a simple starting point, Three.js can handle much more advanced visualizations:3D Games: You can use Three.js to build fully interactive 3D games, complete with physics engines and real-time interaction.Virtual and Augmented Reality: With the help of the WebVR and WebXR APIs, Three.js can be used to create immersive VR/AR experiences directly in the browser.Data Visualizations: Three.js is commonly used to create interactive, real-time 3D data visualizations, especially in fields like data science and analytics.Animations and Simulations: Whether it’s simulating physics or creating smooth animations, Three.js makes it easy to animate objects in 3D space.3D Models and Textures: Three.js supports importing 3D models from formats like OBJ, GLTF, and FBX, and applying textures and lighting for realistic visuals.Resources to Learn MoreOfficial Three.js Documentation: https://threejs.org/docs/Three.js Examples: https://threejs.org/examples/Three.js GitHub Repository: https://github.com/mrdoob/three.js/Community and Tutorials: There are numerous tutorials and courses available on platforms like YouTube, Udemy, and freeCodeCamp that dive deeper into Three.js.ConclusionThree.js is an incredibly powerful library that opens the door for developers to create immersive, interactive 3D experiences directly in the web browser. Whether you’re interested in building 3D games, visualizing data, or adding interactive 3D elements to your site, Three.js provides the tools you need to get started quickly and efficiently.With its vast capabilities and an ever-growing community of users, Three.js is an excellent choice for anyone looking to dive into the world of 3D web development.Start experimenting with Three.js today, and see how you can bring your creative ideas to life!

Three.jsJavascriptweb
💡 Understanding Design Patterns in Software Development

April 20, 2025Dev_01

💡 Understanding Design Patterns in Software Development

share

In the ever-evolving world of software development, writing clean, reusable, and maintainable code is essential. That’s where Design Patterns come in. These are proven solutions to common problems in software design that help developers tackle complex coding challenges with elegance and efficiency.Whether you're a beginner learning to structure your code better or a seasoned developer aiming to follow best practices, understanding design patterns can significantly enhance your development skills.📌 What Are Design Patterns?Design patterns are typical solutions to common problems in software design. They are like blueprints that you can customize to solve a particular design problem in your code.They’re not libraries or code you can plug into your project—they’re concepts or templates that guide how you structure your code for common use cases, like creating objects, organizing classes, or managing communication between components.✅ Think of design patterns as time-tested guidelines that lead to robust, scalable, and easy-to-read code.🧠 Why Use Design Patterns?✅ Promote code reusability✅ Improve communication between developers with a common vocabulary✅ Ensure maintainability and scalability✅ Help with refactoring and reducing code smells✅ Reduce technical debt🏗️ Categories of Design PatternsDesign patterns are generally divided into three main categories:1. Creational PatternsThese deal with object creation mechanisms, trying to create objects in a manner suitable to the situation.Popular Creational Patterns:Singleton: Ensures a class has only one instance and provides a global point of access to it.Use case: Logging, configurations, or DB connections.Factory Method: Allows a class to defer instantiation to subclasses.Use case: When the exact type of the object isn’t known until runtime.Abstract Factory: Creates families of related or dependent objects.Use case: UI themes, widget sets.Builder: Separates the construction of a complex object from its representation.Use case: Creating complex documents or UI components.Prototype: Creates new objects by copying an existing one.Use case: When object creation is costly.2. Structural PatternsThese focus on how classes and objects are composed to form larger structures.Popular Structural Patterns:Adapter: Allows incompatible interfaces to work together.Use case: Integrating legacy or third-party APIs.Decorator: Adds new behaviors to objects dynamically.Use case: UI components, middleware.Facade: Provides a simplified interface to a larger body of code.Use case: Wrapping complex libraries.Composite: Treats individual objects and groups of objects uniformly.Use case: UI trees, file systems.Proxy: Controls access to another object.Use case: Lazy loading, access control, logging.3. Behavioral PatternsThese deal with communication between objects, helping define how objects interact and distribute responsibility.Popular Behavioral Patterns:Observer: Notifies all dependent objects when one object changes state.Use case: Event systems, UI state sync.Strategy: Enables selecting an algorithm’s behavior at runtime.Use case: Sorting methods, payment gateways.Command: Encapsulates a request as an object.Use case: Undo/redo, task queues.State: Allows an object to alter its behavior when its internal state changes.Use case: Finite state machines.Chain of Responsibility: Passes requests along a chain until handled.Use case: Middleware in web apps.🛠️ Example: Singleton Pattern in TypeScriptHere’s a quick example of the Singleton pattern in TypeScript:class Singleton { private static instance: Singleton; private constructor() {} public static getInstance(): Singleton { if (!Singleton.instance) { Singleton.instance = new Singleton(); } return Singleton.instance; } public log(): void { console.log('I am the only instance!'); } } const logger1 = Singleton.getInstance(); const logger2 = Singleton.getInstance(); console.log(logger1 === logger2); // true💡 Explanation: Only one instance of the Singleton class can exist. This pattern is great for things like database connections, where you want to ensure a single shared resource.📘 Real-World Examples of Design PatternsReact Context API → Observer patternRedux → Mediator, ObserverExpress middleware → Chain of ResponsibilityMongoose schema builder → BuilderReact hooks → Strategy (selecting how state or side effects are handled)🚀 Best Practices for Using Design Patterns🧩 Use when needed, not for the sake of using them🧼 Keep code readable and maintainable🤝 Communicate with team using design pattern names to explain architecture🔍 Continuously refactor and improve based on evolving needs🔚 ConclusionDesign patterns are essential tools in a developer’s toolkit. They empower you to write better, cleaner, and more scalable code. While they shouldn’t be used blindly, understanding when and how to apply them can significantly enhance your code quality and team collaboration.Start small—implement a few in your projects and build your understanding over time. Before you know it, you’ll start recognizing patterns instinctively in your day-to-day development.

PatternsProgramming
🌐 How the Internet Works — Explained Simply

April 20, 2025Greg

🌐 How the Internet Works — Explained Simply

share

Have you ever wondered how you're able to type in www.google.com, hit Enter, and almost instantly get a webpage filled with search results? It feels like magic—but it's not. It's the Internet in action. In this post, we’ll break down how the Internet works in a clear, understandable way.📦 What Is the Internet?At its core, the Internet is a massive network of computers that are connected to each other globally. These computers share information using a set of standard rules called protocols.Think of it like a postal system—you send a letter (data), it gets transported through different locations (routers/servers), and eventually reaches the right person (computer or device).🧱 Basic Building BlocksTo understand how the internet works, let's first look at some key components:Client: Your device (like a phone, tablet, or computer) that requests data.Server: A remote computer that stores websites, files, or applications and sends them back upon request.IP Address: A unique number assigned to every device connected to the Internet.DNS (Domain Name System): Like the phonebook of the Internet—translates domain names (like google.com) into IP addresses.Router: A device that directs data between your device and the wider internet.ISP (Internet Service Provider): The company that gives you access to the internet (like AT&T, Comcast, etc.).🚦 Step-by-Step: What Happens When You Visit a Website?Let’s say you want to visit www.youtube.com. Here’s what actually happens behind the scenes:1. You Type a URL (like youtube.com)Your browser doesn’t understand "youtube.com" directly. It needs the server’s IP address.2. DNS LookupYour browser asks a DNS server to find the IP address of youtube.com. The DNS responds with something like:142.250.190.2063. Browser Sends a RequestYour browser now knows where to go and sends an HTTP request to the YouTube server:"Hey, can I get the homepage of youtube.com?"This request is broken into small packets of data and sent across the internet.4. Packets Travel Through the InternetThese data packets travel from your device → router → ISP → across various servers and routers → until they reach YouTube’s server.Each router along the way decides where to send the packet next. This is why it's often compared to a GPS system for data.5. Server RespondsYouTube’s server receives the request, processes it, and sends back data (HTML, CSS, JavaScript, images, etc.) in response packets.6. Browser Renders the PageYour browser receives the packets, assembles them, and displays the YouTube homepage.🎉 You now see the website—all this usually happens in under a second!🔒 What About Security?When you see https:// in the address bar, it means the data is encrypted using SSL/TLS. This protects your information from being intercepted.💬 Common Protocols Behind the ScenesHTTP/HTTPS – Used to load webpagesTCP/IP – Core protocol suite that manages packet deliveryDNS – Resolves domain names to IP addressesFTP – Transfers filesSMTP/IMAP – For sending and receiving emails📡 What About Wi-Fi and Mobile Data?Whether you use Wi-Fi or mobile data, it’s just different ways of connecting your device to your ISP, which then connects you to the global Internet.Wi-Fi: Connects via a local router to your ISPMobile Data: Connects via cellular towers to your mobile provider (which acts like an ISP)🔚 ConclusionThe Internet is a complex, yet beautifully organized system that connects billions of devices across the globe. From DNS lookups to data packets flying through routers, every webpage you visit is the result of a high-speed digital conversation.Next time you load a website, remember: you’re making a request that zips across the planet in milliseconds—and that’s pretty amazing.

InternetTech
🧭 Next.js Page Routes vs App Routes — What's the Difference?

April 19, 2025Isroiljon

🧭 Next.js Page Routes vs App Routes — What's the Difference?

share

With the introduction of the App Router in Next.js 13+, developers now have two paradigms for defining routes: the traditional Pages Router and the modern App Router. Understanding the difference between the two is key to deciding which one best fits your project.🔹 Pages Router (Pre-Next.js 13)The Pages Router is the classic file-based routing system used in Next.js since the beginning. It's still widely supported and maintained.📁 Structure/pages ├── index.tsx // → / ├── about.tsx // → /about └── blog └── [id].tsx // → /blog/:id✅ FeaturesBased on file structure inside /pagesSupports dynamic routes via [param]Built-in API routes via /pages/apigetStaticProps, getServerSideProps, getInitialProps for data fetchingWorks great for traditional SSR and SSG❌ LimitationsLess flexible layoutsLess powerful streaming and partial renderingNo support for server components🔹 App Router (Introduced in Next.js 13)The App Router is a newer system introduced with Next.js 13, designed to offer more flexibility and control over modern React app architecture.📁 Structure/app ├── page.tsx // → / ├── layout.tsx // Shared layout ├── about │ └── page.tsx // → /about └── blog └── [id] └── page.tsx // → /blog/:id✅ FeaturesSupports React Server Components out of the boxBuilt-in layouts, templates, and loading statesgenerateStaticParams, generateMetadata, fetch() for data fetchingGreat for nested routes and modular designFine-grained control over SSR, SSG, and client-side behavior❌ CaveatsNewer and more complex mental modelSome 3rd party libraries may not support server components yetStill evolving, some features can feel less mature than pages🆚 Key DifferencesFeaturePages RouterApp RouterDirectory/pages/appData FetchinggetStaticProps, etc.fetch(), generateStaticParams, etc.LayoutsRepeated in each page or with _app.tsxlayout.tsx with nested layoutsServer Components❌ Not supported✅ Fully supportedStreaming❌ Limited✅ SupportedRoutingFile-basedFile-based + nested structureCompatibility✅ Stable✅ Actively developing🤔 Which One Should You Use?Starting a new project? → Go with the App Router for more flexibility and future-proof architecture.Maintaining an older codebase? → Stick with the Pages Router unless a refactor is worth it.Need custom layouts or partial loading states? → App Router is your friend.💡 TipYou can mix both in the same project, but it’s recommended to choose one for consistency. Mixing can lead to confusion and extra complexity.🔚 ConclusionNext.js is evolving to support the future of React with powerful features like Server Components and nested layouts. While the Pages Router remains a stable choice, the App Router unlocks advanced features and a cleaner structure.Choose the one that fits your team’s needs — and don’t be afraid to explore both!

Next.jsRoutesWeb
  • @2025
  • TwitterLinkedInEmailGithub
  • Telegram