Hybrid Blazor apps in the Mobile Blazor Bindings July update
Eilon
July 22nd, 2020
I’m excited to announce we are releasing the Mobile Blazor Bindings July update! This release adds support for building Hybrid Blazor apps, which contain both native and web UI.
Hybrid apps are a composition of native and web UI in a single app. With Mobile Blazor Bindings this means you can write the native UI of your app using Blazor, and also create web UI in your app using Blazor. A major advantage of hybrid apps is that the HTML part of the app can reuse content, layout, and styles that are used in a regular web app, while enabling rich native UI to be composed alongside it. You can reuse code, designs, and knowledge, while still taking full advantage of each platform’s unique features. This feature supports Android, iOS, Windows (WPF), and macOS. And it’s all Blazor, C#, .NET, and Visual Studio. Woohoo!
You can mix and match native and web UI in whatever structure makes sense for your app. Here’s a simple example:
These are the major new features in the 0.4 Preview 4 release:
New Hybrid Apps feature enables mixing Blazor native UI components with Blazor web UI components in the same page. This one is HUGE!
Hybrid Apps are hosted in a new BlazorWebView component that uses a browser component to contain the web part of the app. No remote or local web server; all your code runs in the app’s process.
New blazorhybrid project template that supports Android, iOS, Windows (WPF), and macOS for creating hybrid apps
Updated dependencies: Xamarin.Forms 4.7, Xamarin.Essentials 1.5, and other libraries.
.NET Core 3.1 SDK is required to use the new preview
How does it work?
In hybrid apps all the code (both for the native UI parts and the web UI parts) runs as .NET code on the device. There is no local or remote web server and no WebAssembly (WASM). The .NET code for the entire app runs in a single process. The native UI components run as the device’s standard UI components (button, label, etc.) and the web UI components are hosted in a browser view (such as WebKit, Chromium, and Edge WebView2). The components can share state using standard .NET patterns, such as event handlers, dependency injection, or anything else you are already using in your apps today.
Get started
To get started building a Blazor Hybrid app with Experimental Mobile Blazor Bindings preview 4, install the .NET Core 3.1 SDK and then run the following command:
dotnet new -i Microsoft.MobileBlazorBindings.Templates::0.4.74-preview
And then create your first project by running this command:
Here’s the code for an app similar to what was seen at the top of this post. It has native UI and web UI sharing the same app state, running together in the same app process (no web server or HTTP). The native UI uses the new <BlazorWebView> component to specify which web component to load and where to locate static web assets. Blazor does all the work.
Check out last month’s ASP.NET Community Standup where I talked a bit about these new features and did a demo of Blazor hybrid apps (starts at 30:35):
For more information please check out:
Thank you to contributors
This release had several major contributions from Jan-Willem Spuij. Jan-Willem had already built his own BlazorWebView component and kindly helped us get this functionality into the Mobile Blazor Bindings project with many great improvements. Thank you Jan-Willem!
What’s next? Let us know what you want!
This project relies on your feedback to help shape the future of Blazor for native and hybrid scenarios. Please share your thoughts on this blog post or at the GitHub repo so we can keep the discussion going.
Posted by: xSicKxBot - 07-24-2020, 08:56 AM - Forum: Lounge
- No Replies
NHL's New Seattle Kraken Team Announced, But They May Not End Up In NHL 21
Seattle's NHL team, the 32nd franchise in the league, received its name today. The Seattle Kraken won't play until the 2021-22 season, but we don't know if EA will add the new team to NHL 21 before it launches on October 16. We've reached out to the developer to find out.
EA has already said that they've had to adjust their development timeline due to the pandemic. The franchise's regular September release window was pushed back a month after the studio "had to make major adjustments in developing the game from home" according to a blog post on the official NHL site.
"This transition has been very successful and we’re happy to say that the game is on track and feature-complete against our original vision," the post continued. "We just need a few extra weeks to do the polish, fine tuning and bug fixing."
Posted by: xSicKxBot - 07-24-2020, 06:48 AM - Forum: Python
- No Replies
Python One Line For Loop Lambda
Problem: Given a collection. You want to create a new list based on all values in this collection. The code should run in a single line of code. How do you accomplish this? Do you need a lambda function?
Example: Given an array a = [1, 2, 3, 4]. You need to create a second array b with all values of a—while adding +1 to each value. Here’s your multi-liner:
a = [1, 2, 3, 4]
b = []
for x in a: b.append(x+1)
print(b)
# [2, 3, 4, 5]
How do you accomplish this in a single line of code?
Answer: No, you don’t need a lambda function. What you’re looking for is a feature called list comprehension. Here’s the one-liner expression that accomplishes this without the lambda function:
b = [x+1 for x in a]
print(b)
# [2, 3, 4, 5]
You can try this example yourself in our interactive code shell:
Let’s dive into some background information in case you wonder how list comprehensions work. Based on your question, I also suspect that you don’t completely understand lambda functions either, so I’ll also add another section about lambda functions. Finally, you’ll also learn about a third alternative method to solve this exact problem by using the lambda function in combination with Python’s built-in map() function!
So, stay with me—you’ll become a better coder in the process!
List Comprehension 101
List comprehension is a compact way of creating lists. The simple formula is [expression + context].
Expression: What to do with each list element?
Context: What elements to select? The context consists of an arbitrary number of for and if statements.
The example [x for x in range(3)] creates the list [0, 1, 2].
Have a look at the following interactive code snippet—can you figure out what’s printed to the shell? Go ahead and click “Run” to see what happens in the code:
I’ll explain both ways of generating a new list in the following.
Example: Say you want to filter out all customers from your database who earn more than $1,000,000. This is what a newbie not knowing list comprehension would do:
# (name, $-income)
customers = [("John", 240000), ("Alice", 120000), ("Ann", 1100000), ("Zach", 44000)] # your high-value customers earning <$1M
whales = []
for customer, income in customers: if income>1000000: whales.append(customer)
print(whales)
# ['Ann']
This snippet needs four lines just to create a list of high-value customers (whales)!
Instead, a much better way of doing the same thing is to use list comprehension:
whales = [x for x,y in customers if y>1000000]
print(whales)
# ['Ann']
List comprehension is dead simple when you know the formula.
“A list comprehension consists of brackets containing an expression followed by a for clause, then zero or more for or if clauses. The result will be a new list resulting from evaluating the expression in the context of the for and if clauses which follow it.”
Here is the formula for list comprehension. That’s the one thing you should take home from this tutorial.
Formula: List comprehension consists of two parts.
‘[‘ + expression + context + ‘]’
The first part is the expression. In the example above it was the variable x. But you can also use a more complex expression such as x.upper(). Use any variable in your expression that you have defined in the context within a loop statement. See this example:
whales = [x.upper() for x,y in customers if y>1000000]
print(whales)
# ['ANN']
The second part is the context. The context consists of an arbitrary number of for and if clauses. The single goal of the context is to define (or restrict) the sequence of elements on which we want to apply the expression. That’s why you sometimes see complex restrictions such as this:
small_fishes = [x + str(y) for x,y in customers if y<1000000 if x!='John']
# (John is not a small fish...)
print(small_fishes)
# ['Alice120000', 'Zach44000']
Albrecht, one of the loyal readers of my “Coffee Break Python” email course, pointed out that you can break the formula further down using the following blueprint:
lst = [<expression> for <item> in <collection> if <expression>]
A lambda function is an anonymous function in Python. It starts with the keyword lambda, followed by a comma-separated list of zero or more arguments, followed by the colon and the return expression. For example, lambda x, y, z: x+y+z would calculate the sum of the three argument values x+y+z.
Here’s a practical example where lambda functions are used to generate an incrementor function:
Exercise: Add another parameter to the lambda function!
Watch the video or read the article to learn about lambda functions in Python:
Puzzle. Here’s a small code puzzle to test your skills:
def make_incrementor(n): return lambda x: x + n
f = make_incrementor(42)
print(f(0))
print(f(1))
To test your understanding, you can solve this exact code puzzle with the topic “lambda functions in Python” at my Finxter code puzzle app.
To become successful in coding, you need to get out there and solve real problems for real people. That’s how you can become a six-figure earner easily. And that’s how you polish the skills you really need in practice. After all, what’s the use of learning theory that nobody ever needs?
Practice projects is how you sharpen your saw in coding!
Do you want to become a code master by focusing on practical code projects that actually earn you money and solve problems for people?
Then become a Python freelance developer! It’s the best way of approaching the task of improving your Python skills—even if you are a complete beginner.
Spicy Girls Bundle, Death Stranding's out, Surviving Mars Jack
Spicy Girls Bundle | 9 Steam Games | 93% OFF
[www.indiegala.com] Spice things up with these adult games featuring nature's finest. Make sure you do not miss special 24h launch price. You can also save an extra 30% when paying with crypto.
[www.indiegala.com] Colonize Mars and discover her secrets, with minimal casualties at a historical price. You can also save an extra 15% when paying with crypto.
Posted by: xSicKxBot - 07-24-2020, 06:48 AM - Forum: Lounge
- No Replies
This Week at Bungie – 7/23/20
This week at Bungie, we drew a thin line between light and dark.
Today, we had some exciting news to share on the Xbox Games Showcase. Bungie and Xbox announced that they are joining forces to bring Destiny 2 to Xbox Game Pass this fall.
With an active Xbox Game Pass subscription, players will have access to the standard edition (seasonal content sold separately) of each expansion beginning with Forsaken and Shadowkeep (available September 2020) and Beyond Light (available beginning on November 10, 2020).
Later this year we will be releasing a version of Destiny 2 that will be optimized for Xbox Series X, including 4K resolution and running at 60 frames per second. Players who already own Destiny 2 on Xbox One will be able to transfer their game to Xbox Series X for free via Smart Delivery.
In addition, for Xbox Game Pass Ultimate subscribers, Destiny 2 can also be streamed to your Android mobile devices via xCloud.
Dive Deep
Most of our fresh content doesn’t end up on our streaming channels, so it’s time we got back to our old antics. Next week, your Host will be the freshest face on the Community team: Nicole! She joins us in today’s TWAB to discuss details on the Developer Deep Dive into the Destiny dungeon:
Nicole: Howdy, Guardians! I hope you’re all safe, healthy, and finding some fun out there. Thanks for keeping us company (not to mention each other) during these very unique days. I’ve felt so welcomed since stepping into the community from the Bungie side, and I’m excited to continue to explore ways to engage with and entertain you.
During our recent participation in the St. Jude Fundraiser marathon with our friends who drive the @GCXEvent, we discovered some new ways to recreate the streaming experience from our homes—which means developer commentary is coming soon to a screen near you!
You are cordially invited to dive into the Prophecy dungeon with some of the devs who created the experience.
Developer Deep Dive : Prophecy Dungeon
Tuesday, July 28 – 10AM Pacific
Come and watch us play our own game and tell you stories from its creation on the development floor. Learn more about our inspirations and motivations as we share snapshots from when it was just a work in progress. Join us in chat for the conversation!
We welcome you behind the curtain for a bit of fun, reminiscing, and insight into the life of game development.
I can’t wait to talk to you all again soon, but for now, see you then!
(Oh, and yes, we’ll archive it later, for those of you who can’t make it.)
Dam Beavers
We would never harm our large-toothed, pond-dwelling friends, but we are on a mission to reduce the error codes that share their name. Late last week, we had some success in bringing the number of Beaver errors back down to similar levels reported in past Seasons. Here is the Destiny Dev Team with some more info on our progress.
Destiny Dev Team: This past week Valve identified hardware configuration issues with 4 relays in their Chicago, Virginia, Stockholm, and Dubai data centers. In each case, the affected relay was unable to send traffic to one other relay in the same data center. If a connection to a peer went through both of those relays, then it would drop. Valve has fixed the configuration issues, and we have confirmed that the rate of disconnections in the affected areas has been reduced significantly.
These changes have reduced Beaver error codes significantly with players in the central and eastern United States of America being impacted the most. Beaver error codes are an indication of connectivity failure and can be caused by a wide range of issues. Some Beaver error codes are caused by local internet connectivity issues. If you still experiencing a lot of Beaver errors please use follow our Network Troubleshooting Guide and then report any further issues on our Help forum.
Back on the Menu
Destiny, the Official Cookbook released this week. It contains all kinds of Destiny inspired culinary concoctions waiting for you to whip up for breakfast, lunch, and dinner. Maybe even second breakfast if you are as hungry as the Drifter usually is. Yum yum yum yum yum.
Earlier this week, we gave you a behind the scenes look at how the cook book came to be. We partnered with Victoria Rosenthal to author this collection of recipes. She showed off her culinary and photography skills, dove deep into Destiny lore, and helped bring this fun cooking guide to life.
Twitch Prime
We have extended our Twitch Prime Rewards and now we’re in the bonus rounds. If you have an active Prime subscription, visit this page to link your Bungie.net account and claim your rewards. Once you are all set you can pay a visit to Amanda Holliday in the Tower to grab your new gear.
Here’s a look at what you can get this month:
Tractor Cannon – Exotic Weapon
Machinist’s Trove – Exotic Weapon Ornament
Shadow Trespass – Exotic Ship
Cavalcade – Legendary Sparrow
DAM RESTORED
Our Player Support Team is tracking all of the known issues.
This is their report.
SEPTENARY ENCRYPTION EMBLEM
Last week, players were able to redeem their Bungie Day Septenary Encryption emblem in their Bungie.net Account’s Code Redemption History. An issue arose when players discovered that they had the option to choose a platform to redeem the emblem on. This wasn’t intentional and we have confirmed that the platform chosen doesn’t matter when players go to retrieve the emblem in-game.
Once players have redeemed their emblem, they should restart Destiny 2 and visit their Collections>Flair>General section to acquire the emblem.
KNOWN ISSUES
While we continue investigating various known issues, here is a list of the latest issues that were reported to us in our #Help Forum:
Players can’t see their responses in chat on PC anymore.
Duress and Egress lore may disappear if the Triumphs aren’t claimed.
The South Paw controller scheme doesn’t allow Sparrows to boost.
The High-Energy Fire Dawn Mod doesn’t allow Consumed with Light to stack twice when the Stacks on Stacks Dawn Mod is equipped.
For a full list of emergent issues in Destiny 2, players can review our Known Issues article. Players who observe other issues should report them to our #Help forum.
In a World
It’s been a minute since I’ve been in a movie theater, but with how many amazing Destiny movies are being made by the community, I don’t really care. This is where we get to stay in our PJs, burn our own popcorn, and pick our favorites to share with you! Let’s take a look at who caught our eye this week.
Movie of the Week: Killstreaks
Honorable Mention: Gotta Catch Them All
If one of these videos belongs to you, congrats! Now make sure you have your Bungie.net profile in the description of said video so we can send out your prized emblem.
That’s not the end of this week – we still have a Friday to survive – but this is how we bring “This Week At Bungie” to a close. While the journey to Beyond Light has been extended, we’re one week closer. That leaves a lot of time to talk about how the next expansion will change the game, as well as what you’ll want to accomplish between now and November.
I’m out next week, so be nice to Dmg while I’m gone.
With New Campaigns Comes Great Rewards in Gems of War on Xbox One
Gems of War is a must-play for match 3 RPG fans who are keen to sink their teeth and minds into a thrilling battle system and rich sprawling fantasy world. Our 5.0 Update rapidly expands the storyline, offering a plethora of new content in the ever-expanding world of Krystara.
Seek Adventure, Earn Rewards
Campaigns have arrived in Gems of War! Taking the form of seasonal content that spans 10 weeks. Our new Campaigns offer fresh and exciting new challenges for players looking for thrilling pursuits. Explore the new Campaigns, earn stars, and use them to unlock buffs to help unravel the rich story of Gems of War.
Each week you can tackle a new campaign task which unlocks a new Artifact Upgrade. Delve deeper into Krystara’s sprawling lore with exciting new quests, progress, and earn a treasure trove of rewards!
Grab more loot with Campaign Passes & Elite Passes
Passes are arriving alongside Campaigns, offering more treasure for your hoard. Every player will have access to a Campaign pass with free rewards!
For adventurers seeking riches beyond the Campaign pass, our new Elite Pass is available to players wanting to unlock an elite rewards track. The Elite Rewards track offers extra loot and special collectible content.
Discover all of our exciting new features as part of the 5.0 Update. We’re constantly updating our content as well! Every week we release a new troop with skill sets to help battle your foes and reap the rewards of a hard day’s battle.
From the creators of Puzzle Quest, play the new Puzzle/RPG/Strategy mash-up, GEMS OF WAR! Battle against epic bosses or other players. In Gems of War, you battle your foes not just with swords and sorcery, but with a puzzle board! Match gems to power your spells, and match skulls to smite your enemies! Then take the spoils of war, and forge a mighty empire. It’s highly addictive, easy to learn, and filled with crazy combos and tons of depth. · Collect and level-up over 300 different troops and their special spells · Discover over 250 Quests, each with a distinctive story · Collect all 150+ Weapons and their unique spells · Rise on the global rankings in asynchronous PvP · Team up with others in guilds and join forces in Guild Wars · Conquer all 25+ Kingdoms and rule the world!
Posted by: xSicKxBot - 07-24-2020, 06:46 AM - Forum: Lounge
- No Replies
Xbox closes Q4 with gains in hardware revenue, record engagement
Microsoft saw an uptick in console sales during the last quarter of its 2020 financial year, reporting a 49 percent increase in hardware revenue due to an increase in consoles sold.
It’s a notable increase given that Microsoft’s last few quarterly reports have found hardware sales to be slowing. That jump also comes alongside other year-over-year increases for the Xbox brand during the quarter ending June 30, 2020.
Along with those year-over-year hardware gains, Microsoft says that Xbox content and services revenue also increased by $1.2 billion or 65 percent compared to the same quarter last year. As a whole, Microsoft says video game revenue increased $1.3 billion or 64 percent. Like many other companies right now, Microsoft credits that increase in spending (and record engagement) to on-going stay-at-home guidelines, as well as strength from third-party games.
Posted by: xSicKxBot - 07-24-2020, 06:46 AM - Forum: Lounge
- No Replies
Rocket League will tone down its Steam presence following free-to-play shift
Rocket League is officially going free-to-play when it launches on the Epic Games Store later in the summer, and following that shift new players on PC will no longer be able to download the game through Steam.
A heavier pivot toward the Epic Games Store has been somewhat expected since Rocket League developer Psyonix was acquired by Epic Games late last year, but today’s announcement isn’t full Epic Games Store exclusivity by any means.
For the most part, the Epic Games Store launch won’t affect current players of the game. Those that already play through Steam can continue to do so, and will also still see the same updates and new features as other platforms.
The only real EGS-centric change here is that, following the free-to-play update, new players won’t be able to download Rocket League through Steam and will instead have to turn to the Epic Games Store.
“Once Rocket League goes free to play, anyone who already owns Rocket League on any platform (including Steam) will be able to play and enjoy the game with full support for future updates and features,” explains a blog from Psyonix. “However, the Steam version will no longer be available to download for new players. To put it simply, wherever you play now (including Steam), you’ll still be able to play in the future.”
This rough timeline for a free-to-play launch comes 5 years into Rocket League’s lifetime, and follows a series of monetization changes and alterations launched in the months following Psyonix’s acquisition by Epic Games.
Posted by: ChavellyDrees - 07-24-2020, 04:04 AM - Forum: Lounge
- No Replies
Além do próximo par fuente Hunter Green, a Nike lançará em breve outro colorway de “Anniversary” accomplish Nike Air Max 1 . Esse agrado do Air Max 1 começa com uma construção fuente malha branca no dátil do pé e zero calcanhar, juntamente com sobreposições cinza claro nobuck zero mediopé, painéis laterais age calcanhar. A aparência accomplish OG atinge esse novo colorway "Hunter Green" accomplish Nike Air Max 1 como aspecto de sua "Anniversary Series". nike mulher sapatilhas A silhueta lendária vem com um clássico bloqueio de cores, já que e sapato apresenta uma construção de malha branca zero dedo do pé age no tornozelo, além fuente sobreposições de nobuck cinza nos painéis laterais age no calcanhar.
A silhueta New Balance 327 causou um grande estrago desde que foi lançada em abril. Nas semanas seguintes, vimos várias novas ?il-de-perdrix, com muito poucos lançamentos. Esta semana, adicionamos outra à lista, enquanto esperamos pacientemente pelo próximo lançamento 327. A silhueta 327 do New Balance é a mais recente fuente uma linha de sapatilhas new balance homem muy buenos modelos de estilo fuente vida da marca baseada em Boston nos últimos anos, que estreou zero mês passado com e ajuda de Casablanca fuente Paris. Agora, o armonioso tênis inspirado no tênis está finalmente entrando zero calendário geral de lançamentos da New Balance, estreando no início desta hebdómada em três cores.
Após uma colaboração com T. Crew, o New Harmony 997 é apresentado em uma nova colorway que caso inspira no esporte accomplish beisebol. Inspirado nas ?il-de-perdrix dos campos de treinamento de primavera e estádios nos EUA e Toronto, o tênis apresenta camurça e parte superior fuente nobuck em um tema gradiente. O New Balance 997 Sport estreou-se no culo passado com a ajuda sapatilhas new balance outlet accomplish campeão da NBA TWICE e do atleta accomplish New Balance Kawhi Leonard. Agora, em 2020, ela espera dar um considerável salto à medida o qual o elegante estilo fuente vida aparecer em uma nova colorway "Taxi".
O ginnasta da Nike Golf, comprar sapatilhas brooks Koepka, levou para sua medalha social a revelação de uma versão pronta para o golfe accomplish Off-White x Nike Air Max 90. Brooks Heritage mergulha com e Pink Dolphin para lançar sua última colaboração inspirada no famoso bloco fuente madeira japonês O Brooks Regent apresenta uma mescolanza de tons pastel inspirados no trabalho do pintor japonês Hokusai. A indicador Brooks, com sede em Seattle, se une à Casual Industrees - o qual também está localizada em Seattle, para uma versão futura do modelo Fusion.