DotNetGerman BloggersAlle Blogs von DotNetGerman.comCopyright 2004-2014 DotNetGerman.comDotNetGerman.comhttps://blog.codeinside.eu/2024/03/15/dotnet-dev-certs-httpshttps://blog.codeinside.eu/2024/03/15/dotnet-dev-certs-https/Code-Inside Blogdotnet dev-certs https - How .NET Issues Your Local Dev HTTPS Certificate <p>If you start developing a ASP.NET Core application you will notice that your site is running under “http <strong>s</strong> ://localhost:1234” and that your browser is happy to accept it - so there are some questions to be asked.</p> <h1 id="why-https-on-your-local-dev-box">Why HTTPS on your local dev box?</h1> <p>The first question might be: Why is HTTPS on your local dev box even needed?</p> <p>At least two reasons for this (from my perspective):</p> <ul> <li>Browsers love HTTPS nowadays. There are some features, like websockets, that refuse to work with HTTP. I’m not 100% aware of all the problems, but running a webapp under HTTP in 2024 is painful (and rightfully so!).</li> <li>Integration with other services is mostly forbidden. If you rely on a 3rd party authentication system (e.g. Microsoft/Facebook/Google/Apple Login) they might accept “localhost” as a reply address, but might deny HTTP addresses.</li> </ul> <p>I wouldn’t count “security” as an issue here, because you are developing on your own system. If there is something on your machine HTTPS won’t help you at that point.</p> <h1 id="how-does-aspnet-core-issues-a-valid--trusted-cert">How does ASP.NET Core issues a valid &amp; trusted cert?</h1> <p>I’m not exactly sure when this happens, as it was already installed on my development machine.</p> <p>Either when you install the Visual Studio workload for ASP.NET Core or if you create your very first ASP.NET Core application the dev cert for localhost will be issued.</p> <h2 id="but-how">But how?</h2> <p>The .NET SDK ships with a CLI tool called <code class="language-plaintext highlighter-rouge">dotnet dev-certs https</code> and this tool issues the certificate. The output of this command will look like this if a valid and trusted certificate is found::</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>PS C:\Users\muehsig&gt; dotnet dev-certs https A valid HTTPS certificate is already present. </code></pre></div></div> <h2 id="dev-certs-https">dev-certs https</h2> <p>There are other options available:</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>PS C:\Users\muehsig&gt; dotnet dev-certs https --help Usage: dotnet dev-certs https [options] Options: -ep|--export-path Full path to the exported certificate -p|--password Password to use when exporting the certificate with the private key into a pfx file or to encrypt the Pem exported key -np|--no-password Explicitly request that you don't use a password for the key when exporting a certificate to a PEM format -c|--check Check for the existence of the certificate but do not perform any action --clean Cleans all HTTPS development certificates from the machine. -i|--import Imports the provided HTTPS development certificate into the machine. All other HTTPS developer certificates will be cleared out --format Export the certificate in the given format. Valid values are Pfx and Pem. Pfx is the default. -t|--trust Trust the certificate on the current platform. When combined with the --check option, validates that the certificate is trusted. -v|--verbose Display more debug information. -q|--quiet Display warnings and errors only. -h|--help Show help information </code></pre></div></div> <h1 id="what-happens-when-the-cert-is-no-longer-valid">What happens when the cert is no longer valid?</h1> <p>This is an interesting one, because I had this experience just this week (and that’s the reason for this blogpost).</p> <p>A certificate needs to be in the certification store to be considered trusted. That means your “localhost”-dev cert will be stored in your personal certification store (at least on Windows):</p> <p><img src="https://blog.codeinside.eu/assets/md-images/2024-03-15/devcerts.png" alt="x" title="Dev Cert in Certification Store" /></p> <p>As you can see, the command <code class="language-plaintext highlighter-rouge">dotnet dev-certs https --check --trust</code> will return something like this:</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>A trusted certificate was found: E7A2FB302F26BCFFB7C21801C09081CF2FAAAD2C - CN=localhost - Valid from 2024-03-13 11:12:10Z to 2025-03-13 11:12:10Z - IsHttpsDevelopmentCertificate: true - IsExportable: true </code></pre></div></div> <p>If the certificate is stale, then your browser won’t accept it anymore and your web application will start, but can’t be viewed because your browser will refuse it.</p> <h1 id="how-to-repair-invalid-certificates">How to repair invalid certificates?</h1> <p>Use the two commands and it should work again:</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>dotnet dev-certs https --clean </code></pre></div></div> <p>…which will remove the old certification and…</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>dotnet dev-certs https --trust </code></pre></div></div> <p>… to issue a new cert and invoke the trust dialog from Windows.</p> <h1 id="if-it-works">If it works…</h1> <p>There are some more options, e.g. to export the certificate, which can be useful in certain scenarios, but if you can use HTTPS on your local development machine and everything works you shouldn’t have to bother. If you want to learn more, checkout the <a href="https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-dev-certs">dotnet dev-certs</a> documentation.</p> <p>Hope this helps!</p> Fri, 15 Mar 2024 23:59:00 ZCode-Inside BlogCode-Inside BlogCode-Inside Bloghttp://heise.de/-9656153Holger SchwichtenbergNeu in .NET 8.0 [14]: Neue Wächtermethoden für Parameter.NET 8.0 bietet neue Hilfsmethoden zum Auslösen von Fehlern bei falschen Parametern.Fri, 15 Mar 2024 13:15:00 +01002024-03-15T13:15:00+01:00Holger SchwichtenbergHolger SchwichtenbergHolger Schwichtenberghttps://www.xplatform.rocks/?p=1749https://www.xplatform.rocks/jeddah-gp-a-new-chapter-in-formula-1-saudi-arabia/Thorsten HansJeddah GP: A New Chapter in Formula 1, Saudi Arabia<p>The Formula 1 season continues its excitement with the Jeddah Grand Prix in Saudi Arabia&#8217;s coastal city. This event follows the season opener in Bahrain and precedes the race in Melbourne, Australia. The night race at the Jeddah Corniche Circuit promises to be a highlight of the 2023 season. Jeddah Corniche Circuit: A Marvel of<a class="continue-link" href="https://www.xplatform.rocks/jeddah-gp-a-new-chapter-in-formula-1-saudi-arabia/">...(Continue Reading)</a></p> <p>The post <a href="https://www.xplatform.rocks/jeddah-gp-a-new-chapter-in-formula-1-saudi-arabia/">Jeddah GP: A New Chapter in Formula 1, Saudi Arabia</a> appeared first on <a href="https://www.xplatform.rocks">xplatform.rocks</a>.</p> Thu, 14 Mar 2024 07:11:35 ZThorsten Hans <p>The Formula 1 season continues its excitement with the Jeddah Grand Prix in Saudi Arabia&#8217;s coastal city. This event follows the season opener in <a href="https://www.xplatform.rocks/the-2024-formula-1-racing-season-starting-with-a-bang-in-bahrain/">Bahrain</a> and precedes the race in <a href="https://www.xplatform.rocks/f1-melbourne-grand-prix-australia/">Melbourne, Australia</a>. The night race at the Jeddah Corniche Circuit promises to be a highlight of the 2023 season.</p> <figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="1024" height="1024" src="https://www.xplatform.rocks/wp-content/uploads/2023/12/saudiarabia.webp" alt="" class="wp-image-1750" srcset="https://www.xplatform.rocks/wp-content/uploads/2023/12/saudiarabia.webp 1024w, https://www.xplatform.rocks/wp-content/uploads/2023/12/saudiarabia-300x300.webp 300w, https://www.xplatform.rocks/wp-content/uploads/2023/12/saudiarabia-150x150.webp 150w, https://www.xplatform.rocks/wp-content/uploads/2023/12/saudiarabia-768x768.webp 768w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure> <h2 class="wp-block-heading"><strong>Jeddah Corniche Circuit: A Marvel of Engineering</strong></h2> <p>Stretching 6.175 kilometers along the Red Sea coast, <a href="https://saudiarabiangp.com/en">this street circuit</a> with its 27 turns is a test of skill for drivers, ranking as the second longest in the Formula One calendar. The track, set against a backdrop of iconic structures like the Jeddah Tower and King Fahd Fountain, seamlessly integrates into the city&#8217;s landscape. However, the future might see Formula 1 shifting to Riyadh, with the Qiddiya Entertainment Complex slated to become the new venue from 2024, hosting various motorsport and entertainment events.</p> <h2 class="wp-block-heading"><strong>Champions of the Jeddah Grand Prix</strong></h2> <p>In its third year, the Jeddah Grand Prix has seen notable winners:</p> <ul> <li>2021: Lewis Hamilton (Mercedes)</li> <li>2022: Max Verstappen (Red Bull)</li> <li>2023: Sergio Perez (Red Bull)</li> </ul> <h2 class="wp-block-heading"><strong>Formula 1&#8217;s Ties with Saudi Arabia: A Blend of Progress and Controversy</strong></h2> <p>Saudi Arabia&#8217;s foray into Formula One, while marked with significant investments and sponsorships, has not been free of controversy. The nation&#8217;s conservative Islamic culture juxtaposes with the sport&#8217;s global appeal. Nonetheless, the huge investments, including a $900 million deal for a ten-year hosting agreement, showcase Saudi Arabia&#8217;s commitment to making its mark in Formula One.</p> <h2 class="wp-block-heading"><strong>Beyond the Racetrack: Human Rights and Change</strong></h2> <p>Amidst the glamour of Formula One in Saudi Arabia, concerns over human rights persist. Figures like Lewis Hamilton have used their influence to bring attention to these issues, advocating for movements like LGBT rights. The impact of Formula One in driving social change in Saudi Arabia remains an open question.</p> <h2 class="wp-block-heading"><strong>Formula 1 in Jeddah: An Intriguing Evolution</strong></h2> <p>Saudi Arabia&#8217;s journey in the world of Formula One is multi-faceted. With the Jeddah Corniche Circuit and the upcoming Qiddiya Entertainment Complex, the country is redefining motorsport standards. Yet, the integration of sports with the broader social context in Saudi Arabia is a complex and evolving narrative.</p> <h2 class="wp-block-heading"><strong>Exploring Jeddah: A City of Wonder</strong></h2> <p>Jeddah, a major Saudi Arabian city, offers a blend of historical, cultural, and modern attractions. Highlights include the scenic Jeddah Corniche, the record-breaking King Fahd Fountain, the under-construction Jeddah Tower, the historical Al-Balad district, Nasseef House, the Floating Mosque, Jeddah Aquarium, King Fahd Mosque, the expansive Red Sea Mall, Fakieh Aquarium, Atallah Happy Land Park, and the pioneering King Abdullah Economic City.</p> <p>These attractions contribute to Jeddah&#8217;s unique allure, blending tradition with modernity.</p> <h2 class="wp-block-heading"><strong>Formula 1 Fans: Watch the Race for Free</strong></h2> <p>For Formula 1 enthusiasts eager to catch the action, including the Saudi Arabian race, <a href="https://www.xplatform.rocks/watch-forumla1-free/">free F1 live streaming</a> is possible. By using a simple trick, fans can enjoy the races live without any cost.</p> <p>The post <a href="https://www.xplatform.rocks/jeddah-gp-a-new-chapter-in-formula-1-saudi-arabia/">Jeddah GP: A New Chapter in Formula 1, Saudi Arabia</a> appeared first on <a href="https://www.xplatform.rocks">xplatform.rocks</a>.</p> Thorsten HansThorsten Hanshttps://www.xplatform.rocks/?p=1738https://www.xplatform.rocks/f1-miami-grand-prix-a-dazzling-event-in-the-sunshine-state/Thorsten HansF1 Miami Grand Prix: A Dazzling Event in the Sunshine State<p>The Formula 1 Miami Grand Prix, set to illuminate the Florida skies from May 5-7, 2023, marks the event&#8217;s second appearance on the F1 calendar. This thrilling night race, held in the vibrant state of Florida, USA, is not just a testament to the region&#8217;s growing significance in Formula 1 but also a showcase of<a class="continue-link" href="https://www.xplatform.rocks/f1-miami-grand-prix-a-dazzling-event-in-the-sunshine-state/">...(Continue Reading)</a></p> <p>The post <a href="https://www.xplatform.rocks/f1-miami-grand-prix-a-dazzling-event-in-the-sunshine-state/">F1 Miami Grand Prix: A Dazzling Event in the Sunshine State</a> appeared first on <a href="https://www.xplatform.rocks">xplatform.rocks</a>.</p> Wed, 13 Mar 2024 10:52:40 ZThorsten Hans <p>The Formula 1 Miami Grand Prix, set to illuminate the Florida skies from May 5-7, 2023, marks the event&#8217;s second appearance on the F1 calendar. This thrilling night race, held in the vibrant state of Florida, USA, is not just a testament to the region&#8217;s growing significance in Formula 1 but also a showcase of high-octane excitement.</p> <figure class="wp-block-image size-full"><img decoding="async" width="1024" height="1024" src="https://www.xplatform.rocks/wp-content/uploads/2023/12/MIAmi-1.webp" alt="" class="wp-image-1739" srcset="https://www.xplatform.rocks/wp-content/uploads/2023/12/MIAmi-1.webp 1024w, https://www.xplatform.rocks/wp-content/uploads/2023/12/MIAmi-1-300x300.webp 300w, https://www.xplatform.rocks/wp-content/uploads/2023/12/MIAmi-1-150x150.webp 150w, https://www.xplatform.rocks/wp-content/uploads/2023/12/MIAmi-1-768x768.webp 768w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure> <h2 class="wp-block-heading"><strong>From Baku to Miami: The F1 Journey Continues</strong></h2> <p>Following the <a href="https://www.xplatform.rocks/the-thrill-of-f1-in-azerbaijan-baku-grand-prix/">Baku Grand Prix in Azerbaijan</a>, Formula 1 teams embarked on a lengthy journey to Miami, a routine part of their global travels. After the Miami event, the entourage will proceed to the <a href="https://www.xplatform.rocks/f1-italy-in-imola-gp-emilia-romana/">Italian Grand Prix in Imola</a>, maintaining the fast-paced schedule of the Formula 1 season.</p> <h2 class="wp-block-heading"><strong>Miami Grand Prix&#8217;s Heartbeat: The Miami International Autodrome</strong></h2> <p>At the core of the Miami Grand Prix&#8217;s excitement lies the <a href="https://www.racingcircuits.info/north-america/usa/miami-international-autodrome.html">Miami International Autodrome</a>. This track, encircling the Miami Dolphins&#8217; Hard Rock Stadium, temporarily transforms the NFL arena into a racing spectacle, offering an adrenaline-pumping experience for Formula One enthusiasts.</p> <h2 class="wp-block-heading"><strong>The Thrilling Circuit: Challenging and Fast-Paced</strong></h2> <p>Known as the Hard Rock Stadium Circuit, this 5.41 km track with its 19 demanding turns demands precision and strategic mastery from the drivers. With top speeds reaching 320 km/h and a counterclockwise direction, it guarantees a thrilling racing adventure.</p> <h2 class="wp-block-heading"><strong>Safety First: F1&#8217;s Commitment to Secure Racing</strong></h2> <p>Developed to meet FIA&#8217;s stringent safety standards, the Hard Rock Stadium Circuit ensures a secure yet exhilarating racing experience. Close coordination between race organizers and security teams guarantees optimal safety for both drivers and spectators.</p> <h2 class="wp-block-heading"><strong>A Decade of Racing: The Long-term Vision</strong></h2> <p>The ten-year contract with Formula One heightens the anticipation, offering drivers, both veteran and emerging, ample opportunities to master the track and showcase their prowess.</p> <h2 class="wp-block-heading"><strong>Beyond Racing: Miami Grand Prix&#8217;s Cultural Impact</strong></h2> <p>The Miami Grand Prix goes beyond racing, highlighting the Hard Rock Stadium&#8217;s versatility as a venue for diverse events, from the Miami Dolphins&#8217; games to the ATP Tennis Miami Open and major concerts, embodying Miami&#8217;s dynamic cultural scene.</p> <h2 class="wp-block-heading"><strong>Miami: A City of Diverse Attractions</strong></h2> <p>Miami, a city of stark contrasts, captivates visitors worldwide with its stunning beaches, vibrant nightlife, and rich culinary landscape. From art galleries and luxury shopping to lush parks and a myriad of activities, Miami is a city where excitement and relaxation seamlessly merge.</p> <h3 class="wp-block-heading"><strong>Discover Miami: A City Full of Surprises</strong></h3> <p>While the Miami Grand Prix is a highlight, Miami&#8217;s charm extends beyond the race track. The city offers a rich tapestry of experiences ranging from iconic beaches to cultural landmarks and natural wonders.</p> <p><strong>Miami&#8217;s Must-Visit Destinations</strong>:</p> <ol> <li><strong>South Beach:</strong> Famous for its white sands, turquoise waters, and lively vibe, plus the iconic Art Deco architecture.</li> <li><strong>Art Deco Historic District:</strong> Houses a vast collection of 1920s and 1930s Art Deco buildings.</li> <li><strong>Little Havana:</strong> The heart of Cuban culture in Miami with authentic experiences.</li> <li><strong>Vizcaya Museum and Gardens:</strong> A former industrialist&#8217;s estate, now a European art museum.</li> <li><strong>Wynwood Walls:</strong> A neighborhood celebrated for its vibrant street art.</li> <li><strong>Miami Seaquarium:</strong> A chance to interact with marine life.</li> <li><strong>Jungle Island:</strong> A combination of a zoo and botanical garden with exotic wildlife.</li> <li><strong>Everglades National Park:</strong> A unique ecosystem offering airboat tours and alligator sightings.</li> <li><strong>Miami Design District:</strong> Known for luxury shopping, art galleries, and trendy dining.</li> <li><strong>Bayfront Park:</strong> A public park hosting various events and offering scenic bay views.</li> <li><strong>Coral Gables:</strong> Notable for Mediterranean architecture and the historic Biltmore Hotel.</li> <li><strong>Perez Art Museum Miami (PAMM):</strong> Showcases modern and contemporary art.</li> <li><strong>Zoo Miami:</strong> Florida&#8217;s largest zoo, emphasizing natural habitats.</li> <li><strong>Coconut Grove:</strong> A quaint area with charming shops, cafes, and galleries.</li> </ol> <p>For those planning to attend the Miami Grand Prix, the city is well-connected, with multiple transport options including flights, trains, buses, and cars. Visitors should anticipate warm weather, typical of Miami, but also be prepared for occasional rain.</p> <h2 class="wp-block-heading"><strong>Experience the Miami Grand Prix from Anywhere</strong></h2> <p>For fans unable to witness the race in person, <a href="https://www.xplatform.rocks/watch-forumla1-free/">the entire Formula One season</a>, including the Miami Grand Prix, is available for streaming online. This allows enthusiasts worldwide to partake in the excitement from the comfort of their homes.</p> <p>The post <a href="https://www.xplatform.rocks/f1-miami-grand-prix-a-dazzling-event-in-the-sunshine-state/">F1 Miami Grand Prix: A Dazzling Event in the Sunshine State</a> appeared first on <a href="https://www.xplatform.rocks">xplatform.rocks</a>.</p> Thorsten HansThorsten Hanshttps://www.xplatform.rocks/?p=1764https://www.xplatform.rocks/f1-melbourne-grand-prix-australia/Thorsten HansF1 Melbourne – Grand Prix Australia<p>Following a brief pause in 2020 and 2021, owing to the worldwide coronavirus crisis, the Australian Melbourne Grand Prix made a triumphant return to the racing schedule in 2022. The 2023 event is poised for an early April launch, a mere fortnight after the Jiddah Grand Prix in Saudi Arabia. Enthusiasts eagerly anticipate the subsequent<a class="continue-link" href="https://www.xplatform.rocks/f1-melbourne-grand-prix-australia/">...(Continue Reading)</a></p> <p>The post <a href="https://www.xplatform.rocks/f1-melbourne-grand-prix-australia/">F1 Melbourne &#8211; Grand Prix Australia</a> appeared first on <a href="https://www.xplatform.rocks">xplatform.rocks</a>.</p> Tue, 12 Mar 2024 13:18:11 ZThorsten Hans <p>Following a brief pause in 2020 and 2021, owing to the worldwide coronavirus crisis, the Australian Melbourne Grand Prix made a triumphant return to the racing schedule in 2022. The 2023 event is poised for an early April launch, a mere fortnight after the <strong>Jiddah Grand Prix in Saudi Arabia</strong>. Enthusiasts eagerly anticipate the subsequent racing spectacle at the <a href="https://www.xplatform.rocks/the-thrill-of-f1-in-azerbaijan-baku-grand-prix/">Azerbaijan GP in Baku</a>.</p> <figure class="wp-block-image size-full"><img decoding="async" width="1024" height="1024" src="https://www.xplatform.rocks/wp-content/uploads/2024/01/melbourne-1.webp" alt="" class="wp-image-1765" srcset="https://www.xplatform.rocks/wp-content/uploads/2024/01/melbourne-1.webp 1024w, https://www.xplatform.rocks/wp-content/uploads/2024/01/melbourne-1-300x300.webp 300w, https://www.xplatform.rocks/wp-content/uploads/2024/01/melbourne-1-150x150.webp 150w, https://www.xplatform.rocks/wp-content/uploads/2024/01/melbourne-1-768x768.webp 768w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure> <h2 class="wp-block-heading">Melbourne Grand Prix: Exploring the Albert Park Circuit</h2> <p>Set to take place at the <a href="https://www.austadiums.com/stadiums/melbourne-gp-circuit">Albert Park Circuit</a> in Melbourne, this race features one of Formula One&#8217;s quicker tracks. Famed for its numerous high-speed stretches and 16 challenging corners, some forming acute 90-degree angles, the circuit demands exceptional precision in steering and acceleration from the drivers.</p> <p>This 5.303-kilometer track, notorious for its rough surfaces causing top drivers to lose crucial points and standings, runs clockwise and spans 58 laps, totaling a race distance of 307.5 kilometers.</p> <h2 class="wp-block-heading">Melbourne Grand Prix &#8211; Records and Rivalries</h2> <p>Michael Schumacher&#8217;s 2004 record of 1:24.125 remains the fastest race lap, while Lewis Hamilton&#8217;s 2019 lap at 1:20.486 stands as the quickest ever. The circuit&#8217;s layout results in high fuel consumption, with over two-thirds of the lap at full throttle, increasing tire and brake wear. Additionally, Melbourne&#8217;s unpredictable weather adds an extra layer of complexity, testing the mettle of drivers and their technical teams.</p> <h3 class="wp-block-heading">The Melbourne Grand Prix: A Retrospective</h3> <p>Since its inception in 1985, the Australian Grand Prix has witnessed numerous iconic moments, particularly in 1994 and 1995 when Michael Schumacher clinched back-to-back world titles. The Melbourne Grand Prix boasts an impressive roster of victors, with Charles Leclerc winning in 2022, and no races held in 2020 and 2021 due to the pandemic.</p> <p>Celebrated Champions of the Melbourne Grand Prix:</p> <figure class="wp-block-table"><table><thead><tr><th>Year</th><th>Winner</th><th>Location</th></tr></thead><tbody><tr><td>2022</td><td>Charles Leclerc Ferrari</td><td></td></tr><tr><td>2021</td><td>No Grand Prix race</td><td>Melbourne GP</td></tr><tr><td>2020</td><td>No Grand Prix race</td><td>Melbourne GP</td></tr><tr><td>2019</td><td>Valtteri Bottas Mercedes</td><td>Melbourne GP</td></tr><tr><td>2018</td><td>Sebastian Vettel Ferrari</td><td>Melbourne GP</td></tr><tr><td>2017</td><td>Sebastian Vettel Ferrari</td><td>Melbourne GP</td></tr><tr><td>2016</td><td>Nico Rosberg Mercedes</td><td>Melbourne GP</td></tr><tr><td>2015</td><td>Lewis Hamilton Mercedes</td><td>Melbourne GP</td></tr><tr><td>2014</td><td>Nico Rosberg Mercedes</td><td>Melbourne GP</td></tr><tr><td>2013</td><td>Kimi Räikkönen Lotus Renault</td><td>Melbourne GP</td></tr><tr><td>2012</td><td>Jenson Button McLaren Mercedes</td><td>Melbourne GP</td></tr><tr><td>2011</td><td>Sebastian Vettel Red Bull Renault</td><td>Melbourne GP</td></tr><tr><td>2010</td><td>Jenson Button McLaren Mercedes</td><td>Melbourne GP</td></tr><tr><td>2009</td><td>Jenson Button McLaren Mercedes</td><td>Melbourne GP</td></tr><tr><td>2008</td><td>Lewis Hamilton McLaren Mercedes</td><td>Melbourne GP</td></tr><tr><td>2007</td><td>Kimi Räikkönen Ferrari</td><td>Melbourne GP</td></tr><tr><td>2006</td><td>Fernando Alonso Renault</td><td>Melbourne GP</td></tr><tr><td>2005</td><td>Giancarlo Fisichella Renault</td><td>Melbourne GP</td></tr><tr><td>2004</td><td>Michael Schumacher Ferrari</td><td>Melbourne GP</td></tr><tr><td>2003</td><td>David Coulthard McLaren Mercedes</td><td>Melbourne GP</td></tr><tr><td>2002</td><td>Michael Schumacher Ferrari</td><td>Melbourne GP</td></tr><tr><td>2001</td><td>Michael Schumacher Ferrari</td><td>Melbourne GP</td></tr><tr><td>2000</td><td>Michael Schumacher Ferrari</td><td>Melbourne GP</td></tr><tr><td>1999</td><td>Eddie Irvine Ferrari</td><td>Melbourne GP</td></tr><tr><td>1998</td><td>Mika Häkkinen McLaren Mercedes</td><td>Melbourne GP</td></tr><tr><td>1997</td><td>David Coulthard McLaren Mercedes</td><td>Melbourne GP</td></tr><tr><td>1996</td><td>Damon Hill Williams Renault</td><td>Melbourne GP</td></tr><tr><td>1995</td><td>Damon Hill Williams Renault</td><td>Adelaide GP</td></tr><tr><td>1994</td><td>Nigel Mansell Williams Renault</td><td>Adelaide GP</td></tr><tr><td>1993</td><td>Ayrton Senna McLaren Ford</td><td>Adelaide GP</td></tr><tr><td>1992</td><td>Gerhard Berger McLaren Honda</td><td>Adelaide GP</td></tr><tr><td>1991</td><td>Ayrton Senna McLaren Honda</td><td>Adelaide GP</td></tr><tr><td>1990</td><td>Nelson Piquet Benetton Ford</td><td>Adelaide GP</td></tr><tr><td>1989</td><td>Thierry Boutsen Williams Renault</td><td>Adelaide GP</td></tr><tr><td>1988</td><td>Alain Prost McLaren Honda</td><td>Adelaide GP</td></tr><tr><td>1987</td><td>Gerhard Berger Ferrari</td><td>Adelaide GP</td></tr><tr><td>1986</td><td>Alain Prost McLaren Porsche</td><td>Adelaide GP</td></tr><tr><td>1985</td><td>Keke Rosberg Williams Honda</td><td>Adelaide GP</td></tr></tbody></table></figure> <h2 class="wp-block-heading">Melbourne and its Must-Visit Attractions</h2> <p>Melbourne, known for its eclectic culture and architecture, offers a plethora of attractions. Highlights include the vibrant Federation Square, the lush Royal Botanic Gardens, the iconic Melbourne Cricket Ground (MCG), the historic National Gallery of Victoria (NGV), and the poignant Shrine of Remembrance. The Eureka Tower offers stunning city views, while the Melbourne Zoo and Aquarium provide unique wildlife experiences. The bustling Queen Victoria Market, scenic Great Ocean Road, and artistic laneways add to the city&#8217;s charm, with Phillip Island being a haven for wildlife enthusiasts.</p> <ol> <li><strong>Federation Square</strong>: This bustling public square stands as a central venue for cultural events and social gatherings, pulsating with life and activity.</li> <li><strong>Royal Botanic Gardens</strong>: Nestled in the city&#8217;s heart, this expansive garden boasts a stunning collection of flora, offering a serene escape amidst nature.</li> <li><strong>Melbourne Cricket Ground (MCG)</strong>: Renowned worldwide, the MCG is steeped in sporting history, hosting numerous legendary sporting events.</li> <li><strong>National Gallery of Victoria (NGV)</strong>: As Australia&#8217;s oldest art gallery, the NGV houses an awe-inspiring array of artworks, a testament to the nation&#8217;s rich artistic heritage.</li> <li><strong>Shrine of Remembrance</strong>: This solemn war memorial honors the valor and sacrifice of Australians who served in wars, a poignant reminder of the country&#8217;s history.</li> <li><strong>Eureka Tower</strong>: Dominating Melbourne&#8217;s skyline, this skyscraper offers stunning panoramic city views, with its skydeck being a major attraction.</li> <li><strong>Melbourne Zoo</strong>: A family favorite, the zoo is home to a diverse range of wildlife, providing an engaging and educational experience for all ages.</li> <li><strong>Melbourne Museum</strong>: Showcasing the region&#8217;s history, culture, and natural science, this modern museum captivates visitors with its informative and interactive exhibits.</li> <li><strong>St. Kilda Beach</strong>: A popular coastal spot, known for its vibrant promenade, array of restaurants, and lively atmosphere.</li> <li><strong>Melbourne Aquarium</strong>: Dive into an underwater journey here, featuring a rich variety of marine life, including the majestic sharks and playful penguins.</li> <li><strong>Queen Victoria Market</strong>: A bustling hub offering an eclectic mix of fresh food, apparel, and souvenirs, reflecting Melbourne&#8217;s vibrant market culture.</li> <li><strong>Great Ocean Road</strong>: A scenic drive just outside Melbourne, renowned for its breathtaking coastal views and natural beauty, perfect for a day trip.</li> <li><strong>Flinders Street Railway Station</strong>: An architectural icon and a major transportation hub, this station is a central point in Melbourne&#8217;s bustling city life.</li> <li><strong>Laneways and Arcades</strong>: Explore Melbourne&#8217;s unique character through its artistic laneways, brimming with cozy cafes, boutique shops, and vibrant street art.</li> <li><strong>Phillip Island</strong>: Famous for its penguin parade, this island offers a chance to encounter koalas, seals, and other native wildlife in their natural habitat.</li> <li><strong>Yarra River</strong>: Winding through the city, the river provides a picturesque setting for boat rides and picnics, adding to the city&#8217;s charm.</li> <li><strong>State Library Victoria</strong>: More than just a library, this institution boasts rich history and stunning architecture, making it a landmark of knowledge and beauty.</li> <li><strong>Lygon Street</strong>: The heart of Italian culture in Melbourne, filled with delectable restaurants and cafes, perfect for food enthusiasts.</li> <li><strong>Chapel Street</strong>: A go-to destination for shopping and nightlife, offering a diverse range of stores and entertainment options.</li> <li><strong>Dandenong Ranges</strong>: Close to Melbourne, these ranges offer outdoor adventures like hiking and picnicking, including rides on the historic Puffing Billy steam train.</li> </ol> <p>These attractions showcase Melbourne&#8217;s vibrant mix of culture, history, art, gastronomy, and nature, making it a captivating destination to explore.</p> <h2 class="wp-block-heading">Experience Formula 1 Live Without Subscriptions</h2> <p>For those keen on experiencing the full <a href="https://www.xplatform.rocks/watch-forumla1-free/">Formula 1 season live without a paid Sky subscription</a>, there are alternative, subscription-free methods. This option serves as a budget-friendly alternative to costly pay-TV services, allowing fans to enjoy the thrill of Formula 1 racing without added expense.</p> <p>The post <a href="https://www.xplatform.rocks/f1-melbourne-grand-prix-australia/">F1 Melbourne &#8211; Grand Prix Australia</a> appeared first on <a href="https://www.xplatform.rocks">xplatform.rocks</a>.</p> Thorsten HansThorsten Hanshttps://www.xplatform.rocks/?p=1745https://www.xplatform.rocks/the-thrill-of-f1-in-azerbaijan-baku-grand-prix/Thorsten HansThe Thrill of F1 in Azerbaijan: Baku Grand Prix<p>As the Formula One season unfolds with thrilling races, the Baku Grand Prix in Azerbaijan, situated along the Caspian Sea, is set to capture the world&#8217;s attention in late April. Following the exhilarating race in Melbourne, the Formula One journey continues, leading up to another exciting event &#8211; the Miami Grand Prix. Fans of the<a class="continue-link" href="https://www.xplatform.rocks/the-thrill-of-f1-in-azerbaijan-baku-grand-prix/">...(Continue Reading)</a></p> <p>The post <a href="https://www.xplatform.rocks/the-thrill-of-f1-in-azerbaijan-baku-grand-prix/">The Thrill of F1 in Azerbaijan: Baku Grand Prix</a> appeared first on <a href="https://www.xplatform.rocks">xplatform.rocks</a>.</p> Mon, 11 Mar 2024 15:55:12 ZThorsten Hans <p>As the Formula One season unfolds with thrilling races, the Baku Grand Prix in Azerbaijan, situated along the Caspian Sea, is set to capture the world&#8217;s attention in late April. Following the exhilarating race in <strong>Melbourne</strong>, the Formula One journey continues, leading up to another exciting event &#8211; the <strong>Miami Grand Prix</strong>. Fans of the sport are in for a succession of spectacular races.</p> <figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1024" height="1024" src="https://www.xplatform.rocks/wp-content/uploads/2023/12/Azerbaijan-1.webp" alt="" class="wp-image-1747" srcset="https://www.xplatform.rocks/wp-content/uploads/2023/12/Azerbaijan-1.webp 1024w, https://www.xplatform.rocks/wp-content/uploads/2023/12/Azerbaijan-1-300x300.webp 300w, https://www.xplatform.rocks/wp-content/uploads/2023/12/Azerbaijan-1-150x150.webp 150w, https://www.xplatform.rocks/wp-content/uploads/2023/12/Azerbaijan-1-768x768.webp 768w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure> <h2 class="wp-block-heading"><strong>Baku Grand Prix: A Blend of History and Speed</strong></h2> <p>The <a href="https://www.bakucitycircuit.com/">Baku City Circuit</a>, the official name of Baku&#8217;s racetrack, made its memorable debut in 2017. This track stands out in the Formula One circuit for its sheer beauty and challenge. Daniel Ricciardo clinched a remarkable win in his Red Bull in its inaugural year, while Lewis Hamilton, despite starting in pole position, finished without a victory.</p> <p>Traversing through Baku&#8217;s heart, the track passes by significant landmarks like the Maiden&#8217;s Tower and weaves through the Old Town. It stretches along the seafront, ending at Government Square. This 6.006-kilometer circuit, with its narrowest point being just 7 meters wide, is often cited as one of the most demanding in the sport. The limited overtaking opportunities, especially in turns 7 and 16, place a premium on starting positions in the 51-lap race.</p> <h3 class="wp-block-heading"><strong>Baku: A City of Stunning Contrasts</strong></h3> <p>Baku, Azerbaijan&#8217;s capital, is a tapestry of old and new, a blend of diverse cultures and eras. Situated on the western shore of the Caspian Sea, it serves as the country&#8217;s political, economic, and cultural nucleus. This city captivates visitors with its mix of ancient heritage and modern vibrancy, offering something for everyone &#8211; from Formula 1 enthusiasts to history and architecture lovers.</p> <h3 class="wp-block-heading"><strong>A Journey Through Time and Architecture</strong></h3> <p>Baku&#8217;s history is rich and varied, dating back to the first millennium BC. Influences from various empires, including the Persians, Romans, and the Soviet Union, are evident in its architecture and culture. The Old City, or İçəri Şəhər, a UNESCO World Heritage Site, houses landmarks like the Maiden&#8217;s Tower and the Palace of the Shirvanshahs.</p> <p>In the realm of contemporary architecture, Baku is equally impressive. The Flame Towers, designed to resemble flickering flames, dominate the city&#8217;s skyline. The Heydar Aliyev Center, a creation of the famed Zaha Hadid, is another architectural gem with its flowing, futuristic design.</p> <h3 class="wp-block-heading"><strong>Economic Growth and Cultural Fusion</strong></h3> <p>Baku&#8217;s economy thrives primarily on its oil and gas industry, propelling it into a significant global energy hub. This economic boom has spurred growth in sectors like technology, tourism, finance, and sports, including Formula One. </p> <p>The cultural scene in Baku is a fascinating fusion of Eastern and Western influences. From traditional Azerbaijani music and dance to European art and literature, the city is a hub of cultural diversity. It boasts an array of museums, galleries, and theaters showcasing both local and international works.</p> <h3 class="wp-block-heading"><strong>A Tourist&#8217;s Delight</strong></h3> <p>Baku attracts a global audience with its blend of historical and modern attractions. The city offers a wide range of experiences, from the quaint cobbled streets of the old city to contemporary shopping and dining options. Key tourist spots include the Tezepir Mosque, Gobustan National Park with its ancient petroglyphs, and the scenic waterfront.</p> <h3 class="wp-block-heading"><strong>Climate Patterns</strong></h3> <p>Baku experiences a semi-arid climate with significant temperature variations between summer and winter. Summers are typically warm, averaging around 26°C in June, while winters are generally mild.</p> <h2 class="wp-block-heading"><strong>Recapping the Baku Grand Prix History</strong></h2> <p>The Baku Grand Prix has seen a variety of winners since its inception, for example:</p> <ul> <li>2017: Daniel Ricciardo (Red Bull-TAG Heuer)</li> <li>2018: Lewis Hamilton (Mercedes)</li> <li>2019: Valtteri Bottas (Mercedes)</li> <li>2021: Sergio Pérez (Red Bull Racing-Honda)</li> <li>2022: Max Verstappen (Red Bull Racing-Honda)</li> </ul> <h2 class="wp-block-heading"><strong>Experience the Baku Grand Prix from Home</strong></h2> <p>For fans eager to catch the Baku Grand Prix and other <a href="https://www.xplatform.rocks/watch-forumla1-free/">F1 races live</a>, there&#8217;s a way to enjoy it for free. By using a reliable VPN, you can access live streams of all the Formula One races. This method, which I have relied on for years, brings the excitement of the race track right into your home.</p> <p>The post <a href="https://www.xplatform.rocks/the-thrill-of-f1-in-azerbaijan-baku-grand-prix/">The Thrill of F1 in Azerbaijan: Baku Grand Prix</a> appeared first on <a href="https://www.xplatform.rocks">xplatform.rocks</a>.</p> Thorsten HansThorsten Hanshttps://www.xplatform.rocks/?p=1732https://www.xplatform.rocks/f1-italy-in-imola-gp-emilia-romana/Thorsten HansF1 Italy in Imola GP – Emilia Romana<p>The Imola Grand Prix, also known as the Emilia-Romagna Grand Prix, is set to exhilarate fans for the fourth time this year. Previously celebrated as the San Marino Grand Prix, the 2023 event will unfold in mid-May, following the Miami Grand Prix in the USA. The iconic Italian race in Imola will precede the prestigious<a class="continue-link" href="https://www.xplatform.rocks/f1-italy-in-imola-gp-emilia-romana/">...(Continue Reading)</a></p> <p>The post <a href="https://www.xplatform.rocks/f1-italy-in-imola-gp-emilia-romana/">F1 Italy in Imola GP &#8211; Emilia Romana</a> appeared first on <a href="https://www.xplatform.rocks">xplatform.rocks</a>.</p> Mon, 11 Mar 2024 09:24:16 ZThorsten Hans <p>The <strong>Imola Grand Prix</strong>, also known as the Emilia-Romagna Grand Prix, is set to exhilarate fans for the fourth time this year. Previously celebrated as the San Marino Grand Prix, the 2023 event will unfold in mid-May, following the <strong>Miami Grand Prix in the USA</strong>. The iconic Italian race in Imola will precede the prestigious <a href="https://www.xplatform.rocks/f1-gp-monte-carlo-circuit-de-monaco/">Monaco GP in Monte Carlo</a>.</p> <figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1024" height="1024" src="https://www.xplatform.rocks/wp-content/uploads/2023/12/italy-1.webp" alt="" class="wp-image-1733" srcset="https://www.xplatform.rocks/wp-content/uploads/2023/12/italy-1.webp 1024w, https://www.xplatform.rocks/wp-content/uploads/2023/12/italy-1-300x300.webp 300w, https://www.xplatform.rocks/wp-content/uploads/2023/12/italy-1-150x150.webp 150w, https://www.xplatform.rocks/wp-content/uploads/2023/12/italy-1-768x768.webp 768w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure> <h2 class="wp-block-heading"><strong>A Glimpse into the Past of the Imola Grand Prix</strong></h2> <p>This year marks the return of the Imola GP to the Formula One calendar, a race historically known as the San Marino Grand Prix. In earlier times, each country was limited to hosting just one Formula One race, leading to its assignment to the small, Italy-encircled state of San Marino, nestled between Emilia-Romagna and the Marches.</p> <p>The Autodromo Imola, a mere 80 km from the Scuderia headquarters in Maranello, is often referred to as Ferrari&#8217;s home race, adding to its prestige and significance in the racing world.</p> <h2 class="wp-block-heading"><strong>The Legendary Imola Circuit: Dino e Enzo Ferrari</strong></h2> <p>The circuit, officially known as the <a href="https://www.autodromoimola.it/?lang=en">Autodromo Enzo e Dino Ferrari</a>, has been a Formula One venue since 2020. Known as the San Marino Grand Prix until 2006, it was temporarily dropped from the calendar due to its then-outdated facilities.</p> <p>Historically, the Imola circuit was notorious for its danger, highlighted by the tragic accidents that claimed the lives of Ayrton Senna and Roland Ratzenberger in 1994. Over the years, significant changes were made to the Tamburello and Tosa corners, and the Variante Alta and Variante Bassa chicanes, greatly enhancing safety. These modifications have allowed the track to reclaim its spot in Formula One as the Emilia-Romagna Grand Prix since 2020.</p> <h3 class="wp-block-heading"><strong>Imola Grand Prix Circuit: By the Numbers</strong></h3> <p>The Autodromo Dino e Enzo Ferrari, a counterclockwise circuit, stretches over 4.909 km and includes 17 turns. The race spans 63 laps, covering a total distance of 309.049 km. The lap record is held by Lewis Hamilton (Mercedes) with an impressive time of 1:15.484.</p> <p>Recent winners include Lewis Hamilton (Mercedes, 2020) and Max Verstappen (Red Bull Honda, 2021 and 2022).</p> <h2 class="wp-block-heading"><strong>Emilia-Romagna: Italy&#8217;s Gem</strong></h2> <p>The region of Emilia-Romagna in Italy is a treasure trove of experiences, from its celebrated Italian cuisine to breathtaking natural landscapes and historical sites. Known for balsamic vinegar, Parmesan cheese, pasta, tortellini, and prosciutto di Parma, the region is a food lover&#8217;s paradise. Motorsport enthusiasts can revel in the Formula 1 race at the Imola circuit and visit the renowned Ferrari Museum in Maranello. The region also boasts natural beauty, historical ruins, cultural events, and festivals, making it an attractive destination for travelers worldwide.</p> <p>The Emilia-Romagna region in Italy is a mosaic of delightful experiences and attractions:</p> <ol> <li><strong>Culinary Delights</strong>: Celebrated for its exquisite Italian cuisine, Emilia-Romagna is the birthplace of culinary treasures such as balsamic vinegar, Parmesan cheese, as well as popular foods like pasta, tortellini, and prosciutto di Parma.</li> <li><strong>Formula 1 Racing</strong>: This region is also a haven for Formula 1 enthusiasts, hosting the thrilling Imola Grand Prix at the renowned Autodromo Enzo e Dino Ferrari in Imola.</li> <li><strong>Ferrari Museum</strong>: For automotive fans, the Ferrari Museum in Maranello is a must-visit. It offers a deep dive into the storied history and captivating designs of the iconic Ferrari brand.</li> <li><strong>Natural Beauty</strong>: Emilia-Romagna boasts a diverse landscape, with its picturesque rivers, lakes, and mountains, making it a perfect destination for nature lovers to explore through hiking, biking, and other outdoor activities.</li> <li><strong>Historical Sites</strong>: Rich in history, the region is dotted with numerous historical landmarks, including ancient ruins and UNESCO World Heritage Sites. A notable example is the Roman amphitheater in Parma.</li> <li><strong>Cultural Events</strong>: The region is also a hub for cultural richness, hosting a variety of events, festivals, and functions that draw visitors from across the globe, offering a glimpse into its vibrant cultural tapestry.</li> </ol> <h2 class="wp-block-heading"><strong>Free Viewing of the Emilia-Romagna Formula 1 Race</strong></h2> <p>Did you know that <a href="https://www.xplatform.rocks/watch-forumla1-free/">all Formula 1 races</a>, including the Imola Grand Prix, can be streamed live for free? With a stable internet connection (minimum 5 Mbps) and a reliable VPN, you can enjoy the thrill of Formula 1 racing from anywhere in the world.</p> <p>The post <a href="https://www.xplatform.rocks/f1-italy-in-imola-gp-emilia-romana/">F1 Italy in Imola GP &#8211; Emilia Romana</a> appeared first on <a href="https://www.xplatform.rocks">xplatform.rocks</a>.</p> Thorsten HansThorsten Hanshttp://heise.de/-9649523Holger SchwichtenbergNeu in .NET 8.0 [13]: Leistung von FrozenSetEine Menge des Typs FrozenSet gewinnt beim tausendmaligen Aufruf von Contains() gegenüber anderen Objektmengen. Fri, 08 Mar 2024 12:31:00 +01002024-03-08T12:31:00+01:00Holger SchwichtenbergHolger SchwichtenbergHolger Schwichtenberghttps://www.xplatform.rocks/?p=1726https://www.xplatform.rocks/f1-gp-monte-carlo-circuit-de-monaco/Thorsten HansF1 GP Monte Carlo – Circuit de Monaco<p>Monte Carlo Grand Prix: The Formula One season&#8217;s seventh round is set to dazzle in Monaco from May 26 to 28, 2023. In a notable update, Sebastian Vettel, Germany&#8217;s long-anticipated world champion, has opted out of the race this year. Vettel, the esteemed driver from Heppenheim, had previously declared in 2022 that he wouldn&#8217;t be<a class="continue-link" href="https://www.xplatform.rocks/f1-gp-monte-carlo-circuit-de-monaco/">...(Continue Reading)</a></p> <p>The post <a href="https://www.xplatform.rocks/f1-gp-monte-carlo-circuit-de-monaco/">F1 GP Monte Carlo &#8211; Circuit de Monaco</a> appeared first on <a href="https://www.xplatform.rocks">xplatform.rocks</a>.</p> Fri, 08 Mar 2024 10:35:35 ZThorsten Hans <p><strong>Monte Carlo Grand Prix</strong>: The Formula One season&#8217;s seventh round is set to dazzle in Monaco from May 26 to 28, 2023. In a notable update, Sebastian Vettel, Germany&#8217;s long-anticipated world champion, has opted out of the race this year. Vettel, the esteemed driver from Heppenheim, had previously declared in 2022 that he wouldn&#8217;t be competing in another Formula 1 season.</p> <figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="585" src="https://www.xplatform.rocks/wp-content/uploads/2023/12/montecarlo-1-1024x585.webp" alt="" class="wp-image-1727" srcset="https://www.xplatform.rocks/wp-content/uploads/2023/12/montecarlo-1-1024x585.webp 1024w, https://www.xplatform.rocks/wp-content/uploads/2023/12/montecarlo-1-300x171.webp 300w, https://www.xplatform.rocks/wp-content/uploads/2023/12/montecarlo-1-768x439.webp 768w, https://www.xplatform.rocks/wp-content/uploads/2023/12/montecarlo-1-1536x878.webp 1536w, https://www.xplatform.rocks/wp-content/uploads/2023/12/montecarlo-1.webp 1792w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure> <h2 class="wp-block-heading"><strong>Monte Carlo Grand Prix: The Circuit Explored</strong></h2> <p>The <a href="https://www.monacograndprixticket.com/formula1monaco/the-circuit-of-monaco">Monaco circuit</a>, a temporary track, snakes through the scenic locales of Monte Carlo and La Condamine in Monaco. Famous for hosting the Monaco Grand Prix, this track sees various city streets transformed annually into a racing haven. This transformation is no small feat, involving the removal of traffic signs and flower pots. The track, spanning 3.337 kilometers, is equipped with pit lanes, guardrails, movable fences, and impressive grandstands. It features 19 challenging turns, adding to the race&#8217;s excitement. Racers will complete 78 laps during the event, covering a total distance of 260 kilometers.</p> <p>This street circuit is known for its limited run-off areas, making it one of the most perilous in the Formula One roster, despite lower average speeds compared to other tracks. Former world champion Nelson Piquet likened racing here to &#8220;flying a helicopter in your living room,&#8221; while David Coulthard, a two-time winner at Monaco, called it &#8220;pure madness.&#8221; Winning in Monaco is a testament to a driver&#8217;s precision, bravery, and ability to push boundaries.</p> <p>A unique aspect of the Monaco circuit is its pit lane. Due to Monaco&#8217;s specific constraints, the pit lane wasn&#8217;t initially planned and is quite narrow, challenging teams to manage their equipment effectively. The pit building is adjacent to the start-finish straight, and since 2004, the pit lane has run behind it. This layout demands exceptional adaptability and skill from teams and drivers during pit stops.</p> <h2 class="wp-block-heading"><strong>The Circuit de Monaco&#8217;s Storied Past</strong></h2> <p>Debuting in 1929 for the Monaco Grand Prix, organized by the Automobile Club de Monaco, the Circuit de Monaco boasts a rich history. Formula One engines roared through Monaco&#8217;s streets for the first time in 1950, marking the principality&#8217;s inclusion in the Formula One calendar. Argentine driver Juan Manuel Fangio triumphed in the inaugural race. However, it wasn&#8217;t until 1955 that the second Formula One Monaco Grand Prix took place. Since then, this event has been a constant in the racing calendar.</p> <h2 class="wp-block-heading"><strong>What&#8217;s Next After Monte Carlo?</strong></h2> <p>Following the thrill of the Monte Carlo Grand Prix, Formula One teams will have a week to gear up for the next <a href="https://www.xplatform.rocks/f1-in-barcelona-spain-grand-prix/">Grand Prix at the Circuit de Barcelona-Catalunya</a>. This follows their recent participation in the <strong>Grand Prix in Italy-Imola</strong>.</p> <h2 class="wp-block-heading">Formula 1 GP Monte Carlo &#8211; Winners</h2> <figure class="wp-block-table"><table><tbody><tr><th>Year</th><th>Racer</th><th>Team</th></tr><tr><td>2023</td><td>Max Verstappen</td><td>Red Bull</td></tr><tr><td>2022</td><td>Sergio Perez</td><td>Red Bull</td></tr><tr><td>2021</td><td>Max Verstappen</td><td>Red Bull</td></tr><tr><td>2020</td><td>no race because of Covid-19</td><td></td></tr><tr><td>2019</td><td>Lewis Hamilton (GBR)</td><td>Mercedes</td></tr><tr><td>2018</td><td>Daniel Ricciardo (AUS)</td><td>Red Bull</td></tr><tr><td>2017</td><td>Sebastian Vettel (D)</td><td>Ferrari</td></tr><tr><td>2016</td><td>Lewis Hamilton (GBR)</td><td>Mercedes</td></tr><tr><td>2015</td><td>Nico Rosberg (GER)</td><td>Mercedes</td></tr><tr><td>2014</td><td>Nico Rosberg (GER)</td><td>Mercedes</td></tr><tr><td>2013</td><td>Nico Rosberg (GER)</td><td>Mercedes</td></tr><tr><td>2012</td><td>Mark Webber (AUS)</td><td>Red Bull Racing</td></tr><tr><td>2011</td><td>Sebastian Vettel (GER)</td><td>Red Bull Racing</td></tr><tr><td>2010</td><td>Mark Webber (AUS)</td><td>Red Bull Racing</td></tr><tr><td>2009</td><td>Jenson Button (GBR)</td><td>Brawn</td></tr><tr><td>2008</td><td>Lewis Hamilton (GBR)</td><td>McLaren</td></tr><tr><td>2007</td><td>Fernando Alonso (ESP)</td><td>McLaren</td></tr><tr><td>2006</td><td>Fernando Alonso (ESP)</td><td>Renault</td></tr><tr><td>2005</td><td>Kimi Räikkönen (FIN)</td><td>McLaren</td></tr><tr><td>2004</td><td>Jarno Trulli (ITA)</td><td>Renault</td></tr><tr><td>2003</td><td>Juan Pablo Montoya (COL)</td><td>Williams</td></tr><tr><td>2002</td><td>David Coulthard (GBR)</td><td>McLaren</td></tr><tr><td>2001</td><td>Michael Schumacher (GER)</td><td>Ferrari</td></tr><tr><td>2000</td><td>David Coulthard (GBR)</td><td>McLaren</td></tr><tr><td>1999</td><td>Michael Schumacher (GER)</td><td>Ferrari</td></tr><tr><td>1998</td><td>Mika Häkkinen (FIN)</td><td>McLaren</td></tr><tr><td>1997</td><td>Michael Schumacher (GER)</td><td>Ferrari</td></tr><tr><td>1996</td><td>Olivier Panis (FRA)</td><td>Ligier</td></tr><tr><td>1995</td><td>Michael Schumacher (GER)</td><td>Benetton</td></tr><tr><td>1994</td><td>Michael Schumacher (GER)</td><td>Benetton</td></tr><tr><td>1993</td><td>Ayrton Senna (BRA)</td><td>McLaren</td></tr><tr><td>1992</td><td>Ayrton Senna (BRA)</td><td>McLaren</td></tr><tr><td>1991</td><td>Ayrton Senna (BRA)</td><td>McLaren</td></tr><tr><td>1990</td><td>Ayrton Senna (BRA)</td><td>McLaren</td></tr><tr><td>1989</td><td>Ayrton Senna (BRA)</td><td>McLaren</td></tr><tr><td>1988</td><td>Alain Prost (FRA)</td><td>McLaren</td></tr><tr><td>1987</td><td>Ayrton Senna (BRA)</td><td>Lotus</td></tr><tr><td>1986</td><td>Alain Prost (FRA)</td><td>McLaren</td></tr><tr><td>1985</td><td>Alain Prost (FRA)</td><td>McLaren</td></tr><tr><td>1984</td><td>Alain Prost (FRA)</td><td>McLaren</td></tr><tr><td>1983</td><td>Keke Rosberg (FIN)</td><td>Williams</td></tr><tr><td>1982</td><td>Riccardo Patrese (ITA)</td><td>Brabham</td></tr><tr><td>1981</td><td>Gilles Villeneuve (CAN)</td><td>Ferrari</td></tr><tr><td>1980</td><td>Carlos Reutemann (ARG)</td><td>Williams</td></tr><tr><td>1979</td><td>Jody Scheckter (RSA)</td><td>Ferrari</td></tr><tr><td>1978</td><td>Patrick Depailler (FRA)</td><td>Tyrrell</td></tr><tr><td>1977</td><td>Jody Scheckter (RSA)</td><td>Wolf</td></tr><tr><td>1976</td><td>Niki Lauda (AUT)</td><td>Ferrari</td></tr><tr><td>1975</td><td>Niki Lauda (AUT)</td><td>Ferrari</td></tr><tr><td>1974</td><td>Ronnie Peterson (SWE)</td><td>Lotus</td></tr><tr><td>1973</td><td>Jackie Stewart (GBR)</td><td>Tyrrell</td></tr><tr><td>1972</td><td>Jean-Pierre Beltoise (FRA)</td><td>BRM</td></tr><tr><td>1971</td><td>Jackie Stewart (GBR)</td><td>Tyrrell</td></tr><tr><td>1970</td><td>Jochen Rindt (AUT)</td><td>Lotus</td></tr><tr><td>1969</td><td>Graham Hill (GBR)</td><td>Lotus</td></tr><tr><td>1968</td><td>Graham Hill (GBR)</td><td>Lotus</td></tr><tr><td>1967</td><td>Denny Hulme (NZL)</td><td>Brabham</td></tr><tr><td>1966</td><td>Jackie Stewart (GBR)</td><td>BRM</td></tr><tr><td>1965</td><td>Graham Hill (GBR)</td><td>BRM</td></tr><tr><td>1964</td><td>Graham Hill (GBR)</td><td>BRM</td></tr><tr><td>1963</td><td>Graham Hill (GBR)</td><td>BRM</td></tr><tr><td>1962</td><td>Bruce McLaren (AUS)</td><td>Cooper</td></tr><tr><td>1961</td><td>Stirling Moss (GBR)</td><td>Lotus</td></tr><tr><td>1960</td><td>Stirling Moss (GBR)</td><td>Lotus</td></tr><tr><td>1959</td><td>Jack Brabham (AUS)</td><td>Cooper</td></tr><tr><td>1958</td><td>Maurice Trintignant (FRA)</td><td>Cooper</td></tr><tr><td>1957</td><td>Juan Manuel Fangio (ARG)</td><td>Maserati</td></tr><tr><td>1956</td><td>Stirling Moss (GBR)</td><td>Maserati</td></tr><tr><td>1955</td><td>Maurice Trintignant (FRA)</td><td>Ferrari</td></tr><tr><td>1950</td><td>Juan Manuel Fangio (ARG)</td><td>Alfa Romeo</td></tr></tbody></table></figure> <h2 class="wp-block-heading"><strong>Is Free Viewing of Formula One Races Possible?</strong></h2> <p><strong>GP Monte Carlo</strong>: Exciting news for Formula 1 enthusiasts! There&#8217;s a savvy way to <a href="https://www.xplatform.rocks/watch-forumla1-free/">watch all Formula 1 races</a> without shelling out for a costly TV subscription. This involves leveraging the power of a VPN service, a method I&#8217;ve been personally using for years with great success. Not only is this approach cost-effective, but it also ensures top-notch broadcast quality. So, for those passionate about Formula 1 and eager to catch every race live, this VPN method is definitely worth exploring.</p> <p>The post <a href="https://www.xplatform.rocks/f1-gp-monte-carlo-circuit-de-monaco/">F1 GP Monte Carlo &#8211; Circuit de Monaco</a> appeared first on <a href="https://www.xplatform.rocks">xplatform.rocks</a>.</p> Thorsten HansThorsten Hanshttp://heise.de/-9646306Golo RodenSoftwareentwicklung: Ankündigung der tech:lounge Masterclass Die the native web GmbH veranstaltet ab kommender Woche insgesamt zwölf Webinare zu den Themen Go, TypeScript, skalierbare APIs und moderne, native Web-UIs.Fri, 08 Mar 2024 07:27:00 +01002024-03-08T07:27:00+01:00Golo RodenGolo RodenGolo Rodenhttps://blog.codeinside.eu/2024/03/07/upgrade-assistanthttps://blog.codeinside.eu/2024/03/07/upgrade-assistant/Code-Inside Blog.NET Upgrade Assistant <p>For those facing the challenge of migrating their .NET Framework-based application to the modern .NET stack, Microsoft’s <a href="https://dotnet.microsoft.com/en-us/platform/upgrade-assistant">“Upgrade Assistant”</a> is highly recommended:</p> <iframe width="660" height="371" src="https://www.youtube.com/embed/3mPb4KAbz4Y" title="Upgrade Your .NET Projects Faster with Visual Studio" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen=""></iframe> <h1 id="what-is-the-upgrade-assistant">What is the “Upgrade Assistant”?</h1> <p>The “Upgrade Assistant” is a tool that can integrate into Visual Studio or be accessed <a href="https://learn.microsoft.com/en-us/dotnet/core/porting/upgrade-assistant-overview?WT.mc_id=dotnet-35129-website#upgrade-with-the-cli-tool">via CLI</a>. If you install the <a href="https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.upgradeassistant"><strong>extension</strong></a> for Visual Studio you will have a new option “Upgrade project” available in your Solution Explorer.</p> <h1 id="net-framework-to-new-and-more">.NET Framework to “new” and more…</h1> <p>Its main use case is upgrading .NET Framework-based WPF, WinForms, class libraries, or web applications to the newest .NET version. Besides this, the tool offers some other migration paths as well, e.g. from UWP to WinUI 3.</p> <p>You even can use the tool to migrate from an older .NET Core version to a newer version (but - to be honest: those upgrades are quite easy in contrast to the .NET Framework to .NET Core migration).</p> <p>Depending on the project type, the assistant allows for an “In-Place Upgrade,” “Side-by-Side,” or “Side-by-Side Incremental” upgrade.</p> <ul> <li>“In-Place Upgrade” means that the existing code is directly modified.</li> <li>“Side-by-Side” means that a new project is created and migration to the latest version is based on a copy.</li> <li>“Side-by-Side Incremental,” to my knowledge, is only available for ASP.NET web applications. Here, a new .NET Core project is added in parallel, and a sort of “bridge” is built in the original .NET project. This seems to me to be clever on the one hand but also very risky on the other.</li> </ul> <p>You can see those upgrade methods in the video above.</p> <h1 id="is-it-good">Is it good?</h1> <p><a href="https://primesoft-group.com/en/">We</a> have used (or at least tested) the Assistant for upgrading WPF and class libraries to .NET Core and it helps to identify problems (e.g. if a NuGet package or any “old” framework code is not compatible). My verdict: If you need to upgrade your code, you should give it a try. In a more complex code base, it will sometimes mess with the code, but it still helps to give directions.</p> <p>Hope this helps!</p> Thu, 07 Mar 2024 23:59:00 ZCode-Inside BlogCode-Inside BlogCode-Inside Bloghttps://www.xplatform.rocks/?p=1719https://www.xplatform.rocks/f1-in-barcelona-spain-grand-prix/Thorsten HansF1 in Barcelona – Spain Grand Prix<p>Mark your calendars for an exhilarating motorsport event! The Grand Prix of Spain is set to rev up from June 2 to June 4, 2023, in Barcelona. This highly anticipated race follows the iconic Monaco Grand Prix and precedes the Canadian Grand Prix in Montreal. Motorsport enthusiasts are in for a treat as the Formula<a class="continue-link" href="https://www.xplatform.rocks/f1-in-barcelona-spain-grand-prix/">...(Continue Reading)</a></p> <p>The post <a href="https://www.xplatform.rocks/f1-in-barcelona-spain-grand-prix/">F1 in Barcelona &#8211; Spain Grand Prix</a> appeared first on <a href="https://www.xplatform.rocks">xplatform.rocks</a>.</p> Thu, 07 Mar 2024 12:56:45 ZThorsten Hans <p>Mark your calendars for an exhilarating motorsport event! The Grand Prix of Spain is set to rev up from June 2 to June 4, 2023, in Barcelona. This highly anticipated race follows the iconic <strong><a href="https://www.xplatform.rocks/f1-gp-monte-carlo-circuit-de-monaco/">Monaco Grand Prix</a></strong> and precedes the <strong><a href="https://www.xplatform.rocks/the-f1-canadian-grand-prix-gp-montreal/">Canadian Grand Prix in Montreal</a></strong>. Motorsport enthusiasts are in for a treat as the Formula One circuit continues its global journey.</p> <figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="585" src="https://www.xplatform.rocks/wp-content/uploads/2023/12/spain-1-1024x585.webp" alt="" class="wp-image-1720" srcset="https://www.xplatform.rocks/wp-content/uploads/2023/12/spain-1-1024x585.webp 1024w, https://www.xplatform.rocks/wp-content/uploads/2023/12/spain-1-300x171.webp 300w, https://www.xplatform.rocks/wp-content/uploads/2023/12/spain-1-768x439.webp 768w, https://www.xplatform.rocks/wp-content/uploads/2023/12/spain-1-1536x878.webp 1536w, https://www.xplatform.rocks/wp-content/uploads/2023/12/spain-1.webp 1792w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure> <h2 class="wp-block-heading"><strong>Spotlight on the Circuit de Barcelona-Catalunya</strong></h2> <p>Nestled in the heart of Montmeló, just north of Barcelona, the <a href="https://www.circuitcat.com/en/">Circuit de Barcelona-Catalunya</a> stands as a testament to Spain&#8217;s love for motorsports. The circuit&#8217;s inception was driven by the desire to bring the Spain Grand Prix back to Barcelona. Since its grand opening in September 1991, this circuit has proudly hosted the Spain Grand Prix.</p> <p>Beyond hosting prestigious races, the Circuit de Barcelona-Catalunya serves as a key testing ground for Formula 1 and motorbike teams. The region&#8217;s mild winter and spring temperatures make it an ideal location for pre-season training. Over the years, the circuit has undergone several modifications, featuring long, sweeping corners that challenge tyres and favour cars with superior aerodynamics.</p> <p>One of the circuit&#8217;s most unforgettable moments was in 1996, when Michael Schumacher clinched his first victory for Scuderia Ferrari amidst a torrential downpour. In 2013, the circuit embraced its current name, Circuit de Barcelona-Catalunya, following a sponsorship agreement with the city of Barcelona.</p> <h2 class="wp-block-heading"><strong>Exploring the Intricacies of the Circuit</strong></h2> <p>Renowned for its challenging layout, the Circuit de Barcelona-Catalunya boasts a total length of 4.655 kilometers, featuring 16 turns with a mix of 9 right and 7 left turns. The Spain Grand Prix here is a test of endurance and skill, with a race length of 307.362 km, spread over 66 laps.</p> <p>One of the circuit&#8217;s most notable features is turn 10, also known as La Caixa, positioned on the picturesque Montjuic hill. This turn is particularly challenging for drivers, coming right after a long straight where speeds can soar up to 300 km/h.</p> <p>The circuit isn&#8217;t just a haven for Formula 1; it also plays host to the Motorcycle Grand Prix (MotoGP) annually. This event draws a diverse crowd of motorsport aficionados and motorbike enthusiasts from around the globe, all eager to witness high-speed action and create lasting memories at this iconic circuit.</p> <h2 class="wp-block-heading">The best of the Barcelona GP</h2> <figure class="wp-block-table"><table><tbody><tr><th>Year</th><th>Winner</th><th>Team / Racing car</th></tr><tr><td>2023</td><td>M. Verstappen</td><td>Red Bull / Honda</td></tr><tr><td>2022</td><td>M. Verstappen</td><td>Red Bull / Honda</td></tr><tr><td>2021</td><td>L. Hamilton</td><td>Mercedes-AMG / Mercedes</td></tr><tr><td>2020</td><td>L. Hamilton</td><td>Mercedes-AMG / Mercedes</td></tr><tr><td>2019</td><td>L. Hamilton</td><td>Mercedes-AMG / Mercedes</td></tr><tr><td>2018</td><td>L. Hamilton</td><td>Mercedes-AMG / Mercedes</td></tr><tr><td>2017</td><td>L. Hamilton</td><td>Mercedes-AMG / Mercedes</td></tr><tr><td>2016</td><td>M. Verstappen</td><td>Red Bull / TAG Heuer</td></tr><tr><td>2015</td><td>N. Rosberg</td><td>Mercedes-AMG / Mercedes</td></tr><tr><td>2014</td><td>L. Hamilton</td><td>Mercedes-AMG / Mercedes</td></tr><tr><td>2013</td><td>F. Alonso</td><td>Ferrari / Ferrari</td></tr><tr><td>2012</td><td>P. Maldonado</td><td>Williams / Renault</td></tr><tr><td>2011</td><td>S. Vettel</td><td>Red Bull / Renault</td></tr><tr><td>2010</td><td>M. Webber</td><td>Red Bull / Renault</td></tr><tr><td>2009</td><td>J. Button</td><td>Brawn GP / Mercedes</td></tr><tr><td>2008</td><td>K. Räikkönen</td><td>Ferrari / Ferrari</td></tr><tr><td>2007</td><td>F. Massa</td><td>Ferrari / Ferrari</td></tr><tr><td>2006</td><td>F. Alonso</td><td>Renault / Renault</td></tr><tr><td>2005</td><td>K. Räikkönen</td><td>McLaren / Mercedes</td></tr><tr><td>2004</td><td>M. Schumacher</td><td>Ferrari / Ferrari</td></tr><tr><td>2003</td><td>M. Schumacher</td><td>Ferrari / Ferrari</td></tr><tr><td>2002</td><td>M. Schumacher</td><td>Ferrari / Ferrari</td></tr><tr><td>2001</td><td>M. Schumacher</td><td>Ferrari / Ferrari</td></tr><tr><td>2000</td><td>M. Häkkinen</td><td>McLaren / Mercedes</td></tr><tr><td>1999</td><td>M. Häkkinen</td><td>McLaren / Mercedes</td></tr><tr><td>1998</td><td>M. Häkkinen</td><td>McLaren / Mercedes</td></tr><tr><td>1997</td><td>J. Villeneuve</td><td>Williams / Renault</td></tr><tr><td>1996</td><td>M. Schumacher</td><td>Ferrari / Ferrari</td></tr><tr><td>1995</td><td>M. Schumacher</td><td>Benetton / Renault</td></tr><tr><td>1994</td><td>D. Hill</td><td>Williams / Renault</td></tr><tr><td>1993</td><td>A. Prost</td><td>Williams / Renault</td></tr><tr><td>1992</td><td>N. Mansell</td><td>Williams / Renault</td></tr><tr><td>1991</td><td>N. Mansell</td><td>Williams / Renault</td></tr></tbody></table></figure> <h2 class="wp-block-heading"><strong>Barcelona&#8217;s Charm: Beyond the Track</strong></h2> <p>Barcelona, the pulsating heart of Catalonia in Spain, is renowned globally for its breathtaking art and architecture. This city offers much more than just the thrill of the Spain Grand Prix.</p> <h3 class="wp-block-heading"><strong>Must-See Attractions in Barcelona Beyond the Grand Prix</strong></h3> <p>While in Barcelona, there are several must-visit attractions that add to the charm of this vibrant city:</p> <ol> <li><strong>Explore the Masterpieces of Gaudí</strong>: Marvel at the architectural genius of Antoni Gaudí, particularly the iconic Sagrada Família church.</li> <li><strong>Wander Through the Barri Gòtic</strong>: Immerse yourself in the historic ambiance of the Gothic Quarter.</li> <li><strong>Stroll Down Rambla Street</strong>: Experience the lively atmosphere of this famous street.</li> <li><strong>Unwind at Barceloneta Beach</strong>: Relax on the sands of this popular urban beach.</li> <li><strong>Indulge at Mercat de la Boqueria</strong>: Savor the flavors at this bustling public market.</li> </ol> <h3 class="wp-block-heading"><strong>Delve into Barcelona&#8217;s Culinary Delights</strong></h3> <p>Barcelona&#8217;s culinary scene is a hidden gem, often found in the most unassuming places. The city&#8217;s best eateries often dazzle with their simplicity, opting for modest decor over grandeur. It&#8217;s in these low-key establishments, often with wooden or plastic chairs, where you&#8217;ll find the most authentic and delicious meals.</p> <p>These cozy spots, frequently run by local families, serve traditional dishes like tapas, offering a genuine taste of Barcelona. Here, you&#8217;ll mingle with locals and experience the city&#8217;s culinary heart. So, venture into these lesser-known eateries &#8211; the experience is truly rewarding.</p> <h2 class="wp-block-heading">How to Watch the F1 Spain Grand Prix for Free</h2> <p>For fans unable to make it to Barcelona, there&#8217;s good news. You can <a href="https://www.xplatform.rocks/watch-forumla1-free/">watch all the Formula 1 races</a>, including the Spain Grand Prix, from the comfort of your home for free. All you need is a reliable VPN service and stable internet. This way, you won’t miss a moment of the high-speed action, no matter where you are.</p> <p>The post <a href="https://www.xplatform.rocks/f1-in-barcelona-spain-grand-prix/">F1 in Barcelona &#8211; Spain Grand Prix</a> appeared first on <a href="https://www.xplatform.rocks">xplatform.rocks</a>.</p> Thorsten HansThorsten Hanshttps://www.xplatform.rocks/?p=1709https://www.xplatform.rocks/the-f1-canadian-grand-prix-gp-montreal/Thorsten HansThe F1 Canadian Grand Prix – GP Montreal<p>This year, the much-anticipated Formula 1 Canadian Grand Prix is set to take place in Montreal from June 16 to 18. Prior to this event, Formula 1 teams competed at the Circuit de Barcelona-Catalunya in Spain for the Barcelona Grand Prix. Following the excitement in Canada, the next stop will be the Red Bull Ring<a class="continue-link" href="https://www.xplatform.rocks/the-f1-canadian-grand-prix-gp-montreal/">...(Continue Reading)</a></p> <p>The post <a href="https://www.xplatform.rocks/the-f1-canadian-grand-prix-gp-montreal/">The F1 Canadian Grand Prix &#8211; GP Montreal</a> appeared first on <a href="https://www.xplatform.rocks">xplatform.rocks</a>.</p> Wed, 06 Mar 2024 15:31:37 ZThorsten Hans <p>This year, the much-anticipated Formula 1 Canadian Grand Prix is set to take place in Montreal from June 16 to 18. Prior to this event, Formula 1 teams competed at the Circuit de Barcelona-Catalunya in Spain for the <strong><a href="https://www.xplatform.rocks/f1-in-barcelona-spain-grand-prix/">Barcelona Grand Prix</a></strong>. Following the excitement in Canada, the next stop will be the <a href="https://www.xplatform.rocks/f1-austria-gp-red-bull-ring-in-spielberg/">Red Bull Ring in Spielberg, Austria</a>.</p> <figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="585" src="https://www.xplatform.rocks/wp-content/uploads/2023/12/canada-1024x585.webp" alt="" class="wp-image-1707" srcset="https://www.xplatform.rocks/wp-content/uploads/2023/12/canada-1024x585.webp 1024w, https://www.xplatform.rocks/wp-content/uploads/2023/12/canada-300x171.webp 300w, https://www.xplatform.rocks/wp-content/uploads/2023/12/canada-768x439.webp 768w, https://www.xplatform.rocks/wp-content/uploads/2023/12/canada-1536x878.webp 1536w, https://www.xplatform.rocks/wp-content/uploads/2023/12/canada.webp 1792w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure> <h2 class="wp-block-heading"><strong>Circuit Gilles Villeneuve: Montreal&#8217;s Pride in F1 History</strong></h2> <p>The Formula One Canadian Grand Prix has a rich history dating back to its inaugural race in 1967 at <a href="https://www.pistemonttremblant.com/en/">Circuit Mont-Tremblant</a>, Quebec. This first race saw the victory of the legendary Jack Brabham, a two-time world champion at that time. Over the years, the event moved between various locations before settling at its current home, the Circuit Gilles Villeneuve in Montreal, in 1978.</p> <p>Named in memory of Gilles Villeneuve, a Canadian racing icon who sadly passed away in a 1982 Belgian Grand Prix accident, the Circuit Gilles Villeneuve has been synonymous with the Canadian Grand Prix since then. Known for its high-speed stretches, tight turns, and demanding layout, the circuit tests the mettle of the world&#8217;s best drivers.</p> <p>One of the most notable moments in the circuit&#8217;s history was in 1994, when Michael Schumacher, who would go on to become a record-holding world champion, clinched his first Formula 1 victory here. Schumacher&#8217;s affinity with this track is evident as he won the Canadian Grand Prix seven times, marking his extraordinary career.</p> <p>The Canadian Grand Prix faced cancellations in 2020 and 2021 due to the global Corona pandemic.</p> <h2 class="wp-block-heading"><strong>Exploring the Gilles Villeneuve Circuit</strong></h2> <p>Situated on Île Notre-Dame in Montreal, the Circuit Gilles-Villeneuve is a temporary motor racing track named on June 12, 1982, in honor of Gilles Villeneuve. The circuit, set on the man-made Île Notre-Dame in the St. Lawrence River, doubles as a public road when not hosting races.</p> <p>Featuring long straights and fast sections due to its location on the elongated island, the course spans 4.361 km and is raced in a clockwise direction. Over 70 laps, drivers cover a total distance of 305.270 km. </p> <p>Since its establishment in 1978, the circuit has seen minimal changes. Major alterations include moving the start-finish line and pit lane in 1987 to the end of the Droit du Casino straight, rather than behind the Épingle des Stands hairpin. In 2002, the pit exit was modified, now leading into the Virage de Senna hairpin instead of the first corner.</p> <h2 class="wp-block-heading"><strong>Champions of the Canadian Grand Prix</strong></h2> <p>Over the years, the Canadian Grand Prix has celebrated numerous winners, each leaving their mark on this historic circuit.</p> <figure class="wp-block-table"><table><tbody><tr><th>Year</th><th>Winner</th></tr><tr><td>2022</td><td>Max Verstappen</td></tr><tr><td>2021</td><td>No race</td></tr><tr><td>2020</td><td>No race</td></tr><tr><td>2019</td><td>Lewis Hamilton (Mercedes)</td></tr><tr><td>2018</td><td>Sebastian Vettel (Ferrari)</td></tr><tr><td>2017</td><td>Lewis Hamilton (Mercedes)</td></tr><tr><td>2016</td><td>Lewis Hamilton (Mercedes)</td></tr><tr><td>2015</td><td>Lewis Hamilton (Mercedes)</td></tr><tr><td>2014</td><td>Daniel Ricciardo (Red Bull-Renault)</td></tr><tr><td>2013</td><td>Sebastian Vettel (Red Bull-Renault)</td></tr><tr><td>2012</td><td>Lewis Hamilton (McLaren-Mercedes)</td></tr><tr><td>2011</td><td>Jenson Button (McLaren-Mercedes)</td></tr><tr><td>2010</td><td>Lewis Hamilton (McLaren-Mercedes)</td></tr><tr><td>2009</td><td>No race</td></tr><tr><td>2008</td><td>Robert Kubica (BMW Sauber)</td></tr><tr><td>2007</td><td>Lewis Hamilton (McLaren-Mercedes)</td></tr><tr><td>2006</td><td>Fernando Alonso (Renault)</td></tr><tr><td>2005</td><td>Kimi Räikkönen (McLaren-Mercedes)</td></tr><tr><td>2004</td><td>Michael Schumacher (Ferrari)</td></tr><tr><td>2003</td><td>Michael Schumacher (Ferrari)</td></tr><tr><td>2002</td><td>Michael Schumacher (Ferrari)</td></tr><tr><td>2001</td><td>Ralf Schumacher (Williams-BMW)</td></tr><tr><td>2000</td><td>Michael Schumacher (Ferrari)</td></tr><tr><td>1999</td><td>Mika Häkkinen (McLaren-Mercedes)</td></tr><tr><td>1998</td><td>Michael Schumacher (Ferrari)</td></tr><tr><td>1997</td><td>Michael Schumacher (Ferrari)</td></tr><tr><td>1996</td><td>Damon Hill (Williams-Renault)</td></tr><tr><td>1995</td><td>Jean Alesi (Ferrari)</td></tr><tr><td>1994</td><td>Michael Schumacher (Benetton-Ford Cosworth)</td></tr><tr><td>1993</td><td>Alain Prost (Williams-Renault)</td></tr><tr><td>1992</td><td>Gerhard Berger (McLaren-Honda)</td></tr><tr><td>1991</td><td>Nelson Piquet (Benetton-Ford Cosworth)</td></tr><tr><td>1990</td><td>Ayrton Senna (McLaren-Honda)</td></tr><tr><td>1989</td><td>Thierry Boutsen (Williams-Renault)</td></tr><tr><td>1988</td><td>Ayrton Senna (McLaren-Honda)</td></tr><tr><td>1987</td><td>No race</td></tr><tr><td>1986</td><td>Nigel Mansell (Williams-Honda)</td></tr><tr><td>1985</td><td>Michele Alboreto (Ferrari)</td></tr><tr><td>1984</td><td>Nelson Piquet (Brabham-BMW)</td></tr><tr><td>1983</td><td>René Arnoux (Ferrari)</td></tr><tr><td>1982</td><td>Nelson Piquet (Brabham-BMW)</td></tr><tr><td>1981</td><td>Jacques Laffite (Ligier-Matra)</td></tr><tr><td>1980</td><td>Alan Jones (Williams-Ford Cosworth)</td></tr><tr><td>1979</td><td>Alan Jones (Williams-Ford Cosworth)</td></tr><tr><td>1978</td><td>Gilles Villeneuve (Ferrari)</td></tr><tr><td>1977</td><td>Jody Scheckter (McLaren-Ford Cosworth)</td></tr><tr><td>1976</td><td>James Hunt (McLaren-Ford Cosworth)</td></tr><tr><td>1975</td><td>No race</td></tr><tr><td>1974</td><td>Emerson Fittipaldi (McLaren-Ford Cosworth)</td></tr><tr><td>1973</td><td>Peter Revson (McLaren-Ford Cosworth)</td></tr><tr><td>1972</td><td>Jackie Stewart (Tyrrell-Ford Cosworth)</td></tr><tr><td>1971</td><td>Jackie Stewart (Tyrrell-Ford Cosworth)</td></tr><tr><td>1970</td><td>Jacky Ickx (Ferrari)</td></tr><tr><td>1969</td><td>Jacky Ickx (Brabham-Ford Cosworth)</td></tr><tr><td>1968</td><td>Denis Hulme (McLaren-Ford Cosworth)</td></tr><tr><td>1967</td><td>Jack Brabham (Brabham-Repco)</td></tr></tbody></table></figure> <h2 class="wp-block-heading"><strong>Stellar Performances at the Gilles-Villeneuve Circuit</strong></h2> <p>The Canadian Grand Prix at Montreal&#8217;s Gilles-Villeneuve Circuit has witnessed some remarkable achievements over the years, particularly from two of Formula 1&#8217;s most celebrated drivers.</p> <p>When it comes to securing pole positions at the Canadian Grand Prix, Michael Schumacher from Germany and Lewis Hamilton from the United Kingdom have both demonstrated exceptional prowess. Each has claimed the pole position six times, showcasing their skill and consistency on this challenging track.</p> <p>In terms of victories, Schumacher and Hamilton again stand out, each having emerged as champions seven times at the Montreal GP. This remarkable feat places them jointly at the top for the most wins in the history of the Canadian Grand Prix, reflecting their dominance in the sport.</p> <p>The circuit&#8217;s current lap record is held by the Finnish racing talent, Valtteri Bottas. In 2019, driving a Mercedes, Bottas delivered an extraordinary performance, clocking a lap time of 1:13.078.</p> <p>However, the fastest lap ever recorded at the Gilles Villeneuve Circuit belongs to Germany&#8217;s Sebastian Vettel. During the qualifying round in 2019, Vettel pushed his Ferrari to the limits, setting an unparalleled record time of 1:10.240.</p> <h2 class="wp-block-heading"><strong>Access to Formula 1: No Pay-TV Required?</strong></h2> <p>For fans seeking to <a href="https://www.xplatform.rocks/watch-forumla1-free/">watch Formula 1 races</a>, there&#8217;s a convenient and cost-effective way to enjoy all the action from home. Without the need for a pay-TV subscription, you can access live streams of Formula 1 races. This method, which I&#8217;ve personally been using for years, offers excellent broadcast quality. It&#8217;s a great option for enthusiasts who want to stay up-to-date with all the thrilling races.</p> <p>The post <a href="https://www.xplatform.rocks/the-f1-canadian-grand-prix-gp-montreal/">The F1 Canadian Grand Prix &#8211; GP Montreal</a> appeared first on <a href="https://www.xplatform.rocks">xplatform.rocks</a>.</p> Thorsten HansThorsten Hanshttps://www.xplatform.rocks/?p=1714https://www.xplatform.rocks/f1-british-grand-prix-at-silverstone/Thorsten HansF1 British Grand Prix at Silverstone<p>In the thrilling world of Formula 1, the British Grand Prix is slated to be held at its birthplace &#8211; the Silverstone Circuit &#8211; from July 7 to 9 this year. This race follows closely on the heels of the Austrian Grand Prix at Spielberg, which takes place a week earlier. Post-Silverstone, the action moves<a class="continue-link" href="https://www.xplatform.rocks/f1-british-grand-prix-at-silverstone/">...(Continue Reading)</a></p> <p>The post <a href="https://www.xplatform.rocks/f1-british-grand-prix-at-silverstone/">F1 British Grand Prix at Silverstone</a> appeared first on <a href="https://www.xplatform.rocks">xplatform.rocks</a>.</p> Wed, 06 Mar 2024 08:42:01 ZThorsten Hans <p>In the thrilling world of Formula 1, the British Grand Prix is slated to be held at its birthplace &#8211; the Silverstone Circuit &#8211; from July 7 to 9 this year. This race follows closely on the heels of the <a href="https://www.xplatform.rocks/f1-austria-gp-red-bull-ring-in-spielberg/">Austrian Grand Prix at Spielberg</a>, which takes place a week earlier. Post-Silverstone, the action moves to the <a href="https://www.xplatform.rocks/gp-hungary-f1-in-budapest-hungaroring/">Hungaroring in Budapest</a>.</p> <figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="585" src="https://www.xplatform.rocks/wp-content/uploads/2023/12/uk-1024x585.webp" alt="" class="wp-image-1712" srcset="https://www.xplatform.rocks/wp-content/uploads/2023/12/uk-1024x585.webp 1024w, https://www.xplatform.rocks/wp-content/uploads/2023/12/uk-300x171.webp 300w, https://www.xplatform.rocks/wp-content/uploads/2023/12/uk-768x439.webp 768w, https://www.xplatform.rocks/wp-content/uploads/2023/12/uk-1536x878.webp 1536w, https://www.xplatform.rocks/wp-content/uploads/2023/12/uk.webp 1792w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure> <h2 class="wp-block-heading">Silverstone: A Circuit Steeped in History</h2> <p>The Silverstone Grand Prix stands as one of the most iconic and storied events in motorsport history. Tracing its origins back to the nascent days of Formula One, the first British Grand Prix was hosted in 1950 at this very circuit, then a repurposed military airfield, and marked the inception of the Formula One World Championship.</p> <p>Over the years, the <a href="https://www.silverstone.co.uk/">Silverstone circuit</a> has evolved from its original, lengthier airstrip format to a more compact, safer, and exhilarating 5.891 km track. This transformation has made Silverstone a benchmark for modern racing circuits.</p> <h3 class="wp-block-heading">Silverstone Today: The Pinnacle of the F1 Season</h3> <p>Now, the Silverstone Circuit is renowned as a highlight of the Formula 1 calendar. The current configuration offers a 52-lap race, totaling 306.3 kilometers, where high-tech cars zoom past an audience of up to 135,000 spectators. Max Verstappen holds the record for the fastest lap in this circuit with a time of 1:27.097 in his Red Bull racer.</p> <h3 class="wp-block-heading">The Legacy of Silverstone&#8217;s Grand Prix</h3> <p>The Silverstone Grand Prix has consistently delivered riveting races and dramatic moments for decades. Racing legends like Jim Clark,</p> <p>Jackie Stewart, Nigel Mansell, and Lewis Hamilton have etched their names in its history with multiple victories, reinforcing the British legacy in racing.</p> <p>In 2010, the circuit underwent significant renovations to adapt to the advanced needs of modern Formula One racing. This upgrade included redesigning the pit areas, the starting and finishing straights, and various corners.</p> <p>The Grand Prix at Silverstone has maintained its essential place in the Formula One roster for over seventy years. In 2020, its 70th anniversary was celebrated with a special race, aptly named the &#8220;70th Anniversary Grand Prix,&#8221; to compensate for the numerous cancellations caused by the COVID-19 pandemic. Interestingly, Silverstone, alongside Monza, has the distinction of being one of the only two F1 circuits to have consistently hosted races since 1950.</p> <h2 class="wp-block-heading">Champions of the Silverstone Grand Prix</h2> <p>The history of the British Grand Prix at Silverstone is marked by an illustrious list of winners from various teams, showcasing the competitive spirit and evolution of the sport over the years.</p> <figure class="wp-block-table"><table><tbody><tr><th>Year</th><th>Pilot</th><th>Team</th></tr><tr><td>2023</td><td>Max Verstappen</td><td>Red Bull</td></tr><tr><td>2022</td><td>Carlos Sainz jr.</td><td>Ferrari</td></tr><tr><td>2021</td><td>Lewis Hamilton</td><td>Mercedes</td></tr><tr><td>2020</td><td>Max Verstappen</td><td>Red Bull</td></tr><tr><td>2020</td><td>Lewis Hamilton</td><td>Mercedes</td></tr><tr><td>2019</td><td>Lewis Hamilton</td><td>Mercedes</td></tr><tr><td>2018</td><td>Sebastian Vettel</td><td>Ferrari</td></tr><tr><td>2017</td><td>Lewis Hamilton</td><td>Mercedes</td></tr><tr><td>2016</td><td>Lewis Hamilton</td><td>Mercedes</td></tr><tr><td>2015</td><td>Lewis Hamilton</td><td>Mercedes</td></tr><tr><td>2014</td><td>Lewis Hamilton</td><td>Mercedes</td></tr><tr><td>2013</td><td>Nico Rosberg</td><td>Mercedes</td></tr><tr><td>2012</td><td>Mark Webber</td><td>Red Bull Renault</td></tr><tr><td>2011</td><td>Fernando Alonso</td><td>Ferrari</td></tr><tr><td>2010</td><td>Mark Webber</td><td>Red Bull Renault</td></tr><tr><td>2009</td><td>Sebastian Vettel</td><td>Red Bull Renault</td></tr><tr><td>2008</td><td>Lewis Hamilton</td><td>Mercedes</td></tr><tr><td>2007</td><td>Kimi Räikkönen</td><td>Ferrari</td></tr><tr><td>2006</td><td>Fernando Alonso</td><td>Renault</td></tr><tr><td>2005</td><td>Juan Pablo Montoya</td><td>McLaren Mercedes</td></tr><tr><td>2004</td><td>Michael Schumacher</td><td>Ferrari</td></tr><tr><td>2003</td><td>Rubens Barrichello</td><td>Ferrari</td></tr><tr><td>2002</td><td>Michael Schumacher</td><td>Ferrari</td></tr><tr><td>2001</td><td>Mika Häkkinen</td><td>McLaren Mercedes</td></tr><tr><td>2000</td><td>David Coulthard</td><td>McLaren Mercedes</td></tr><tr><td>1999</td><td>David Coulthard</td><td>McLaren Mercedes</td></tr><tr><td>1998</td><td>Michael Schumacher</td><td>Ferrari</td></tr><tr><td>1997</td><td>Jacques Villeneuve</td><td>Williams Renault</td></tr><tr><td>1996</td><td>Jacques Villeneuve</td><td>Williams Renault</td></tr><tr><td>1995</td><td>Johnny Herbert</td><td>Benetton Renault</td></tr><tr><td>1994</td><td>Damon Hill</td><td>Williams Renault</td></tr><tr><td>1993</td><td>Alain Prost</td><td>Williams Renault</td></tr><tr><td>1992</td><td>Nigel Mansell</td><td>Williams Renault</td></tr><tr><td>1991</td><td>Nigel Mansell</td><td>Williams Renault</td></tr><tr><td>1990</td><td>Alain Prost</td><td>Ferrari</td></tr><tr><td>1989</td><td>Alain Prost</td><td>McLaren Honda</td></tr><tr><td>1988</td><td>Ayrton Senna</td><td>McLaren Honda</td></tr><tr><td>1987</td><td>Nigel Mansell</td><td>Williams Honda</td></tr><tr><td>1985</td><td>Alain Prost</td><td>McLaren Porsche</td></tr><tr><td>1983</td><td>Alain Prost</td><td>Renault</td></tr><tr><td>1981</td><td>John Watson</td><td>McLaren Ford</td></tr><tr><td>1979</td><td>Clay Regazzoni</td><td>Williams Ford</td></tr><tr><td>1977</td><td>James Hunt</td><td>McLaren Ford</td></tr><tr><td>1975</td><td>Emerson Fittipaldi</td><td>McLaren Ford</td></tr><tr><td>1973</td><td>Peter Revson</td><td>McLaren Ford</td></tr><tr><td>1971</td><td>Jackie Stewart</td><td>Tyrrell Ford</td></tr><tr><td>1969</td><td>Jackie Stewart</td><td>Matra Ford</td></tr><tr><td>1967</td><td>Jim Clark</td><td>Lotus Climax</td></tr><tr><td>1965</td><td>Jim Clark</td><td>Lotus Climax</td></tr><tr><td>1963</td><td>Jim Clark</td><td>Lotus Climax</td></tr><tr><td>1960</td><td>Jack Brabham</td><td>Cooper Climax</td></tr><tr><td>1958</td><td>Peter Collins</td><td>Ferrari</td></tr><tr><td>1956</td><td>Juan Manuel Fangio</td><td>Ferrari</td></tr><tr><td>1954</td><td>José Froilán González</td><td>Ferrari</td></tr><tr><td>1953</td><td>Alberto Ascari</td><td>Ferrari</td></tr><tr><td>1952</td><td>Alberto Ascari</td><td>Ferrari</td></tr><tr><td>1951</td><td>José Froilán González</td><td>Ferrari</td></tr><tr><td>1950</td><td>Giuseppe Farina</td><td>Alfa Romeo</td></tr></tbody></table></figure> <h2 class="wp-block-heading">Accessing Formula 1 Excitement Live and Free</h2> <p>For fans wanting to experience the entire Formula 1 season, there are options to <a href="https://www.xplatform.rocks/watch-forumla1-free/">watch every race live for free</a> using VPN services. This method, which I have personally used for several years, ensures you don&#8217;t miss a single moment of racing action due to transmission issues, all while saving money.</p> <p>The post <a href="https://www.xplatform.rocks/f1-british-grand-prix-at-silverstone/">F1 British Grand Prix at Silverstone</a> appeared first on <a href="https://www.xplatform.rocks">xplatform.rocks</a>.</p> Thorsten HansThorsten Hanshttps://www.xplatform.rocks/?p=1700https://www.xplatform.rocks/f1-austria-gp-red-bull-ring-in-spielberg/Thorsten HansF1 Austria GP – Red Bull Ring in Spielberg<p>The Austrian Grand Prix, set amidst the picturesque Red Bull Ring in Spielberg, is a thrilling event for Formula 1 fans. Scheduled to take place from June 30 to July 2, it follows two weeks after the Canadian Grand Prix in Montreal. This event promises an adrenaline-packed weekend, leading up to another racing highlight &#8211;<a class="continue-link" href="https://www.xplatform.rocks/f1-austria-gp-red-bull-ring-in-spielberg/">...(Continue Reading)</a></p> <p>The post <a href="https://www.xplatform.rocks/f1-austria-gp-red-bull-ring-in-spielberg/">F1 Austria GP &#8211; Red Bull Ring in Spielberg</a> appeared first on <a href="https://www.xplatform.rocks">xplatform.rocks</a>.</p> Tue, 05 Mar 2024 09:06:58 ZThorsten Hans <p>The Austrian Grand Prix, set amidst the picturesque Red Bull Ring in Spielberg, is a thrilling event for Formula 1 fans. Scheduled to take place from June 30 to July 2, it follows two weeks after the <strong><a href="https://www.xplatform.rocks/the-f1-canadian-grand-prix-gp-montreal/">Canadian Grand Prix in Montreal</a></strong>. This event promises an adrenaline-packed weekend, leading up to another racing highlight &#8211; the <strong><a href="https://www.xplatform.rocks/f1-british-grand-prix-at-silverstone/">British Grand Prix at Silverstone Circuit</a></strong>.</p> <figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="585" src="https://www.xplatform.rocks/wp-content/uploads/2023/12/austrria-1024x585.webp" alt="" class="wp-image-1702" srcset="https://www.xplatform.rocks/wp-content/uploads/2023/12/austrria-1024x585.webp 1024w, https://www.xplatform.rocks/wp-content/uploads/2023/12/austrria-300x171.webp 300w, https://www.xplatform.rocks/wp-content/uploads/2023/12/austrria-768x439.webp 768w, https://www.xplatform.rocks/wp-content/uploads/2023/12/austrria-1536x878.webp 1536w, https://www.xplatform.rocks/wp-content/uploads/2023/12/austrria.webp 1792w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure> <h2 class="wp-block-heading">The Legacy and Evolution of the Spielberg Grand Prix/Austrian GP</h2> <p>The journey of Formula One in Spielberg began in 1970, with races being a staple at the <a href="https://www.redbullring.com/en/">Österreichring</a>, nestled in the landscapes of Spielberg and Flatschach. Originally spanning 5.911 kilometers, the track underwent an extension to 5.942 kilometers in 1977, a response to the tragic accident involving Mark Donohue. Throughout its early years, the race lengths varied, oscillating between 52 and 54 laps, a slight decrease from the initial 60 laps in its inaugural season.</p> <p>Known for its blistering speeds, the Österreichring frequently witnessed new records in average lap speeds, earning a reputation as a high-speed battleground for racers.</p> <p>The 1987 race marked a turning point, with two severe accidents prompting a decade-long pause for Formula One in Austria, as the track no longer met modern standards. The 1990s saw a transformative redesign of the circuit, enhancing safety, introducing runoff zones, and narrowing corners. This modernization reduced the track&#8217;s length to 4.319 kilometers and ushered in a new era under the name A1-Ring, with Formula One returning from 1997 to 2003.</p> <p>In 2004, Dietrich Mateschitz acquired the site, transforming it into a state-of-the-art motorsports center, now known as the <a href="https://www.redbullring.com/en/red-bull-ring/">Red Bull Ring</a>. This marked a new chapter in the track&#8217;s history.</p> <p>By 2014, Formula One made a triumphant return to Spielberg, with the first race of this new era held on June 22. Further solidifying its place in the F1 calendar, a contract extension in March 2023 announced races until at least the 2027 season.</p> <h2 class="wp-block-heading">The Modern Marvel: Red Bull Ring&#8217;s Design and Experience</h2> <p>Hermann Tilke, a renowned track architect, was tasked with designing the contemporary Red Bull Ring. A unique aspect of this track is its striking altitude variations, offering clear visibility and a distinct racing experience.</p> <p>Spanning 4.318 kilometers for Formula 1 races, the Red Bull Ring features ten turns and an elevation of 677 meters, creating an exhilarating drive. It boasts a 65-meter elevation change, with steep gradients adding to the challenge.</p> <p>The circuit starts with a demanding right turn, leading into a steep uphill straight. The hairpin, a prime spot for overtaking, slows cars from over 320 km/h to just 70 km/h. Following this is a downhill right turn, leading into quick left turns in the infield, culminating in the final bends.</p> <p>Nestled in Upper Styria&#8217;s Aichfeld, the Red Bull Ring is cradled by slopes on three sides, some serving as natural grandstands. This not only provides spectators with panoramic views but also integrates the track seamlessly into the picturesque landscape, marrying the thrill of racing with the tranquility of nature.</p> <h2 class="wp-block-heading">Austrian GP &#8211; List of Winners</h2> <figure class="wp-block-table"><table><tbody><tr><th>Year</th><th>Pilot</th><th>Team</th></tr><tr><td>2022</td><td>Charles Leclerc</td><td>Ferrari</td></tr><tr><td>2021</td><td>Max Verstappen</td><td>Red Bull Honda</td></tr><tr><td>2020</td><td>Lewis Hamilton</td><td>Mercedes</td></tr><tr><td>2020</td><td>Valtteri Bottas</td><td>Mercedes</td></tr><tr><td>2019</td><td>Max Verstappen</td><td>Red Bull Honda</td></tr><tr><td>2018</td><td>Max Verstappen</td><td>Red Bull Renault</td></tr><tr><td>2017</td><td>Valtteri Bottas</td><td>Mercedes</td></tr><tr><td>2016</td><td>Lewis Hamilton</td><td>Mercedes</td></tr><tr><td>2015</td><td>Nico Rosberg</td><td>Mercedes</td></tr><tr><td>2014</td><td>Nico Rosberg</td><td>Mercedes</td></tr><tr><td>2003</td><td>Michael Schumacher</td><td>Ferrari</td></tr><tr><td>2002</td><td>Michael Schumacher</td><td>Ferrari</td></tr><tr><td>2001</td><td>David Coulthard</td><td>McLaren Mercedes</td></tr><tr><td>2000</td><td>Mika Häkkinen</td><td>McLaren</td></tr><tr><td>1999</td><td>Eddie Irvine</td><td>Ferrari</td></tr><tr><td>1998</td><td>Mika Häkkinen</td><td>McLaren Mercedes</td></tr><tr><td>1997</td><td>Jacques Villeneuve</td><td>Williams</td></tr><tr><td>1987</td><td>Nigel Mansell</td><td>Williams Honda</td></tr><tr><td>1986</td><td>Alain Prost</td><td>McLaren Porsche</td></tr><tr><td>1985</td><td>Alain Prost</td><td>McLaren Porsche</td></tr><tr><td>1984</td><td>Niki Lauda</td><td>McLaren Porsche</td></tr><tr><td>1983</td><td>Alain Prost</td><td>Renault Renault</td></tr><tr><td>1982</td><td>Elio de Angelis</td><td>Lotus Ford</td></tr><tr><td>1981</td><td>Jacques Laffite</td><td>Ligier Matra</td></tr><tr><td>1980</td><td>Jean-Pierre Jabouille</td><td>Renault</td></tr><tr><td>1979</td><td>Alan Jones</td><td>Williams Ford</td></tr><tr><td>1978</td><td>Ronnie Peterson</td><td>Lotus Ford</td></tr><tr><td>1977</td><td>Alan Jones</td><td>Shadow Ford</td></tr><tr><td>1976</td><td>John Watson</td><td>Penske Ford</td></tr><tr><td>1975</td><td>Vittorio Brambilla</td><td>March Ford</td></tr><tr><td>1974</td><td>Carlos Reutemann</td><td>Brabham Ford</td></tr><tr><td>1973</td><td>Ronnie Peterson</td><td>Lotus Ford</td></tr><tr><td>1972</td><td>Emerson Fittipaldi</td><td>Lotus Ford</td></tr><tr><td>1971</td><td>Joseph Siffert</td><td>B.R.M.</td></tr><tr><td>1970</td><td>Jacky Ickx</td><td>Ferrari</td></tr></tbody></table></figure> <h2 class="wp-block-heading">Enjoy Every Race from Home: Free and Easy Streaming</h2> <p>Are you an F1 enthusiast looking for a way to catch all the action without the hefty subscription fees? Great news: You can <a href="https://www.xplatform.rocks/watch-forumla1-free/">watch every F1 race live, and it&#8217;s completely free</a>. No subscriptions, no hidden costs. If this sounds too good to be true, I encourage you to read our detailed guide. It&#8217;s a method I&#8217;ve personally used for years, saving substantial amounts of money while enjoying seamless, high-quality broadcasts. Don&#8217;t miss out on this fantastic opportunity to stay connected with every thrilling moment of the races, all from the comfort of your home.</p> <p>The post <a href="https://www.xplatform.rocks/f1-austria-gp-red-bull-ring-in-spielberg/">F1 Austria GP &#8211; Red Bull Ring in Spielberg</a> appeared first on <a href="https://www.xplatform.rocks">xplatform.rocks</a>.</p> Thorsten HansThorsten Hanshttp://heise.de/-9643310Holger SchwichtenbergNeu in .NET 8.0 [12]: Eingefrorene Objektmengen.NET 8.0 bietet zwei neue Objektmengen, bei denen man nach dem Erstellen die Elemente nicht ändern, ergänzen oder löschen kann. Fri, 01 Mar 2024 09:22:00 +01002024-03-01T09:22:00+01:00Holger SchwichtenbergHolger SchwichtenbergHolger Schwichtenberghttps://blog.codeinside.eu/2024/02/24/winui3-with-community-toolkit-and-template-studiohttps://blog.codeinside.eu/2024/02/24/winui3-with-community-toolkit-and-template-studio/Code-Inside BlogWinUI 3 Community Toolkit and the Template Studio <p>In my last post <a href="https://blog.codeinside.eu/2024/02/12/first-steps-with-winui3/">“First steps with WinUI 3”</a> I already mentioned the <a href="https://apps.microsoft.com/detail/9p3jfpwwdzrc">“WinUI 3 Gallery”-App</a>, but I missed mentioning two great resources.</p> <p>If you take a deeper look at the “Home” page, you will spot the <a href="https://apps.microsoft.com/detail/9nblggh4tlcq">Community Toolkit Gallery (another app)</a> and the <a href="https://marketplace.visualstudio.com/items?itemName=TemplateStudio.TemplateStudioForWinUICs">“Template Studio for WinUI”</a>.</p> <p><img src="https://blog.codeinside.eu/assets/md-images/2024-02-24/winui3gallery.png" alt="x" title="WinUI 3 Gallery" /></p> <h1 id="what-is-the-community-toolkit">What is the Community Toolkit?</h1> <p>The Community Toolkit is a community-driven collection of components and other helpers.</p> <p><img src="https://blog.codeinside.eu/assets/md-images/2024-02-24/community-toolkit.png" alt="x" title="WinUI 3 Gallery" /></p> <p>The “home” of the Community Toolkit can be found on <a href="https://github.com/CommunityToolkit/Windows">GitHub</a></p> <p>As of today, the Community Toolkit seems “alive” with recent commits in February 2024.</p> <p>Interesting fact: The controls from the toolkit seems to work with the <a href="https://platform.uno/">Uno Platform</a> as well.</p> <h1 id="what-is-the-template-studio">What is the Template Studio?</h1> <p>Template Studio is an addin for Visual Studio and can be installed <a href="https://marketplace.visualstudio.com/items?itemName=TemplateStudio.TemplateStudioForWinUICs">from the Marketplace</a>.</p> <p>This adds the ‘Template Studio for WinUI’ template to Visual Studio:</p> <p><img src="https://blog.codeinside.eu/assets/md-images/2024-02-24/template-studio.png" alt="x" title="Template Studio" /></p> <p>After the usual “pick a name and location” you will be greeted with this Wizard:</p> <p>The first step is to select a “Project type”:</p> <p><img src="https://blog.codeinside.eu/assets/md-images/2024-02-24/template-studio-1.png" alt="x" title="Template Studio - Project Type" /></p> <p>In the next step you choose a “Design pattern” - which has only one item… well.</p> <p><img src="https://blog.codeinside.eu/assets/md-images/2024-02-24/template-studio-2.png" alt="x" title="Template Studio - Design pattern" /></p> <p>In “Pages” you can create your “views/pages” based on a given layout:</p> <p>Some pages can only be added once (e.g. the “Settings”), but most pages can be added multiple times.</p> <p><img src="https://blog.codeinside.eu/assets/md-images/2024-02-24/template-studio-3.png" alt="x" title="Template Studio - Pages" /></p> <p>In “Features” you can add some WinUI 3 related features:</p> <p><img src="https://blog.codeinside.eu/assets/md-images/2024-02-24/template-studio-4.png" alt="x" title="Template Studio - Features" /></p> <p>In the last setting you can decide if you want to add an MSTest project as well:</p> <p><img src="https://blog.codeinside.eu/assets/md-images/2024-02-24/template-studio-5.png" alt="x" title="Template Studio - Testing" /></p> <p>The result is the following Visual Studio solution, which includes two projects and a number of <code class="language-plaintext highlighter-rouge">TODO</code> items:</p> <p><img src="https://blog.codeinside.eu/assets/md-images/2024-02-24/template-studio-vsproject.png" alt="x" title="Template Studio - Solution" /></p> <p>If you run the code a pretty simple app with your configured pages will be found:</p> <p><img src="https://blog.codeinside.eu/assets/md-images/2024-02-24/template-studio-result.png" alt="x" title="Template Studio - Result" /></p> <p><strong>Warning:</strong> Such code generators might be a good starting point, but (as always with such generators) the code might be “too stupid” or “too complicated” - depending on your needs.</p> <h1 id="any-other-useful-resource">Any other useful resource?</h1> <p>I’m a newbie with WinUI 3. The Community Toolkit looks promising and even the Template Studio looks good - at least from a few minutes playtime. If anyone has other useful resource: Please let me know (e.g. in the comments or via email).</p> <p>Hope this helps!</p> Sat, 24 Feb 2024 23:59:00 ZCode-Inside BlogCode-Inside BlogCode-Inside Bloghttp://heise.de/-9637003Holger SchwichtenbergNeu in .NET 8.0 [11]: Neue ZufallsfunktionenIn der Klasse System.Random gibt es nun eine Zufallsreihenfolge mit Random.Shared.Shuffle() und Zufallsauswahl via Random.Shared.GetItems().Fri, 23 Feb 2024 15:06:00 +01002024-02-23T15:06:00+01:00Holger SchwichtenbergHolger SchwichtenbergHolger Schwichtenberghttp://heise.de/-9633960Golo RodenHTMX: Die perfekte UI-Technologie?Die einen lieben HTMX, die anderen hassen es. Was ist dran am Hype um HTMX, was spricht für und was gegen die Bibliothek? Thu, 22 Feb 2024 08:03:00 +01002024-02-22T08:03:00+01:00Golo RodenGolo RodenGolo Rodenhttps://asp.net-hacker.rocks/2024/02/19/cloud-native-development-net-aspire.htmlhttps://asp.net-hacker.rocks/2024/02/19/cloud-native-development-net-aspire.htmlJürgen GutschDevelop cloud native applications using .NET Aspire<p>At the .NET Conf 2023, Microsoft announced a kind of toolset to build cloud-native applications. That announcement was kind of <a href="https://youtu.be/z1M-7Bms1Jg?si=JCSi-dqZYptF_ZEf">hidden in a talk</a> done by <a href="https://twitter.com/condrong">Glenn Condron</a> and <a href="https://twitter.com/davidfowl">David Fowler</a> about building cloud-native applications using .NET 8, which was also announced at that conference. This talk actually was about .NET Aspire, which I will quickly introduce with this post.</p> <p>Let's start first by answering a question.</p> <p>When I did a talk about .NET Aspire recently <a href="https://www.meetup.com/basel-net-user-group/events/297394460/">at the .NET user group in Basel (CH)</a>, one individual in the audience asked me the following question:</p> <h2>What is a cloud-native application?</h2> <p>Let's ask the internet to find the right answer:</p> <blockquote> <p><strong>Amazon:</strong> &quot;Cloud native is the software approach of building, deploying, and managing modern applications in cloud computing environments. Modern companies want to build highly scalable, flexible, and resilient applications that they can update quickly to meet customer demands. To do so, they use modern tools and techniques that inherently support application development on cloud infrastructure. These cloud-native technologies support fast and frequent changes to applications without impacting service delivery, providing adopters with an innovative, competitive advantage.&quot; (https://aws.amazon.com/what-is/cloud-native/)</p> </blockquote> <blockquote> <p><strong>Google:</strong> &quot;A cloud-native application is specifically designed from the ground up to take advantage of the elasticity and distributed nature of the cloud. &quot; (https://cloud.google.com/learn/what-is-cloud-native)</p> </blockquote> <blockquote> <p><strong>RedHat:</strong> &quot;Cloud-native applications are a collection of small, independent, and loosely coupled services.&quot; (https://www.redhat.com/en/topics/cloud-native-apps)</p> </blockquote> <blockquote> <p><strong>Oracle:</strong> &quot;The term cloud native refers to the concept of building and running applications to take advantage of the distributed computing offered by the cloud delivery model. Cloud-native apps are designed and built to exploit the scale, elasticity, resiliency, and flexibility the cloud provides.&quot; (https://www.oracle.com/cloud/cloud-native/what-is-cloud-native/)</p> </blockquote> <blockquote> <p><strong>Microsoft:</strong> &quot;<em>Cloud-native architecture and technologies are an approach to designing, constructing, and operating workloads that are built in the cloud and take full advantage of the cloud computing model.</em>&quot; (https://learn.microsoft.com/en-us/dotnet/architecture/cloud-native/definition)</p> </blockquote> <blockquote> <p><strong>Cloud Native Computing Foundation (CNCF):</strong> &quot;Cloud native technologies empower organizations to build and run scalable applications in modern, dynamic environments such as public, private, and hybrid clouds. Containers, service meshes, microservices, immutable infrastructure, and declarative APIs exemplify this approach.</p> <p>These techniques enable loosely coupled systems that are resilient, manageable, and observable. Combined with robust automation, they allow engineers to make high-impact changes frequently and predictably with minimal toil.&quot; (https://github.com/cncf/toc/blob/main/DEFINITION.md)</p> </blockquote> <p>Every answer is a little different. Basically, it means a cloud-native application is built for the cloud and uses the services the cloud provides to be scalable and resilient.</p> <h2>What is .NET Aspire doing?</h2> <p>.NET Aspire helps with <strong>tooling</strong> in VS and the CLI to create and interact with .NET Aspire apps. It also brings some project templates to create new .NET Aspire apps. .NET Aspire helps with <strong>orchestrating</strong>, means running and connecting to multi-project applications and their dependencies. It also provides <strong>components</strong> that connect to cloud dependencies like queues, caches, databases, or even prebuild containers. All those components can be orchestrated and connected to your applications using C#. .NET Aspire creates a deployment-ready development environment. Using the Azure Development CLI (azd) you can easily deploy your cloud native application to Azure.</p> <p>.NET Aspire is made for local development and it is made for Microsoft Azure. Developments and deployments to other clouds might be possible in the future with the support of the developer community. In the first stage, Microsoft will not support other cloud providers. Which makes sense since Azure is the number one platform for Microsoft.</p> <p>.NET Aspire uses Docker Desktop to run your cloud-native application. When you press F5 in VS, your apps will be deployed to containers and will run on Docker Desktop locally. When you deploy your cloud-native application, a Bycep script will be created and your apps will be deployed to a new Azure Resource Group inside Azure Container Apps. App Service Containers are not supported yet. AKS is only supported via the community tool Aspirate.</p> <p>Currently, .NET Aspire is Preview 3. Which means some features might not work or are not yet implemented.</p> <p>But those limitations are absolutely fine for the moment.</p> <h2>Why is .NET Aspire needed?</h2> <p>Actually, it is not needed. There are good tools out there to set up the local development environment the way you can develop cloud-native applications locally. There are also tools that set up your development environment inside the cloud to develop in the same environment where your application will live. This is great and super helpful. Unfortunately, these possibilities are sometimes hard to set up and some teams can't use it for some reason. The easiest way to set up an environment locally for me as a developer on Windows using .NET was to use Docker Compose or to load or emulate the services I needed locally or to be connected to the cloud environment all the time and to use the cloud services directly. Both options are not perfect.</p> <p>So, you see that .NET Aspire is not needed. But it is super helpful for me as a C# developer.</p> <h2>Let's have a quick look at .NET Aspire in action</h2> <p>Therefore, I created a frontend app using the new Blazor Web App and a backend that provides me with the data via a Web API endpoint. Both apps are just the default templates with the weather data demos. I just did a small modification: Instead of generating the weather data in the front end, it now loads them from the API.</p> <p>When doing right-click on one of the projects and select &quot;Add&quot;, you will see two new entries in the context menu:</p> <ul> <li>&quot;.NET Aspire Component...&quot;</li> <li>&quot;.NET Aspire Orchestration Support...&quot;</li> </ul> <p><img src="https://asp.net-hacker.rocks/img/net-aspire/image-20240222214405599.png" alt="image-20240222214405599" /></p> <p>Selecting &quot;.NET Aspire Orchestration Support...&quot;, it creates two new projects in your solution:</p> <p><img src="https://asp.net-hacker.rocks/img/net-aspire/image-20240222214727408.png" alt="image-20240222214727408" /></p> <p>The AppHost is the project where you will do the actual composition, we will have a more detailed look later. The ServiceDefaults contains one single code file with extension methods that configure default services and Middlewares the actual projects need to use. Mainly Telemetry and HelthChecks. Actually, these service defaults are added to the actual projects when adding the Aspire Orchestration support. The following code shows the usage of the default in lines 5 and 17:</p> <p><img src="https://asp.net-hacker.rocks/img/net-aspire/image-20240222215145900.png" alt="image-20240222215145900" /></p> <p>As you can see, I also configured a HttpClient that connects to the backend API.</p> <p>I also added the Aspire orchestration support to the backend API and the service defaults are added to that project as well. In this project, I configured a distributed Redis cache in line 14:</p> <p><img src="https://asp.net-hacker.rocks/img/net-aspire/image-20240222220527042.png" alt="image-20240222220527042" /></p> <p>This application contains three components: A frontend which is a Blazor web app, a backend which is a minimal API and a Redis cache. These three components need to be orchestrated to run and debug it locally. The problem is, that I don't have a local instance of Redis yet.</p> <p>This is where Aspire can help us. Let's have a look into the <code>Program.cs</code> of the AppHost Project:</p> <pre><code class="language-csharp">var builder = DistributedApplication.CreateBuilder(args); var cache = builder.AddRedis(&quot;cache&quot;); var backend = builder.AddProject&lt;Projects.WeatherApp_Backend&gt;(&quot;backend&quot;) .WithReference(cache) .WithReplicas(2); builder.AddProject&lt;Projects.WeatherApp_Frontend&gt;(&quot;frontend&quot;) .WithReference(backend); builder.Build().Run(); </code></pre> <p>This looks pretty similar to a regular minimal API without any ASP.NET Core stuff. The first line defines a DistributedApplicationBuilder which is the orchestrator.</p> <p>Line 3 adds Redis to the orchestration with the name &quot;cache&quot;. Remember that we configured the distributed cache with the exact same name in the backend project.</p> <p>Line 5 adds a project reference to the orchestration with the name backend. It references the cache and it should start two instances of the backend.</p> <p>Line 9 adds a project reference to the front end. This one needs the backend and adds it as a reference.</p> <p>How does the frontend know the backend address when the apps are running in orchestration? I do have the same problem when I use docker-compose to orchestrate apps. In this case, i just need to read the endpoint URL from the environment variables:</p> <pre><code class="language-csharp">IIbuilder.Services.AddScoped(sp =&gt; new HttpClient { BaseAddress = new Uri(builder.Configuration.GetValue&lt;string&gt;(&quot;services:backend:0&quot;)) }); </code></pre> <p>You will see why this is working a little later.</p> <p>Let's start the application but ensure Docker Desktop is running first. Since it is all in preview at the moment, you may need to start the application two times. Once the app is started you'll see the URL in the console that pops up. In case no browser opens automatically copy the URL and open it in a browser.:</p> <p><img src="https://asp.net-hacker.rocks/img/net-aspire/image-20240223094108726.png" alt="image-20240223094108726" /></p> <p>You will see the really cool Aspire portal in the browser that shows you all the running apps:</p> <p><img src="https://asp.net-hacker.rocks/img/net-aspire/image-20240223094441698.png" alt="image-20240223094441698" /></p> <p>This Portal is built with the new ASP.NET Core Blazor web.</p> <p>On the start screen, you see all the running services. Two instances of the backend app and one instance of the frontend app. You will also recognize the instance of the Redis cache. This is coming from a docker image that got pulled by Aspire and is running as a container now. You will also see that the backends have two endpoint URLs. One is equal to both instances and the other one is the individual URL for that specific container. The one that is equal to both is routed through a kid of a proxy.</p> <p>This portal doesn't show you only the running services. Because of the Service defaults that got injected into the apps, it can read the health states, the logs, and the telemetry information of your apps. This will help you to debug your locally running apps. Just click through the portal to see the logs, the traces, and the metrics.</p> <p>When you click on the details link of a specific running service, you can also see the environment variables that got passed to the service. In the next screenshot, you can see that the URL of the backend app will be passed as an environment variable to the frontend. This is the environment variable we used in the frontend to connect to the backend:</p> <p><img src="https://asp.net-hacker.rocks/img/net-aspire/image-20240223094932947.png" alt="image-20240223094932947" /></p> <p>The orchestration makes the services to know each other this way. The backend gets the connection string to Redis via the environment variable. This is why the services can interact. So there is almost no magic here. Just C# to orchestrate and environment variables to connect the services to each other.</p> <h2>Deployment</h2> <p>As mentioned your cloud-native app will be orchestrated to be cloud-ready. You can easily deploy your application to your Azure subscription. The tool that helps you with that is the Azure Developer CLI (<code>azd</code>). This CLI is super easy to use prepares your app for you and can do the deployment. After the installation of <code>azd</code> you just use it.</p> <p>With the console of your choice, cd to your solution folder and type <code>azd login</code>. This will open up a browser that you can use to log in with your Azure account.</p> <p>The following command will prepare your application to be ready for deployment:</p> <pre><code class="language-shell">azd init </code></pre> <p>It creates some configuration files and a <code>Bycep</code> script to set up your environment on Azure. Take a look at it to learn about <code>Bycep</code>.</p> <p>The next command does the deployment:</p> <pre><code class="language-shell">azd up </code></pre> <p>If you own more than one subscription you are asked which one to use. The CLI is super awesome. It is an interactive one that guides you through the entire deployment. Just follow the instructions.</p> <p>If the deployment is done your app is up and running on Azure. It is really that easy.</p> <p>It sets all up on Azure. A Redis is up and running. Your apps are running in Azure Container Apps and if you would have a SQL Server configured in .NET Aspire, it would also set up a SQL Azure for you</p> <p>Just don't use preview versions of .NET. That won't run on Azure and it took me some time to figure out why my cloud native app is not running on Azure. The easiest way to not stumble into that issue is to create a <code>global.json</code> and pin your solution to an SDK version of .NET that is supported on Azure.</p> <h2>Conclusion</h2> <p>This is just an introduction post about .NET Aspire. I hope it gives you a good overview of it.</p> <p>I will definitely follow the releases of .NET Aspire and I'm really looking forward to using the final release for the development of real applications that will go into production.</p> <p>I really like it and will - for sure - write more deep dive about it. I also did a <a href="https://www.meetup.com/basel-net-user-group/events/297394460/">talk at the .NET user group Basel</a> and would also do it at your user group, if you like. I'm also open to conference talks.</p> <p>Just one thing I would really like to have is the Aspire portal to be deployed as well. I think this will be super helpful to monitor applications in production. As far as I know, there are no plans yet to have this portal as a tool for production. On the other hand, if you don't properly secure this portal, it could be a really dangerous security risk and all the information that the portal provides is also available on the Azure portal. So there isn't a real need for that.</p> <p>Do you want to learn more about .NET Aspire? Follow the docs that are super complete and also contain super helpful tutorials about all the built in components: https://learn.microsoft.com/de-de/dotnet/aspire/</p>Mon, 19 Feb 2024 00:00:00 Z2024-02-19T00:00:00ZJürgen GutschJürgen GutschJürgen Gutschhttp://heise.de/-9630577Holger SchwichtenbergNeu in .NET 8.0 [10]: Plattformneutrale Abfrage der PrivilegienIn der Klasse System.Environment hat Microsoft in .NET 8.0 die Eigenschaft IsPrivilegedProcess hinzugefügt.Fri, 16 Feb 2024 12:42:00 +01002024-02-16T12:42:00+01:00Holger SchwichtenbergHolger SchwichtenbergHolger Schwichtenberghttps://blog.codeinside.eu/2024/02/12/first-steps-with-winui3https://blog.codeinside.eu/2024/02/12/first-steps-with-winui3/Code-Inside BlogFirst steps with WinUI 3 <p>Developing desktop apps <strong>for</strong> Windows is quite complex in 2024. There are some “old school” frameworks like WPF or WinForms (or even older stuff) and there is this confusing UWP (but I think it’s dead). The “modern stack” seems to be <code class="language-plaintext highlighter-rouge">WinUI</code> - so let’s take a look.</p> <p><img src="https://blog.codeinside.eu/assets/md-images/2024-02-12/winui.png" alt="x" title="WinUI" /></p> <p><em>See <a href="https://learn.microsoft.com/en-us/windows/apps/develop/">here</a></em></p> <h1 id="what-is-winui">What is WinUI?</h1> <p>WinUI is the “modern” version of WPF without the (dumb?) constraints from UWP. You can of course use your typical “Windows” programming languages (like C# or C++).</p> <p>If you heard of UWP. The “Universal Windows Platform” was a good idea but failed, because - at least from my limited testing - the platform was very strict and you couldn’t do the same stuff that you can do with WPF/WinForms.</p> <p>WinUI 1 and 2 were targeted at UWP (if I remember correctly) and with WinUI 3 Microsoft decided to lift those UWP constraints and with it we get a modern desktop stack based on the “known” XAML.</p> <p>In summary:</p> <p>WinUI 3 apps can be used for apps that run on Windows 11 and Windows 10 and can be distributed via the Microsoft Store and you can do the same crazy stuff that you love about WPF/WinForms.</p> <h1 id="does-anybody-outside-of-microsoft-use-winui">Does anybody outside of Microsoft use WinUI?</h1> <p>WinUI is used in Windows 11, e.g. the settings or the new explorer - which is nice, but it would be good, if we found a non-Microsoft app that uses this tech, right?</p> <p>Thankfully last week Apple decided to release <a href="https://apps.microsoft.com/detail/9PFHDD62MXS1">Apple Music</a> (and <a href="https://twitter.com/OrderByAsync/status/1755598050641526902">other apps</a>) as a native Windows app and it seems (<a href="https://twitter.com/mixen/status/1757085072115773473">confirmed</a>) like it was written with WinUI:</p> <p><img src="https://blog.codeinside.eu/assets/md-images/2024-02-12/applemusic.png" alt="x" title="Apple Music" /></p> <p>If Apple uses this tech, it seems “safe enough” for some exploration.</p> <h1 id="how-to-get-started">How to get started?</h1> <p>You will need <a href="https://visualstudio.microsoft.com/vs/">Visual Studio 2022</a>. Be aware, that even if you check all those desktop related workloads in the installer the WinUI 3 templates <strong>are still missing</strong>.</p> <p><img src="https://blog.codeinside.eu/assets/md-images/2024-02-12/vsinstall.png" alt="x" title="Visual Studio Workloads" /></p> <p>For the WinUI 3 templates you will need to install the <strong><a href="https://learn.microsoft.com/en-us/windows/apps/windows-app-sdk/">Windows App SDK</a></strong>.</p> <h1 id="visual-studio-templates">Visual Studio Templates</h1> <p>After the Windows App SDK is installed we finally have the templates in Visual Studio:</p> <p><img src="https://blog.codeinside.eu/assets/md-images/2024-02-12/vstemplates.png" alt="x" title="Visual Studio Templates" /></p> <p>The default <code class="language-plaintext highlighter-rouge">Blank App, Packaged (WinUI 3 in Desktop)</code> is… well… quite blank:</p> <p><img src="https://blog.codeinside.eu/assets/md-images/2024-02-12/solution.png" alt="x" title="Visual Studio Solution" /></p> <p>If you start the application, you will see this:</p> <p><img src="https://blog.codeinside.eu/assets/md-images/2024-02-12/startapp.png" alt="x" title="Blank Application" /></p> <h1 id="packaged-vs-unpacked">Packaged vs. Unpacked</h1> <p>If you check the toolbar, you will notice the <code class="language-plaintext highlighter-rouge">App 6 (Package)</code> debug button. <code class="language-plaintext highlighter-rouge">Packaged Apps</code> can access some Windows APIs (e.g. custom context menu extensions) that <code class="language-plaintext highlighter-rouge">Unpackaged Apps</code> can’t. <code class="language-plaintext highlighter-rouge">Unpackaged Apps</code> on the other hand act like WPF apps - e.g. they have a “normal” <code class="language-plaintext highlighter-rouge">.exe</code> and can be distributed like any <code class="language-plaintext highlighter-rouge">.exe</code>-file.</p> <p><a href="https://learn.microsoft.com/en-us/windows/apps/get-started/intro-pack-dep-proc#packaged-or-unpackaged">This documentation page</a> should cover this topic.</p> <p>Let’s say we want to have a “proper” <code class="language-plaintext highlighter-rouge">myApp.exe</code> app, then the <code class="language-plaintext highlighter-rouge">Unpackaged App</code> is the way to go. If you choose the <code class="language-plaintext highlighter-rouge">App 6 (Unpackaged)</code> debug option you might see this weird error:</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>XamlCheckProcessRequirements(); Exception Unhandled: System.DllNotFoundException: 'Unable to load DLL 'Microsoft.ui.xaml.dll' or one of its dependencies: The specified module could not be found. (0x8007007E)' </code></pre></div></div> <p>To fix this, you will need to add this to the <code class="language-plaintext highlighter-rouge">.csproj</code>:</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code> &lt;PropertyGroup&gt; ... &lt;WindowsPackageType&gt;None&lt;/WindowsPackageType&gt; ... &lt;/PropertyGroup&gt; </code></pre></div></div> <p>After that the debug button should start the application and you should be able to start the <code class="language-plaintext highlighter-rouge">.exe</code>.</p> <h1 id="samples">Samples</h1> <p>Ok, the most basic steps are done - now what?</p> <p>To get a feeling about what is possible and what not, you should install the <a href="https://apps.microsoft.com/detail/9P3JFPWWDZRC?">WinUI 3 Gallery</a> app.</p> <p><img src="https://blog.codeinside.eu/assets/md-images/2024-02-12/winuisample.png" alt="x" title="WinUI 3 Gallery" /></p> <p>This application should give a some guidiance.</p> <p>Hope this helps!</p> <p><em>Note: I’m a beginner with WinUI 3 and just want to show other people the first few steps - if I miss something, just write me a comment! Thanks &lt;3</em></p> Mon, 12 Feb 2024 23:55:00 ZCode-Inside BlogCode-Inside BlogCode-Inside Bloghttp://heise.de/-9623061Holger SchwichtenbergNeu in .NET 8.0 [9]: Neue und erweiterte DatenannotationenIn .NET 8.0 hat Microsoft die Annotationsklassen im Namensraum System.ComponentModel.DataAnnotations erweitert. Fri, 09 Feb 2024 15:33:00 +01002024-02-09T15:33:00+01:00Holger SchwichtenbergHolger SchwichtenbergHolger Schwichtenberghttp://heise.de/-9616685Holger SchwichtenbergNeu in .NET 8.0 [8]: Verbesserungen für nameof() in C# 12.0Der in C# 6.0 eingeführte Operator, der den Namen eines Bezeichners als String liefert, hatte bisher einige Einschränkungen, die in C# 12.0 entfallen.Fri, 02 Feb 2024 12:30:00 +01002024-02-02T12:30:00+01:00Holger SchwichtenbergHolger SchwichtenbergHolger Schwichtenberghttp://heise.de/-9611002Golo RodenVanilla-Web: Der Frontend-Trend 2024?Die Entwicklung von Web-UIs erfordert zu viele Frameworks und Tools, die zudem aufwendig und komplex zu integrieren sind. Könnte sich das im Jahr 2024 ändern?Fri, 02 Feb 2024 08:30:00 +01002024-02-02T08:30:00+01:00Golo RodenGolo RodenGolo Rodenhttp://heise.de/-9609780Holger SchwichtenbergNeu in .NET 8.0 [7]: Optionale Parameter in Lambda-Ausdrücken in C# 12.0​Die aktuelle Version von Microsofts Programmiersprache C# erweitert sowohl reguläre Lambdas als auch Statement Lambdas.​Fri, 26 Jan 2024 14:18:00 +01002024-01-26T14:18:00+01:00Holger SchwichtenbergHolger SchwichtenbergHolger Schwichtenberghttp://heise.de/-9602188Holger SchwichtenbergNeu in .NET 8.0 [6]: ref readonly in C# 12.0In der aktuellen Version von C# lassen sich Methodenparameter als unveränderlich deklarieren.Fri, 19 Jan 2024 16:07:00 +01002024-01-19T16:07:00+01:00Holger SchwichtenbergHolger SchwichtenbergHolger Schwichtenberghttps://blog.codeinside.eu/2024/01/17/windows-path-and-app-pathshttps://blog.codeinside.eu/2024/01/17/windows-path-and-app-paths/Code-Inside BlogHow Windows locates an executable via PATH or App Paths <p>If you’ve ever worked with the Windows operating system, especially in a programming context, you might have used the <code class="language-plaintext highlighter-rouge">Process.Start(yourapp)</code> (e.g. <code class="language-plaintext highlighter-rouge">Process.Start(Outlook)</code>) method in languages like C#. This method is used to start a process - essentially to run an executable file. But have you ever stopped to think about how Windows knows where to find the executables you’re trying to run? Let’s dive into the inner workings of Windows and uncover this mystery.</p> <h1 id="understanding-the-path-environment-variable">Understanding the PATH Environment Variable</h1> <p>One of the first things that come into play is the <code class="language-plaintext highlighter-rouge">PATH</code> environment variable. This variable is crucial for the operating system to locate the executables.</p> <p><strong>What is the PATH Variable?</strong></p> <p>The <code class="language-plaintext highlighter-rouge">PATH</code> environment variable is a system-wide or user-specific setting that lists directories where executable files are stored. When you run a command in the command prompt or use <code class="language-plaintext highlighter-rouge">Process.Start(...)</code>, Windows looks through these directories to find the executable file.</p> <p>The <code class="language-plaintext highlighter-rouge">PATH</code> environment variable can be viewed via the system settings:</p> <p><img src="https://blog.codeinside.eu/assets/md-images/2024-01-17/environmentsettings.png" alt="x" title="System Settings" /></p> <p>… there is also a nice editor now build into Windows for the <code class="language-plaintext highlighter-rouge">PATH</code> environment variable:</p> <p><img src="https://blog.codeinside.eu/assets/md-images/2024-01-17/pathedit.png" alt="x" title="Path Edit" /></p> <p><strong>How Does PATH Work?</strong></p> <p>If the executable is not in the current directory, Windows searches through each directory specified in the <code class="language-plaintext highlighter-rouge">PATH</code> variable. The order of directories in <code class="language-plaintext highlighter-rouge">PATH</code> is important - Windows searches them in the order they are listed. If it finds the executable in one of these directories, it runs it.</p> <p>However, the <code class="language-plaintext highlighter-rouge">PATH</code> variable isn’t the only mechanism at play here.</p> <h1 id="the-role-of-app-paths-in-the-windows-registry">The Role of App Paths in the Windows Registry</h1> <p>Another less-known but equally important component is the “<strong><a href="https://learn.microsoft.com/en-us/windows/win32/shell/app-registration">App Paths</a></strong>” registry key. This key is located in <code class="language-plaintext highlighter-rouge">HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths</code>.</p> <p><strong>Understanding App Paths</strong></p> <p>The <code class="language-plaintext highlighter-rouge">App Paths</code> key is used to specify paths to specific applications. Each application can have its entry under the <code class="language-plaintext highlighter-rouge">App Paths</code> key, which means that Windows can find and run these applications even if their directories are not listed in the <code class="language-plaintext highlighter-rouge">PATH</code> variable.</p> <p><img src="https://blog.codeinside.eu/assets/md-images/2024-01-17/apppaths.png" alt="x" title="App path" /></p> <p><strong>How Do App Paths Work?</strong></p> <p>When you use <code class="language-plaintext highlighter-rouge">Process.Start(...)</code> and specify an application name like “OUTLOOK”, Windows first checks the App Paths registry key before it checks the <code class="language-plaintext highlighter-rouge">PATH</code> variable. If it finds an entry for the application here, it uses this path to start the application. This is particularly useful for applications that are not in common directories or have multiple executables in different locations.</p> <h1 id="conclusion">Conclusion</h1> <p>Both <code class="language-plaintext highlighter-rouge">PATH</code> and <code class="language-plaintext highlighter-rouge">App Paths</code> play significant roles. While <code class="language-plaintext highlighter-rouge">PATH</code> is great for general-purpose directory searching (especially for system utilities and command-line tools), <code class="language-plaintext highlighter-rouge">App Paths</code> is more specific and tailored for individual applications.</p> <p>There are probably even more options out there besides <code class="language-plaintext highlighter-rouge">PATH</code> and <code class="language-plaintext highlighter-rouge">App Paths</code> - Windows is full of hidden gems like this 😉.</p> <p>Fun fact: I only discovered <code class="language-plaintext highlighter-rouge">App Paths</code> while debugging a problem. We use <code class="language-plaintext highlighter-rouge">Process.Start(OUTLOOK)</code> to start Microsofts Outlook Client and I was wondering why this even works.</p> <p>Hope this helps!</p> Wed, 17 Jan 2024 23:55:00 ZCode-Inside BlogCode-Inside BlogCode-Inside Bloghttp://heise.de/-9600553Holger SchwichtenbergKostenloser Vortrag zu den Neuerungen in .NET 8.0 und C# 12.0 am 31. JanuarDie Vorträge in Ratingen behandeln die Neuerungen in der Syntax von C# 12.0 sowie in ASP.NET Core 8.0, Blazor 8.0 und Entity Framework Core 8.0.Wed, 17 Jan 2024 16:39:00 +01002024-01-17T16:39:00+01:00Holger SchwichtenbergHolger SchwichtenbergHolger Schwichtenberghttps://blog.codeinside.eu/2024/01/12/dotnetcore-and-proxy-settingshttps://blog.codeinside.eu/2024/01/12/dotnetcore-and-proxy-settings/Code-Inside Blog.NET ('.NET Core') and Proxy Settings <p>If your .NET (“.NET Core”) program is running on a system that specifies strict proxy settings, you must either handle these settings in your application itself or use these environment variables.</p> <p>Since I had this problem from time to time and the procedure was not 100% clear to me, I am now recording it here on the blog.</p> <p><strong>“DefaultProxy”</strong></p> <p>If you don’t specify any proxy, then the <code class="language-plaintext highlighter-rouge">DefaultProxy</code> is used and depending on your operation system the following will be used:</p> <p>(Copied from <a href="https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient.defaultproxy?view=net-8.0">here</a>)</p> <blockquote> <p>For Windows: Reads proxy configuration from environment variables or, if those are not defined, from the user’s proxy settings.</p> <p>For macOS: Reads proxy configuration from environment variables or, if those are not defined, from the system’s proxy settings.</p> <p>For Linux: Reads proxy configuration from environment variables or, in case those are not defined, this property initializes a non-configured instance that bypasses all addresses. The environment variables used for DefaultProxy initialization on Windows and Unix-based platforms are:</p> <p>HTTP_PROXY: the proxy server used on HTTP requests. HTTPS_PROXY: the proxy server used on HTTPS requests. ALL_PROXY: the proxy server used on HTTP and/or HTTPS requests in case HTTP_PROXY and/or HTTPS_PROXY are not defined. NO_PROXY: a comma-separated list of hostnames that should be excluded from proxying. Asterisks are not supported for wildcards; use a leading dot in case you want to match a subdomain. Examples: &gt; NO_PROXY=.example.com (with leading dot) will match www.example.com, but will not match example.com. NO_PROXY=example.com (without leading dot) will not match www.example.com. This behavior might be &gt; revisited in the future to match other ecosystems better.</p> </blockquote> <p><strong>Scenario: Web-App that needs external &amp; “internal” Web-APIs</strong></p> <p>We often had the following problem: Our web application needs to contact external services. This means, that we <strong>must use</strong> the proxy. At the same time, our web application also wants to communicate with other web APIs on the same machine, but the proxy does not allow this (the proxy can’t return the request to the same machine - not sure why).</p> <p>It should be noted that the “IIS account” or “Network Service” did NOT have a proxy setting itself, i.e. the “User Proxy Settings” were always empty.</p> <p><strong>Solution:</strong></p> <p>We used the following proxy settings and it worked:</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ALL_PROXY = proxyserver.corp.acme.com NO_Proxy = internalserver.corp.acme.com </code></pre></div></div> <p>Our web application and our internal web api were running on “internalserver.corp.acme.com”. Each request to external services were routed through the proxy and each “internal” request didn’t touch the proxy.</p> <p><strong>IE-Proxy Settings:</strong></p> <p>This solution should work fine on “Server-Environments”. If you have a desktop application, then the “Default Proxy” handling should do the trick. In some special cases the “IE proxy setting” handling might be needed. If you want to learn more about this, read this blogpost: <a href="https://blog.codeinside.eu/2022/03/28/how-to-use-ie-proxy-settings-with-httpclient/">How to use IE proxy settings with HttpClient</a>.</p> <p>Hope this helps!</p> Fri, 12 Jan 2024 22:55:00 ZCode-Inside BlogCode-Inside BlogCode-Inside Bloghttp://heise.de/-9594693Holger SchwichtenbergNeu in .NET 8.0 [5]: Typaliasse in C# 12.0Typen können in der aktuellen Version von C# durch das Schlüsselwort using einen alternativen Namen erhalten.Fri, 12 Jan 2024 12:12:00 +01002024-01-12T12:12:00+01:00Holger SchwichtenbergHolger SchwichtenbergHolger Schwichtenberghttp://heise.de/-9581392Holger SchwichtenbergNeu in .NET 8.0 [4]: Collection Expressions in C# 12.0Das aktuelle Release der Programmiersprache C# vereinfacht das Initialisieren von Collections wie Listen.Fri, 05 Jan 2024 10:00:00 +01002024-01-05T10:00:00+01:00Holger SchwichtenbergHolger SchwichtenbergHolger Schwichtenberghttp://heise.de/-9581346Holger SchwichtenbergNeu in .NET 8.0 [3]: Primärkonstruktoren in C# 12.0Die Programmiersprache C# bietet in Version 12.0 die Möglichkeit, über eine Parameterliste hinter dem Typnamen einen Primärkonstruktor zu definieren.Fri, 29 Dec 2023 10:00:00 +01002023-12-29T10:00:00+01:00Holger SchwichtenbergHolger SchwichtenbergHolger Schwichtenberghttp://heise.de/-9581213Holger SchwichtenbergNeu in .NET 8.0 [2]: Neue AnwendungsartenBlazor bekommt in .NET 8.0 einen Auto-Rendering-Modus und Blazor Static-Server-Rendering.Fri, 22 Dec 2023 09:54:00 +01002023-12-22T09:54:00+01:00Holger SchwichtenbergHolger SchwichtenbergHolger Schwichtenberghttp://stefanhenneken.net/?p=2568https://stefanhenneken.net/2023/12/21/book-release-use-of-the-solid-principles-with-iec-61131-3/Stefan HennekenBook release „Use of the SOLID principles with IEC 61131-3“Due to the regular calls for articles about the SOLID principles, I decided some time ago to offer this series in the form of a small book. This book can now be ordered (as a paperback and as an e-book) from all well-known bookshops and digital platforms. In addition to the SOLID principles, the book &#8230; <a href="https://stefanhenneken.net/2023/12/21/book-release-use-of-the-solid-principles-with-iec-61131-3/" class="more-link">Continue reading<span class="screen-reader-text"> "Book release „Use of the SOLID principles with IEC&#160;61131-3“"</span></a>Thu, 21 Dec 2023 19:01:24 ZStefan Henneken <p>Due to the regular calls for articles about the SOLID principles, I decided some time ago to offer this series in the form of a small book. This book can now be ordered (as a paperback and as an e-book) from all well-known bookshops and digital platforms. In addition to the SOLID principles, the book also addresses the KISS, DRY, LoD and YAGNI principles.</p> <span id="more-2568"></span> <p>Of course, the previous articles are still available free of charge here on the blog. This means that everyone is free to decide whether they would prefer to read the articles online, on an e-book reader or as a printed book.</p> <p>The price for the almost 100-page book is €6.99 for the <a href="https://buchshop.bod.de/use-of-the-solid-principles-with-the-iec-61131-3-stefan-henneken-9783757892227" target="_blank" rel="noreferrer noopener">printed version</a> (ISBN-13: 9783757892227) and €4.99 for the <a href="https://buchshop.bod.de/use-of-the-solid-principles-with-the-iec-61131-3-stefan-henneken-9783758356148" target="_blank" rel="noreferrer noopener">e-book</a> (ISBN-13: 9783758356148).</p> Stefan HennekenStefan Hennekenhttp://stefanhenneken.net/?p=2625https://stefanhenneken.net/2023/12/17/iec-61131-3-the-principles-kiss-dry-lod-and-yagni/Stefan HennekenIEC 61131-3: The Principles KISS, DRY, LoD and YAGNIThe 5 SOLID principles were presented in the previous posts. In addition to the SOLID principles, however, there are other principles that are also briefly presented here. What all these principles have in common is the goal of making software more maintainable and more reusable. Don’t Repeat Yourself (DRY) The DRY principle states (as the &#8230; <a href="https://stefanhenneken.net/2023/12/17/iec-61131-3-the-principles-kiss-dry-lod-and-yagni/" class="more-link">Continue reading<span class="screen-reader-text"> "IEC 61131-3: The Principles KISS, DRY, LoD and&#160;YAGNI"</span></a>Sun, 17 Dec 2023 08:57:50 ZStefan Henneken <p>The 5 SOLID principles were presented in the previous posts. In addition to the SOLID principles, however, there are other principles that are also briefly presented here. What all these principles have in common is the goal of making software more maintainable and more reusable.</p> <span id="more-2625"></span> <h1 class="wp-block-heading">Don’t Repeat Yourself (DRY)</h1> <p>The DRY principle states (as the name suggests) that program code should not be duplicated unnecessarily. Instead, a function should be implemented only once and called at desired points in the program.</p> <p>The DRY principle can help improve the maintainability of code, as it becomes easier to make changes to a function if it is implemented in only one place in the program code. In addition, the DRY principle can help reduce errors in the program, since duplicated code often leads to unexpected behaviour when a change is made in only one of the duplicated locations. Thus the DRY principle is an important principle in the software development, which can contribute to the improvement of the code quality.</p> <p>Although the DRY principle is easy to understand and implement, it is probably the most disregarded principle. Because nothing is easier than to repeat source code by copy &amp; paste. Especially when the time pressure is particularly high. Therefore, you should always try to implement shared functions in separate modules.</p> <p>The following short example shows the application of the DRY principle. A PLC program receives different temperature values from several sensors. All temperature values are to be displayed in an HMI and written to a log file. To make the temperature values more readable, the formatting should be done in the PLC:</p> <div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate"> FUNCTION F_DisplayTemperature : STRING VAR_INPUT fSensorValue : LREAL; bFahrenheit : BOOL; END_VAR IF (fSensorValue &gt; 0) THEN IF (bFahrenheit) THEN F_DisplayTemperature := CONCAT('Temperature: ', REAL_TO_FMTSTR(fSensorValue, 1, TRUE)); F_DisplayTemperature := CONCAT(F_DisplayTemperature, ' °C'); ELSE F_DisplayTemperature := CONCAT('Temperature: ', REAL_TO_FMTSTR(fSensorValue * 1.8 + 32, 1, TRUE)); F_DisplayTemperature := CONCAT(F_DisplayTemperature, ' °F'); END_IF ELSE F_DisplayTemperature := 'No sensor data available'; END_IF </pre></div> <p>In this example the function <font face="Courier New">F_DisplayTemperature()</font> is implemented only once. For the formatting of the temperature values this function is called at the desired places in the program. By avoiding duplicated code, the program becomes clearer and easier to read. If, for example, it is necessary to change the number of decimal places, this only has to be done in one place, namely in the function <font face="Courier New">F_DisplayTemperature()</font>.</p> <p>In addition to the use of functions, inheritance can also help to comply with the DRY principle by relocating a functionality in a base FB and using it by all derived FBs.</p> <p>However, there may be cases in which the DRY principle should be deliberately violated. This is always the case if the readability of the source code is worsened by the use of DRY. Thus for the circle computation the formula for the circumference (U=2rπ) or for the area (A=r<sup>2</sup>π) is sufficiently readable. An outsourcing into separate functions does not increase the code quality, but only the dependence to further modules, in which the functions for the circle computation are. Instead, a global constant should be created for π and used in the calculations.</p> <p>In summary, the DRY principle helps make program code cleaner and shorter by avoiding code duplication.</p> <h1 class="wp-block-heading">Law Of Demeter (LoD)</h1> <p>The <em>Law of Demeter</em> is another principle whose observance can significantly minimize the couplings between function blocks. The <em>Law of Demeter</em> specifies that only elements in the immediate vicinity should be accessed from a function block (or method or function). In concrete terms, this means that only accesses to the following elements are permitted:</p> <ul> <li>Variables of the own function block (everything between <font face="Courier New">VAR/END_VAR</font>)</li> <li>Methods/properties of the own function block</li> <li>Methods/properties of the function blocks that were created in the own function block</li> <li>Parameters passed to methods or function blocks (<font face="Courier New">VAR_INPUT</font>)</li> <li>Global constants or parameters contained in a parameter list</li> </ul> <p>The <em>Law of Demeter</em> could therefore also be called: <em>Don&#8217;t talk to strangers</em>. Strangers are elements that are not directly present in the function block. In contrast, the own elements are called friends.</p> <p>Also this principle originates from the 1980iger years, thus from the time, in which the object-oriented software development increased strongly in popularity. The name <em>Demeter</em> is to be led back on a software project of the same name, in which this principle was recognized for the first time (<em>Demeter</em> is in the Greek mythology the sister of Zeus and the Goddess of the agriculture). At the end of the 1980s, this principle was further elaborated by Ian Holland and Karl J. Lieberherr and published under the title <a href="https://homepages.cwi.nl/~storm/teaching/reader/LieberherrHolland89.pdf" target="_blank" rel="noreferrer noopener">Assuring Good Style for Object-Oriented Programs</a>.</p> <p>The following graphic is intended to illustrate the <em>Law of Demeter</em> in a little more detail:</p> <figure class="wp-block-image size-large is-resized"><a href="https://stefanhenneken.files.wordpress.com/2023/11/pic01-1.png"><img width="723" height="420" data-attachment-id="2633" data-permalink="https://stefanhenneken.net/2023/12/17/iec-61131-3-the-principles-kiss-dry-lod-and-yagni/pic01-1-2/" data-orig-file="https://stefanhenneken.files.wordpress.com/2023/11/pic01-1.png" data-orig-size="723,420" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="pic01-1" data-image-description="" data-image-caption="" data-medium-file="https://stefanhenneken.files.wordpress.com/2023/11/pic01-1.png?w=300" data-large-file="https://stefanhenneken.files.wordpress.com/2023/11/pic01-1.png?w=723" src="https://stefanhenneken.files.wordpress.com/2023/11/pic01-1.png?w=723" alt="" class="wp-image-2633" style="width:470px" srcset="https://stefanhenneken.files.wordpress.com/2023/11/pic01-1.png 723w, https://stefanhenneken.files.wordpress.com/2023/11/pic01-1.png?w=150 150w, https://stefanhenneken.files.wordpress.com/2023/11/pic01-1.png?w=300 300w" sizes="(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px" /></a></figure> <p><font face="Courier New">FB_A</font> contains an instance of <font face="Courier New">FB_B</font> (<font face="Courier New">fbB</font>). Therefore, <font face="Courier New">FB_A</font> can directly access the methods and properties of <font face="Courier New">FB_B</font>.</p> <p><font face="Courier New">FB_B</font> contains an instance of <font face="Courier New">FB_C</font>. Therefore, <font face="Courier New">FB_B</font> can access <font face="Courier New">FB_C</font> directly.</p> <p><font face="Courier New">FB_B</font> could offer a property or a method that returns the reference to <font face="Courier New">FB_C</font> (<font face="Courier New">refC</font>). Access from <font face="Courier New">FB_A</font> to the instance of <font face="Courier New">FB_C</font> via <font face="Courier New">FB_B</font> would thus theoretically be possible:</p> <div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate"> nValue := fbB.refC.nValue; </pre></div> <p>The instance on <font face="Courier New">FB_C</font> is created in <font face="Courier New">FB_B</font>. If <font face="Courier New">FB_A</font> accesses this instance directly, a fixed coupling between <font face="Courier New">FB_A</font> and <font face="Courier New">FB_C</font> is created. This fixed coupling can lead to problems in the care, maintenance and testing of the program. If <font face="Courier New">FB_A</font> is tested, not only <font face="Courier New">FB_B</font> must be present, but <font face="Courier New">FB_C</font> as well. A frequent violation of the <em>Law of Demeter</em> is therefore also helpful in the early detection of maintenance problems.</p> <p>Even creating a corresponding local variable in which the reference to <font face="Courier New">FB_C</font> is stored does not solve the actual problem:</p> <div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate"> refC : REFERENCE TO FB_C; refC REF= fbB.refC; nValue := refC.nValue; </pre></div> <p>At first glance, these dependencies are not always apparent, as <font face="Courier New">FB_C</font> is accessed indirectly via <font face="Courier New">FB_B</font>.</p> <h2 class="wp-block-heading">Example</h2> <p>Here is a concrete example that illustrates the problem again and also offers a solution.</p> <p>The function blocks <font face="Courier New">FB_Building</font>, <font face="Courier New">FB_Floor</font>, <font face="Courier New">FB_Room</font> and <font face="Courier New">FB_Lamp</font> represent the structure of a building and its lighting. The building consists of 5 floors, each containing 20 rooms and each room contains 10 lamps.</p> <p>Each function block contains the corresponding instances of the underlying elements. The function blocks each provide a property that offers a reference to these elements. <font face="Courier New">FB_Lamp</font> contains the property <font face="Courier New">nPowerConsumption</font>, via which the current power consumption of the lamp is output.</p> <figure class="wp-block-image size-large is-resized"><a href="https://stefanhenneken.files.wordpress.com/2023/11/pic02.png"><img width="705" height="759" data-attachment-id="2585" data-permalink="https://stefanhenneken.net/2023/12/16/iec-61131-3-die-prinzipien-kiss-dry-lod-und-yagni/pic02-8/" data-orig-file="https://stefanhenneken.files.wordpress.com/2023/11/pic02.png" data-orig-size="705,759" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="pic02" data-image-description="" data-image-caption="" data-medium-file="https://stefanhenneken.files.wordpress.com/2023/11/pic02.png?w=279" data-large-file="https://stefanhenneken.files.wordpress.com/2023/11/pic02.png?w=705" src="https://stefanhenneken.files.wordpress.com/2023/11/pic02.png?w=705" alt="" class="wp-image-2585" style="width:440px" srcset="https://stefanhenneken.files.wordpress.com/2023/11/pic02.png 705w, https://stefanhenneken.files.wordpress.com/2023/11/pic02.png?w=139 139w, https://stefanhenneken.files.wordpress.com/2023/11/pic02.png?w=279 279w" sizes="(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px" /></a></figure> <p>A function is to be developed that determines the power consumption of all lamps in the building.</p> <p>One solution could be to access each individual lamp via several nested loops and add up the power consumption:</p> <div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate"> FUNCTION F_CalcPowerConsumption : UDINT VAR_INPUT refBuilding : REFERENCE TO FB_Building; END_VAR VAR nFloor, nRoom, nLamp : INT; END_VAR IF (NOT __ISVALIDREF(refBuilding)) THEN F_CalcPowerConsumption := 0; RETURN; END_IF FOR nFloor := 1 TO 5 DO FOR nRoom := 1 TO 20 DO FOR nLamp := 1 TO 10 DO F_CalcPowerConsumption := F_CalcPowerConsumption + refBuilding .refFloors&#91;nFloor] .refRooms&#91;nRoom] .refLamps&#91;nLamp].nPowerConsumption; END_FOR END_FOR END_FOR </pre></div> <p>The „diving‟ into the object structure down to each lamp seems somehow impressive. But this makes the function dependent on all function blocks, even those that are only indirectly addressed via a reference.</p> <p>The access of <font face="Courier New">refBuilding</font> to <font face="Courier New">refFloors</font> does not violate the <em>Law of Demeter</em>, since <font face="Courier New">refFloors</font> is a direct property of <font face="Courier New">FB_Building</font>. However, all further accesses to the references have the consequence that our function also becomes dependent on the other function blocks.</p> <p>If, for example, the structure of <font face="Courier New">FB_Room</font> or <font face="Courier New">FB_Floor</font> changes, the function for power consumption may also have to be adapted.</p> <p>To comply with the <em>Law of Demeter</em>, each function block could offer a method (<font face="Courier New">CalcPowerConsumption()</font>) in which the power consumption is calculated. In each of these methods, the underlying method <font face="Courier New">CalcPowerConsumption()</font> is called:</p> <figure class="wp-block-image size-full is-resized"><a href="https://stefanhenneken.files.wordpress.com/2023/11/pic03.png"><img data-attachment-id="2595" data-permalink="https://stefanhenneken.net/2023/12/16/iec-61131-3-die-prinzipien-kiss-dry-lod-und-yagni/pic03-8/" data-orig-file="https://stefanhenneken.files.wordpress.com/2023/11/pic03.png" data-orig-size="705,893" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="pic03" data-image-description="" data-image-caption="" data-medium-file="https://stefanhenneken.files.wordpress.com/2023/11/pic03.png?w=237" data-large-file="https://stefanhenneken.files.wordpress.com/2023/11/pic03.png?w=705" src="https://stefanhenneken.files.wordpress.com/2023/11/pic03.png" alt="" class="wp-image-2595" style="width:440px" /></a></figure> <p>The <font face="Courier New">CalcPowerConsumption()</font> method in <font face="Courier New">FB_Building</font> only accesses its own elements. In this case, it accesses the property <font face="Courier New">refFloors</font> to call the method <font face="Courier New">CalcPowerConsumption()</font> of <font face="Courier New">FB_Floor</font>:</p> <div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate"> METHOD CalcPowerConsumption : UDINT VAR nFloor : INT; END_VAR FOR nFloor := 1 TO 5 DO CalcPowerConsumption := CalcPowerConsumption + refFloors&#91;nFloor].CalcPowerConsumption(); END_FOR </pre></div> <p>In <font face="Courier New">CalcPowerConsumption()</font> of <font face="Courier New">FB_Floor</font>, only <font face="Courier New">FB_Room</font> is accessed:</p> <div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate"> METHOD CalcPowerConsumption : UDINT VAR nRoom : INT; END_VAR FOR nRoom := 1 TO 20 DO CalcPowerConsumption := CalcPowerConsumption + refRooms&#91;nRoom].CalcPowerConsumption(); END_FOR </pre></div> <p>Finally, the power consumption of all lamps in the room is calculated in <font face="Courier New">FB_Room</font>:</p> <div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate"> METHOD CalcPowerConsumption : UDINT VAR nLamp : INT; END_VAR FOR nLamp := 1 TO 10 DO CalcPowerConsumption := CalcPowerConsumption + refLamps&#91;nLamp].nPowerConsumption; END_FOR </pre></div> <p>The structure of the function <font face="Courier New">F_CalcPowerConsumption()</font> is thus much simpler:</p> <div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate"> FUNCTION F_CalcPowerConsumption : UDINT VAR_INPUT refBuilding : REFERENCE TO FB_Building; END_VAR IF (NOT __ISVALIDREF(refBuilding)) THEN F_CalcPowerConsumption := 0; RETURN; END_IF F_CalcPowerConsumption := refBuilding.CalcPowerConsumption(); </pre></div> <p>After this adjustment, <font face="Courier New">F_CalcPowerConsumption()</font> is only dependent on <font face="Courier New">FB_Building</font> and its method <font face="Courier New">CalcPowerConsumption()</font>. How <font face="Courier New">FB_Building</font> calculates the power consumption in <font face="Courier New">CalcPowerConsumption()</font> is irrelevant for <font face="Courier New">F_CalcPowerConsumption()</font>. The structure of <font face="Courier New">FB_Room</font> or <font face="Courier New">FB_Floor</font> could change completely, <font face="Courier New">F_CalcPowerConsumption()</font> would not have to be adapted.</p> <p>The first variant, in which all function blocks were iterated through, is very susceptible to changes. No matter which function block the structure changes, an adjustment of <font face="Courier New">F_CalcPowerConsumption()</font> would be necessary every time.</p> <p><a href="https://github.com/StefanHenneken/Blog-2023-06-IEC61131-LoD-Sample01" target="_blank" rel="noreferrer noopener">Sample 1 (TwinCAT 3.1.4024) on GitHub</a></p> <p>However, it must be taken into account that nested structures do make sense. The <em>Law of Demeter</em> does not have to be applied here. It can be helpful to distribute the configuration data hierarchically over several structures in order to increase readability.</p> <h1 class="wp-block-heading">Keep It Simple, Stupid (KISS)</h1> <p>The KISS principle states that code should be as „simple‟ as possible so that it is as easy to understand as possible and thus effective to maintain. Here, „simple‟ is also to be understood as „plain‟. This means a simplicity that tries to leave out the unnecessary but still fulfils the customer&#8217;s requirements. By following the KISS principle, a system is:</p> <ul> <li>easy to understand</li> <li>easy to extend</li> <li>easy to maintain</li> </ul> <p>If the requirement is to sort ten million records, using the bubblesort algorithm would be simple to implement, but the low speed of the algorithm will not meet the client&#8217;s requirements. Therefore, a solution must always be found that meets the customer&#8217;s required expectations, but whose implementation is as simple (plain) as possible.</p> <p>Basically, two types of requirements are to be distinguished:</p> <p><strong>Functional requirement:</strong> The customer or stakeholder demands a specific feature. The exact requirements for this feature are then defined together with the customer and only then is it implemented. Functional requirements extend an application with clear functions (features) desired by the customer.</p> <p><strong>Non-functional requirements:</strong> A non-functional requirement is, for example, the splitting of an application into different modules or the provision of interfaces, e.g. to enable unit tests. Non-functional requirements are performance features that are not necessarily visible to the customer. However, these may be necessary so that the software system can be maintained and serviced.</p> <p>The KISS principle is always about the <strong>non-functional requirements</strong>. The focus is on the „how‟. In other words, the question of how the required functions are achieved. The YAGNI principle, which is described in the following chapter, refers to the <strong>functional requirements</strong>. Here the focus is on the „what‟.</p> <p>The KISS principle can be applied at several levels:</p> <p><strong>Formatting source code</strong></p> <p>Although the following source code is very compact, the KISS principle is violated here because it is difficult to understand and thus very error-prone:</p> <div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate"> IF(x&lt;=RT&#91;k-1](o&#91;n+2*j]))THEN WT&#91;j+k](l AND NOT S.Q);END_IF; IF(x&gt;RI&#91;k+1](o&#91;n+2*k]))THEN WO&#91;j-k](l OR NOT S.Q);END_IF; </pre></div> <p>The source code should be formatted in such a way that the sequence is better recognised. Also, the identifiers for variables and functions should be chosen in such a way that their meaning is easier to understand.</p> <p><strong>Unnecessary source code</strong></p> <p>Source code that does not help to improve readability also violates the KISS principle:</p> <div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate"> bCalc := F_CalcFoo(); IF (bCalc = TRUE) THEN bResult := TRUE; ELSE bResult := FALSE; END_IF </pre></div> <p>Although the source code is well structured and the identifiers have been chosen so that their meaning is easier to recognise, the source code can be significantly reduced:</p> <div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate"> bResult := F_CalcFoo(); </pre></div> <p>This one line is much easier to understand than the 6 lines before. The source code is „simpler‟, with the same range of functions.</p> <p><strong>Software design / software architecture</strong></p> <p>The design or structure of software can also violate the KISS principle. If, for example, a complete SQL database is used to store configuration data, although a text file would suffice, the KISS principle is also violated.</p> <p>The division of a PLC programme into several CPU cores only makes sense if it also produces a practical benefit. In this case, appropriate mechanisms must be built into a PLC program to synchronise access to shared resources. These increase the complexity of the system considerably and should only be used if the application requires them.</p> <p>I have deliberately placed the chapters on the KISS principle and the YAGNI principle at the end. From here, I would like to take a brief look back at the beginning of the series on the SOLID principles.</p> <p>When introducing the SOLID principles, I occasionally pointed out the danger of overengineering. Abstractions should only be provided if they are necessary for the implementation of features.</p> <p>To clarify this, I will use the example for the explanation of the SOLID principles again (see: <a href="https://stefanhenneken.net/2022/02/09/iec-61131-3-solid-the-dependency-inversion-principle/" target="_blank" rel="noreferrer noopener">IEC 61131-3: SOLID – The Dependency Inversion Principle</a>).</p> <figure class="wp-block-image size-full is-resized"><a href="https://stefanhenneken.files.wordpress.com/2023/11/pic04.png"><img data-attachment-id="2596" data-permalink="https://stefanhenneken.net/2023/12/16/iec-61131-3-die-prinzipien-kiss-dry-lod-und-yagni/pic04-8/" data-orig-file="https://stefanhenneken.files.wordpress.com/2023/11/pic04.png" data-orig-size="569,965" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Pic04" data-image-description="" data-image-caption="" data-medium-file="https://stefanhenneken.files.wordpress.com/2023/11/pic04.png?w=177" data-large-file="https://stefanhenneken.files.wordpress.com/2023/11/pic04.png?w=569" src="https://stefanhenneken.files.wordpress.com/2023/11/pic04.png" alt="" class="wp-image-2596" style="width:420px" /></a></figure> <p>There is a fixed dependency between the three lamp types and the controller. If the application is to be extended by another lamp type, it is necessary to adapt the programme at various points. By applying the <a href="https://stefanhenneken.net/2022/02/09/iec-61131-3-solid-the-dependency-inversion-principle/" target="_blank" rel="noreferrer noopener">Dependency Inversion Principle (DIP)</a> and the <a href="https://stefanhenneken.net/2022/03/10/iec-61131-3-solid-the-single-responsibility-principle" target="_blank" rel="noreferrer noopener">Single Responsibility Principle (SRP)</a>, the programme became much more flexible. The integration of additional lamp types has been significantly simplified. However, the complexity of the programme was also significantly increased by these adjustments, as the UML diagram shows:</p> <figure class="wp-block-image size-large is-resized"><a href="https://stefanhenneken.files.wordpress.com/2023/11/pic05.png"><img loading="lazy" width="542" height="1023" data-attachment-id="2600" data-permalink="https://stefanhenneken.net/2023/12/16/iec-61131-3-die-prinzipien-kiss-dry-lod-und-yagni/pic05-8/" data-orig-file="https://stefanhenneken.files.wordpress.com/2023/11/pic05.png" data-orig-size="656,1239" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Pic05" data-image-description="" data-image-caption="" data-medium-file="https://stefanhenneken.files.wordpress.com/2023/11/pic05.png?w=159" data-large-file="https://stefanhenneken.files.wordpress.com/2023/11/pic05.png?w=542" src="https://stefanhenneken.files.wordpress.com/2023/11/pic05.png?w=542" alt="" class="wp-image-2600" style="width:440px" srcset="https://stefanhenneken.files.wordpress.com/2023/11/pic05.png?w=542 542w, https://stefanhenneken.files.wordpress.com/2023/11/pic05.png?w=79 79w, https://stefanhenneken.files.wordpress.com/2023/11/pic05.png?w=159 159w, https://stefanhenneken.files.wordpress.com/2023/11/pic05.png 656w" sizes="(max-width: 542px) 85vw, 542px" /></a><figcaption class="wp-element-caption"><em>(abstract elements are displayed in italics)</em></figcaption></figure> <p>Before additional levels of abstraction are realised by applying the SOLID principles, one should always critically question the extra effort involved.</p> <p>The structure of the first variant is completely sufficient if the program is used exclusively in a project to this extent. The program is small enough to understand the structure of the software and to make small adjustments. The KISS principle was followed. No more complexity than necessary has been built in.</p> <p>However, if the first variant is only an intermediate step, e.g. in the development of a comprehensive light management system, it is to be expected that the application will increase in complexity. It is also possible that at a later stage the development will have to be distributed among several people. The use of unit tests is another point that justifies the implementation of SOLID principles. Without decoupling the individual lamp types through interfaces, the use of unit tests is difficult or even impossible. Here, too, the KISS principle is not violated. The KISS principle must therefore always be considered in context.</p> <h1 class="wp-block-heading">You Ain’t Gonna Need It (YAGNI)</h1> <p>YAGNI stands for <em>You Ain&#8217;t Gonna Need It</em> and also means <em>You will not need it</em>. It means that in software development you should only implement the features that are needed. No functions or features should be implemented, which might be needed someday.</p> <p>In contrast to the KISS principle, which always focuses on the non-functional requirements, the YAGNI principle focuses on the functional requirements.</p> <p>When developing software, it can be tempting to implement additional features without a concrete requirement. This can be the case, for example, if features are implemented during development without consulting the customer, in the firm belief that the customer will demand them later.</p> <p>Referring to our example above, the YAGNI principle would be violated if the operating hours recording were implemented (see: <a href="https://stefanhenneken.net/2023/02/25/iec-61131-3-solid-the-interface-segregation-principle/" target="_blank" rel="noreferrer noopener">IEC 61131-3: SOLID – The Interface Segregation Principle</a>), although this was not requested by the customer.</p> <p>If it is determined during development that a particular feature could be useful, it should only be implemented after consultation with the customer. Otherwise, a system will gradually receive more and more source code for features that no one needs.</p> <p>This example makes it clear once again that all the principles described so far are not fixed rules or even laws. However, the principles are a powerful tool for improving the code quality of software.</p> <img src="https://vg09.met.vgwort.de/na/d2bb4f0b77f34e73b6a5e6eb3c015d84" width="1" height="1" alt=""> Stefan HennekenStefan Hennekenhttp://stefanhenneken.net/?p=2572https://stefanhenneken.net/2023/12/16/iec-61131-3-die-prinzipien-kiss-dry-lod-und-yagni/Stefan HennekenIEC 61131-3: Die Prinzipien KISS, DRY, LoD und YAGNIIn den vorherigen Posts wurden die 5 SOLID-Prinzipien vorgestellt. Neben den SOLID-Prinzipien gibt es noch weitere Prinzipien, von denen ich einige ebenfalls kurz vorgestellen möchte. All diese Prinzipen haben das gemeinsame Ziel, die Wartbarkeit und die Wiederverwendbarkeit von Software zu verbessern. Don’t Repeat Yourself (DRY) Das DRY-Prinzip besagt (wie der Name schon vermuten lässt), dass &#8230; <a href="https://stefanhenneken.net/2023/12/16/iec-61131-3-die-prinzipien-kiss-dry-lod-und-yagni/" class="more-link">Continue reading<span class="screen-reader-text"> "IEC 61131-3: Die Prinzipien KISS, DRY, LoD und&#160;YAGNI"</span></a>Sat, 16 Dec 2023 09:07:23 ZStefan Henneken <p>In den vorherigen Posts wurden die 5 SOLID-Prinzipien vorgestellt. Neben den SOLID-Prinzipien gibt es noch weitere Prinzipien, von denen ich einige ebenfalls kurz vorgestellen möchte. All diese Prinzipen haben das gemeinsame Ziel, die Wartbarkeit und die Wiederverwendbarkeit von Software zu verbessern.</p> <span id="more-2572"></span> <h1 class="wp-block-heading">Don’t Repeat Yourself (DRY)</h1> <p>Das DRY-Prinzip besagt (wie der Name schon vermuten lässt), dass man Programmcode nicht unnötig duplizieren sollte. Stattdessen sollte eine Funktion nur einmal implementiert und an gewünschten Stellen im Programm aufgerufen werden.</p> <p>Das DRY-Prinzip kann helfen, die Wartbarkeit von Code zu verbessern, da es einfacher wird, Änderungen an einer Funktion vorzunehmen, wenn sie nur an einer Stelle im Programmcode implementiert wurde. Außerdem kann das DRY-Prinzip dazu beitragen, Fehler im Programm zu reduzieren, da duplizierter Code oft zu unerwarteten Verhaltensweisen führt, wenn eine Änderung nur an einer der duplizierten Stellen vorgenommen wird. Somit ist das DRY-Prinzip ein wichtiger Grundsatz in der Softwareentwicklung, welcher zur Verbesserung der Codequalität beitragen kann.</p> <p>Obwohl das DRY-Prinzip einfach zu verstehen und umzusetzen ist, ist es wahrscheinlich das am meisten missachtete Prinzip. Denn nichts ist einfacher, als Quellcode durch Copy &amp; Paste zu wiederholen. Gerade dann, wenn der Zeitdruck besonders hoch ist. Deshalb sollte man sich immer bemühen, gemeinsam genutzte Funktionen in separate Module zu implementieren.</p> <p>Das folgende kurze Beispiel zeigt die Anwendung des DRY-Prinzips. Ein SPS-Programm erhält von mehreren Sensoren unterschiedliche Temperaturwerte. Alle Temperaturwerte sollen in einem HMI angezeigt und in eine Log-Datei geschrieben werden. Damit die Temperaturwerte besser lesbar sind, soll die Formatierung in der SPS erfolgen:</p> <div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate"> FUNCTION F_DisplayTemperature : STRING VAR_INPUT fSensorValue : LREAL; bFahrenheit : BOOL; END_VAR IF (fSensorValue &gt; 0) THEN IF (bFahrenheit) THEN F_DisplayTemperature := CONCAT('Temperature: ', REAL_TO_FMTSTR(fSensorValue, 1, TRUE)); F_DisplayTemperature := CONCAT(F_DisplayTemperature, ' °C'); ELSE F_DisplayTemperature := CONCAT('Temperature: ', REAL_TO_FMTSTR(fSensorValue * 1.8 + 32, 1, TRUE)); F_DisplayTemperature := CONCAT(F_DisplayTemperature, ' °F'); END_IF ELSE F_DisplayTemperature := 'No sensor data available'; END_IF </pre></div> <p>In diesem Beispiel wird die Funktion <font face="Courier New">F_DisplayTemperature()</font> nur einmal implementiert. Für die Formatierung der Temperaturwerte wird diese Funktion an den gewünschten Stellen im Programm aufgerufen. Durch das Vermeiden von dupliziertem Code wird das Programm übersichtlicher und einfacher zu lesen. Ist es z.B. notwendig die Anzahl der Nachkommerstellen zu verändern, so muss dieses nur an einer Stelle, nämlich in der Funktion <font face="Courier New">F_DisplayTemperature()</font>, erfolgen.</p> <p>Neben den Einsatz von Funktionen kann auch die Vererbung helfen das DRY-Prinzip einzuhalten, indem eine Funktionalität in einen Basis-FB verlagert und von allen abgeleiteten FBs verwendet wird.</p> <p>Es kann aber Fälle geben, in denen das DRY-Prinzip bewusst verletzt werden sollte. Dieses ist immer dann der Fall, wenn sich durch den Einsatz von DRY die Lesbarkeit des Quellcode verschlechtert. So ist für die Kreisberechnung die Formel für den Umfang (U=2rπ) oder für die Fläche (A=r<sup>2</sup>π) ausreichend lesbar. Eine Auslagerung in separate Funktionen erhöht nicht die Codequalität, sondern nur die Abhängigkeit zu weiteren Modulen, in denen sich die Funktionen für die Kreisberechnung befinden. Stattdessen sollte für π eine globale Konstante angelegt und in den Berechnungen verwendet werden.</p> <p>Zusammenfassend lässt sich sagen, dass das DRY-Prinzip dazu beiträgt, das Programmcode sauberer und kürzer wird, indem es die Duplizierung von Code vermeidet.</p> <h1 class="wp-block-heading">Law Of Demeter (LoD)</h1> <p>Das <em>Law of Demeter</em> ist ein weiteres Prinzip, dessen Beachtung die Kopplungen zwischen Funktionsblöcken deutlich minimieren kann. Das <em>Law of Demeter</em> legt fest, dass aus einem Funktionsblock (bzw. Methode oder Funktion) nur auf Elemente in unmittelbarer Nähe zugegriffen werden sollte. Konkret bedeutet dieses, dass nur Zugriffe auf die folgenden Elemente erlaubt sind:</p> <ul> <li>Variablen des eigenen Funktionsblocks (alles zwischen <font face="Courier New">VAR/END_VAR</font>)</li> <li>Methoden/Eigenschaften des eigenen Funktionsblocks</li> <li>Methoden/Eigenschaften der Funktionsblöcke die im eigenen Funktionsblock angelegt wurden</li> <li>Parameter die an Methoden oder Funktionsblöcke übergeben wurden (<font face="Courier New">VAR_INPUT</font>)</li> <li>Globale Konstanten oder Parameter die in einer Parameterliste enthalten sind</li> </ul> <p>Das <em>Law of Demeter</em> könnte somit auch heißen: <em>Don’t talk to strangers</em>. Als Strangers (Fremde) werden hierbei die Elemente bezeichnet, die nicht unmittelbar in dem Funktionsblock vorhanden sind. Im Gegensatz dazu, werden die eigenen Elemente Friends (Freunde) genannt.</p> <p>Auch dieses Prinzip stammt aus den 1980iger Jahren, also aus der Zeit, in der die objektorientierte Softwareentwicklung stark an Popularität zugenommen hat. Der Name <em>Demeter</em> ist auf ein gleichnamiges Softwareprojekt zurückzuführen, in dem dieses Prinzip erstmal erkannt wurde (<em>Demeter</em> ist in der griechischen Mythologie die Schwester von Zeus und die Göttin der Landwirtschaft). Ende der 1980iger Jahre wurde dieses Prinzip von Ian Holland und Karl J. Lieberherr weiter ausgearbeitet und unter dem Titel <a href="https://homepages.cwi.nl/~storm/teaching/reader/LieberherrHolland89.pdf" target="_blank" rel="noreferrer noopener">Assuring Good Style for Object-Oriented Programs</a> veröffentlicht.</p> <p>Die folgende Grafik soll das <em>Law of Demeter</em> etwas genauer verdeutlichen:</p> <figure class="wp-block-image size-large is-resized"><a href="https://stefanhenneken.files.wordpress.com/2023/11/pic01.png"><img loading="lazy" width="729" height="420" data-attachment-id="2581" data-permalink="https://stefanhenneken.net/2023/12/16/iec-61131-3-die-prinzipien-kiss-dry-lod-und-yagni/pic01-8/" data-orig-file="https://stefanhenneken.files.wordpress.com/2023/11/pic01.png" data-orig-size="729,420" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="pic01" data-image-description="" data-image-caption="" data-medium-file="https://stefanhenneken.files.wordpress.com/2023/11/pic01.png?w=300" data-large-file="https://stefanhenneken.files.wordpress.com/2023/11/pic01.png?w=729" src="https://stefanhenneken.files.wordpress.com/2023/11/pic01.png?w=729" alt="" class="wp-image-2581" style="width:470px" srcset="https://stefanhenneken.files.wordpress.com/2023/11/pic01.png 729w, https://stefanhenneken.files.wordpress.com/2023/11/pic01.png?w=150 150w, https://stefanhenneken.files.wordpress.com/2023/11/pic01.png?w=300 300w" sizes="(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px" /></a></figure> <p>In <font face="Courier New">FB_A</font> ist eine Instanz von <font face="Courier New">FB_B</font> (<font face="Courier New">fbB</font>) enthalten. Deshalb kann <font face="Courier New">FB_A</font> direkt auf die Methoden und Eigenschaften von <font face="Courier New">FB_B</font> zugreifen.</p> <p><font face="Courier New">FB_B</font> enthält eine Instanz von <font face="Courier New">FB_C</font>. Deshalb kann <font face="Courier New">FB_B</font> direkt auf <font face="Courier New">FB_C</font> zugreifen.</p> <p><font face="Courier New">FB_B</font> könnte eine Eigenschaft oder eine Methode anbieten, welche die Referenz auf <font face="Courier New">FB_C</font> zurückgibt (<font face="Courier New">refC</font>). Ein Zugriff aus <font face="Courier New">FB_A</font> auf die Instanz von <font face="Courier New">FB_C</font> über <font face="Courier New">FB_B</font> wäre somit theoretisch möglich:</p> <div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate"> nValue := fbB.refC.nValue; </pre></div> <p>Die Instanz auf <font face="Courier New">FB_C</font> wird in <font face="Courier New">FB_B</font> angelegt. Wenn <font face="Courier New">FB_A</font> auf diese Instanz direkt zugreift, entsteht eine feste Kopplung zwischen <font face="Courier New">FB_A</font> und <font face="Courier New">FB_C</font>. Diese feste Kopplung kann zu Problemen bei der Pflege, Wartung und dem Testen des Programms führen. Wird <font face="Courier New">FB_A</font> getestet, so muss nicht nur <font face="Courier New">FB_B</font> vorhanden sein, sondern auch <font face="Courier New">FB_C</font>. Ein häufiges Verletzen des <em>Law of Demeter</em> ist somit auch hilfreich bei der Früherkennung von Wartungsproblemen.</p> <p>Auch das Anlegen einer entsprechenden lokalen Variablen, in der die Referenz auf <font face="Courier New">FB_C</font> abgelegt wird, löst das eigentliche Problem nicht:</p> <div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate"> refC : REFERENCE TO FB_C; refC REF= fbB.refC; nValue := refC.nValue; </pre></div> <p>Auf dem ersten Blick sind diese Abhängigkeiten nicht immer zu erkennen, da der Zugriff auf <font face="Courier New">FB_C</font> indirekt über <font face="Courier New">FB_B</font> erfolgt.</p> <h2 class="wp-block-heading">Beispiel</h2> <p>Hierzu ein konkretes Beispiel, welches das Problem nochmal verdeutlicht und auch einen Lösungsansatz anbietet.</p> <p>Mit den Funktionsblöcken <font face="Courier New">FB_Building</font>, <font face="Courier New">FB_Floor</font>, <font face="Courier New">FB_Room</font> und <font face="Courier New">FB_Lamp</font> wird die Struktur eines Gebäudes und dessen Beleuchtung abgebildet. Das Gebäude besteht aus 5 Etagen, in der sich jeweils 20 Räume befinden und jeder Raum enthält 10 Lampen.</p> <p>In jedem Funktionsblock sind die entsprechenden Instanzen der darunterliegenden Elemente enthalten. Die Funktionsblöcke stellen jeweils eine Eigenschaft zur Verfügung, welche eine Referenz auf diese Elemente anbietet. <font face="Courier New">FB_Lamp</font> enthält die Eigenschaft <font face="Courier New">nPowerConsumption</font>, über der die aktuelle Leistungsaufnahme der Lampe ausgegeben wird.</p> <figure class="wp-block-image is-resized"><a href="https://stefanhenneken.files.wordpress.com/2023/11/pic02.png"><img loading="lazy" width="705" height="759" data-attachment-id="2585" data-permalink="https://stefanhenneken.net/2023/12/16/iec-61131-3-die-prinzipien-kiss-dry-lod-und-yagni/pic02-8/" data-orig-file="https://stefanhenneken.files.wordpress.com/2023/11/pic02.png" data-orig-size="705,759" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="pic02" data-image-description="" data-image-caption="" data-medium-file="https://stefanhenneken.files.wordpress.com/2023/11/pic02.png?w=279" data-large-file="https://stefanhenneken.files.wordpress.com/2023/11/pic02.png?w=705" src="https://stefanhenneken.files.wordpress.com/2023/11/pic02.png?w=705" alt="" class="wp-image-2585" style="width:440px" srcset="https://stefanhenneken.files.wordpress.com/2023/11/pic02.png 705w, https://stefanhenneken.files.wordpress.com/2023/11/pic02.png?w=139 139w, https://stefanhenneken.files.wordpress.com/2023/11/pic02.png?w=279 279w" sizes="(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px" /></a></figure> <p>Es soll eine Funktion entwickelt werden, welche die Leistungsaufnahme aller Lampen in dem Gebäude ermittelt.</p> <p>Ein Lösungsansatz könnte darin bestehen, dass über mehrere verschachtelte Schleifen auf jede einzelne Lampe zugegriffen und die Leistungsaufnahme addiert wird:</p> <div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate"> FUNCTION F_CalcPowerConsumption : UDINT VAR_INPUT refBuilding : REFERENCE TO FB_Building; END_VAR VAR nFloor, nRoom, nLamp : INT; END_VAR IF (NOT __ISVALIDREF(refBuilding)) THEN F_CalcPowerConsumption := 0; RETURN; END_IF FOR nFloor := 1 TO 5 DO FOR nRoom := 1 TO 20 DO FOR nLamp := 1 TO 10 DO F_CalcPowerConsumption := F_CalcPowerConsumption + refBuilding .refFloors&#91;nFloor] .refRooms&#91;nRoom] .refLamps&#91;nLamp].nPowerConsumption; END_FOR END_FOR END_FOR </pre></div> <p>Das „Eintauchen‟ in die Objektstruktur bis hinunter zu jeder Lampe wirkt schon irgendwie beeindruckend. Doch dadurch ist die Funktion abhängig von allen Funktionsblöcken, auch von denen, die nur indirekt über eine Referenz angesprochen werden.</p> <p>Der Zugriff von <font face="Courier New">refBuilding</font> auf <font face="Courier New">refFloors</font> verstößt nicht gegen das <em>Law of Demeter</em>, da <font face="Courier New">refFloors</font> eine direkte Eigenschaft von <font face="Courier New">FB_Building</font> ist. Alle weiteren Zugriffe auf die Referenzen haben aber zur Folge, dass unsere Funktion auch von den anderen Funktionsblöcken abhängig wird.</p> <p>Ändert sich z.B. die Struktur von <font face="Courier New">FB_Room</font> oder <font face="Courier New">FB_Floor</font>, so muss evtl. auch die Funktion zur Leistungsaufnahme angepasst werden.</p> <p>Um das <em>Law of Demeter</em> einzuhalten, könnte jeder Funktionsblock eine Methode anbieten (<font face="Courier New">CalcPowerConsumption()</font>), in welcher die Leistungsaufnahme berechnet wird. In jeder dieser Methoden, wird wiederrum die darunter liegende Methode <font face="Courier New">CalcPowerConsumption()</font> aufgerufen:</p> <figure class="wp-block-image size-large is-resized"><a href="https://stefanhenneken.files.wordpress.com/2023/11/pic03.png"><img loading="lazy" width="705" height="893" data-attachment-id="2595" data-permalink="https://stefanhenneken.net/2023/12/16/iec-61131-3-die-prinzipien-kiss-dry-lod-und-yagni/pic03-8/" data-orig-file="https://stefanhenneken.files.wordpress.com/2023/11/pic03.png" data-orig-size="705,893" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="pic03" data-image-description="" data-image-caption="" data-medium-file="https://stefanhenneken.files.wordpress.com/2023/11/pic03.png?w=237" data-large-file="https://stefanhenneken.files.wordpress.com/2023/11/pic03.png?w=705" src="https://stefanhenneken.files.wordpress.com/2023/11/pic03.png?w=705" alt="" class="wp-image-2595" style="width:440px" srcset="https://stefanhenneken.files.wordpress.com/2023/11/pic03.png 705w, https://stefanhenneken.files.wordpress.com/2023/11/pic03.png?w=118 118w, https://stefanhenneken.files.wordpress.com/2023/11/pic03.png?w=237 237w" sizes="(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px" /></a></figure> <p>Die Methode <font face="Courier New">CalcPowerConsumption()</font> in <font face="Courier New">FB_Building</font> greift nur auf die eigenen Elemente zu. In diesem Fall auf die Eigenschaft <font face="Courier New">refFloors</font>, um darüber die Methode <font face="Courier New">CalcPowerConsumption()</font> von <font face="Courier New">FB_Floor</font> aufzurufen:</p> <div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate"> METHOD CalcPowerConsumption : UDINT VAR nFloor : INT; END_VAR FOR nFloor := 1 TO 5 DO CalcPowerConsumption := CalcPowerConsumption + refFloors&#91;nFloor].CalcPowerConsumption(); END_FOR </pre></div> <p>In <font face="Courier New">CalcPowerConsumption()</font> von <font face="Courier New">FB_Floor</font> wird wiederrum nur auf <font face="Courier New">FB_Room</font> zugegriffen:</p> <div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate"> METHOD CalcPowerConsumption : UDINT VAR nRoom : INT; END_VAR FOR nRoom := 1 TO 20 DO CalcPowerConsumption := CalcPowerConsumption + refRooms&#91;nRoom].CalcPowerConsumption(); END_FOR </pre></div> <p>Zuletzt wird in <font face="Courier New">FB_Room</font> die Leistungsaufnahme aller Lampen in dem Raum berechnet:</p> <div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate"> METHOD CalcPowerConsumption : UDINT VAR nLamp : INT; END_VAR FOR nLamp := 1 TO 10 DO CalcPowerConsumption := CalcPowerConsumption + refLamps&#91;nLamp].nPowerConsumption; END_FOR </pre></div> <p>Der Aufbau der Funktion <font face="Courier New">F_CalcPowerConsumption()</font> gestaltet sich dadurch deutlich einfacher:</p> <div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate"> FUNCTION F_CalcPowerConsumption : UDINT VAR_INPUT refBuilding : REFERENCE TO FB_Building; END_VAR IF (NOT __ISVALIDREF(refBuilding)) THEN F_CalcPowerConsumption := 0; RETURN; END_IF F_CalcPowerConsumption := refBuilding.CalcPowerConsumption(); </pre></div> <p><font face="Courier New">F_CalcPowerConsumption()</font> ist nach dieser Anpassung nur noch abhängig von <font face="Courier New">FB_Building</font> und dessen Methode <font face="Courier New">CalcPowerConsumption()</font>. Wie <font face="Courier New">FB_Building</font> in <font face="Courier New">CalcPowerConsumption()</font> die Leistungsaufnahme berechnet, ist für <font face="Courier New">F_CalcPowerConsumption()</font> ohne Bedeutung. Der Aufbau von <font face="Courier New">FB_Room</font> oder <font face="Courier New">FB_Floor</font> könnte sich komplett ändern, <font face="Courier New">F_CalcPowerConsumption()</font> müsste nicht angepasst werden.</p> <p>Die erste Variante, in der durch alle Funktionsblöcke iteriert wurde, ist sehr anfällig gegenüber Änderungen. Egal bei welchem Funktionsblock sich der Aufbau ändert, eine Anpassung von <font face="Courier New">F_CalcPowerConsumption()</font> wäre jedes Mal notwendig.</p> <p><a href="https://github.com/StefanHenneken/Blog-2023-06-IEC61131-LoD-Sample01" target="_blank" rel="noreferrer noopener">Beispiel 1 (TwinCAT 3.1.4024) auf GitHub</a></p> <p>Allerdings ist zu berücksichtigen, dass verschachtelte Strukturen durchaus Sinn ergeben. Hier muss das <em>Law of Demeter</em> nicht anwendet werden. So kann es hilfreich sein, die Konfigurationsdaten über mehrere Strukturen hierarchisch zu verteilen, um so die Lesbarkeit zu erhöhen.</p> <h1 class="wp-block-heading">Keep It Simple, Stupid (KISS)</h1> <p>Das KISS-Prinzip besagt, dass Code so „simple‟ wie möglich sein sollte, damit dieser möglichst einfach zu verstehen und somit effektiv zu warten ist. Hierbei sollte „simple‟ mit „schlicht‟ übersetzt werden. Damit ist eine Schlichtheit gemeint, die versucht Unnötiges wegzulassen aber weiterhin die Anforderungen des Kunden zu erfüllen. Durch die Beachtung des KISS-Prinzips wird ein System:</p> <ul> <li>einfach zu verstehen</li> <li>einfach zu erweitern</li> <li>einfach zu pflegen</li> </ul> <p>Besteht die Anforderung darin zehn Millionen Datensätze zu sortieren, so wäre die Verwendung des Bubblesort-Algorithmus zwar einfach in der Umsetzung, doch wird die geringe Geschwindigkeit des Algorithmus nicht den Anforderungen des Kunden entsprechen. Es muss also immer eine Lösung gefunden werden, die den geforderten Erwartungen des Kunden entspricht und deren Umsetzung aber möglichst einfach (schlicht) ist.</p> <p>Grundsätzlich sind zwei Arten von Anforderungen zu unterscheiden:</p> <p><strong>Funktionale Anforderung:</strong> Der Kunde bzw. Stakeholder fordert ein bestimmtes Leistungsmerkmal. Gemeinsam mit dem Kunden werden dann die genauen Anforderungen für dieses Leistungsmerkmal festgelegt und erst danach wird dieses implementiert. Funktionale Anforderungen erweitern eine Anwendung um eindeutige, von dem Kunden gewünschte, Funktionen (Leistungsmerkmale).</p> <p><strong>Nicht funktionale Anforderungen:</strong> Eine nicht funktionale Anforderung ist z.B. das Aufteilen einer Anwendung auf verschiedene Module oder das Vorsehen von Schnittstellen, um z.B. Unit-Tests zu ermöglichen. Nicht funktionale Anforderungen sind Leistungsmerkmale, die für den Kunden nicht unbedingt sichtbar sind. Diese können aber notwendig sein, damit das Softwaresystem gepflegt und gewartet werden kann.</p> <p>Bei dem KISS-Prinzip geht es immer um die <strong>nicht funktionalen Anforderungen</strong>. Das „Wie‟ steht im Mittelpunkt. Also die Frage, wie die geforderten Funktionen erreicht werden. Das YAGNI-Prinzip, welches im folgenden Kapitel beschrieben wird, bezieht sich auf die <strong>funktionalen Anforderungen</strong>. Hier steht das „Was‟ im Mittelpunkt.</p> <p>Das KISS-Prinzip kann auf mehrere Ebene angewendet werden:</p> <p><strong>Formatierung Quellcode</strong></p> <p>Der folgende Quellcode ist zwar sehr kompakt, doch wird hier das KISS-Prinzip verletzt, da dieser nur schwer zu verstehen und somit sehr fehleranfällig ist:</p> <div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate"> IF(x&lt;=RT&#91;k-1](o&#91;n+2*j]))THEN WT&#91;j+k](l AND NOT S.Q);END_IF; IF(x&gt;RI&#91;k+1](o&#91;n+2*k]))THEN WO&#91;j-k](l OR NOT S.Q);END_IF; </pre></div> <p>Der Quellcode sollte so formatiert werden, dass der Ablauf besser erkannt wird. Auch sollten die Bezeichner für Variablen und Funktionen so gewählt werden, dass deren Bedeutung leichter zu verstehen ist.</p> <p><strong>Unnötiger Quellcode</strong></p> <p>Quellcode, der nicht dazu beiträgt, die Lesbarkeit zu verbessern, verletzt ebenfalls gegen das KISS-Prinzip:</p> <div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate"> bCalc := F_CalcFoo(); IF (bCalc = TRUE) THEN bResult := TRUE; ELSE bResult := FALSE; END_IF </pre></div> <p>Der Quellcode ist zwar gut strukturiert, auch wurden die Bezeichner so gewählt damit die Bedeutung leichter zu erkennen ist, doch kann der Quellcode deutlich reduziert werden:</p> <div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate"> bResult := F_CalcFoo(); </pre></div> <p>Diese eine Zeile ist deutlich einfacher zu verstehen, wie die 6 Zeilen zuvor. Der Quellcode ist „schlichter‟, bei gleichem Funktionsumfang.</p> <p><strong>Softwaredesign / Softwarearchitektur</strong></p> <p>Auch das Design oder die Struktur einer Software kann gegen das KISS-Prinzip verstoßen. Wird z.B. für das Abspeichern von Konfigurationsdaten eine komplette SQL-Datenbank eingesetzt, obwohl eine Textdatei ausreichen würde, so wird ebenfalls das KISS-Prinzip verletzt.</p> <p>Das Aufteilen eines SPS-Programms auf mehrere CPU-Cores ist nur dann sinnvoll, wenn es auch einen praktischen Nutzen hervorbringt. In einem SPS-Programm müssen in diesem Fall entsprechende Mechanismen eingebaut werden, um den Zugriff auf gemeinsame Ressourcen zu synchronisieren. Diese erhöhen die Komplexität des Systems erheblich und sollten nur dann zum Einsatz kommen, wenn die Anwendung dieses auch erfordert.</p> <p>Ganz bewusst habe ich die Kapitel zu dem KISS-Prinzip und zu dem YAGNI-Prinzip an das Ende gesetzt. Von hier aus möchte ich nochmal einen kurzen Rückblick auf den Anfang der Serie über die SOLID-Prinzipien werfen.</p> <p>Bei der Vorstellung der SOLID-Prinzipien habe ich gelegentlich auf die Gefahr des Overengineering hingewiesen. Abstraktionen sollten nur dann vorgesehen werden, wenn diese für die Umsetzung von Features notwendig sind.</p> <p>Um dieses zu verdeutlichen, will ich das Beispiel für die Erklärung der SOLID-Prinzipien noch einmal verwenden (siehe: <a href="https://stefanhenneken.net/2021/10/23/iec-61131-3-solid-das-dependency-inversion-principle/" target="_blank" rel="noreferrer noopener">IEC 61131-3: SOLID – Das Dependency Inversion Principle</a>).</p> <figure class="wp-block-image size-full is-resized"><a href="https://stefanhenneken.files.wordpress.com/2023/11/pic04.png"><img data-attachment-id="2596" data-permalink="https://stefanhenneken.net/2023/12/16/iec-61131-3-die-prinzipien-kiss-dry-lod-und-yagni/pic04-8/" data-orig-file="https://stefanhenneken.files.wordpress.com/2023/11/pic04.png" data-orig-size="569,965" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Pic04" data-image-description="" data-image-caption="" data-medium-file="https://stefanhenneken.files.wordpress.com/2023/11/pic04.png?w=177" data-large-file="https://stefanhenneken.files.wordpress.com/2023/11/pic04.png?w=569" src="https://stefanhenneken.files.wordpress.com/2023/11/pic04.png" alt="" class="wp-image-2596" style="width:420px" /></a></figure> <p>Zwischen den drei Lampentypen und dem Controller besteht eine feste Abhängigkeit. Soll die Anwendung um einen weiteren Lampentyp erweitert werden, so ist es notwendig das Programm an verschiedenen Stellen anzupassen. Durch das Anwenden des <a href="https://stefanhenneken.net/2021/10/23/iec-61131-3-solid-das-dependency-inversion-principle/" target="_blank" rel="noreferrer noopener">Dependency Inversion Principle (DIP)</a> und des <a href="https://stefanhenneken.net/2022/02/20/iec-61131-3-solid-das-single-responsibility-principle/" target="_blank" rel="noreferrer noopener">Single Responsibility Principle (SRP)</a> wurde das Programm deutlich flexibler. Das Integrieren von zusätzlichen Lampentypen wurde dadurch signifikant vereinfacht. Aber auch die Komplexität des Programms wurde durch diese Anpassungen deutlich größer, wie das UML-Diagramm zeigt:</p> <figure class="wp-block-image size-large is-resized"><a href="https://stefanhenneken.files.wordpress.com/2023/11/pic05.png"><img loading="lazy" width="542" height="1023" data-attachment-id="2600" data-permalink="https://stefanhenneken.net/2023/12/16/iec-61131-3-die-prinzipien-kiss-dry-lod-und-yagni/pic05-8/" data-orig-file="https://stefanhenneken.files.wordpress.com/2023/11/pic05.png" data-orig-size="656,1239" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Pic05" data-image-description="" data-image-caption="" data-medium-file="https://stefanhenneken.files.wordpress.com/2023/11/pic05.png?w=159" data-large-file="https://stefanhenneken.files.wordpress.com/2023/11/pic05.png?w=542" src="https://stefanhenneken.files.wordpress.com/2023/11/pic05.png?w=542" alt="" class="wp-image-2600" style="width:440px" srcset="https://stefanhenneken.files.wordpress.com/2023/11/pic05.png?w=542 542w, https://stefanhenneken.files.wordpress.com/2023/11/pic05.png?w=79 79w, https://stefanhenneken.files.wordpress.com/2023/11/pic05.png?w=159 159w, https://stefanhenneken.files.wordpress.com/2023/11/pic05.png 656w" sizes="(max-width: 542px) 85vw, 542px" /></a><figcaption class="wp-element-caption"><em>(abstrakte Elemente werden in kursiver Schriftart dargestellt)</em></figcaption></figure> <p>Bevor zusätzliche Abstraktionsebenen durch die Anwendung der SOLID-Prinzipien realisiert werden, sollte man den Mehraufwand immer kritisch hinterfragen. </p> <p>Die erste Variante ist vom Aufbau vollkommen ausreichend, wenn das Programm in diesem Umfang ausschließlich in einem Projekt eingesetzt wird. Das Programm ist klein genug, um den Aufbau der Software zu verstehen und um kleine Anpassungen vorzunehmen. Das KISS-Prinzip wurde befolgt. Es wurde nicht mehr Komplexität als notwendig eingebaut.</p> <p>Ist die erste Variante allerdings nur ein Zwischenschritt, z.B. bei der Entwicklung eines umfangreichen Lichtmanagementsystem, so ist damit zu rechnen, dass die Anwendung an Komplexität noch zunehmen wird. Auch ist es möglich, dass zu einem späteren Zeitpunkt die Entwicklung auf mehrere Personen verteilt werden muss. Der Einsatz von Unit-Tests ist ein weiterer Punkt, der die Umsetzung der SOLID-Prinzipien rechtfertigt. Ohne die Entkopplung der einzelnen Lampentypen durch Schnittstellen, ist der Einsatz von Unit-Tests nur schwer bzw. gar nicht möglich. Auch hier wird das KISS-Prinzip nicht verletzt. Das KISS-Prinzip muss somit immer im Kontext betrachtet werden.</p> <h1 class="wp-block-heading">You Ain’t Gonna Need It (YAGNI)</h1> <p>YAGNI steht für <em>You Ain&#8217;t Gonna Need It</em> und bedeutet frei übersetzt <em>Du wirst es nicht brauchen</em>. Es besagt, dass man in der Softwareentwicklung nur die Leistungsmerkmale realisieren sollte, die benötigt werden. Es sollen keine Funktionen oder Features implementiert werden, die vielleicht irgendwann einmal gebraucht werden könnten.</p> <p>Im Gegensatz zu dem KISS-Prinzip, bei dem es immer um die nicht funktionalen Anforderungen geht, liegt der Fokus bei dem YAGNI-Prinzip auf den funktionalen Anforderungen.</p> <p>Bei der Entwicklung von Software kann die Versuchung groß sein, zusätzliche Leistungsmerkmale ohne konkrete Anforderung zu implementieren. Das kann z.B. dann der Fall sein, wenn während der Entwicklung Leistungsmerkmale ohne Absprache mit dem Kunden implementiert werden, in dem festen Glauben, dass der Kunde diese später noch fordern wird.</p> <p>Bezogen auf unser obiges Beispiel, wird das YAGNI-Prinzip dann verletzt, wenn man die Betriebsstundenerfassung implementieren würde (siehe: <a href="https://stefanhenneken.net/2022/10/01/iec-61131-3-solid-das-interface-segregation-principle/" target="_blank" rel="noreferrer noopener">IEC 61131-3: SOLID – Das Interface Segregation Principle</a>), obwohl dieses vom Kunden nicht gefordert wurde.</p> <p>Wird während der Entwicklung festgestellt, dass ein bestimmtes Leistungsmerkmal sinnvoll sein könnte, so sollte die Implementierung erst nach Absprache mit dem Kunden erfolgen. Ansonsten erhält ein System nach und nach immer mehr Quellcode für Leistungsmerkmale, die niemand benötigt.</p> <p>Durch dieses Beispiel wird noch einmal deutlich, dass alle bisher beschriebenen Prinzipien keine festen Regeln oder gar Gesetze sind. Die Prinzipien sind aber ein mächtiges Werkzeug, um die Codequalität von Software zu verbessern.</p> <img src="https://vg09.met.vgwort.de/na/93d392f39202492bae015767cf9762b3" width="1" height="1" alt=""> Stefan HennekenStefan Hennekenhttp://blog.m-ri.de/?p=1509http://blog.m-ri.de/index.php/2023/12/12/webview2-build-120-zerstoert-com-infrastruktur/Martin RichterWebView2 Build 120 zerstört COM-InfrastrukturWieder mal eine tolle Geschichte wie Kunden auf uns als Softwarehersteller sauer werden, weil Microsoft ein nicht funktionierendes Update veröffentlicht. Die Story: Effekt:Seit dem Update kann man nach dem, ein WebView2 Fenster zerstört wurde, keine COM Class Factory in unserem Programm aufrufen.Intern scheint das WebView2 CoSuspendClassObjects aufzurufen wenn das Control zerstört wird. Die Folge unser &#8230; <a href="http://blog.m-ri.de/index.php/2023/12/12/webview2-build-120-zerstoert-com-infrastruktur/" class="more-link"><span class="screen-reader-text">„WebView2 Build 120 zerstört COM-Infrastruktur“</span> weiterlesen</a>Tue, 12 Dec 2023 17:04:00 ZMartin Richter <p>Wieder mal eine tolle Geschichte wie Kunden auf uns als Softwarehersteller sauer werden, weil Microsoft ein nicht funktionierendes Update veröffentlicht.</p> <p>Die Story:</p> <ul> <li>Wir nutzen intern COM für sehr viele Objekte, um unsere eigene Software via VB-Script zu steuern.</li> <li>Wir haben auch die Möglichkeit Controls vom Typ <em>WebView2</em> anzulegen.</li> <li>Am 07.12. veröffentlichte Microsoft für den <em>WebView2 </em>den Build 120.</li> <li>Unsere Software benutzt im Allgemeinen <em>„Evergreen“</em>, d.h. es wird immer die aktuelle <em>WebView2 </em>ohne eigne Installation benutzt.</li> </ul> <p>Effekt:<br>Seit dem Update kann man nach dem, ein <em>WebView2 </em>Fenster zerstört wurde, keine COM Class Factory in unserem Programm aufrufen.<br>Intern scheint das <em>WebView2 CoSuspendClassObjects </em>aufzurufen wenn das Control zerstört wird. Die Folge unser <em>IMessageFilter </em>springt an und es kommt ein Dialog, der auf einen nicht reagierenden COM Server hinweist. </p> <p>Der nicht reagierende COM-Server ist unsere eigene Anwendung… <img src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f62f.png" alt="😯" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p>Toll! <img src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f625.png" alt="😥" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p>Einziger für uns möglicher Workaround für uns ist leider, die alte Version 119 auf jedem Client lokal zu installieren. Dann über einen Registry Eintrag (<em>HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\WebView2\BrowserExecutableFolder</em>) den Aufruf von der aktuellen Version umzubiegen.<br>Netterweise kann man das für jede Anwendung separat steuern.</p> <p><a href="https://github.com/MicrosoftEdge/WebView2Feedback/issues/4226">Details zum Nachlesen auf GitHub</a>.</p> <p><strong>Nachtrag: Der Bug verschwand mit dem Update 120.0.2210.77</strong> <strong>in der evergreen Version.</strong> <strong>Bei mir wurde der Fix am Montag den 18.12.2023 automatisch installiert.</strong><br> </p> <hr /><small>Copyright &copy; 2017 Martin Richter<br />Dieser Feed ist nur f&uuml;r den pers&ouml;nlichen, nicht gewerblichen Gebrauch bestimmt. Eine Verwendung dieses Feeds bzw. der hier ver&ouml;ffentlichten Beitr&auml;ge auf anderen Webseiten bedarf der ausdr&uuml;cklichen Genehmigung des Autors.<br />(Digital Fingerprint: bdafe67664ea5aacaab71f8c0a581adf)</small>Martin RichterMartin Richterhttp://blog.m-ri.de/?p=1503http://blog.m-ri.de/index.php/2023/12/09/vs-2022-rollback-deinstalliert-manche-vs-extensions/Martin RichterVS-2022 Rollback deinstalliert manche VS-ExtensionsLeidvoll musste ich erleben, dass ein Visual Studio 2022 Rollback auf die ältere vormals installierte Version leider auch einige VS-Extensions deinstalliert. Bzw. diese gehen verloren. Man sollte also einen Rollback mit Vorsicht verwenden. Er eignet sich also nicht einfach und schnell ein Problem zu umgehen. Es sind einige Nacharbeiten nötig. Copyright &#169; 2017 Martin RichterDieser &#8230; <a href="http://blog.m-ri.de/index.php/2023/12/09/vs-2022-rollback-deinstalliert-manche-vs-extensions/" class="more-link"><span class="screen-reader-text">„VS-2022 Rollback deinstalliert manche VS-Extensions“</span> weiterlesen</a>Sat, 09 Dec 2023 11:25:50 ZMartin Richter <p>Leidvoll musste ich erleben, dass ein Visual Studio 2022 Rollback auf die ältere vormals installierte Version leider auch einige VS-Extensions deinstalliert. Bzw. diese gehen verloren.</p> <p>Man sollte also einen Rollback mit Vorsicht verwenden. Er eignet sich also nicht einfach und schnell ein Problem zu umgehen. Es sind einige Nacharbeiten nötig.</p> <hr /><small>Copyright &copy; 2017 Martin Richter<br />Dieser Feed ist nur f&uuml;r den pers&ouml;nlichen, nicht gewerblichen Gebrauch bestimmt. Eine Verwendung dieses Feeds bzw. der hier ver&ouml;ffentlichten Beitr&auml;ge auf anderen Webseiten bedarf der ausdr&uuml;cklichen Genehmigung des Autors.<br />(Digital Fingerprint: bdafe67664ea5aacaab71f8c0a581adf)</small>Martin RichterMartin Richterhttp://blog.m-ri.de/?p=1492http://blog.m-ri.de/index.php/2023/12/08/vs-2022-update-zerstoert-mixed-mode-debugger-funktionen-unable-to-step-operation-not-supported-unknown-error-0x8ede0018/Martin RichterVS-2022 Update 17.8 zerstört Mixed Mode Debugger-Funktionen „Unable to step. Operation not supported. Unknown error: 0x8ede0018.“In der letzten Zeit habe ich regelmäßig die aktuellsten Visual-Studio 2022 installiert. Ich muss ehrlich sagen, dass ich seit VS-2029 nicht einmal schlechte Erfahrungen gemacht habe. Das hat sich mit dem heutigen Tag geändert 🙁 ! Nach der Installation des Updates ging keine Step-Debug-Funktion mehr (Step-In, Step-Over, Step-Out, etc.) im Mixed Mode Debugging. Native Mode &#8230; <a href="http://blog.m-ri.de/index.php/2023/12/08/vs-2022-update-zerstoert-mixed-mode-debugger-funktionen-unable-to-step-operation-not-supported-unknown-error-0x8ede0018/" class="more-link"><span class="screen-reader-text">„VS-2022 Update 17.8 zerstört Mixed Mode Debugger-Funktionen &#8222;Unable to step. Operation not supported. Unknown error: 0x8ede0018.&#8220;“</span> weiterlesen</a>Fri, 08 Dec 2023 08:32:11 ZMartin Richter <p>In der letzten Zeit habe ich regelmäßig die aktuellsten <em>Visual-Studio 2022</em> installiert. Ich muss ehrlich sagen, dass ich seit VS-2029 nicht einmal schlechte Erfahrungen gemacht habe. <br>Das hat sich mit dem heutigen Tag geändert <img src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f641.png" alt="🙁" class="wp-smiley" style="height: 1em; max-height: 1em;" /> ! </p> <p>Nach der Installation des Updates ging keine Step-Debug-Funktion mehr (Step-In, Step-Over, Step-Out, etc.) im Mixed Mode Debugging. <em>Native Mode Debugging</em> scheint zu gehen.</p> <p>Egal was man macht man bekommt den Fehler:</p> <pre class="wp-block-preformatted"><strong>Unable to step. Operation not supported. Unknown error: 0x8ede0018.</strong></pre> <p>In der <a href="https://developercommunity.visualstudio.com/t/debug-single-step-function-does-not-work/10521835">Developer Community</a> für VS ist dieser Bug auch bereits bekannt und angeblich gibt es einen Fix. Der ist aber noch nicht öffentlich.</p> <p>Leider arbeite ich an einigen C++/CLI Modulen und benötige den Mixed-Mode.</p> <p>Das erste mal habe im <em>Visual Studio Installer</em> einen Rollback versucht. Leider hat der Rollback meine Extension zum Teil deinstalliert. Mein <em>Visual Assist </em>von <em>Whole Tomato</em> war auf einmal nicht mehr vorhanden. Toll&#8230; <img src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f62f.png" alt="😯" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p><strong>Nachtrag: Das Problem ist in der Version 17.8.4 behoben, die am 10.01.2024 veröffentlicht wurde.</strong></p> <p></p> <p></p> <p></p> <p></p> <p></p> <hr /><small>Copyright &copy; 2017 Martin Richter<br />Dieser Feed ist nur f&uuml;r den pers&ouml;nlichen, nicht gewerblichen Gebrauch bestimmt. Eine Verwendung dieses Feeds bzw. der hier ver&ouml;ffentlichten Beitr&auml;ge auf anderen Webseiten bedarf der ausdr&uuml;cklichen Genehmigung des Autors.<br />(Digital Fingerprint: bdafe67664ea5aacaab71f8c0a581adf)</small>Martin RichterMartin Richterhttp://heise.de/-9535986Holger SchwichtenbergIn eigener Sache: Fachbuch zu ASP.NET Core Blazor 8.0 ist erschienenAnhand des Fallbeispiels MiracleList zeigt das neue Buch die meisten Blazor-Funktionen in einem praxisnahen Gesamtzusammenhang.Wed, 22 Nov 2023 13:17:00 +01002023-11-22T13:17:00+01:00Holger SchwichtenbergHolger SchwichtenbergHolger Schwichtenberghttps://www.developa.org/?p=2177https://www.developa.org/Frankfurt/die-top-5-ki-tools-fuer-c-entwickler/Kazim BaharDie Top 5 KI-Tools für C# EntwicklerEs gibt mittlerweile viele KI-Tools, die C#-Entwicklern bei verschiedenen Aufgaben helfen können, z.B. bei der Codegenerierung, Codevervollständigung, Dokumentation, Fehlersuche und Optimierung. Zum einen fühlt man sich beim Einsatz solcher Tools wie in einer Pair-Programming Session, sprich&#46;&#46;&#46;Sun, 05 Nov 2023 14:58:20 ZKazim BaharKazim BaharKazim Baharhttp://heise.de/-9351944Holger SchwichtenbergIn eigener Sache: C# 12.0 Crashkurs ist erschienen​Eine Neuauflage des Fachbuchs "C# Crashkurs" bezieht die Neuerungen von C# 12.0 mit ein.Thu, 02 Nov 2023 16:49:00 +01002023-11-02T16:49:00+01:00Holger SchwichtenbergHolger SchwichtenbergHolger Schwichtenberghttps://iamcodeprincess.tumblr.com/post/729724843806834688https://iamcodeprincess.tumblr.com/post/729724843806834688Manuela RinkKey Benefits of Cleaning Services<h1><a href="https://href.li/?https://www.crestviewwindowcleaning.com/professional-cleaning-services/"><span class="npf_color_niles">Key Benefits of Cleaning Services</span></a></h1><p><br/></p><p><b>Are you tired of cleaning? Discover the advantages of professional cleaning services. </b></p><p><b>Save time, effort, and enjoy a healthier environment. Don&rsquo;t miss out on the benefits of hiring a cleaning service.</b></p><ul><li><span class="npf_color_rachel"><b>Time-Saving Convenience:</b></span></li><li><span class="npf_color_rachel"><b>Enhanced Health and Hygiene<br/>Impeccable Cleaning Standa</b>rd</span>s</li><li><span class="npf_color_rachel"><b>Customized Cleaning Plans</b></span></li><li><span class="npf_color_rachel"><b>Cost-Effective Solution</b></span></li></ul><p class="npf_link" data-npf='{"type":"link","url":"https://href.li/?https://www.crestviewwindowcleaning.com/professional-cleaning-services/","display_url":"https://href.li/?https://www.crestviewwindowcleaning.com/professional-cleaning-services/","title":"10 Key Benefits of Professional Cleaning Services","description":"Transform your space with our top-tier Professional Cleaning Services. A meticulous touch for a pristine environment.","site_name":"Crestview Window Cleaning","poster":[{"media_key":"e513c60e847a2ad2f11c49447f09875c:71c86043a7bb2c23-c5","type":"image/png","width":1366,"height":768}]}'><a href="https://href.li/?https://www.crestviewwindowcleaning.com/professional-cleaning-services/" target="_blank">10 Key Benefits of Professional Cleaning Services</a></p>Thu, 28 Sep 2023 12:50:41 -0400Manuela RinkManuela RinkManuela Rinkhttps://iamcodeprincess.tumblr.com/post/729642796541181952https://iamcodeprincess.tumblr.com/post/729642796541181952Manuela RinkWhy Is It Important to Hire an Insured Gutter Cleaner?<h1><a href="https://www.crestviewwindowcleaning.com/why-is-it-important-to-hire-an-insured-gutter-cleaner/">Why Is It Important to Hire an Insured Gutter Cleaner?</a></h1><p><b>Hiring an insured gutter cleaner is crucial for home maintenance.</b><br/><b>It ensures safety and protects property and workers. </b></p><p><b>This article emphasizes the importance of hiring an insured gutter cleaner for homeowners</b></p><ul><li><b>Protection against Accidents and Liability</b></li><li><b>Safeguarding Your Property</b></li><li><b>Professionalism and Reliability</b></li><li><b>Peace of Mind</b></li></ul><p class="npf_link" data-npf='{"type":"link","url":"https://href.li/?https://www.crestviewwindowcleaning.com/why-is-it-important-to-hire-an-insured-gutter-cleaner/","display_url":"https://href.li/?https://www.crestviewwindowcleaning.com/why-is-it-important-to-hire-an-insured-gutter-cleaner/","title":"Why Is It Important to Hire an Insured Gutter Cleaner? - Crestview Window Cleaning","description":"Gutter cleaning is the process of removing debris, leaves, and other materials from your gutters to prevent clogging and water damage. It in","site_name":"Crestview Window Cleaning","poster":[{"media_key":"b3c8cd425732bedef0008ca357089243:a384d87eee105155-eb","type":"image/png","width":1200,"height":630}]}'><a href="https://href.li/?https://www.crestviewwindowcleaning.com/why-is-it-important-to-hire-an-insured-gutter-cleaner/" target="_blank">Why Is It Important to Hire an Insured Gutter Cleaner? - Crestview Window Cleaning</a></p>Wed, 27 Sep 2023 15:06:35 -0400Manuela RinkManuela RinkManuela Rinkhttps://iamcodeprincess.tumblr.com/post/729536591439233024https://iamcodeprincess.tumblr.com/post/729536591439233024Manuela RinkRecognizing Visual Cues For Water Damage<h1><a href="https://protechdki.com/recognizing-visual-cues-for-water-damage/">Recognizing Visual Cues For Water Damage</a></h1><p><b>Water damage is costly and can be harmful.</b></p><p><b>Recognizing visual signs is important.</b></p><p><b>Let&rsquo;s explore common signs and how to protect your property.</b></p><p class="npf_link" data-npf='{"type":"link","url":"https://protechdki.com/recognizing-visual-cues-for-water-damage/","display_url":"https://protechdki.com/recognizing-visual-cues-for-water-damage/","title":"Cracking the Code: Recognizing Visual Cues for Water Damage - Protech Restoration | Water Damage Restoration In Chicago","description":"Sharpen your water damage detection skills by mastering visual cues. Learn how to spot early signs of water damage and improve your detectio","site_name":"ProTech Water Damage","poster":[{"media_key":"49a9776ccc1e8f6c535dfa6f7b66aeeb:94d72f3a972cb686-d5","type":"image/png","width":1080,"height":630}]}'><a href="https://protechdki.com/recognizing-visual-cues-for-water-damage/" target="_blank">Cracking the Code: Recognizing Visual Cues for Water Damage - Protech Restoration | Water Damage Restoration In Chicago</a></p>Tue, 26 Sep 2023 10:58:30 -0400Manuela RinkManuela RinkManuela Rinkhttps://iamcodeprincess.tumblr.com/post/729454774100082688https://iamcodeprincess.tumblr.com/post/729454774100082688Manuela RinkUnlocking Secrets:<ul><li>Unlocking Secrets:</li></ul><p><a href="https://www.crestviewwindowcleaning.com/effective-roof-cleaning-techniques/">Effective Roof Cleaning Techniques for a Spotless Home</a></p><p><br/></p><p>Maintaining a clean roof is crucial for the appearance and structure of your home. </p><p>Roofs can gather dirt, debris, algae, and moss, which not only affect the visual appeal but can also cause damage.</p><p>This blog post will discuss effective roof cleaning techniques for keeping your roof in excellent condition.</p><p class="npf_link" data-npf='{"type":"link","url":"https://href.li/?https://www.crestviewwindowcleaning.com/effective-roof-cleaning-techniques/","display_url":"https://href.li/?https://www.crestviewwindowcleaning.com/effective-roof-cleaning-techniques/","title":"15 Effective Roof Cleaning Techniques| Crestview","description":"Discover effective roof cleaning techniques for a pristine home exterior. Say goodbye to dirt and stains with these effective methods.","site_name":"Crestview Window Cleaning","poster":[{"media_key":"95dcbbca59b459ea584b9fdb3653898f:f6c84b53cb886d8b-6c","type":"image/png","width":1366,"height":768}]}'><a href="https://href.li/?https://www.crestviewwindowcleaning.com/effective-roof-cleaning-techniques/" target="_blank">15 Effective Roof Cleaning Techniques| Crestview</a></p>Mon, 25 Sep 2023 13:18:03 -0400Manuela RinkManuela RinkManuela Rinkhttps://iamcodeprincess.tumblr.com/post/729450292194787328https://iamcodeprincess.tumblr.com/post/729450292194787328Manuela RinkFloods are dangerous. Be prepared. Here are 10 flood safety tips<h1><a href="https://protechdki.com/top-10-flood-safety-tips/">10 flood safety tips</a></h1><p>Stay updated on weather alerts. Prepare an emergency kit.</p><p>Share an evacuation plan with family. Move valuables to higher ground.</p><p>Avoid floodwaters for safety. Follow evacuation orders. Turn off utilities before leaving.</p><p>Find higher ground during a flood. Stay connected with a radio or charged phone. Assist others and report emergencies.</p>Mon, 25 Sep 2023 12:06:48 -0400Manuela RinkManuela RinkManuela Rinkhttps://blog.codeinside.eu/2023/09/20/limit-active-directory-property-accesshttps://blog.codeinside.eu/2023/09/20/limit-active-directory-property-access/Code-Inside BlogLimit Active Directory property access <p><strong>Be aware:</strong> I’m not a full time administrator and this post might sound stupid to you.</p> <h1 id="the-problem">The Problem</h1> <p>We access certain Active Directory properties with our application and on one customer domain we couldn’t get any data out via our Active Directory component.</p> <h1 id="solution">Solution</h1> <p>After some debugging and doubts about our functionality we (the admin of the customer and me) found the reason: Our code was running under a Windows Account that was very limted and couldn’t read those properties.</p> <p>If you have similar problems you might want to take a look in the AD User &amp; Group management.</p> <ol> <li>You need to active the advanced features:</li> </ol> <p><img src="https://blog.codeinside.eu/assets/md-images/2023-09-20/advanced_features.png" alt="x" title="Advanced Features" /></p> <ol> <li>Now check the security tab, go to advanced view and add a new permission or change a existing one:</li> </ol> <p><img src="https://blog.codeinside.eu/assets/md-images/2023-09-20/settings.png" alt="x" title="Settings" /></p> <ol> <li>Here you should be able to see a huge dialog with <strong>all available properties</strong>. Check if your user is able to read your target property</li> </ol> <p><img src="https://blog.codeinside.eu/assets/md-images/2023-09-20/details.png" alt="x" title="Details" /></p> <p>Hope this helps!</p> Wed, 20 Sep 2023 23:55:00 ZCode-Inside BlogCode-Inside BlogCode-Inside Bloghttps://blog.codeinside.eu/2023/09/05/zip-deployment-failed-on-azure-and-how-to-fix-ithttps://blog.codeinside.eu/2023/09/05/zip-deployment-failed-on-azure-and-how-to-fix-it/Code-Inside BlogZip deployment failed on Azure <h1 id="the-problem">The Problem</h1> <p>We are using <a href="https://learn.microsoft.com/en-us/azure/app-service/">Azure App Service</a> for our application (which runs great BTW) and deploy it automatically via <a href="https://learn.microsoft.com/en-us/azure/app-service/deploy-zip">ZipDeploy</a>. This basic setup was running smoth, but we noticed that at some point the deployment failed with these error messages:</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>2023-08-24T20:48:56.1057054Z Deployment endpoint responded with status code 202 2023-08-24T20:49:15.6984407Z Configuring default logging for the app, if not already enabled 2023-08-24T20:49:18.8106651Z Zip deployment failed. {'id': 'temp-b574d768', 'status': 3, 'status_text': '', 'author_email': 'N/A', 'author': 'N/A', 'deployer': 'ZipDeploy', 'message': 'Deploying from pushed zip file', 'progress': '', 'received_time': '2023-08-24T20:48:55.8916655Z', 'start_time': '2023-08-24T20:48:55.8916655Z', 'end_time': '2023-08-24T20:49:15.3291017Z', 'last_success_end_time': None, 'complete': True, 'active': False, 'is_temp': True, 'is_readonly': False, 'url': 'https://[...].scm.azurewebsites.net/api/deployments/latest', 'log_url': 'https://[...].scm.azurewebsites.net/api/deployments/latest/log', 'site_name': '[...]', 'provisioningState': 'Failed'}. Please run the command az webapp log deployment show 2023-08-24T20:49:18.8114319Z -n [...] -g production </code></pre></div></div> <p>or this one (depending on how we invoked the deployment script):</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Getting scm site credentials for zip deployment Starting zip deployment. This operation can take a while to complete ... Deployment endpoint responded with status code 500 An error occured during deployment. Status Code: 500, Details: {"Message":"An error has occurred.","ExceptionMessage":"There is not enough space on the disk.\r\n","ExceptionType":"System.IO.IOException","StackTrace":" </code></pre></div></div> <h1 id="there-is-not-enough-space-on-the-disk">“There is not enough space on the disk”?</h1> <p>The message <code class="language-plaintext highlighter-rouge">There is not enough space on the disk</code> was a good hint, but according to the File system storage everything should be fine with only 8% used.</p> <p>Be aware - this is important: We have multiple apps on the same App Service plan!</p> <p><img src="https://blog.codeinside.eu/assets/md-images/2023-09-05/file-system-storage.png" alt="x" title="File System Storage" /></p> <h1 id="kudu-to-the-rescure">Kudu to the rescure</h1> <p>Next step was to check the behind the scene environment via the “Advanced Tools” Kudu and there it is:</p> <p><img src="https://blog.codeinside.eu/assets/md-images/2023-09-05/kudu.png" alt="x" title="Kudu local Storage" /></p> <p>There are two different storages attached to the app service:</p> <ul> <li><code class="language-plaintext highlighter-rouge">c:\home</code> is the “File System Storage” that you can see in the Azure Portal and is quite large. App files are located here.</li> <li><code class="language-plaintext highlighter-rouge">c:\local</code> is a <strong>much</strong> smaller storage with ~21GB and if the space is used, then ZipDeploy will fail.</li> </ul> <h1 id="who-is-using-this-space">Who is using this space?</h1> <p><code class="language-plaintext highlighter-rouge">c:\local</code> stores “mostly” temporarily items, e.g.:</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Directory of C:\local 08/31/2023 06:40 AM &lt;DIR&gt; . 08/31/2023 06:40 AM &lt;DIR&gt; .. 07/13/2023 04:29 PM &lt;DIR&gt; AppData 07/13/2023 04:29 PM &lt;DIR&gt; ASP Compiled Templates 08/31/2023 06:40 AM &lt;DIR&gt; Config 07/13/2023 04:29 PM &lt;DIR&gt; DomainValidationTokens 07/13/2023 04:29 PM &lt;DIR&gt; DynamicCache 07/13/2023 04:29 PM &lt;DIR&gt; FrameworkJit 07/13/2023 04:29 PM &lt;DIR&gt; IIS Temporary Compressed Files 07/13/2023 04:29 PM &lt;DIR&gt; LocalAppData 07/13/2023 04:29 PM &lt;DIR&gt; ProgramData 09/05/2023 08:36 PM &lt;DIR&gt; Temp 08/31/2023 06:40 AM &lt;DIR&gt; Temporary ASP.NET Files 07/18/2023 04:06 AM &lt;DIR&gt; UserProfile 08/19/2023 06:34 AM &lt;SYMLINKD&gt; VirtualDirectory0 [\\...\] 0 File(s) 0 bytes 15 Dir(s) 13,334,384,640 bytes free </code></pre></div></div> <p>The “biggest” item here was in our case under <code class="language-plaintext highlighter-rouge">c:\local\Temp\zipdeploy</code>:</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code> Directory of C:\local\Temp\zipdeploy 08/29/2023 04:52 AM &lt;DIR&gt; . 08/29/2023 04:52 AM &lt;DIR&gt; .. 08/29/2023 04:52 AM &lt;DIR&gt; extracted 08/29/2023 04:52 AM 774,591,927 jiire5i5.zip </code></pre></div></div> <p>This folder stores our <code class="language-plaintext highlighter-rouge">ZipDeploy</code> package, which is quite large with ~800MB. The folder also contains the extracted files - remember: We only have 21GB on this storage, but even if this zip file and the extracted files are ~3GB, there is still plenty of room, right?</p> <h1 id="shared-resources">Shared resources</h1> <p>Well… it turns out, that <strong>each App Service</strong> on a <strong>App Service plan</strong> is using this storage and if you have multiple App Services on the same plan, than those 21GB might melt away.</p> <p>The “bad” part is, that the space is shared, but each App Services has it’s own <code class="language-plaintext highlighter-rouge">c:\local</code> folder (which makes sense). To free up memory we had to clean up this folder on each App Service like that:</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>rmdir c:\local\Temp\zipdeploy /s /q </code></pre></div></div> <h1 id="tldr">TL;DR</h1> <p>If you have problems with ZipDeploy and the error message tells you, that there is not enough space, check out the <code class="language-plaintext highlighter-rouge">c:\local</code> space (and of course <code class="language-plaintext highlighter-rouge">c:\home</code> as well) and delete unused files. Sometimes a reboot might help as well (to clean up temp-files), but AFAIK those ZipDeploy files will survive that.</p> Tue, 05 Sep 2023 23:55:00 ZCode-Inside BlogCode-Inside BlogCode-Inside Blog