01 | Introduction To ASP.NET Web API | What Is Web API ? Web API In ASP.NET | Web API (Hindi/Urdu)
Summary
TLDRThe lecture series introduces the concept of Web APIs, emphasizing their importance in web development and their role in allowing multiple software applications to reuse and interact with data. It explains APIs as a set of predefined functions and protocols that facilitate software and application development. The video uses examples like weather updates and login systems to illustrate how APIs can be accessed across various platforms and devices. It also touches on RESTful services, discussing the architectural style and constraints that make web APIs efficient and reusable, focusing on the use of HTTP methods like GET, POST, PUT, and DELETE for data exchange.
Takeaways
- 😀 The lecture series is about ASP.NET Web API, a topic that many viewers have requested for its importance in web development.
- 🌐 Web API is a concept that is often misunderstood by students, despite being a fundamental aspect of web development and not as complex as perceived.
- 🔌 Web API stands for Application Programming Interface, which provides a set of routines, protocols, and tools for building software and applications.
- 📚 The importance of understanding Web API is emphasized, as it is a common requirement for web development jobs, often asked in interviews.
- 💡 The concept of reusability is central to APIs; they are designed to be used multiple times across different software applications.
- 🛠️ APIs can be built using various technologies, not limited to web technologies, allowing for a wide range of applications.
- 🌟 Examples of APIs include weather updates and login systems, which are used across multiple platforms like websites, mobile apps, and even IoT devices.
- 📊 The data exchanged through APIs is typically in XML or JSON format, which are lightweight and easy to parse.
- 🌐 Web APIs interact with databases and provide resources that can be accessed across different applications, such as mobile apps, desktop apps, browsers, and IoT.
- 📝 The lecture also covers the concept of REST (Representational State Transfer), an architectural style that defines the rules for implementing Web APIs, making them more accessible and easier to use.
Q & A
What is the main topic of the lecture series?
-The main topic of the lecture series is about .NET Web API, focusing on the concept and implementation of APIs in the context of web development.
Why are Web APIs considered important in web development?
-Web APIs are considered important because they allow for the creation of reusable components that can be used across different software applications and web services, making development more efficient and organized.
What does the acronym API stand for?
-API stands for Application Programming Interface, which is a set of routines, protocols, and tools for building software applications.
What is the full form of REST as mentioned in the context of Web APIs?
-REST stands for REpresentational State Transfer, which is an architectural style that defines a set of constraints to be used for creating networked applications.
What are the two common formats in which data is exchanged through Web APIs?
-The two common formats in which data is exchanged through Web APIs are XML (eXtensible Markup Language) and JSON (JavaScript Object Notation).
How does the concept of reusability relate to Web APIs?
-Web APIs are designed to be reusable, allowing developers to implement the same API across multiple software applications and services, thus reducing redundancy and improving efficiency.
What is the role of HTTP protocol in the context of Web APIs?
-The HTTP (Hypertext Transfer Protocol) protocol plays a crucial role in Web APIs as it facilitates the communication between the client and the server, enabling the transfer of data in the form of requests and responses.
What are some common methods or verbs used in HTTP requests to interact with Web APIs?
-Common HTTP methods or verbs used to interact with Web APIs include GET (to retrieve data), POST (to submit data), PUT (to update data), and DELETE (to delete data).
Can Web APIs be implemented using technologies other than web technologies?
-Yes, Web APIs can be implemented using various technologies that provide the capability to create APIs, not limited to web technologies.
What is the significance of understanding RESTful principles when working with Web APIs?
-Understanding RESTful principles is significant as it provides a structured way to design and implement Web APIs, ensuring they are stateless, scalable, and easy to maintain.
How do Web APIs help in reducing the workload for developers?
-Web APIs help in reducing the workload for developers by allowing them to create a single API that can be used across multiple platforms and applications, thus avoiding the need to write separate code for each platform.
Outlines
💻 Introduction to Web APIs in .NET
The speaker begins a lecture series on .NET Web APIs, a topic requested by many viewers due to its practical application despite being considered a complex concept. The speaker emphasizes that Web APIs are not limited to web technologies and can be implemented in various programming languages. The importance of understanding Web APIs is highlighted, especially for those seeking jobs in web development, as they are a frequent topic in interviews. The lecture aims to clarify the concept of APIs and their implementation, starting with the basics of what an API is, according to Wikipedia, which defines it as a set of subroutine definitions, protocols, and tools for building software and applications. The speaker explains that APIs provide pre-defined functions or methods, protocols, and tools that can be used to perform tasks, and their reusability is a key feature, allowing developers to build and integrate software more efficiently.
🌐 Understanding and Examples of Web APIs
The speaker elaborates on the concept of Web APIs, using examples to illustrate their utility. The first example is a weather API that provides updates about the weather in a user's city or country. This API is a common feature across various platforms, including websites, mobile applications, and even tablet applications. The speaker emphasizes that while the API remains the same, it can be accessed across multiple clients and devices. Another example is a login API, which is a ubiquitous feature across different websites and applications, allowing users to register or log in. The speaker points out that these APIs can be used to perform specific tasks within different applications, highlighting the concept of reusability and the ability to integrate APIs into various software and applications.
📱 Web APIs and Client-Server Interaction
The speaker discusses how Web APIs interact with databases and how they can be used across different platforms such as mobile applications, desktop applications, browsers, and IoT devices. The speaker explains that before the advent of Web APIs, developers had to create separate interfaces for each type of client, which was time-consuming. With Web APIs, the same API can be used to access and provide data to mobile apps, desktop applications, browsers, and IoT devices, simplifying the development process. The speaker also touches on the formats in which data is exchanged with Web APIs, typically XML or JSON, and the use of HTTP protocol for data transfer, ensuring security and efficiency in data exchange.
🔗 HTTP Protocol and RESTful Web Services
The speaker delves into the HTTP protocol, which is fundamental to client-server architecture and data exchange in Web APIs. The speaker explains that data exchanged through Web APIs is typically in XML or JSON format and that the exchange occurs via HTTP methods or verbs such as GET, POST, PUT, and DELETE. The speaker introduces the concept of REST (Representational State Transfer), an architectural style that defines a set of constraints for creating scalable web services. The speaker emphasizes that understanding REST is crucial for implementing Web APIs effectively, as it dictates how the APIs should be structured and interact with clients.
🌟 Practical Examples of Web APIs
The speaker provides practical examples of Web APIs, such as an API related to coronavirus statistics, which aggregates data like total cases, deaths, and recoveries. This API is accessed by various clients, including mobile applications, desktop applications, and web browsers, to display up-to-date information on the pandemic. The speaker also discusses how data can be stored within the API by different clients, such as hospitals reporting new cases or deaths, demonstrating the two-way interaction between clients and the API. These examples serve to clarify the concept of Web APIs and their practical applications in real-world scenarios.
Mindmap
Keywords
💡API
💡Web API
💡REST
💡HTTP Protocol
💡JSON
💡Reusability
💡Endpoints
💡Protocols
💡Clients
💡Data Formats
💡HTTP Methods
Highlights
Introduction to the lecture series on ASP.NET Web API, emphasizing its importance in web development.
Explanation of the concept of a Web API and its significance in modern web development.
The importance of understanding Web API for job seekers in the web development field.
Definition of API according to Wikipedia, highlighting its role in software development.
Discussion on the composition of an API, including routines, protocols, and tools.
The concept of reusability in APIs and how it benefits software and application development.
Differentiation between Web API and other types of APIs, and the flexibility in technology choice for API development.
Examples of Web API usage, such as weather updates and login functionalities across various platforms.
The versatility of Web API in accessing data across multiple clients and devices.
Explanation of how Web API interacts with databases and the role of entities within it.
The evolution from traditional database access methods to the streamlined approach offered by Web API.
The data formats commonly used in Web API, such as XML and JSON, and their advantages.
The role of HTTP protocol in data exchange between clients and Web API.
Detailed explanation of HTTP methods (GET, POST, PUT, DELETE) and their use cases in Web API.
Introduction to RESTful architecture and its significance in designing Web APIs.
The constraints and rules of REST that make a Web API 'RESTful' and its benefits.
Practical examples of Web API implementation, such as tracking COVID-19 cases and hospital data uploads.
The potential for Web API to be accessed and utilized across various clients, including mobile applications and desktop applications.
Transcripts
[संगीत]
अच्छा आज से हम स्टार्ट कर रहे हैं एडनेट
वेब एपीआई ठीक है तो यह एक लेक्चर सीरीज
है जो कि बहुत ही ज्यादा व्यूवर्स ने मुझे
कहा था कि सर इस टॉपिक के ऊपर बनाए ठीक है
क्योंकि एक टिपिकल कांसेप्ट है मतलब
टिपिकल तो नहीं है लेकिन इंटरनेट के ऊपर
इसको इस तरह से इतनी टिपिकली इसको
एक्सप्लेन किया जाता है कि स्टूडेंट्स को
समझ में नहीं आता ठीक है हालांकि ये बहुत
आसान सा कांसेप्ट है और इसको इंप्लीमेंट
करना भी कोई इतना ज्यादा मुश्किल नहीं है
लेकिन अगर आपको यह कांसेप्ट समझ में आ गया
तो आप इजली इसको इंप्लीमेंट कर पाएंगे ठीक
है तो ये प्लेलिस्ट जो है ये बिल्कुल मैं
सिर्फ और सिफ अपने व्यूवर्स के लिए यहां
पे स्टार्ट कर रहा हूं ठीक है तो as.net
वेब एपीआई ठीक है बहुत ही ज्यादा
इंपोर्टेंट कांसेप्ट ठीक है as.net के
हवाले से और कोई भी अगर आप वेब डेवलपमेंट
की लैंग्वेज यूज कर रहे हो इस तरह पीएसपी
हो गई और बहुत सारी लैंग्वेजेस है ठीक है
तो उनमें वेब एपीआई का कांसेप्ट बहुत
ज्यादा इंपॉर्टेंस रखता है ठीक है मतलब
अगर आपको वेब डेवलपमेंट की साइट में जॉब्स
चाहिए तो वहां पे ये वेब एपीआई के
क्वेश्चन लाजमी आपसे पूछे जाते हैं ठीक है
तो ये लेक्चर आपने बहुत ध्यान से सुनना है
ठीक है तो यहां पे आते
हैं देखो सबसे पहले बिफोर वी अंडरस्टैंड
व्हाट इज वेब एपीआई लेट्स सी व्हाट इज एन
एपीआई ठीक है मतलब वेब एपीआई को समझने से
पहले सबसे पहले हम ये समझते हैं कि एपीआई
किसे कहते हैं ठीक है मतलब एपीआई की फुल
फॉर्म सबको पता है एप्लीकेशन प्रोग्रामिंग
इंटरफेस ठीक है यह तो इसकी फुल फॉर्म हो
गई लेकिन यह होता क्या है ठीक है देखो एस
पर विकिपीडिया डेफिनेशन ऑफ एपीआई अगर मैं
विकिपीडिया के पॉइंट ऑफ व्यू से एपीआई की
आपको डेफिनेशन समझाऊं तो देखो यहां पे
क्या कह रहा है इन कंप्यूटर प्रोग्रामिंग
एपीआई इज अ सेट ऑफ सब रूटीन डेफिनेशन
प्रोटोकॉल्स एंड टूल्स फॉर बिल्डिंग
सॉफ्टवेयर एंड एप्लीकेशन इसका मतलब
अकॉर्डिंग टू विकपीडिया एपीआई की डेफिनेशन
क्या है के इन कंप्यूटर प्रोग्रामिंग
एपीआई को क्या कहा जाता है इज अ सेट ऑफ सब
रूटीन डेफिनेशन सब रूटीन डेफिनेशन का मतलब
इसको आप फंक्शन भी कह सकते हो ठीक है मतलब
फंक्शन है मेथड्स है जो बने बनाए पहले से
रखे हुए हैं एक एपीआई के अंदर ठीक है मतलब
आपके पास सेट ऑफ सब डेफिनेशन है मतलब सेट
ऑफ फंक्शंस है ठीक है जो कि एपीआई के अंदर
आपके पास रखे गए हैं और उसको हम क्यों यूज
करते हैं किसी भी टास्क को परफॉर्म करने
के लिए उसको हम यूज करते हैं फिर
प्रोटोकॉल्स होते हैं ठीक है कुछ रूल्स
एंड रेगुलेशन होते हैं ठीक है और फिर एंड
टूल्स मतलब कुछ ऐसे टूल्स होते हैं जिनको
यूज करके हम अपनी सॉफ्टवेयर और एप्लीकेशंस
को बिल्ड करते हैं इसका मतलब एपीआई सिंपल
सा कांसेप्ट है कि इसके अंदर आपके पास कुछ
फंक्शंस बने बनाए मौजूद होते हैं ठीक है
कुछ कोड बना बनाया मौजूद होता है कुछ
प्रोटोकॉल्स होते हैं और कुछ टूल्स होते
हैं जिनको हम अपना सॉफ्टवेयर और एप्लीकेशन
डेवलप करने में यूज करते हैं ठीक है इसका
मतलब एक एपीआई बनी हुई है अब उस एपीआई को
मैं किसी भी सॉफ्टवेयर और किसी भी
एप्लीकेशन के अंदर यूज कर सकता हूं और
देखो एक बात याद रखना एपीआई हो या वेब
एपीआई ठीक है इट्स ऑल अबाउट रीयूज बल ठीक
है इसका मतलब कि एपीआई आप बनाते ही इसीलिए
हो वेब एपीआई आप बनाते ही इसीलिए हो कि
आपको वो एपीआई या वो वेब एपीआई मल्टीपल
टाइम्स रीयूज करना है आपकी डिफरेंट
सॉफ्टवेयर एप्लीकेशंस के अंदर ठीक है मतलब
आप एक सॉफ्टवेयर डेवलपर हो या एक वेब
डेवलपर हो ठीक है आप बहुत सारी वेबसाइट्स
बनाते हो लेकिन आपको पता है कि भाई एक चीज
ऐसी है ठीक है एक कोड ऐसा है जो कि के मैं
रीयूज करता हूं अपनी सारी एप्लीकेशंस के
अंदर तो उसको आप क्या कर सकते हो एक एपीआई
की शक्ल में बना के अपने पास रख सकते हो
जिससे क्या होगा कि आप उस एपीआई को
बार-बार रीयूज कर सकते हो ठीक है तभी
मैंने इसको कहा था कि एपीआई हो या वेब
एपीआई हो इट्स ऑल अबाउट रीयूज बल ठीक है
अब देखो एपीआई जरूरी नहीं है कि आप वेब के
अंदर ही बनाओ ठीक है मतलब वेब टेक्नोलॉजी
को यूज करके भी बनाओ ठीक है आप किसी भी
टेक्नोलॉजी को यूज करके मतलब बहुत सारी
ऐसी टेक्नोलॉजीज है जो आपको एपीआई बनाने
की कैपेबिलिटी प्रोवाइड करती है ठीक है
जिस तरह एडनेट वेब एपीआई एडनेट हमें वेब
एपीआई मतलब ऐसी एपीआई जो वेब बेस्ड होती
है ठीक है उनको बनाने की फंक्शनैलिटी हमें
वो प्रोवाइड करता है ठीक है और एपीआई सेम
उसी तरह डेस्कटॉप के लिए भी हम बना सकते
हैं वेब के लिए भी बना सकते हैं और बहुत
सारी आपके पास टेक्नोलॉजीज है जिनको यूज
करके हम अपनी एपीआई क्रिएट कर सकते हैं
ठीक है यहां पे वेब एपीआई है इसका मतलब ये
जो हम एपीआई बनाएंगे वो वेब बेस्ड होगी
ठीक है अच्छा तो वेब एपीआई को समझने से
पहले ये तो आपके पास कांसेप्ट था एपीआई का
अब अगर मैं आपको कुछ एग्जांपल्स दिखाऊ ठीक
है कुछ एपीआई की एग्जांपल दिखाऊ ठीक है तो
यहां पे देखो पहली एग्जांपल वेदर स्पिट्स
ठीक है भाई देखो आपको ये एक विंडो नजर आ
रही होगी ठीक है ये बेसिकली एक एपीआई है
ठीक है मतलब एक वेदर स्निप है मतलब ये जो
स्निप है ये जो टुकड़ा है या क्या बताता
है ये आपको आपके सिटी आपके कंट्री के
अकॉर्डिंग आपको क्या बताता है वेदर की
अपडेट देता है ठीक है आने वाले कितने
दिनों में क्या वेदर होगा यह सारी चीजें
एक एपीआई के अंदर गैदर की गई है ठीक है
इसका मतलब कि इस एपीआई को ये जो आपको वेदर
स्निप इट नजर आ रहा है यह बेसिकली एक
एपीआई है और आपने अक्सर इसी एपीआई को आपने
अपनी वेबसाइट में भी देखा होगा ब्राउजर
में भी देखा होगा मोबाइल एप्लीकेशंस के
अंदर भी देख दे होगा टेबलेट एप्लीकेशन के
अंदर भी देखा होगा और बहुत सारे क्लाइंट्स
के अंदर क्लाइंट डिवाइस के अंदर आपने इस
एपीआई का यूज देखा होगा मतलब एपीआई एक ही
है लेकिन मैं इसको मल्टीपल क्लाइंट्स
मल्टीपल डिवाइस के अंदर एक्सेस कर सकता
हूं ठीक है तो एक एग्जांपल यह हो गई आपके
पास एपीआई की फिर दूसरी
एग्जांपल लॉग इन यूजिंग एक्स वा जड भाई
देखो आप कहीं से भी रजिस्टर होना चाह रहे
हो आप वेबसाइट पर रजिस्टर होना चाह रहे हो
आप प्ले स्टोर की किसी ऐप पे रजिस्टर होना
चाह रहे हो आप कहीं से भी रजिस्टर होना
चाह रहे हो ठीक है किसी भी वेबसाइट हो
प्ले स्टोर की कोई एप्लीकेशन हो कहीं भी
हो आपने ये वाली स्क्रीन लाजमी देखी होगी
बहुत जगहों पे जिस तरह आप कहीं भी रजिस्टर
करते हो तो नीचे फॉर्म के जो नीचे होता है
मतलब एक तो होता है कि आप फॉर्म रजिस्टर
करो उसी के नीचे ये ऑप्शन होता है मतलब ये
एपीआई होती है कि भाई आपको
करना है
एक्सेस कर सकते हो ठीक है मतलब ये एक
एपीआई है जिसको आप कहीं भी किसी भी
वेबसाइट के अंदर जहां जहां आप रजिस्ट्रेशन
का काम करवा रहे हो लॉग इन का काम करवा
रहे हो वहां आप इस एपीआई को यूज कर सकते
हो मतलब वही बात एपीआई इज ऑल अबाउट रियू
जबल य आपने कंपोनेंट बना ली अब आप इसको
वेबसाइट के अंदर अटैच करो अब आप इसको किसी
डेस्कटॉप एप्लीकेशन के अंदर अटैच करो किसी
मोबाइल एप्लीकेशन के अंदर अटैच करो यह
आपके ऊपर डिपेंड करता है फिर सेम इसी
तरह एक और एग्जांपल है पे विद
और उसको हम डिफरेंट क्लाइंट्स के साथ यूज
कर सकते हैं चाहे हम डेस्कटॉप एप्लीकेशन
में यूज करें मोबाइल एप्लीकेशन में यूज
करें जहां चाहे हम उनको इजली एक्सेस कर
सकते हैं ठीक है सही है मतलब बार-बार
रीयूज कर सकते हैं इसी पेमेंट मेथड को तो
ये क्या है एप्लीकेशन प्रोग्रामिंग
इंटरफेस है जो कि किसी स्पेसिफिक टास्क को
हम परफॉर्म करने के लिए बना के रख लेते
हैं और उसको अपनी डिफरेंट क्लाइंट के अंदर
डिफरेंट एप्लीकेशंस के अंदर हम इसको यूज
कर सकते हैं ठीक है तो एक इसका ये पॉइंट
है ठीक है अब चलते हैं आगे तो देखो अब हम
यहां पे बात कर रहे हैं वेब एपीआई की ठीक
है वेब एपीआई मतलब ऐसी एपीआई जो वेब बेस्ड
है मतलब वेब टेक्नोलॉजीज को यूज करके जो
एपीआई बनाई जाती है उसको हम कहते हैं वेब
एपीआई ठीक है तो अब वेब एपीआई बेसिकली है
क्या वेब एपीआई आप समझ लो कोई सर्विस है
ठीक है मतलब कोई सर्विस है जो कि हम अपनी
डिफरेंट क्लाइंट्स के अंदर यूज करना चाह
रहे हैं अपनी डिफरेंट एप्लीकेशंस के अंदर
यूज करना चाह रहे हैं अब वो क्लाइंट
कौन-कौन हो सकते हैं फॉर एग्जांपल मेरी एक
वेब एपीआई है या एक सर्विस अब वो कोई भी
सर्विस हो सकती है ठीक है किसी स्कूल के
लिए कोई सर्विस हो सकती है ठीक है जो
डेटाबेस से कनेक्टेड हो सकती है ठीक है या
आपके पास कोई गवर्नमेंट की कोई सर्विस हो
सकती है या वेब डेवलपर की कोई सर्विस हो
सकती है ठीक है तो वेब एपीआई आप इसलिए
बनाते हो कि जब आपको कोई ऐसी सर्विस बनानी
हो जो मल्टीपल क्लाइंट्स के ऊपर आपके पास
रन हो सके एक्सेस हो सके फॉर एग्जांपल
आपने एक वेब एपीआई बनाई जिसका डाटा मोबाइल
एप्लीकेशंस के अंदर भी एक्सेस हो पा रहा
है अब देखो मोबाइल एप्लीकेशन के अंदर अगर
हम एंड यूज करें आ यूज करें आईओएस यूज
करें तो इसका मतलब के उसके लिए कोडिंग
वगैरह सारी बिल्कुल सेपरेट होती है
बिल्कुल डिफरेंट तरीके से होती है ठीक है
लेकिन मैं उसी वेब एपीआई को उसी सर्विस को
डेस्कटॉप एप्लीकेशन के अंदर भी यूज कर
सकता हूं मैं उन्हीं एप्लीकेशंस को
ब्राउजर में भी यूज कर सकता हूं वेब एपीआई
को ब्राउज में भी यूज कर सकता हूं फिर मैं
वेब एपीआई को आईओटी में भी यूज कर सकता
हूं अब आईओटी क्या है भाई देखो आजकल के
जमाने में आपके पास ऐसी डिवाइस आ रही है
ऐसे होम अप्लायंस आ रहे हैं जिसके अंदर
आपको एक यूजर इंटरफेस मिलता है जिस तरह
आपके पास कुछ रेफ्रिजरेटर ऐसे आ गए कुछ
एयर कंडीशन ऐसे आ गए हैं जिसके अंदर यूजर
इंटरफेस होता है मतलब जो कि डाटा इंटरनेट
से एक्सेस कर सकता है और इंटरनेट पर डाटा
अपलोड कर सकता है ठीक है तो ऐसी
डिवाइसेसपोर्ट
एंड एक्सट्रा मतलब आपके पास एक बड़ी तादाद
है क्लाइंट्स की जहां पर आप अपनी वेब
एपीआई को रीयूज कर सकते हो ठीक है और और
ये वेब एपीआई ये वेब एपीआई डेटाबेस से
इंटरेक्ट करता है ठीक है इसका मतलब आपके
पास ये जो वेब एपीआई है ये बहुत सारी
रिसोर्सेस आपको प्रोवाइड करता है जो हम
मोबाइल एप्लीकेशन में भी एक्सेस कर सकते
हैं डेस्कटॉप में ब्राउजर में या आईओटी
में ठीक है सपोज करो कि जो वेब एपीआई है
ठीक है इसके अंदर हम इमेजेस वगैरह को
एक्सेस कर सकते हैं कोई डाटा जो इसके अंदर
मौजूद है जो मैं डिफरेंट एप्लीकेशंस के
अंदर एक्सेस करवाना चाह रहा हूं वो हो
सकता है या फिर इस वेब एपीआई के अंदर
एंटिटीज हो सकती है ठीक है एंटिटीज मतलब
स्टूडेंट एंटिटी हो गया एंप्लॉई हो गया
कस्टमर हो गया एक्स वाई जड बहुत सारी
एंटिटीज है ठीक है और इन एंटिटीज को बनाने
के लिए जाहिरी बात है हमें डेटाबेस भी
रिक्वायर्ड होता है ठीक है तो मतलब जो हम
वेब एपीआई बनाएंगे जो हम वेब सर्विस
बनाएंगे ठीक है वो वेब सर्विस जो हम
मल्टीपल क्लाइंट्स को सेंड करना चाह रहे
हैं या उन क्लाइंट्स का डाटा इस वेब एपीआई
के थ्रू डेटाबेस में स्टोर करवाना चाह रहे
हैं तब हम कांसेप्ट यूज करते हैं वेब
एपीआई का ठीक है सही है देखो पहले क्या
होता था वेब एपीआई से पहले क्या होता था
कि अगर मुझे कोई डेटाबेस या कोई भी डेटा
सोर्स बनानी है तो वो मुझे मोबाइल
एप्लीकेशन के लिए अलग बनानी है ठीक है
डेस्कटॉप के लिए अलग बनानी है ब्राउजर के
लिए आईओटी के लिए अलग बनानी है ठीक है तो
इसलिए क्या होता था इस केस में क्या होता
था कि हमारा काम बढ़ जाता था क्योंकि देखो
अभी क्या हो रहा है वेब एपीआई के केस में
मोबाइल हो डेस्कटॉप हो वो सारा डाटा वेब
एपीआई के थ्रू एक्सेस किया जा रहा है मतलब
एक ही वेब एपीआई है और वो डेटाबेस के साथ
इंटरेक्ट करके सबको डाटा प्रोवाइड कर रही
है मोबाइल एप्लीकेशंस को भी डेस्कटॉप
एप्लीकेशन को भी ब्राउजर को भी आईओटी को
भी लेकिन पहले ऐसा नहीं था पहले अगर हमें
कोई डेटा सोर्स बनानी है कोई एंटिटीज
वगैरह बनानी है तो वो हम मोबाइल एप्लीकेशन
के लिए बिल्कुल सेपरेटली बनाते थे
डेस्कटॉप एप्लीकेशन के लिए सेपरेटली बनाते
थे ठीक है मतलब काम बहुत ज्यादा लदी होता
था लेकिन जब से वेब एपीआई आई ठीक है तो
इसने जो आपके वेब डेवलपर्स है और जितने भी
डेवलपर्स है ठीक है उनके लिए काम आसान कर
दिया ठीक है मतलब देखो अक्सर स्टूडेंट ये
डाउट में आ जाते हैं कि भाई ये जो मैंने
वेब एपीआई बनाई है इसको मैं सिर्फ वेब
टेक्नोलॉजी में ही यूज कर सकता हूं ऐसा
कुछ भी नहीं है जो आपने वेब एपीआई बनाई है
आप उसको मोबाइल एप्लीकेशन से भी एक्सेस कर
सकते हो डेस्कटॉप एप्लीकेशन से भी एक्सेस
कर सकते हो ब्राउजर जहां चाहो आप उस वे
वेब एपीआई को एक्सेस कर सकते हो ठीक है तो
ये इसका एक मेन पॉइंट है अच्छा फिर वेब
एपीआई से जितना डाटा एक्सेस किया जाता है
और जितना डाटा वेब एपीआई को सेंड किया
जाता है यह किस फॉर्मेट में होता है फॉर
एग्जांपल वेब एपीआई का डाटा अगर हम एक्सेस
करना चाह रहे अपनी मोबाइल एप्लीकेशन में
डेस्कटॉप एप्लीकेशन में ब्राउजर में या
जहां भी तो कुछ फॉर्मेट होते हैं एक होता
है एक्सल फॉर्मेट और एक होता है आपके पास
जेसन फॉर्मेट ठीक है मतलब जो भी मोबाइल
एप्लीकेशन अगर वेब एपीआई का डाटा एक्सेस
करने की कोशिश करेगी तो या तो एक्सएमएल
में होगा या जेसन में होगा और अगर मोबाइल
एप्लीकेशन कुछ डाटा वेब एपीआई के अंदर
इंसर्ट करवाना चाह रहे हैं अपलोड करवाना
चाह रहे हैं तो वो जितना भी डाटा ट्रांसफर
होगा आपकी वेब एपीआई के अंदर वो भी
एक्सएमएल या जेसन फॉर्म में होगा ठीक है
क्योंकि ये फॉर्मेट ऐसे हैं जो कि लाइट
वेट होते हैं क्योंकि देखो यहां पर भी
क्लाइंट सर्वर आर्किटेक्चर फॉलो हो रहा है
क्योंकि मोबाइल एप्लीकेशन क्या है आपका
क्लाइंट हो गया और वेब एपीआई क्या है वेब
एपीआई समझ लो आपका एक तरह सर्वर हो गया
ठीक है तो वो डटा एक्सेस जब करेंगे तो वो
एक्सल फॉर्मेट में होंगे या जेसन फॉर्मेट
में होंगे ठीक है अच्छा तो यह तो हमने देख
लिया कि भाई जो डाटा एक्सचेंज होगा वो किस
फॉर्मेट में होगा एक्सल में होगा या जेसन
में होगा लेकिन यह जो डेटा एक्सचेंज होगा
व होगा कैसे ठीक है सबसे बड़ा पॉइंट देखो
वो होगा आपके पास एचटीटीपी प्रोटोकॉल के
थ्रू ठीक है मतलब देखो जब भी क्लाइंट
सर्वर आर्किटेक्चर की बात होती है तो वहां
पर एचटीटीपी प्रोटोकॉल आ जाता है ठीक है
सही है मतलब जो हमारे डाटा एक्सचेंजिंग को
सिक्योर बनाता है ठीक है जिसकी फुल फॉर्म
क्या है एटीटीपी की हाइपर टेक्स ट्रांसफर
प्रोटोकॉल ठीक है तो ये जितनी भी
एक्सचेंजिंग है ठीक है यह एचटीटीपी
प्रोटोकॉल के थ्रू पॉसिबल होती है ठीक है
मतलब यह तो मैं आपको बता रहा हूं कि जो भी
डाटा चाहे मोबाइल एप्लीकेशन से वेब एपीआई
में ट्रांसफर करना है चाहे डेस्कटॉप से
वेब एपीआई प ट्रांसफर करना है चाहे
ब्राउजर से वेब एपीआई प ट्रांसफर करना है
तो वो डाटा एमएल या जेसन की फॉर्म में
होगा लेकिन इस डाटा को एक्सेस कैसे किया
जाएगा ठीक है एक कोई लेयर होगी ना बीच में
कोई प्रोटोकॉल होगा वो कहलाता है आपके पास
एचटीटीपी प्रोटोकॉल क्योंकि देखो हमें पता
है एचटीटीपी प्रोटोकॉल के अंदर कुछ मेथड्स
होते हैं कुछ वर्ब्स होते हैं फॉर
एग्जांपल गेट होता है ठीक है पोस्ट होता
है ठीक है मतलब कि अगर मुझे अपनी वेब
एपीआई से डाटा एक्सेस करना है मोबाइल
एप्लीकेशन में तो मैं एचटीटीपी प्रोटोकॉल
को यूज करते हुए या तो गेट रिक्वेस्ट
भेजूंगा या मैं पोस्ट रिक्वेस्ट भेजूंगा
अपनी वेब एपीआई को और डाटा मैं रिट्रीव कर
लूंगा अपनी मोबाइल एप्लीकेशन में ठीक है
मतलब गेट हमें पता है हम क्यों यूज करते
हैं कि वेब एपीआई से अगर डाटा हमें गेट
करना है और वेब एपीआई इंटरेक्ट किसके साथ
कर रहा है एक सिंगल डेटाबेस के साथ कर रहा
है और वो डाटा ले रहा है और मोबाइल
एप्लीकेशन को भी प्रोवाइड कर रहा है वही
डाटा डेस्कटॉप एप्लीकेशन में भी जाहा रहा
है भाई डाटा ब्राउजर और आईओटी डिवाइस के
अंदर भी जा रहा है ठीक है तो हम क्या करते
हैं अगर हमें डाटा रिट्रीव करना है तो हम
गेट रिक्वेस्ट यूज करते हैं ठीक है वर्ब
यूज करते हैं कौन सा गेट वाला ठीक है मतलब
इनको मेथड्स भी कहा जाता है और इनको
एचटीटीपी वर्ब्स भी कहा जाता है किसको गेट
हो या पोस्ट हो तो गेट रिक्वेस्ट चाहिए तो
मतलब डाटा मुझे एक्सेस करना है मोबाइल
एप्लीकेशंस के अंदर और अगर मुझे मोबाइल
एप्लीकेशंस के अंदर से डाटा कोई स्टोर
करना है वेब एपीआई के अंदर या डेटाबेस के
अंदर तो मैं यूज करता हूं पोस्ट ठीक है
फिर इसी तरह कुछ और वर्ब्स है अगर मुझे
अपडेट करना है ठीक है मतलब मोबाइल
एप्लीकेशन है उसके अंदर वेब एपीआई के अंदर
कुछ डाटा अपडेट करना है डेस्कटॉप
एप्लीकेशन है उसको डाटा अपडेट करना है तो
यूज करते हैं एक पुट का वर्ब ठीक है फिर
सेम इसी तरह अगर हमारी वेब एपीआई के अंदर
जितना भी डाटा है जितना भी डेटाबेस है
उसके अंदर से डाटा डिलीट करना है तो हम
यूज करते हैं डिलीट का मेथड डिलीट का वर्ब
ठीक है तो ये सारी जो आपके पास वर्ब य
पॉसिबल कैसे होती है एचटीटीपी प्रोटोकॉल
को यूज करके ठीक है तो य पर दो बातें याद
रखनी है कि जितना भी डाटा आप वेब एपीआई को
सेंड करोगे या एक्सेस करोगे तो वो एमल या
जेस के फॉर्मेट में होगा और जब भी आप डाटा
एक्सेस करोगे तो आप बताओगे कि भाई आप गेट
रिक्वेस्ट को यूज कर रहे हो गेट मेथड को
यूज कर रहे हो गेट वर्ब को यूज कर रहे हो
या फिर पोस्ट को यूज कर रहे हो या पुट को
यूज कर रहे हो या डिलीट को यूज कर रहे हो
ठीक है सही है और एक बात याद रखना कि जब
भी आप आप डाटा अपनी वेब एपीआई के थ्रू
एक्सेस करते हो या वेब एपीआई में डाटा
सेंड करते हो तो वो सारा काम आपके यू
आरआईए थ्रू होता है यू
आरआईआईटी फायर ठीक है मतलब आपको कोई यू
आरआईए हो गेट रिक्वेस्ट के साथ तो वो पहले
आपकी
यूआरआरडीए
मोबाइल एप्लीकेशन में या चाहे आप डेस्कटॉप
एप्लीकेशन में करवा सकते हो जहां चाहे आप
करवा सकते हो ठीक है तो यह इसका एक मेन
पॉइंट है ठीक है तो देखो यह जो आपके पास
ये जो चारों कांसेप्ट है ठीक है मतलब
जिनको मैं वर्ब्स कह रहा हूं जिनको मैं
मेथड्स कह रहा हूं इसको हम कहते हैं
वर्ब्स ठीक है क्या कहते हैं एसटीटीपी
वर्ब्स जो कि इनका एक कॉमन नाम होता है इस
एडनेट वेब एपीआई के अंदर ठीक है तो यह
कहलाती है आपके पास वर्ब्स अच्छा
फिर फिर देखो वेब एपीआई के साथ हमारे पास
एक कांसेप्ट बहुत ज्यादा यूज होता है
जिसको हम कहते हैं रे
ठीक है मतलब देखो रेस्ट को समझे बगैर आप
कभी भी एडनेट के अंदर वेब एपीआई नहीं बना
सकते हैं ठीक है अब यह रेस्ट क्या है अब
देखो यह रेस्ट आपके पास एक आर्किटेक्चरल
स्टाइल है या आप इसको आर्किटेक्चरल पैटर्न
भी कह सकते हो इसका मतलब रेस्ट एक
आर्किटेक्चरल पैटर्न है जो यह बताता है कि
किस तरह से आप अपनी वेब एपीआई को
इंप्लीमेंट करोगे बनाओगे ठीक है मतलब
रेस्ट के अंदर कुछ रूल्स है ठीक है कुछ
आपके पास पैटर्न है कुछ स्टाइल है जिसको
फॉलो करके आप वेब एपीआई को इंप्लीमेंट
करते हो वेब एपीआई बनाते हो ठीक है तभी
वेब एपीआई को हम रेस्टफुल वेब सर्विसेस भी
कहते हैं ठीक है वेब एपीआई को आप वेब
सर्विस भी कह सकते हो ठीक है जो आप
डिफरेंट क्लाइंट्स के अंदर यूज करना चाह
रहे हो और अगर आपकी वेब एपीआई रेस्ट के
सारे कंस्ट्रेंट्स को रेस्ट के सारे रूल्स
के ऊपर इंप्लीमेंट होती है तो आप आप उसे
रेस्टफुल वेब सर्विसेस भी कहते हो ठीक है
तो ये एक मेन पॉइंट है कि वेब एपीआई को
अगर आपने इंप्लीमेंट करना है तो रेस्ट
क्या होता है इसके आर्किटेक्चरल स्टाइल
क्या है इसका आपके पास कंस्ट्रेंट्स क्या
है ठीक है ये आपको समझना लाजमी है तभी आप
वेब एपीआई को इंप्लीमेंट कर पाओगे ठीक है
बेटा तो देखो इस डायग्राम को अगर आप समझ
लेते हो ठीक है अच्छे से समझ लेते हो इसको
आप बार-बार रिवाइंड करके सुनो ठीक है अगर
आप इसको अच्छे से समझ लेते हो तो आपका वेब
एपीआई का कांसेप्ट अच्छे से क्लियर हो
जाएगा ठीक है बाकी इसको इंप्लीमेंट किस
तरह से करते हैं प्रैक्टिकल किस तरह से
करते हैं वो हम आगे जाके देखेंगे ठीक है
अच्छा देखो ये जो ये तो मैंने आपको वेब
एपीआई का सारा सिनेरियो समझा दिया ठीक है
अब मैं इसकी कुछ एग्जांपल्स आपको बताता
हूं जो कि वेब एपीआई की एग्जांपल्स हो
सकती है ठीक है यहां पे देखो ठीक है तो
देखो मैं एक वेब एपीआई की बहुत ही आसान
एग्जांपल से आपको समझाता हूं ठीक है और ये
एक ऐसी एग्जांपल है जो आप आप बिल्कुल आजकल
के जमाने के अंदर देख रहे हो ठीक है वो
एग्जांपल क्या है देखो हमारे पास एक वेब
एपीआई है रिलेटेड टू कोरोना वायरस ठीक है
कोरोना वायरस आपको पता है ठीक है न्यूज के
अंदर वेबसाइट के अंदर आप देख रहे हो कि
वहां पर आपको यह बताया जाता है कि कोरोना
के ओवरऑल केसेस कितने ठीक है मतलब कोरोना
के आपके पास डेथ्स कितनी हो चुकी है
कोरोना वायरस की वजह से फिर रिकवर कितने
हो चुके हैं ठीक है और फिर न्यू न्य केसेस
कितने हैं ये सारी इंफॉर्मेशन
आप इस पॉइंट ऑफ टाइम में अपनी वेबसाइट्स
के अंदर भी देख रहे हो अपने मोबाइल फोनस
के अंदर भी देख रहे हो ब्राउजर्स के अंदर
भी देख रहे हो और बहुत सारे क्लाइंट्स के
अंदर आप कोरोना वायरस की ये इंफॉर्मेशन आप
देख रहे हो तो ये कोरोना वायरस की जो आपके
पास इंफॉर्मेशन है ये आपको मिल कैसे रही
है देखो आपके पास एक वेब एपीआई बनाई गई
होगी ठीक है और उस वेब एपीआई के अंदर
जितने भी ओवरऑल केसेस है ठीक है उनको
स्टोर किया जा रहा है मतलब वेब एपीआई का
कोई डेटाबेस भी होगा जहां पे डेली बेसिस
पे कितने केसेस हो रहे हैं वो इसके अंदर
स्टोर किए जा रहे हैं कितनी डेथ्स हो रही
है उनकी इंफॉर्मेशन स्टोर की जा रही है
रिकवर कितने हो चुके हैं उनकी इंफॉर्मेशन
और न्यू केसेस आपके पास कितने हो चुके हैं
वो यहां पे इंप्लीमेंट किए जा रहे हैं ठीक
है चाहे पाकिस्तान हो इंडिया हो हर जगह
क्योंकि कोरोना वायरस इस वक्त हर जगह फैला
हुआ है ठीक है तो आपके पास हर जगह यह
कांसेप्ट यूज़ हो रहा है ठीक है इसका मतलब
वेब एपीआई बना दी गई है ठीक है तो अब इस
वेब एपीआई को कहां-कहां एक्सेस किया जा
रहा है इनको मोबाइल एप्लीकेशंस के अंदर भी
एक्सेस किया जा रहा है ठीक है इनको आपके
पास डेस्कटॉप एप्लीकेशंस के अंदर भी
एक्सेस किया जा रहा है ठीक है और सेम
इन्हीं को इसी वेब एपीआई को ब्राउजर्स के
अंदर भी यूज किया जा रहा है ठीक है मतलब
देखो एक ही वेब एपीआई है और उसको डिफरेंट
क्लाइंट्स के अंदर यूज किया जा रहा है ठीक
है तो ये इसका सबसे बड़ा बेनिफिट है अब
देखो ये जो जितने भी क्लाइंट्स है मोबाइल
एप्लीकेशन हो गए डेस्कटॉप एप्लीकेशन हो गए
ब्राउजर्स हो गए ये सिर्फ इस वेब एपीआई से
डाटा एक्सेस नहीं कर रहे है बल्कि इस वेब
एपीआई के अंदर कोई डाटा स्टोर भी करवा रहे
हैं ठीक है जिस तरह सपोज करो कि भाई आपके
पास कोई डेस्कटॉप एप्लीकेशन है ठीक है
किसी हॉस्पिटल के पास है ठीक है तो वो
हॉस्पिटल इस वेब एपीआई के अंदर मतलब अगर
उस हॉस्पिटल के अंदर कुछ डेथ्स हो जाती है
तो वो इस वेब एपीआई के अंदर डाटा अपलोड कर
देते हैं कि भाई इतना इतनी डेथ्स हो चुकी
है फिर अगर उनके पास पास कोई न्यू केसेस
आते हैं तो वो भी डाटा इसके अंदर स्टोर कर
सकते हैं कितने रिकवर हुए हैं वो भी डाटा
स्टोर कर सकते हैं मतलब देखो सिर्फ वेब
एपीआई से डाटा एक्सेस करने की बात नहीं है
ठीक है आप वेब एपीआई के अंदर डटा स्टोर भी
कर सकते हो डिफरेंट क्लाइंट्स के अंदर तो
ये फायदा है किसका वेब एपीआई का तो देखो
ये एग्जांपल इतनी आसान एग्जांपल है जिस
जिससे आपको वेब एपीआई का कंसेप्ट बहुत
आसानी से समझ आ जाएगा ठीक है फिर एक और
एग्जांपल से इसको समझाता हूं
[संगीत]
5.0 / 5 (0 votes)