Which is the lightest web platform in the earth

Hosting web application is like driving a car. every car has different fuel consumption, maintenance cost, and others. so if you want to build low footprint of the web application resources this article is for you.  🐘 PHP (Official Image: php:apache or php:7.x-fpm) Base Image: php:7.x-apache or php:7.x-fpm (Debian Slim). Size: ~70–150 MB depending on variant. Minimum Host Spec: CPU: 1 vCPU RAM: 512 MB (1 GB recommended for frameworks like Laravel) Storage: 100 MB+ for base image, more with extensions. Notes: Use php:7.x-fpm-alpine for smallest footprint (~30 MB).   ⚙️ ASP.NET Core (mcr.microsoft.com/dotnet/aspnet) Base Image: mcr.microsoft.com/dotnet/aspnet: (runtime only) or dotnet/sdk (development). Size: Runtime ~100 MB; SDK ~200–300 MB. Minimum Host Spec: CPU: 1 vCPU RAM: 1 GB minimum (2 GB recommended for production). Storage: 200 MB+ depending on SDK/runtime. Notes: ASP.NET Core apps are heavier than PHP/Node; avoid SDK images in production.   🌐 Node.js (node:alpine) Base Image: node:alpine (Alpine Linux). Size: ~5–10 MB base + Node runtime. Minimum Host Spec: CPU: 1 vCPU RAM: 512 MB minimum (1 GB recommended). Storage: 50 MB+ for base image. Notes: Ideal for microservices; very lightweight compared to ASP.NET.   🐍 Python (python:3-slim or python:3-alpine) Base Image: python:3-slim (Debian Slim) or python:3-alpine. Size: ~25–50 MB. Minimum Host Spec: CPU: 1 vCPU RAM: 512 MB minimum (1 GB recommended for Django/Flask). Storage: 50 MB+ for base image. Notes: python:3-alpine is smallest but may require manual installation of build tools for some packages. Conclusion:  Lightest stacks: Node.js (node:alpine) and Python (python:3-alpine). Heaviest stack: ASP.NET Core (dotnet/aspnet) due to runtime requirements. Balanced option: PHP (php:7.x-fpm-alpine) with moderate footprint.

Architecting .NET Secure Codes in Cloud Era

Build secure .NET/C# code to meet ISA/IEC 62443 by adopting a Secure Development Lifecycle (SDL), using proven libraries for encoding, crypto, auth, and static analysis, and mapping your SDL to ISA/IEC 62443-4-1 requirements (design, implementation, verification, maintenance). Start with the ISA/IEC 62443 SDL requirements, apply Microsoft .NET secure-coding guidance, and use libraries such as BouncyCastle (crypto), Microsoft AntiXSS, Duende IdentityServer (auth), plus Roslyn analyzers and SonarQube for automated verification. Preparing the Secure Codes by adopting Secure product development lifecycle: define security requirements, threat model, secure design, secure implementation (coding rules), verification (testing/pen tests), and maintenance/patching processes. When we discuss the ISA 62443 what we need to prepare is:  Requirements & threat modeling: capture product security requirements and threat models early; record them in your backlog and link to code changes (62443 SR/SD clauses). Secure design: apply defense-in-depth, least privilege, and secure defaults; avoid unsafe APIs and binary formatters in .NET. Secure implementation (coding rules): validate and sanitize inputs, use parameterized DB access, avoid hard-coded secrets, use safe cryptography primitives, and avoid unsafe/unsafe-code unless strictly necessary. Verification: integrate static analysis, dependency-vulnerability scanning, unit tests for security controls, fuzzing and independent penetration testing. Maintenance: CVE tracking, signed updates, and timely patch delivery per 62443 update requirements. After doing the process, we can prepare several libraries such as Bouncycastle. for encrypting and decrypting your custom data.  Microsoft AntiXSS / System.Web.Security.AntiXss, for avoid XSS ASP.NET core identity, centralized authentication Roslyn analyzers, finding insecire API, hardcoded cryptos, and weak crypto. SonarQube, track security debt and quality gates In practical implementation, below is the steps: Adopt an SDL aligned to ISA/IEC 62443-4-1 and document SM/SD/SI/SV/SUM processes. Use Microsoft secure-coding guidance: avoid binary formatters, validate inputs server-side, use secure APIs. Encoding & sanitization: use AntiXSS for HTML/JS/CSS encoding and sanitization of user content. Cryptography: prefer platform crypto (System.Security.Cryptography) and use BouncyCastle when advanced algorithms or PQC are needed. Authentication/authorization: implement OAuth2/OIDC with Duende IdentityServer and ASP.NET Core Identity for robust token management. Automate verification: add Roslyn analyzers and SecurityCodeScan to dev builds; run SonarQube in CI to enforce gates. Supply-chain & patching: maintain a component inventory, scan NuGet dependencies, and document update delivery per 62443 maintenance requirements.  

Grabbing Music Lyric as a GEN AI dataset

  So we have a mission to get lyrics for a music. Here are some APIs we can use to fetch song lyrics: Lyrics.ovh API — Public APIs. A simple and free API that allows you to retrieve lyrics by providing the artist's name and song title. It's easy to integrate and provides JSON responses. Lyrics & Music API | API.This API offers advanced features, including searching by lyrics, artist, or album. It also supports text-only searches and provides detailed metadata. Song Lyrics APIs: A collection of various lyrics APIs, including Genius and Shazam, which provide detailed song information, including lyrics and metadata :et's use C# codes and Here's a step-by-step guide to set up and use the API in your project: 1. Understand the API The API is a simple, free API that allows you to fetch song lyrics by providing the artist's name and song title. It returns a JSON response containing the lyrics. 2. Set Up Your Development Environment Ensure you have a development environment ready. For C#, you can use Visual Studio or Visual Studio Code. Install the necessary tools, such as the .NET SDK, if you're working with C#. 3. Make an HTTP Request Use an HTTP client library to make requests to the API. In C#, you can use HttpClient from the System.Net.Http namespace. 4. Write the Code Here's a basic example in C# to fetch lyrics: using System; using System.Net.Http; using System.Threading.Tasks; class Program { static async Task Main(string[] args) { string artist = "Ed Sheeran"; string title = "Shape of You"; using (HttpClient client = new HttpClient()) { string url = $"https://api.lyrics.ovh/v1/{artist}/{title}"; try { HttpResponseMessage response = await client.GetAsync(url); response.EnsureSuccessStatusCode(); string responseBody = await response.Content.ReadAsStringAsync(); Console.WriteLine($"Lyrics: {responseBody}"); } catch (HttpRequestException e) { Console.WriteLine($"Request error: {e.Message}"); } } } }   5. Test the Application Run the application and check the console output for the lyrics. 6. Enhance the Application Add error handling for cases where lyrics are not found. Create a user interface if you're building a desktop or web application.

When we need .NET Aspire for Our Project

.NET Aspire is a modern framework designed to streamline the development of cloud-native applications. It's a comprehensive stack that provides programmers with an opinionated, cloud-ready approach to building observable, production-ready, distributed applications. This framework is delivered through a collection of NuGet packages that address specific cloud-native concerns, making it an invaluable tool for developers looking to enhance their applications with the power and flexibility of the cloud. Comparing with traditional ASP.NET Core, .NET Aspire is more cloud oriented with several features:  Simplified Orchestration One of the key benefits of .NET Aspire is its simplified orchestration capabilities. It focuses on enhancing the local development experience by simplifying the management of an application's configuration and interconnections. This means that developers can spend less time on setup and more time on creating features that matter. Orchestration in .NET Aspire is not intended to replace robust systems used in production environments, such as Kubernetes, but rather to provide a set of abstractions that streamline the setup process during the development phase.   Ready-to-Use Components .NET Aspire comes with a suite of ready-to-use components for commonly used services like Redis or PostgreSQL. These components have standardized interfaces, ensuring they connect consistently and seamlessly with your application. This reduces the complexity of integrating different services and allows for a more modular and maintainable codebase.   Enhanced Developer Experience The framework offers project templates and tooling experiences for popular development environments like Visual Studio, Visual Studio Code, and the dotnet CLI. This helps programmers quickly create and interact with .NET Aspire projects, providing a more intuitive and productive development experience.   Cloud-Native Advantages By leveraging .NET Aspire, programmers can build applications that are inherently scalable, resilient, and manageable, thanks to the cloud infrastructure. The framework's design facilitates the creation of microservices, which are small, interconnected services that make up a cloud-native application. This architectural style is well-suited for the cloud, where applications can take full advantage of the scalability and manageability offered by cloud providers.   Streamlined Startup and Monitoring .NET Aspire also aids in streamlining the startup process and improving monitoring capabilities. This ensures that applications are more reliable and easier to maintain. Service discovery features further enhance applications by simplifying the connection to other services and components, even if developers are not ready to utilize more complex features or services.   In conclusion, .NET Aspire presents a multitude of benefits for programmers, particularly those developing cloud-native applications. Its orchestration, components, and tooling are designed to simplify the development process, allowing programmers to focus on delivering high-quality features rather than getting bogged down by configuration and setup complexities. With .NET Aspire, developers can build distributed applications that are ready for the cloud era, providing a clear path to modern application development.   If you need framework that can be used both on premise and cloud, we prefer to use ASP.NET. However, if you need framework that can applied between cloud, .NET Aspire is for you. Put your use case in the comment.   

.NET Development and AI: Harnessing the Power of C# and Microsoft's AI Platform

.NET Development and AI: Harnessing the Power of C# and Microsoft's AI Platform The intersection of .NET development and artificial intelligence (AI) has become an increasingly significant area of focus for software engineers and researchers alike. With the rise of advanced AI technologies. One of the trends that we have witnessed in recent years is the seamless integration of C# programming language and Microsoft's AI platform, enabling developers to create innovative software solutions that leverage the power of both. Software developer today will have several scenarios that can be used to create software that has built in AI. Some of the scenario that commons are: Adding conversation between your application and AI. For example, you put an AI rewrite feature in the application or have a dialog between your application and AI. On this scenario, we can use Azure OpenAI Adding predictive maintenance capabilities to your application to forecast when equipment might fail, or sales will rise. On this scenario, we can use ML.NET Model Builder. Developing chatbot or virtual assistant that can understand and respond to user queries. You can use Azure Open AI, and The Semantic kernel SDK to make it happen.   If you want to build one of the solution you can visit this Collections | Microsoft Learn to make you accelerate the development

Introducing Excel like Grid using Spread Studio .NET

have you ever got a problem with grid control from the ASP.NET. For example, you can’t create well formatted excel report oon the grid or even to export your griod into Excel. In the past, we can use CSV format to export to the Excel compliant. However, editing is tought using Griid. Grid is great for display a row of data but lack feature of editing. If you need a component that help you display like a grid, and manipulate like an Microsoft Excel you might need Spread. Spread is a component product from ComponentOne. On this article, we will guide you step by step to use Visual Studio and Spread Studio.NET. Usage Scenario Spread can be used for several scenario such as: Manipulating native excel files outside Microsoft Excel Creating a dashboard that has chart and data visualization Creating complex and unstructured report such as invoice, or purchase order that can be exported into excel format Creating a flexible grid that use mathematic or statistic formula Installation The installation is quite simple, you just download the component here. The installer will download the component based on your need. The installation will add you the Windows RT component, WPF, Windows Form, and ASP.NET components.         Development Preparation First of first, Spread is simple to activate. It has set of assemby that doesn’t need the Microsoft excel to be installed on client. On this article, we will try the component on Windows RT based. When you start you Visual Studio you will get a toolbox category called GrapeCity XAML the Spredsheet component name is GcSpreadSheet.       Visual Studio will help you add additional reference to the Visual Studio. step-by-step preparation can be seen here. On your designer surface it will be sown like below Design or Develop After you put the component, the next step is design the spread report. it just like creating a Excel format like on the designer surface. If you want to create a new spreadsheet template you can select a menu new spred template         The screen will display, Excel application like , you can set property and others             We will discuss the Excel manipulation further in the next series tutorial Deployment Spread deployment follows one library deployment and it’s embedded on yout application. Furthermore, the deployment is royalty free make you distribute the application as long as you need.

ABCPDF The Best PDF Library for .NET Framework

The title of this post might be provocative, but the title represent how happy we are, when we found the suitable PDF library for .NET framework namely ABCPDF PDF is anywhere, from creating an invoice to creating an eBook. PDF is the most used format for document transaction. However, on the developer side, pdf is the most complex technology to create and to maintain. Several complex scenario such as HTML to PDF or even on the fly generation PDF will be time consuming to develop. Yesterday, we evaluate the several PDF library for our research project codenamed: MMC. The codenamed MMC is unique web application for registering students to enroll a membership course. There are several document to create and it’s should fulfill the compliant standard from the government. Here are the challenge that we receive. Generating massive PDF files for member profiles. Therefore we need a quick and robust “on-the-fly” PDF generator. Converting a html based file to pdf file. our designer create a set of html and css file and we need to convert it into PDF/A specification. Giving a watermark that show the unique identity of our PDF files. After fighting for more than three days to select and choose the PDF library. we found that ABC pdf fulfill our need plus with a good performance. For example, the code to add a watermark based email is quote simple like this int theID = 0; for (int i = 1; i <= theCount; i++) {   theDoc.PageNumber = i;   theDoc.Layer = theDoc.LayerCount + 1;   if (i == 1) {     string thePath = Server.MapPath("../mypics/light.jpg");     theID = theDoc.AddImageFile(thePath, 1);   }   else     theDoc.AddImageCopy(theID); } theDoc.Save(Server.MapPath("watermark.pdf")); theDoc.Clear(); As a result of the performance, the ABC pdf can help us to generate 1 pdf/second for on-the-fly generator, and be able convert the html to pdf seemlessly without lot of codes in the backend. So if you are .net developer try to look some of the PDF library, you are on the right component with ABC PDF. The ABC PDF standard is great, but if you need more feature you can see the Professional one. You can see the comparison of the version here

Topics Highlights

About @ridife

This blog will be dedicated to integrate a knowledge between academic and industry need in the Software Engineering, DevOps, Cloud Computing and Microsoft 365 platform. Enjoy this blog and let's get in touch in any social media.

Month List

Visitor