Coder Baba
2.42K subscribers
1.01K photos
23 videos
722 files
723 links
Everything about programming for beginners.
1 and only official telegram channel of CODERBABA India.

Content:
.NET Developer,
Programming (ASP. NET, VB. NET, C#, SQL Server),
& Projects
follow me https://linktr.ee/coderbaba
*Programming
*Coding
*Note
Download Telegram
👩‍💻 👩‍💻 Garbage Collector. What is this and how it works
————————————————
We are continuing the previous post about managed and unmanaged resources, value and reference types and now we are about to dive into Garbage Collector.

🟢 What is it used for? 🟢
Garbage collector is used for collecting and deleting objects that are not used anymore. So there will be a free memory to use.

🟢 How does it work? 🟢
When we create objects, the objects themselves are instantiated and created in the Heap but the reference to them is stored in the Stack. When we create objects they get the their own Generation, at the instantiating they get the Generation 0. After some business logic and after completing some code blocks, the Stack gets cleared and some references to the objects in the Heap may be deleted, it means that that objects are not used anymore. When there is a need of additional memory and there is no free memory to use the Garbage Collector gets to work. It checks what objects are not used anymore, if it sees that there is no references to the specific objects in the Heap it deletes that object. If it sees that there are still objects that are used it levels up their generation by one point. There are 3 generations at all: 0, 1, 2. The higher the generation the lesser possibility that that object will not be deleted. When Garbage Collector works it checks object from the youngest generations to the oldest. But if there need of a big amount it checks the object of the oldest generations first.

🟢 Can you manage the Garbage Collection by yourself? 🟢
Yes, you can. But most of the time you will not need it as .NET manages all resources by itself. But there is still possibility of doing this via static class GC.

Its methods:
GC.Collect() - makes the garbage collection process be done. There are overloaded versions of this method like: GC.Collect(int generation) - collects garbage from the lowest generation to the user gave as parameter. GC.Collect(int generation, GCCollectionMode mode) where generation parameter is the same as in the previous method and mode is the mode that we want to garbage collection process to be done, its values are: Default (default value for this enumeration - Forced), Forced (makes the GC work immediately), Optimized - lets the GC decide if it is a good moment for making garbage collection.

GC.AddMemoryPressure() - tells CLR that there was allocating a big amount of memory and it should be considered while making garbage collection. In pair with it the method called GC.RemoveMemoryPressure() is used - it tells CLR that early allocated memory was released and it should be not considered during the garbage collection process.

GC.GetGeneration(object value) - gets the generation of object that was passed as a parameter.

GC.GetTotalMemory() - return the memory in bytes that is currently occupied the managed heap.

There are other methods that you may check on your own.
————————————————
This is how Garbage Collector works under the hood. This may be useful during the interviews and working with big amount of memory when there is need of managing resources by yourself. Always remember that it not a best practice to use it but if you need it, you are welcome. Remember to revise this topic sometimes as this question is frequently asked during the interviews on the Junior .NET Developer.
Architectural pattern MVC (Model - View - Controller)
————————————————
Before diving into ASP.NET Core we have to understand the what is the MVC, how it works, what it is used for because structure of all ASP.NET Core applications is based on MVC.
————————————————
🟢 MVC (Model - View - Controller) is an architectural pattern that is used for building loosely coupled, maintainable, and expandable applications. Goal of this pattern is dividing application's responsibilities into 3 interconnected components: Model, View, Controller - in a such way that modification each of them may be done independently.

🟢 Model - is the core component of the MVC. It is responsible for managing the data, business logic and rules of the applications. Model reacts to the commands from Controller and gives response based on the Controller's request. Model is built such way that you can make changes to it without affecting the work of Controller and View. Most of the time developers who build the Model may know nothing about the View and build it independently.

🟢 View - is responsible for interacting with user, gathering inputs. Views must be decoupled from the Model which means that there may be a few Views for the same model, like tables, diagrams, etc., making it easier to change user interface without changing the Model.

🟢 Controller - is the intermediary between View and Model. It receives input from the View, processes it and sends them as commands to the Model. It handles user interactions and define the flow of the application. Controllers keep Views and Models decoupled because the handle the communications between them.

🟢 Benefits:
Loose Coupling: Each component has its responsibility and communicates with others through the defined interfaces. This loose-coupling lets us modify and change each of the component without affecting the rest of work of the application's components.

Maintainability: Separating the application into distinct components makes it easier to understand and maintain the codebase. Changes to one component can be made with minimal impact on the others, simplifying debugging and maintenance.

Scalability: MVC promotes a modular approach to application development. As the application grows, you can add new models, views, or controllers to extend its functionality without the need for significant refactoring.

Testability: Each component can be tested independently, making it easier to write unit tests for your application. This helps ensure that each part of the application functions correctly and allows for easier debugging.

⚠️ Be aware that there are multiple variations of so called MV- patterns family, like: MVVM, MVP, HMVC. Each of them is suitable for different types of applications and different scenarios that your application need. So be aware while choosing the appropriate MV- pattern.
————————————————
This is the MVC pattern in general. Nowadays MVC is the most usable pattern while projecting web applications. Always remember to revise this topic as it is one of the most important things for web developers and interviews will definitely ask you about it. Practice and practice will make your understanding deeper and it will be easier for you when designing architecture of your application.
————————————————
🧠Get:
• Used to retrieve data from server.
• Parameters will be in the request url (as query string only).
• Can send limited number of characters only to server. Max: 2048 characters
• Used mostly as a default method of request for retrieving page, static files etc.
• Can be cached by browsers / search engines
🧠Post:
• Used to insert data into server
• Parameters will be in the request body (as query string, json, xml or form-data).
• Can send unlimited data to server.
• Mostly used for form submission / XHR calls
• Can't be cached by browsers / search engines.
————————————————
Always remember to revise this topic if you want to be hired as a BackEnd Developer as this is necessary topic to be a good BackEnd Developer and to understand how it works.
Good Books For Data Scientists👇👇👇👇👇
🌟🚀 Incredible Offer Alert! 🚀🌟

Attention all tech enthusiasts and aspiring developers! 📣 Are you ready to take your programming skills to the next level? We've got an exclusive deal just for you! 🎓💻

Introducing our stellar ASP.NET Final Year Project with complete source code available for download! 🌐📂 This project is a game-changer, designed to elevate your understanding of ASP.NET and enhance your portfolio significantly.

Why choose our Final Year Project?
🔹 Cutting-edge ASP.NET technology
🔹 Comprehensive source code for deep learning
🔹 A robust project demonstrating real-world applications
🔹 Perfect for academic submissions and portfolio enrichment
🔹 Detailed documentation for easy understanding

This is your chance to get your hands on a high-quality, professionally-crafted project that showcases your skills and knowledge in ASP.NET development. Elevate your resume and impress your professors or potential employers with this exceptional project!

🔗 Click the link in the description to access this incredible offer and download the ASP.NET Final Year Project with its complete source code. Don't miss out on this golden opportunity to boost your programming journey! 🌟💡

Hurry! Get your ASP.NET Final Year Project today and step confidently into the world of web development! 💻
https://coderbaba.myinstamojo.com/product/3284580/digital-library-management-system-aspnet-c-p/
1
Media is too big
VIEW IN TELEGRAM
form validation 👆😎❤️
📚🖥 Library Management System Project Showcase! 🌟💻
I'm excited to present my latest project: a comprehensive Library Management System web application built using ASP.NET C# programming! 🚀📊
This project is designed to streamline library operations, from tracking book inventory to managing issue and return records, penalties, and student borrower details. It's the perfect solution for BCA/MCA/B.Tech/O Level/A Level/Polytechnic final year projects! 🎓

Project Details:
🔹 Project Name: Library Management System Project
🔹 Project Type: Website Project
🔹 Technology & Tools: Visual Studio 2019, C#, ASP.NET Framework, Bootstrap, HTML/CSS/JS, SQL Server Database, DataTabel.js

Abstract:
This Library Management System efficiently tracks book ownership, issues, returns, penalties, and student borrowing activities, ensuring smooth library operations.

Key Features:
📚 Librarian Module: Manage publications, book stock, branches, students, issue and return processes, and penalties.
📖 Student Module: Access book reports, check penalty status, manage account details.

Project Execution:
🔸 How to Run: Follow the instructions provided in the accompanying video or connect with me via Facebook or Instagram for assistance.
🔸 Downloading: The project is available for purchase, complete with the source code and database file. DM me to get your hands on this comprehensive Library Management System project!
🔸 Delivery: Upon purchase, a download link will be sent to your provided email by Instamojo.

This project represents countless hours of dedication and learning. I invite you to rate my work and consider purchasing this efficient Library Management System to streamline your library's operations! 📈💡


Connect with me for more details and let's take your library management to the next level! 🌐