Saturday, March 1, 2025

How does .NET Core Handles Cross-Platform Development

 .NET Core (now merged into .NET 6+) was designed from the ground up to be cross-platform, modular, and high-performance

Here’s how .NET achieves true cross-platform compatibility:


1. Runtime & Execution Model

Unlike the .NET Framework, which was Windows-bound, .NET Core introduced:

  • CoreCLR – A cross-platform, lightweight, high-performance runtime.
  • Mono & WASM (WebAssembly) – Enables running .NET applications on macOS, Linux, mobile (via MAUI/Xamarin), and even in browsers (via Blazor WebAssembly).
  • Just-In-Time (JIT) & Ahead-Of-Time (AOT) Compilation – Optimizes for performance and different OS environments.

🔹 Why It Matters → This ensures that the same .NET Core codebase can run natively on different platforms without modification.


2. Platform-Agnostic APIs

.NET Core provides OS-independent APIs in the Base Class Library (BCL), eliminating Windows-specific dependencies.

For example, file system access is abstracted:

csharp

string path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "file.txt");

This works across Windows, Linux, and macOS, with the framework handling OS-specific implementations.

🔹 Why It Matters → No more System.Windows.Forms or Registry dependencies breaking Linux/macOS compatibility.


3. SDK & CLI for Any OS

The .NET CLI (dotnet) provides a unified toolset across platforms:

sh

dotnet new console dotnet build dotnet test dotnet publish -r linux-x64

This allows Windows, Linux, and macOS developers to use the same commands and workflows.

🔹 Why It Matters → Teams no longer need different build processes for different OS environments.


4. Containerization with Docker & Kubernetes

.NET Core is designed with microservices and containerization in mind. The official .NET Docker images are Linux-based, allowing deployment on:

sh

docker run -d -p 8080:80 mcr.microsoft.com/dotnet/aspnet:8.0

🔹 Why It Matters → .NET Core apps can be packaged in lightweight Linux containers, significantly reducing hosting costs compared to Windows Server-based .NET Framework apps.


5. Cross-Platform UI & Mobile Development

For UI-based applications, .NET offers:
Blazor WebAssembly → Runs .NET in the browser via WebAssembly.
.NET MAUI → Unified framework for iOS, Android, Windows, and macOS apps.
Avalonia & Uno Platform → Open-source alternatives for cross-platform desktop development.

🔹 Why It Matters → Unlike WPF and WinForms, these frameworks allow true write once, run anywhere UI development.


6. Cross-Platform Testing & CI/CD

Automated testing and deployment are seamless:

  • Unit Testingdotnet test runs on Windows, Linux, and macOS.
  • CI/CD Pipelines → Works with GitHub Actions, Azure DevOps, and Jenkins across OS environments.
  • Cloud-Native Deployments → Supports AWS ECS, Azure Kubernetes Service (AKS), and Google Kubernetes Engine (GKE) out of the box.

🔹 Why It Matters → No need to set up platform-specific build environments—everything works everywhere.


7. Handling OS-Specific Scenarios

While .NET Core abstracts most OS-specific logic, sometimes we need platform-dependent code. .NET 6+ provides OperatingSystem APIs:

csharp

if (OperatingSystem.IsWindows()) { Console.WriteLine("Running on Windows"); } else if (OperatingSystem.IsLinux()) { Console.WriteLine("Running on Linux"); } else if (OperatingSystem.IsMacOS()) { Console.WriteLine("Running on macOS"); }

🔹 Why It Matters → This allows graceful handling of platform-specific scenarios without breaking cross-platform compatibility.


Conclusion

.NET Core took 15+ years of learning from .NET Framework and built a true cross-platform, cloud-native, container-ready framework. It's no longer a "Windows technology"—today, .NET powers Linux servers, macOS development, IoT devices, mobile apps, and even WebAssembly in browsers.

💡 Final Thought: If I were designing a modern application, .NET (Core) would be my go-to choice for its flexibility, performance, and ability to run anywhere.

Wednesday, March 4, 2020

Apple not keen to move iPhone 11 manufacturing to India

There was news circulating that Apple is planning to move iphone 11 production to India or Vietnam, but now apple is not counting on India to produce its top-end luxurious iPhone models. The main reasons are lack of robust infrastructure and skilled labour in India. In a recent report by The Wall Street Journal, china amid Coronavirus outbreak, India was deemed unsuitable by Apple for the production of iPhone 11 series units, despite the company’s push into the country over the past few years.

"Apple is unlikely to shift any of the production of its most expensive iPhones to India later this year," a Foxconn executive was quoted as saying in the WSJ report. Foxconn is the major third-party manufacturer of iPhone that has a mass-scale production taking place in China. Although Foxconn has its manufacturing facilities in India as well, it is only partly responsible for producing iPhone units, especially the iPhone XR. A major fraction of the iPhone production which comprises that of iPhone 6 series, iPhone 7 series takes place at the Wistron facility in India.





Over the past few years, smartphone production has been scaled up in India by many OEMs to circumvent import duty and lower the costs of their products to penetrate more aggressively into the market. But that has only been limited to assembly of phones and manufacturing less delicate and less complex equipment. The iPhone production requires components that are developed exclusively by suppliers. The population in China has allowed suppliers to build factories with a capacity for more than 250,000 people.

"India is the closest comparison, but its roads, ports and infrastructure lag far behind those in China. The supply chain isn't in place, and workers in India aren't ready to produce the high-end, organic light-emitting diode models," the Foxconn executive told WSJ on why India is not relevant to produce iPhone 11.

Moreover, Apple was apprehensive that moving the production outside China will hamper the already plummeting sales in the region, which accounts for about a fifth of the total revenue. The report also mentions that the decision to continue production in China is unlikely to change this year, owing to the lack of the necessary infrastructure in India as required by Apple.

Friday, February 2, 2018

President's salary increased from 1.25 lakhs to 5 lakhs after budget 2018

Central government employees had high hopes from Budget 2018 in terms of salary hike. But, Finance Minister announced a hike in salaries of only President, Vice-President and Governors. The salaries of the President and the Vice President have been increased to Rs 5 lakh and Rs 4 lakh per month respectively, in a rectification of an anomaly.

Finance Minister Arun Jaitley announcing the hike in their salaries in his Budget speech said, “The emoluments of the President, the Vice President and the Governors were last revised with effect from January 1, 2006.” “These emoluments are proposed to be revised to Rs 5 lakh for the President, Rs 4 lakh for the Vice President and to Rs 3.5 lakh per month for the Governors,” he added, amidst thumping of desk by the members in the Lok Sabha.



Current salaries of President, Vice-President and Governors are Rs 1.50 lakh, Rs 1.25 lakh and Rs 1.10 lakh respectively.

These salaries are less as compared to the top bureaucrats and service chiefs since the laws were not amended to rectify an anomaly with the implementation of the 7th Pay Commission’s recommendations two years ago.

After the implementation of the 7th Pay Commission’s awards on January 1, 2016, the Cabinet Secretary, who is the top-most bureaucrat in the country, gets Rs 2.5 lakh per month and a Secretary in the Union government draws Rs 2.25 lakh per month.

The President is the supreme commander of all the three armed forces — the Army, Air Force, and Navy
but salary was less than the chiefs of the three armed forces.

Friday, January 26, 2018

President Ram Nath Kovind Awards Commando Who Died Fighting Terrorists

President Ram Nath Kovind was seen getting emotioanl at the Republic Day function today as he awarded the Ashok Chakra posthumously to Indian Air Force Garud Commando Jyoti Prakash Nirala. He got killed after shooting down three terrorists in Jammu and Kashmir last year.

After presenting the award to Corporal Nirala's wife Sushma and mother Malti Devi at Rajpath, President Kovind was seen dabbing his eyes with his handkerchief. Corporal Nirala was part of a Garud Special Forces Unit of the IAF, a team of which was attached to a Rashtriya Rifles battalion as part of 'Operation Rakshak'.



On November 18, an offensive was launched in a village in Bandipora based on specific intelligence. The Garud detachment covertly approached the target house where the terrorists were hiding and laid a close quarter ambush. Despite being hit by several bullets he kept on firing on the terrorists.

In an hour-long operation, the nephew of Lashkar-e-Taiba chief and 26/11 Mumbai terror mastermind Zaki-ur-Rehman Lakhvi were shot dead.

Defence Ministry quoted in a statement "Corporal Nirala, displaying exceptional battle craft, positioned himself close to the approach of the hideout, thus cutting off all possibilities of an escape by the terrorists. Laying the ambush at such close quarters demanded a very high degree of courage and professional acumen,"

"Corporal Nirala exhibited most conspicuous gallantry in fighting with terrorists and made supreme sacrifice," it added.

Jyoti Prakash Nirala, a resident of Bihar's Rohtas district, had joined the Indian Air Force in 2005.

Major Vijayant Bisht of the Army, who led an ambush in Jammu and Kashmir's Uri district and killed two terrorists while saving the life of another soldier, received the Kirti Chakra, the second highest peacetime military award. 

Manushi Chhillar looking gorgeous in red gown at JIO Filfare awards

Miss World 2017 Manushi Chhillar took the red carpet look by storm when she appeared in red gown looking stunnig at the star sparkling event of 63rd Jio Filmfare awards held last night.
Later She shared the stage with Shah Rukh Khan and Ranveer Singh to entertain the audience.



Sunday, January 7, 2018

Easy way to lose weight - Just change your meal schedule!

Did you ever imagine that losing weight could be so simple as just changing your eating schedule.

 “Eating only during a much smaller window of time than people are typically used to may help with weight loss,” said Courtney Peterson, an associate professor at University of Alabama at Birmingham in the US. “We found that eating between 8 am and 2 pm followed by an 18-hour daily fast kept appetite levels more even throughout the day, in comparison to eating between 8 am and 8 pm, which is what the average American does,” said Peterson.

The study is the first human test of early time- restricted feeding (eTRF). This meal-timing strategy reduced swings in hunger and altered fat and carbohydrate burning patterns, which may help with losing weight. With eTRF, people eat their last meal by the mid- afternoon and do not eat again until breakfast the next morning.

The research suggests that eating a very early dinner, or even skipping dinner, may have some benefits for losing weight, although further studies need to take place to confirm that theory. Previous animal studies showed that eTRF helped rodents burn more fat. The human body has an internal clock, and many aspects of metabolism is at their optimal functioning in the morning. Therefore, eating in alignment with the body’s circadian clock by eating earlier in the day may positively influence health. This first test of eTRF in humans follows rodent studies of this approach to weight loss, which previously found that eTRF reduced body fat and decreased the risk of chronic diseases in rodents.

During the human study, researchers followed 11 men and women with excess weight over four days of eating between 8 am and 2 pm, and four days of eating between 8 am and 8 pm. Researchers then tested the impact of eTRF on calories burned, fat burned and appetite. Participants tried both eating schedules, ate the same number of calories both times and completed all testing under supervision. Researchers found that, although eTRF did not affect how many total calories participants burned, it reduced daily
hunger swings and increased fat burning during several hours at night. It also improved metabolic flexibility, which is the body’s ability to switch between burning carbs and burning fats. Whether eTRF helps with long-term weight loss or improves other aspects of health is still unknown. A larger, more
comprehensive study will need to take place to find out, Peterson said.

Wednesday, January 3, 2018

Thalaivar Rajinikanth meets DMK supremo Karunanidhi and Stalin

Rajinikanth met DMK supremo Karunanidhi at his residence in Chennai today, raising the speculation of forming a new alliance with DMK. Stalin was seen welcoming thalaivar at the residence. Karunanidhi is the first political personality Rajinikanth has met after announcing his decision to enter into mainstream politics.

When asked about his meeting with Karunanidhi, Rajinikanth told the media, "He is the senior-most politician in the country. I respect him a lot. We have a very good friendship. I took his blessings as I am entering politics. I am feeling very happy after meeting him." He denied saying anything to Stalin, who said that Rajinikanth had asked Karunanidhi for his blessings to start a party.



"There are some people who think that by using Rajinikanth they can destroy the Dravidian party in Tamil Nadu, but that will never happen. I'll let you know about supporting Rajinikanth during the elections," Stalin told the media.

He announced his political debut on Sunday. Within days, thousands have signed up to be part of his new movement on a website and a mobile app.

The Kollywood legend, who has said he'll "push for spiritual politics without caste or religious leanings," intends to contest in the next Tamil Nadu assembly election.

Rajinikanth has always maintained a cordial relationship with Karunanidhi unlike Amma and has shown his support to DMK many times in the past.  A DMK leader recalled how Prime Minister Narendra Modi also made a surprise visit to Karunanidhi recently. "Everyone has realised the growing weakness of the AIADMK government," the DMK leader said. 

A DMK source said that ideologies could be different, but state-Centre relationship could be cordial if the DMK and the BJP are on the same wavelength. The BJP, which has been unable to make inroads into Tamil Nadu, is also trying to woo Rajinikanth, who has called for "a revolution" in the state. If the game changes in the state, the BJP could rely more on a DMK-Rajinikanth 'alliance' than TTV Dhinakaran, a political analyst said.