I recently moved to a new state and have been doing all the not-so-fun stuff you do when getting settled. DMV visits (ugh). Doctor appointments (major ugh). Trying out different fitness studios (that one’s all right). While they’re all very different activities, one thing is the same across the board: Paperwork.
The problem with these forms is that they’re almost always static PDFs or actual paperwork. In other words, everyone receives the same form. And the provider usually has to highlight the areas they need you to fill out. This creates extra work for them as well as for you as the user.
Website forms aren’t immune to this problem either.
While good design can certainly improve the user experience, sometimes you just can’t get around the tedious nature of forms. That is, unless you use conditional logic when designing your digital forms.
So, that’s what I’d like to look at in this post—the benefits of equipping your forms with conditional logic and some great examples of websites using it today.
Conditional logic is a set of IF/THEN statements programmed into the backend of your form. So when a user enters a specific answer, the form will adapt based on the rules you program into it.
You can use conditional logic on pretty much all of your forms (except maybe the login):
There are a number of reasons to make your website forms dynamic. Let’s look at some examples.
When your website serves different types of users, it can be hard designing a site that appeals to all of them at once, let alone designing a form that does the same thing.
With forms, though, you don’t have to settle for a one-size-fits-all solution, nor do you need to direct certain users to “skip ahead” so they can focus on the most relevant bits. Conditional logic effectively enables you to design one dynamic form for all segments of users.
Let’s take a look at the quote request form on the Two Men and a Truck website.
After entering some basic contact information, users encounter this question: “How Can We Help You?”
Each service/user segment is clearly defined here. What the user selects will determine what appears on the next screen.
For example, this is what users who need supplies see:
Because I’m not in a location served by this company, I don’t see much. However, users who do will see a map and corresponding location information where they can pick up moving supplies.
Users who instead need help moving will see this screen:
You can see how this form has been designed to carefully segment users. By providing precise answers, they’ll receive a more precise quote in the end.
Users who need help moving out of their home see this screen next:
If this had been a business customer, they’d be asked to fill in their company name and email address. Their building choices would be:
So, really, the conditional logic benefits everyone involved. The user fills in questions that help them receive the very best and personalized response (and service). The company also benefits as they don’t have excess fields to sift through. Only the most pertinent details reach their inbox.
Conditional logic can do more than just segment your users. It can also be used to organize and route requests to the corresponding department.
For larger companies, this will definitely come in handy. It’s also something to consider when it comes to tech support.
I can’t tell you how many times I’ve had issues with this due to a lack of conditional logic. While an open-ended field might seem like a simple and attractive way to let the user explain what they need, there are very few people qualified to handle every inquiry. Users either end up dealing with someone who doesn’t know what they’re talking about or they get shuffled around amongst team members until they find a solution.
The Kraken cryptocurrency trading app has a great example of how to use conditional logic to head off these kinds of problems:
The support form starts out simply enough: “Please choose your issue below.” Once the user selects a category, the form begins to transform:
There are a couple of reasons why this is going to lead to a great user experience.
For starters, it’s not an open-ended “What can we do for you?” field. Those suck. Plain and simple. You take all that time filling out the field and then the person who gets back to you ends up asking even more questions.
Secondly, it’s not just one field where conditional logic applies. As the user fills out more and more information, the form transforms even further. This ensures that their issue is properly documented and then routed to the exact person who should be handling it.
Lengthy forms can be intimidating, especially when you’re expected to get the transaction over and done with in no time at all.
One way to deal with the issue of size and the perceived amount of work associated with it is to break a form into steps and to use a breadcrumb progress bar/navigation at the top.
I think that’s the best solution we have in terms of designing lengthy forms to be more user-friendly. That said, this only really fixes the issue of perception. Conditional logic, on the other hand, allows you to deal with the matter of time and work.
Let’s use Domino’s ordering system as an example of what to do.
When a customer goes to the Pizza ordering page, they see this:
Whether they choose to build their own pizza or one of the specialty pizzas, the next thing they see is the Domino’s Pizza Builder pop-up form:
The top of the form is like other multi-step forms with the breadcrumb navigation and the current step highlighted in red. But down below is handled much differently from the typical website form.
In this example, I selected the “Build Your Own” pizza. So it’s not like there are any topping or preparation presets that Domino’s could’ve added to the form for me. Right? Nope.
Rather than force me to make every single choice on every page, the form has already been filled out for me:
By using conditional logic to load preset selections into the form, there’s less work for the user to do. Not only that, the right presets can make them feel like you’ve taken the time to get to know them. Just make sure the presets are based on data. If the user is logged in, you can program the presets to load based on previous account activity and preferences. If they’re not, just use the most popular selections as the presets.
Obviously, this kind of conditional logic won’t work for forms with open-ended questions. However, ones with lots of multiple choice questions it certainly would.
As designers and developers, it’s important to consider how the aesthetics of a form can impair or improve usability. However, that’s not the only way to address common form usability issues.
Conditional logic is a really useful tool in improving the website visitor’s experience with forms. Not only will it help you give them a cleaner look, but they can also greatly streamline the process of filling them out. Your clients will love them too as they reduce the amount of extrapolation and administration they have to do when managing the form’s responses.
]]>
With this release, we’re introducing the commenting functionality that extends the collaborative capabilities of Unite UX. Now you don’t have to leave the app to give feedback about the design or the implementation of your components. Just click on the spot and leave your thoughts. Use @ to mention anyone that has access to your project to notify them via email. Resolve the threads that are already fixed and build your design system just as intended.
The new Unite UX comes with some predefined flows that explain in detail how to get started using the product. You will see guided tutorials, tips and tricks and key functionalities, highlighted to help you get most of the product in no time. So, make sure not to skip it, but even if you do, you can always go back to it using the ‘?’ button in the toolbar.
The 1.5.0 release brings a new type of component parts—links. Sometimes, the components are complex and some of the parts are hidden in the components tree. To improve the visibility of some parts and at the same time preserve the top-right to bottom-left styling from one place algorithm, we’ve extracted such parts and visualize them as links to their original parts where they can be edited. This will improve the overall visibility of the parts and preserve the natural way of styling things.
The performance of the Unite UX is of highest importance for the team. With this release, we managed to locate and fix some bottlenecks, making the app blazing fast. No more endless loading indicator—everything will load before you know it.
The 1.5.0 release includes 2 new components: The Card and the TextArea in the list of supported components. At the same time, we’ve optimized the existing component parts to be more intuitive and easier to style—we have included the No Records template for the grid and redesigned the Button Group templates. And last but not least, all common drop-down (popup, list and items) templates are extracted to separate page in order to be styled globally.
Performance and quality come hand in hand. That’s why we’re always trying to fix as many things as we can—especially the things that are reported from our users. Here are the things we’ve fixed in the 1.4.0 release:
If you still haven’t had the chance to try Unite UX, you can start your 21-day trial now.
]]>A particle of sand—tiny and innocuous. But put a lot of sand particles together and we have something big—a force to reckon with. It is the smallest grains of sand that often add up to form massive beaches, dunes and deserts.
Most .NET developers are looking forward to .NET Multi-platform App UI (MAUI)—the evolution of Xamarin.Forms with .NET 6. Going forward, developers should have much more confidence in the technology stack and tools as .NET MAUI empowers native cross-platform solutions on mobile and desktop.
While it is a long flight until we reach the sands of MAUI, developer excitement is palpable in all the news/content as we tinker and prepare for .NET MAUI. Like the grains of sand, every piece of news/article/video/tutorial/stream contributes towards developer knowledge and we grow a community/ecosystem willing to learn and help.
Sands of MAUI is a humble attempt to collect all the .NET MAUI awesomeness in one place. Here's what is noteworthy for the week of December 13, 2021:
The .NET Podcast app was a cornerstone demo during .NET Conf—a unified app running on multiple platforms and showcasing the flexibility of code sharing across Blazor, .NET MAUI and ASP.NET Core. The source code for the .NET Podcast app was recently open sourced, but running it locally involved a few steps—who knew a real world app had some moving pieces and architectural dependencies.
James Montemagno produced a video showcasing local development walkthrough with the .NET Podcast app—a how-to guide on grabbing source code and running the app locally.
Aside from .NET MAUI and Blazor code, the .NET Podcast app has Azure Container Service dependencies, uses GitHub Actions and utilizes backend APIs powered by ASP.NET Core. This is a great real-world sample app perfect for developer exploration and James shows how to have the full end-to-end demo running on developer local machine.
Developers have always been told that one needs a Mac to build for iOS from Xamarin.Forms/.NET MAUI while on a Windows machine. Turns out, this is not entirely true thanks to a wonderful feature—Xamarin Hot Restart, which enables developers to quickly test code changes on an iOS device during app development. Armed with an iOS device and a connecting cable, developers can directly deploy apps to the device from Xamarin.Forms with Visual Studio while running on Windows.
Gerald Versluis produced a video exploring iOS development without a Mac and dived head first into Xamarin Hot Restart. As usual, Gerald makes the technology accessible to anyone—starting with the basics of Xamarin Hot Restart, developer setup, installing iTunes and connecting to physical iOS device.
With a paid Apple Developer Program subscription, developers can set up Visual Studio on Windows to directly deploy/test apps to iOS devices—and even publish apps to the App Store.
Building client apps with .NET? You could be building web/desktop/mobile apps across a variety of platforms with some solid tooling. And nothing else celebrates .NET on the client side like .NET FrontEnd Day—a full day virtual conference, with focus on building frontend apps using .NET.
With a successful first year under the belt, .NET FrontEnd Day is gearing up for the second edition on Feb 10, 2022 and just announced their list of speakers. Rest assured, there would be no dearth of .NET MAUI and Blazor love—developers should register and tune in.
.NET has come a long way and the future of the .NET developer ecosystem looks bright. There is, however, a lot to take in and the bigger picture story from experienced .NET developers help.
Ed Charbeneau produced a video on the .NET of Today and Tomorrow, recapping some historical perspective and looking ahead at the future with .NET 6.
Ed talks about the .NET unification story and how .NET UI tooling from Progress Telerik can help .NET developers be more successful. It did not take long for Ed to dive into modern web development with .NET 6 and Blazor and exploring the code-sharing future with Hybrid apps using Blazor on top of .NET MAUI—all backed by solid demos and code walkthroughs.
.NET 6 is out and there was a lot of .NET developer content shared at .NET Conf. While most developers are still taking it all in, Dave Brock wrote up an article on favorite things in .NET 6.
Dave correctly points out some of the major objectives with .NET 6—lower barrier to entry into .NET, improving app startup/performance metrics, elevated client app development experience and faster developer inner loop.
While most of Dave's favorites lean towards modern web development, many point to the core benefits of .NET 6 for .NET MAUI developers as well. Some of the .NET 6 excitement centers around Hot Reload, C# 10 features, Minimal APIs and Blazor improvements—the present unified reality of .NET is looking pretty good.
That's it for now.
We'll see you next week with more awesome content relevant to .NET MAUI.
Cheers, developers!
]]>A particle of sand—tiny and innocuous. But put a lot of sand particles together and we have something big—a force to reckon with. It is the smallest grains of sand that often add up to form massive beaches, dunes and deserts.
Most .NET developers are looking forward to .NET Multi-platform App UI (MAUI)—the evolution of Xamarin.Forms with .NET 6. Going forward, developers should have much more confidence in the technology stack and tools as .NET MAUI empowers native cross-platform solutions on mobile and desktop.
While it is a long flight until we reach the sands of MAUI, developer excitement is palpable in all the news/content as we tinker and prepare for .NET MAUI. Like the grains of sand, every piece of news/article/video/tutorial/stream contributes towards developer knowledge and we grow a community/ecosystem willing to learn and help.
Sands of MAUI is a humble attempt to collect all the .NET MAUI awesomeness in one place. Here's what is noteworthy for the week of December 6, 2021:
.NET Conf 2021 was a massive success—great .NET content from Microsoft folks and speakers from all around the world. One of the key demo apps during the .NET Conf keynotes was a modern .NET Podcast app—a showcase of .NET MAUI and Blazor working together on top of .NET 6.
James Montemagno wrote up a .NET Conf Recap post pointing to some wonderful session recordings and behold—the .NET Podcast app now open sourced. This took some coordination and is a great showcase of a full-featured .NET MAUI app with Blazor and Azure Container Apps goodness baked in—a nicely architected codebase for developers to explore.
Maddy Montaquila and David Ortinau hosted the latest .NET MAUI Community Standup with an epic beginning and with special guest THE Jonathan Dick. On the cards was pointers to .NET Conf goodness around .NET MAUI/Blazor/C# and recapping exciting community blog updates.
David and Jon dug deep into Xamarin.Forms—the present reality that isn't shabby at all with latest service release and lots of community PRs. Next up was what we're all waiting on to close out the year strong—the next .NET MAUI release, aka Preview 11, due out soon. There is much to be excited about—Multi-Window support, Layout improvements, new controls/Handlers and performance tuning.
The next wave of tooling update riding out with Visual Studio 17.2 is scheduled to bring in Visual Diagnostics—a web DOM like view/selection of UI elements within a running .NET MAUI app and changing properties on the fly. David and Jon also did a lot of honest Q/A—the future looks productive for .NET MAUI developers.
Both Xamarin.Forms and .NET MAUI provide abstraction over native UI across platforms—developers get to write C#/XAML that gets rendered as native controls on each respective platform. What if you wanted to customize the look and feel or some behavior of the native UI, perhaps on a per platform basis? This is where the evolution to .NET MAUI really makes a difference.
In Xamarin.Forms, one would have to write custom Effects or worst case, a whole custom renderer overriding a native platform implementation—this was not for the faint-hearted.
.NET MAUI makes native UI customizations easy with the new Handler architecture, which provides hooks to tap into native control behavior. Gerald Versluis produced a video on customizing .NET MAUI controls with Handlers and Mappers—an encore after some APIs changed with latest .NET MAUI Previews.
Gerald talks through how to override the Handler implementations through specific Mappers, with PrependToMapper, ModifyMapper or AppendToMapper methods—thus providing developers full flexibility as to how/when to customize control behavior.
Blazor Hybrid apps with .NET MAUI is a great story—brings in the goodness of web to native mobile/desktop apps. However, what if you had investments in JavaScript, like in modern frontend apps with JS SPA frameworks? All this talk of modernizing desktop apps with web code got you thinking if your JS code can make it over the bridge if you give up NodeJs or JSX dependencies?
For modern frontend apps written with Angular/React/other SPA frameworks, PWA and Electron present two lucrative ways to bring the goodness over to desktop audiences. However, Blazor gets to use the BlazorWebView on top of .NET MAUI—and shouldn't a WebView component be able to render any web content?
A curious developer tried just that—would it be possible to render a fully compiled Angular web app inside a .NET MAUI app through the BlazorWebView? Do a full build of an Angular app and you essentially get HTML, JS and CSS—BlazorWebView does not care and is happy to render.
Been hearing the buzz about .NET MAUI Community Toolkit but haven't given it a spin yet? Brandon Minnick produced a short video from .NET Conf giving you the essential rundown of .NET MAUI Community Toolkit and how to get started using it.
.NET MAUI Community Toolkit is an open source toolkit meant to augment the .NET MAUI developer experience with Extensions, Behaviors, Converters, UI Elements and more—nothing stopping you from being more productive.
That's it for now.
We'll see you next week with more awesome content relevant to .NET MAUI.
Cheers, developers!
]]>A particle of sand—tiny and innocuous. But put a lot of sand particles together and we have something big—a force to reckon with. It is the smallest grains of sand that often add up to form massive beaches, dunes and deserts.
Most .NET developers are looking forward to .NET Multi-platform App UI (MAUI)—the evolution of Xamarin.Forms with .NET 6. Going forward, developers should have much more confidence in the technology stack and tools as .NET MAUI empowers native cross-platform solutions on mobile and desktop.
While it is a long flight until we reach the sands of MAUI, developer excitement is palpable in all the news/content as we tinker and prepare for .NET MAUI. Like the grains of sand, every piece of news/article/video/tutorial/stream contributes towards developer knowledge and we grow a community/ecosystem willing to learn and help.
Sands of MAUI is a humble attempt to collect all the .NET MAUI awesomeness in one place. Here's what is noteworthy for the week of November 29, 2021:
.NET developers building web apps are understandably excited about Blazor—C# code front and back with familiar Razor syntax and productive tooling. With .NET MAUI, the story gets better with Blazor goodness now welcome on native cross-platform apps for mobile and desktop. Eilon Lipton did an awesome session at .NET Conf covering the promise of Blazor on native apps—powered by .NET MAUI.
Developers get to write true Blazor code and bring in Razor Class Libraries into native apps bootstrapped by .NET MAUI—all possible with the modern light weight BlazorWebView component, while maintaining full native device API access. This promise of Blazor on mobile/desktop with .NET MAUI should be the foundation of migrating/modernizing older apps while sharing code with web apps—the future looks good!
Nish Anil and Vivek Sridhar hosted the latest Microsoft Reactor show called SamosaChai.NET—what better way to learn .NET than over the classic Indian snack time. The guest was none other than James Montemagno who talked through building mobile/desktop apps with .NET MAUI and Blazor.
Over friendly banter, James walked through the .NET MAUI basics, from getting started with the templated solutions to building the complex .NET Conf podcast app. If you are still on the fence about .NET MAUI, this is a great starting point to see the future of cross-platform app development with .NET.
Matt Soucoup hosted the latest .NET MAUI podcast and invited James Montemagno and David Ortinau for company. On the cards was celebrating all things .NET 6—the release, tooling, .NET Conf and of course, .NET MAUI. When friends hang out live on air, they share customer stories and quality ramblings about the state of modern .NET.
Key takeaways include developer flexibility with .NET—the right tools for the right job without being forced into it. Client developers with .NET have a native desktop and mobile technology stacks to reach just about any device. Web developers doing .NET could be doing some flavor of ASP.NET or Blazor, but many enterprises also have investments in JS stacks with Angular/React—all of which is now welcome in cross-platform native apps with .NET MAUI. Choice in technology stack is a good thing and .NET developers love the flexibility.
DotNetCurry, better known as 'DNC', produces a free digital magazine publication bringing the latest from the .NET/JavaScript worlds, presented by Microsoft MVP's and industry veterans. DNC Magazine recently hit the 50th edition—big congratulations are due for continued efforts to maintain quality and reaching the milestone. The 50th edition does not disappoint and is packed with loads of .NET/JS content, including big coverage of .NET MAUI.
Gerald Versluis turned off his usual camera/microphone and took to the keyboard to write up a piece of what developers can expect with .NET MAUI. Gerald covers the .NET MAUI basics, the new Handler architecture, Host Builder model, bringing in Blazor goodness and several other benefits that .NET MAUI brings to the table. Going offline for a bit? This 50th edition DNC Magazine is a must to download and soak in all the latest developer content.
For good reason, the MVVM design pattern works well for XAML/C# codebases and much of the core features are supported out of the box in Xamarin.Forms/.NET MAUI. When you need just a little bit more help, but want to stay away from heavier MVVM frameworks, you may look at TinyMvvm, an open-source light-weight MVVM library custom built for Xamarin.Forms.
Wondering what the future holds with TinyMvvm with .NET MAUI? Developer Daniel Hindrikes has you covered. After the 3.0 release, the first preview of TinyMvvm for .NET MAUI is now out and ready for you to give things a spin. Not surprisingly, the MauiAppBuilder Host Builder pattern to bootstrap .NET MAUI apps works well with dependency injection—it would be really simple to use an extension method with a resolver and get rolling using TinyMvvm for .NET MAUI apps.
That's it for now.
We'll see you next week with more awesome content relevant to .NET MAUI.
Cheers, developers!
]]>A particle of sand—tiny and innocuous. But put a lot of sand particles together and we have something big—a force to reckon with. It is the smallest grains of sand that often add up to form massive beaches, dunes and deserts.
Most .NET developers are looking forward to .NET Multi-platform App UI (MAUI)—the evolution of Xamarin.Forms with .NET 6. Going forward, developers should have much more confidence in the technology stack and tools as .NET MAUI empowers native cross-platform solutions on mobile and desktop.
While it is a long flight until we reach the sands of MAUI, developer excitement is palpable in all the news/content as we tinker and prepare for .NET MAUI. Like the grains of sand, every piece of news/article/video/tutorial/stream contributes towards developer knowledge and we grow a community/ecosystem willing to learn and help.
Sands of MAUI is a humble attempt to collect all the .NET MAUI awesomeness in one place. Here's what is noteworthy for the week of November 22, 2021:
Hot off the heels of .NET 6 launch at .NET Conf, three developer advocate stooges invited an old friend to relive all the excitement: Ed Charbeneau, Alyssa Nicoll, Sam Basu and Jeff Fritz hosted the Future of .NET webinar.
This was a fun 2 hours breaking down all the big announcements from a developer's perspective and whipping up quick demos to showcase the hot bits. Discussions evolved around the significance of .NET 6, VS 2022 launch, C# 10 features, .NET MAUI updates and bringing Blazor goodness to desktop with hybrid apps. With .NET 6 carrying the LTS badge, migration and modernization would be top of mind for lot of existing apps—it was good to see an honest conversation about all the options on the table.
How can a .NET MAUI release go by without some expected YouTube goodness? Gerald Versluis put out a video for all things .NET MAUI Preview 10 and recapped some tooling goodness with VS 2022. Gerald also went on to cover the sweet cross-platform real-time podcast app demo from .NET Conf keynote, showcasing the best of code sharing with .NET MAUI and Hybrid apps with Blazor.
One call to action is clear—if you haven't already, now is a great time to get started with .NET MAUI. The promise is coming together nicely.
James Montemagno and Frank Krueger hosted the latest episode of the Merge Conflict podcast, diving into all the details of .NET 6 and Visual Studio 2022 releases.
While developer excitement is palpable, it was good to see the acknowledgement that there is a lot to take in—developers may need some time to settle in with the new .NET bits and Azure cloud services. James shared some good info on some of the behind-the-scenes work that went in towards making the cross-platform podcast demo app for .NET Conf—something soon to be open sourced for developers to tinker with.
There was a ton of content from passionate developers from around the world at .NET Conf—and some real gems for those interested in .NET MAUI. Javier Suarez did a session on Drawn Controls in .NET MAUI, diving into much of the awesome work that him and the team has been putting together.
Javier started with the basics of .NET MAUI and Microsoft.Maui.Graphics library, giving developers the freedom to render native UI per their needs. Javier then dived into the meat of things—the goodness evolving from the Microsoft.Maui.Graphics.Controls library.
While experimental, this new cross-platform graphics library allows developers to render fully drawn UI components with .NET MAUI, catering to popular design systems like Cupertino, Fluent and Material. Javier showed off some cool demos and talked through performance and extensibility of drawn controls—definitely a wonderful development within the .NET MAUI stack.
Luis Matos continues his excellent series on the MauiAppBuilder—this time diving into much of the code that now powers the bootstrapping of .NET MAUI apps using the generic .NET Builder pattern.
Luis talks about how to initialize a MauiAppBuilder instance using a Static method with default configurations and dives into the MauiAppBuilder Public API. This API is where a lot of the plumbing happens—lot of properties/configurations and a single method called Build() which creates the MauiApp. Luis dives into some tricky internal code unapologetically and teaches us a lot—looking forward to the rest of the series.
That's it for now.
We'll see you next week with more awesome content relevant to .NET MAUI.
Cheers, developers!
]]>A particle of sand—tiny and innocuous. But put a lot of sand particles together and we have something big—a force to reckon with. It is the smallest grains of sand that often add up to form massive beaches, dunes and deserts.
Most .NET developers are looking forward to .NET Multi-platform App UI (MAUI)—the evolution of Xamarin.Forms with .NET 6. Going forward, developers should have much more confidence in the technology stack and tools as .NET MAUI empowers native cross-platform solutions on mobile and desktop.
While it is a long flight until we reach the sands of MAUI, developer excitement is palpable in all the news/content as we tinker and prepare for .NET MAUI. Like the grains of sand, every piece of news/article/video/tutorial/stream contributes towards developer knowledge and we grow a community/ecosystem willing to learn and help.
Sands of MAUI is a humble attempt to collect all the .NET MAUI awesomeness in one place. Here's what is noteworthy for the week of November 15, 2021:
Welcome to .NET 6. After a year of work from the .NET teams and the developer community, .NET 6 is out in full glory and proudly carries the Long Term Support (LTS) badge. Richard Lander wrote up the epic .NET 6 announcement post and the key point to take away is massive gains in performance.
.NET 6 is the first .NET release that natively supports Apple Silicon for MacOS and Windows Arm64, paving the path for .NET apps to run on new frontiers. .NET 6 is a massive unification effort with web, cloud, desktop, IoT and mobile apps all using the same .NET Libraries—this makes it easy for developers to share code easily across apps/platforms.
Tooling for .NET 6 development gets better across the board, with Hot Reload support everywhere and tons of new language features in C# 10 and F# 6. Just one word sums it all up: yay!
Sitting pretty on top of stable .NET 6 LTS runtime is the next iteration of .NET MAUI—Preview 10 is now out. David Ortinau wrote up the post announcing .NET MAUI Preview 10. The key to note here is how easy it is to get started. The best developer experience with .NET MAUI is through the latest Visual Studio 2022 Preview 17.1, which shipped alongside the GA VS 2022 17.0 version.
All one has to do to get started is to install the 'Mobile development with .NET' workload during VS 2022 setup—all of the .NET MAUI dependencies and mobile platform runtimes/SDKs/simulators are included with a simple checkbox.
.NET MAUI Preview 10 release brings in the Handler implementations of the popular CollectionView and IndicatorView controls, as well as property implementations and improvements with a bunch of other UI controls. The .NET MAUI GA goal is looking closer every single day with platform and tooling updates.
Modern .NET is the developer platform for building anything for anywhere and nothing celebrates .NET quite like .NET Conf. In its 11th year, .NET Conf was held Nov 9-11 this year—2 days of awesome content from Microsoft folks, before a full 24 hours of non-stop livestream with passionate community speakers from all around the world.
Scott Hunter opened .NET Conf with a wonderful keynote, tapping into some well-known faces from the .NET team and together, they did kick up the excitement around the .NET ecosystem. The keynote covered a plethora of topics—.NET 6, C# 10, Minimal APIs, Blazor updates, .NET MAUI updates, Hybrid Apps with Blazor/.NET MAUI, Azure support and a whole lot more. Want to get the latest scoop on .NET? This is the keynote to start with.
After the .NET Conf keynote, Maddy Leger Montaquila took the stage to talk about something dear to all our hearts—all things.NET MAUI. Maddy started with the basics and provided the latest updates with .NET MAUI Preview 10, including the ease of development with Windows Subsystem for Android.
Tooling for .NET MAUI is catching up fast. While Maddy may be a little uncomfortably fond of her Mac, Hot Reload (both XAML and C#) is starting to work just about everywhere. Add the promise of Hybrid apps bringing Blazor goodness and code sharing into desktop, you can see why developers and enterprises cannot wait for the .NET MAUI GA release coming early next year.
No matter the platform or tooling, developer experience is largely shaped by the programming language—C# does not disappoint for .NET MAUI. Along with .NET 6 and VS 2022 launch comes the next language update—welcome to C# 10. Kathleen Dollard wrote up the C# 10 announcement post—covering all the features that make your code run faster and be more prettier/expressive.
The plethora of improvements in C# 10 include some key features that aid in big mobile/cross-platform projects—such as Global Usings, Implicit Usings, File-scoped namespaces, Improvements for Lambda expressions, better parity between Structs and Classes and more. C# 10 is here to allow .NET MAUI developers write cleaner and more easily maintainable code.
That's it for now.
We'll see you next week with more awesome content relevant to .NET MAUI.
Cheers, developers!
]]>A particle of sand—tiny and innocuous. But put a lot of sand particles together and we have something big—a force to reckon with. It is the smallest grains of sand that often add up to form massive beaches, dunes and deserts.
Most .NET developers are looking forward to .NET Multi-platform App UI (MAUI)—the evolution of Xamarin.Forms with .NET 6. Going forward, developers should have much more confidence in the technology stack and tools as .NET MAUI empowers native cross-platform solutions on mobile and desktop.
While it is a long flight until we reach the sands of MAUI, developer excitement is palpable in all the news/content as we tinker and prepare for .NET MAUI. Like the grains of sand, every piece of news/article/video/tutorial/stream contributes towards developer knowledge and we grow a community/ecosystem willing to learn and help.
Sands of MAUI is a humble attempt to collect all the .NET MAUI awesomeness in one place. Here's what is noteworthy for the week of November 8, 2021:
Maddy Montaquila and Sweeky Satpathy hosted the latest .NET MAUI Community Standup—there was a lot of community news to cover, which shows excitement around .NET MAUI. They were joined by engineer Tim Miller to provide the latest scoop on XAML Hot Reload—the older wiser sibling to the hot new .NET Hot Reload.
While making C# code edits on the fly on running apps is cool, the most productivity boost for Xamarin.Forms and .NET MAUI developers likely comes from XAML Hot Reload—how quickly can one iterate on the inner dev loop when changing XAML in the visual tree & see changes updated in simulators/devices.
Sure, you can bring Clippy into a .NET MAUI app today, but XAML Hot Reload in future would let you select elements in visual tree and see everything around it in a grid-like schema—great for getting layouts exactly right. And Live Property Explorer would let developers tinker with every aspect of each UI component—change properties on the fly and see the changes in the app while running. Tim showed off a lot of the unreleased hotness with XAML Hot Reload—much to look forward to for developer productivity when .NET MAUI hits GA.
We’ve reached the big .NET 6 release, bringing a more unified runtime, language maturity and better developer tooling. Xamarin.Forms is evolving into .NET MAUI—a modern, open-source, cross-platform stack for targeting mobile and desktop apps. The present day reality of going cross-platform with Xamarin.Forms isn’t too shabby, but there are some developer pain points that are being alleviated by .NET MAUI.
A struggling developer wrote up a 10 point article on why the evolution to .NET MAUI matters. The list of things developers get to gain with .NET MAUI are elevated confidence, desktop reach, Blazor support, better architecture, improved tooling and more. When the future is so shiny and so close, there isn’t much harm in looking ahead.
Developer Luis Matos has started a wonderful article series taking an in-depth look at the MauiAppBuilder—the thing that bootstraps all .NET MAUI apps with .NET 6 runtime. While MauiAppBuilder brings consistency with rest of modern .NET in using the Host Builder pattern, Luis takes an inside look at how MauiAppBuilder works and some considerations on how to configure everything. This is a rather interesting series touching upon the core of how .NET MAUI apps will startup—2 articles are live already and we cannot wait for the rest.
Tanay Parikh and Jon Galloway hosted the latest ASP.NET Community Standup and were joined by Matthew Leibowitz from the .NET MAUI team to talk about SkiaSharp—the cross-platform 2D graphics .NET API based on Google's Skia Graphics Library. Matthew is the Skia wizard and showed off the Blazor Native Interop with SkiaSharp—this directly applies to Blazor Hybrid apps bootstrapped with .NET MAUI.
Sure, on the web, Blazor code can talk to JavaScript over the JS Interop, but now developers get the option to have Blazor on native apps talk to other native libraries, perhaps written in C/C++ and compiled into WASM. All the SkiaSharp coolness of Canvas, Shaders, Animations and more—now welcome in Blazor code inside desktop apps powered by .NET MAUI.
Matthew Soucoup hosted the latest .NET MAUI podcast and featured a customer success story—Polaris with their awesome RideCommand companion apps that can work with snowmobiles, motorcycles, off-road and other powersports vehicles. The RideCommand family of apps allows riders to plan their route with on-board maps and trails, track progress, see overlayed info, connect with other riders and share the experience on social media.
The app experience isn't only on mobile, but also synced on the infotainment screens on snowmobiles or other vehicles, where available. The developers at Polaris talked through the process of building the whole app using Xamari.Forms, in partnership with Microsoft's customer advisory team—such an amazing set of apps and an inspiring story.
That's it for now.
We'll see you next week with more awesome content relevant to .NET MAUI.
Cheers, developers!
]]>Angular, Google’s JavaScript (TypeScript) framework for building web applications, mobile or desktop has over 77,000 stars on GitHub. It’s maintained by the Angular Team at Google and a host of community members and organizations.
To be able to follow through in this article’s demonstration you should have:
Other nice-to-haves include:
In this post, you will be introduced to hosting in Angular’s Firebase and how easy it is to set up.
There are a lot of ways to build an Angular application today, one of the most popular ways is using the Angular CLI to scaffold a project. In today’s post, we will use the Kendo UI Wizard to scaffold our Angular application. Kendo UI for Angular is a UI library that provides tools to build accessible and usable web applications with seamless integration with your favorite frontend frameworks like Angular.
Note: Kendo UI for Angular is a commercial UI component library, and as a part of this you will need to provide a license key when you use the components in your Angular projects. You can snag a license key through a free trial or by owning a commercial license. For more information, you can head over to the Kendo UI for Angular Licensing page.
Open your VS Code and navigate to the Extensions tab on the far left side of the application. Search for Kendo UI Wizard and install the extension. After you have done that, make sure to reload the VS Code application so you can start to use the newly downloaded tool.
Open the Command Palette. Either go to View -> Command Palette, or use shortcut Command + Shift + P for Mac or Ctrl + Shift + P on a PC. You’ll see a task runner prompt, where you can click on the Kendo UI Wizard and create a new project by answering the step-by-step prompt.
I called mine the Firebaseapp, but you can call yours any name of your choosing. Select the directory where you want this project to be saved on your machine.
Select Angular as the framework and then click the next button to choose the pages you want to have on startup. Choose one blank page, and click the next button.
This will ensure that a new (blank) component is created for you when the app is generated—how cool is that? You can still add a few new pages to be generated, but for our app today, one blank page is fine.
The last thing to pick is your style theme, and I picked Bootstrap styling. You can choose the Default or even Material theme.
After generating the project, open it in VS Code and in the terminal run the command below:
npm install
This is to install all dependencies, now you can check the app you generated by running the serve command:
ng serve
Now that you see it live on your development server, let us talk about hosting this same application online for everyone to be able to access it.
There are a lot of platforms that let you host your Angular application easily. Most of the very popular ones are free. Some of them include Netlify, GitHub pages, Firebase hosting, AWS, Azure and many others. Today we will be using the Firebase cloud hosting platform to host our Angular application.
Google’s Firebase provides cloud services, a database, authentication infrastructure, hosting, cloud functions, analytics for usage by customers, and tools that help you build native and web apps. The hosting service is an easy-to-use platform to host both static and dynamic web apps and even microservices with a single command. No configuration is required to use Firebase—yes, zero configs!
Open the Firebase Dashboard here and log in with your Google credentials, and then click “Add project" and go through the process of creating a new project.
First provide the project name—in our case, nghost. Then click “Next,” and you’ll be asked to choose if you would like Analytics. Make sure to toggle that off, as we do not need Analytics for this tutorial.
Then click “Finish” to generate your new project called nghost.
Click on “Continue” and then, at the navigation tab at the left, click on “Hosting.” It should show you a screen like this:
The next step is for us to build for production and then do the deployment of the Angular app we have built.
There is a simple way to build your app in Angular to be ready for deployment. This means telling Angular to compile the project code, do code splitting and create a public folder that can be uploaded on any hosting platform like Firebase Hosting.
In your VS Code, run the command below:
ng build --prod
This creates the dist folder with the generated files to upload. Now to connect our project to Firebase, you have to install the Firebase tools and then confirm your identity to be able to access the project you created from the CLI in VS Code.
npm install -g firebase-tools
firebase login
The login will open up an authentication service in your browser, and, once you are done, you will see a success message:
Then you can deploy the app with this command:
firebase init
This shows you a series of prompts and you have to choose based on your needs. The first prompt asks you what service you want to use, choose the hosting option:
? Which Firebase features do you want to set up for this directory? Press Space to select features, then Enter to confirm your choices. **Hosting: Configure files for Firebase Hosting and (optionally) set up GitHub Action deploys**
The next one asks if you have created a project on Firebase before.
? Please select an option: Use an existing project
? Select a default Firebase project for this directory: nghost-68106 (nghost)
i Using project nghost-68106 (nghost)
Choose “Yes” and select nghost (or whatever you named your own project).
The last few questions are about deployment details.
? What do you want to use as your public directory? dist/kendo-angular-seed
? Configure as a single-page app (rewrite all urls to /index.html)? Yes
? Set up automatic builds and deploys with GitHub? No
? File dist/kendo-angular-seed/index.html already exists. Overwrite? No
After hitting “Enter,” you should see a success message with a link you can visit to view the app live:
✔ Deploy complete!
Project Console: [https://console.firebase.google.com/project/nghost-68106/overview](https://console.firebase.google.com/project/nghost-68106/overview)
Hosting URL: [https://nghost-68106.web.app](https://nghost-68106.web.app)
And just like that, your application is live. Congratulations!
In this post, we looked at how to easily build out an Angular application using Kendo UI for Angular. We also saw the various ways to deploy our applications and went step-by-step to deploy our Angular application on Firebase hosting platform. What will you be building next?
]]>A particle of sand—tiny and innocuous. But put a lot of sand particles together and we have something big—a force to reckon with. It is the smallest grains of sand that often add up to form massive beaches, dunes and deserts.
Most .NET developers are looking forward to .NET Multi-platform App UI (MAUI)—the evolution of Xamarin.Forms with .NET 6. Going forward, developers should have much more confidence in the technology stack and tools as .NET MAUI empowers native cross-platform solutions on mobile and desktop.
While it is a long flight until we reach the sands of MAUI, developer excitement is palpable in all the news/content as we tinker and prepare for .NET MAUI. Like the grains of sand, every piece of news/article/video/tutorial/stream contributes towards developer knowledge and we grow a community/ecosystem willing to learn and help.
Sands of MAUI is a humble attempt to collect all the .NET MAUI awesomeness in one place. Here's what is noteworthy for the week of November 1, 2021:
The latest public Windows 11 builds include the Windows Subsystem for Android (WSA)—this is a big deal allowing users the ability to run Android apps from the Amazon App Store. This is an even bigger deal for mobile developers using Xamarin.Forms or .NET MAUI—your Android apps can now run on Windows itself, without the use of any Android emulators.
James Montemagno produced a video for WSA usage documenting the process to reach the Android Subsystem through easy setup and IP address. Once done, Visual Studio starts listing the WSA as a target for running Xamarin/.NET MAUI apps on Android—how cool to not need Android emulators. Alas, say goodbye to long coffee breaks while your app deploys on Android!
One of the most welcome changes in .NET MAUI is how apps are going to be bootstrapped—there is now consistency with rest of modern .NET. The new app start up utilizes the .NET Generic Host Builder and makes it easy to work with Dependency Injection. Gerald Versluis published a video on how easy it is to work with DI in .NET MAUI apps and walked through the whole process—using the Host Builder, registering Container dependencies and using Constructor Injection.
While .NET MAUI makes it easy to work with DI, this is perfectly doable across most of .NET today and a good architectural pattern that sets up apps for easy portability/migration.
James Montemagno and Frank A. Krueger hosted the latest episode of the Merge Conflict podcast—this time on the upcoming .NET 6 and C# 10 hotness. There is something about nerdy developers geeking out about the latest language features—C# 10 does not disappoint with Scoped Namespace declarations, Global Usings, Record structs and lots of updates to type/property handling.
The other hot thing in .NET 6 is Minimal APIs—the no-drama way of quickly building out backend APIs with C#. Minimal APIs are meant to be incredibly fast and growing with API needs, without the ceremony of traditional .NET APIs. If you are looking to build modern .NET MAUI app and need a fast simple API backend, Minimal APIs should be a strong contender.
XamExpertDay had happened a few weeks back—an all-day virtual conference with lots of great content. As awesome as it was, it was also the last one—XamExpertDay is evolving to .NET MAUI Expert Day. Maddy Montaquila had done the closing keynote this year—evaluating where things are, how we got here and where we're headed.
Maddy talked through much of the work that has gone into .NET MAUI already—from inception to present day and what lies ahead till GA. It was a wonderful behind-the-scenes look at the madness, pain, hilarity and triumphs of modern day software shipping process—a great way for folks new to .NET MAUI to get up to speed.
Machine Learning (ML) is a type of Artificial Intelligence (AI) that focuses on the use of data and algorithms to imitate how humans learn/think and gradually improve on accuracy. How is this relevant to .NET MAUI developers? Well, with mobile and desktop apps competing for user attention/usage, ML could be the thing that gives your apps the edge—pulling off innovative solutions around classification, decision-making, prediction, anomaly detection and more.
ML.NET brings machine learning home for all .NET developers, with Model Builders and Visual Studio tooling. Jayme Singleton has been hosting wonderfully educational .NET content and she was joined by Bri Achtman for a session on learning all-things ML.NET. Bri started with the basics of machine learning workflows and went on to demonstrate real scenarios where ML.NET really shines. Find two hours on a weekend to watch this and come out with a thorough understanding of ML and ML.NET.
That's it for now.
We'll see you next week with more awesome content relevant to .NET MAUI.
Cheers, developers!
]]>On October 23, BleepingComputer reported that hackers had hijacked the UA-Parser-JS Node Package Manager (NPM) library to infect Linux and Windows devices with password-stealing trojans and crypto miners. While Progress products were not directly compromised, out of an abundance of caution we feel it’s important to make our developer community aware of this news and how to rectify it.
On Friday, October 22, an unknown actor published malicious versions of the UA-Parser-JS NPM library. The ultimate targets were essentially any product that stores passwords locally. The malicious versions of the package were available for about four hours, from approximately 12:15-4:23 p.m. GMT.
If you’re directly or indirectly using ua-parser-js versions 0.7.29, 0.8.0, and 1.0.0, you should consider your system compromised. Those versions were unpublished from npmjs several hours after the exploit was detected by the package owner.
You may be affected if you use the NPM to manage and download open-source libraries as part of your engineering processes. The most likely targets are developer and CI/CD environments. Any computer that has one of the malicious versions of this package installed or running should be considered compromised.
Progress products were not compromised directly by this incident. We leverage practices to minimize vulnerabilities throughout our development cycle and work continuously to harden our products and infrastructure.
The malicious code specially targeted the password files of common FTP clients, including Progress WS_FTP Professional. Locally stored password files for many other common applications were also targeted including Chrome, Firefox and Safari among others.
The Kinvey Flex feature allows deployment of custom Node.js services and therefore it is possible for Flex deployment to be affected. If you are using the Kinvey Flex feature, please review your deployed projects to ensure they and their dependencies are not using one of the compromised versions of the ua-parser-js module.
Even if a Flex service was affected, it is not possible for the harmful code to escape its isolated environment and harm or access anything else, even on multi-tenant Kinvey instances.
In the past several posts, we have taken an expansive look at data binding in one direction, either from the template to component or from component to template. Today we will be looking at two-way data binding in Angular.
This post is suited for all levels of frontend developers who use Angular, so being conversant with beginner concepts and installation processes is not assumed. Here are a few prerequisites you should have before you start to use Angular 12 and follow along through this article’s demonstration:
// run the command in a terminal
ng version
Confirm that you are using version 12, and update to 12 if you are not.
Other nice-to-haves include:
When you bind events in your Angular template to a component, and where the changes made in the template are also updated in the component data, what you are doing is called two-way data binding. The data flow here is bi-directional, meaning it can go both ways. A good description of it is that it is a combination of both event binding and property binding.
One of the most popular use cases for two-way data binding is working with forms. Many times, you would like to represent data you collect from a user in real-time in one way or another.
In two-way data binding, data is bound using the ngModel directive, which requires the Angular FormsModule to work. The banana-in-a-box syntax for this looks something like this:
<input [(ngModel)]="component property">
We are going to use the Angular CLI to generate a new test application where we can test out two-way data binding and show how you can easily use it in your workflow today.
More specifically, we are going to replicate this typing game with a function that allows you see exactly what you type in an input box in another element in the template.
Open your VS Code in the location of your choice, open the terminal and run this command:
ng new twoway
Make sure to answer the prompts like this:
? Would you like to add Angular routing? No
? Which stylesheet format would you like to use? CSS
Now that your new project has been generated, navigate into it like this:
cd twoway
ng serve
Now navigate to the src folder and inside the app component.html file, copy the styles there into the app.component.css file. Then replace the content of the application with the code block below:
<div class="toolbar" role="banner">
<span>Welcome</span>
<div class="spacer"></div>
<a aria-label="Angular on twitter" target="_blank" rel="noopener" href="https://twitter.com/angular" title="Twitter">
</a>
</div>
<div class="content" role="main">
<!-- Highlight Card -->
<div class="card highlight-card card-small">
<svg id="rocket" alt="Rocket Ship" xmlns="http://www.w3.org/2000/svg" width="101.678" height="101.678" viewBox="0 0 101.678 101.678">
<g id="Group_83" data-name="Group 83" transform="translate(-141 -696)">
<circle id="Ellipse_8" data-name="Ellipse 8" cx="50.839" cy="50.839" r="50.839" transform="translate(141 696)" fill="#dd0031"/>
</g>
</svg>
<span>{{ title }} app is running!</span>
<svg id="rocket-smoke" alt="Rocket Ship Smoke" xmlns="http://www.w3.org/2000/svg" width="516.119" height="1083.632" viewBox="0 0 516.119 1083.632">
</svg>
</div>
<!-- Resources -->
<h2>Resources</h2>
<p>Here are some links to help you get started:</p>
<div class="card-container">
<a class="card" target="_blank" rel="noopener" href=#>
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"></svg>
<span>Hello</span>
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"></svg> </a>
<a class="card" target="_blank" rel="noopener" href=#>
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"></svg>
<span>Hello</span>
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"></svg>
</a>
<a class="card" target="_blank" rel="noopener" href=#>
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"></svg>
<span>Hello</span>
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"></svg>
</a>
</div>
</div>
If you run the command below in your terminal, the app should now look like this:
ng serve
Just as we discussed earlier, two-way binding is the combination of property binding and event binding, so we will try to achieve that now with the example above.
Open the app component HTML file and in the highlight card section, replace the content with the code block below:
<h2>Type anything</h2>
<input type="text" [value]="name" (input)="name=$event.target.value">
<hr>
<div class="spacer"></div>
<a aria-label="Angular on twitter" target="_blank" rel="noopener" href="https://twitter.com/angular" title="Twitter">
</a>
</div>
<div class="content" role="main">
<!-- Highlight Card -->
<div class="card highlight-card card-small">
<svg id="rocket" alt="Rocket Ship" xmlns="http://www.w3.org/2000/svg" width="101.678" height="101.678" viewBox="0 0 101.678 101.678">
<g id="Group_83" data-name="Group 83" transform="translate(-141 -696)">
<circle id="Ellipse_8" data-name="Ellipse 8" cx="50.839" cy="50.839" r="50.839" transform="translate(141 696)" fill="#dd0031"/>
</g>
</svg>
<span>You just typed {{name}}</span>
<svg id="rocket-smoke" alt="Rocket Ship Smoke" xmlns="http://www.w3.org/2000/svg" width="516.119" height="1083.632" viewBox="0 0 516.119 1083.632">
</svg>
</div>
Now you can see the property binding we created, assigning the input from the user to the name property, and then binding the event target on the same element to the same property. This is literally how event binding works.
Defining the name property, open the app component.ts file and replace the content with this code block:
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'twoway';
name="";
}
If you save all the files now and check your browser at localhost:4200 it should be exactly as you expect.
Angular has a directive that makes this process even easier to manage in one straight statement. The directive is called the ngModel directive used in Angular to handle data binding. The best use case where ngModel is useful is when handling forms in your applications.
Change these lines in the app component.html file from:
<input type="text" [value]="name" (input)="name=$event.target.value">
<span>You just typed {{name}}</span>
to this code block below:
<input type="text" name="value" [(ngModel)]="value">
<span>You just typed {{value}}</span>
For this to work, we have to import the FormsModule in our app module file:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { FormsModule } from '@angular/forms';
@NgModule({
declarations: [
AppComponent
],
imports: [
FormsModule,
BrowserModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Finally, change the property name in the component.ts file from name to value and you are all set.
We have just looked at two-way data binding in Angular, the original way to achieve it and how Angular made it even easier through ngModel. We saw how useful it can be to be able to bind data in two directions instead of just one as we have seen in the recent posts. How would you like to use ngModel in your forms today?
If you’re a developer who works with designers, you’re already familiar with the infamous “handoff”—that point in the workflow when you start turning wireframes and mockups into code. Even if you’re not personally familiar with the process, it’s probably unsurprising to hear that this is often a real pain point. This pain can be lessened, however, when both sides have an understanding of what the other will be looking for in the handoff process.
Designers are expected to have a pretty thorough understanding of the frontend web: HTML elements, the CSS box model, how responsive resizing works, component-based structure, etc. And yet, when we flip the script, developers are rarely expected to have an understanding of design basics—what’s up with that?
Teams work better and create better products when both parties have a high level understanding of each others’ tools and priorities. Not to mention all the ways having access to the design source files can make your own job easier.
With that in mind, I’d love to introduce my developer friends to Figma, one of the most popular and widely used UI design tools. It’s free for individual use, so I’d encourage you to go make an account and start playing around! It’s the best way to learn.
Like any specialized software, a Figma file can be a little overwhelming to navigate if you’re not familiar with it. So let’s start from the top and take a look at the the basics, along with the Figma features that will be most useful for developers.
Figma files are organized by Pages (think screens of your application), which each contain Frames (subpages, often used to organize mockups of Pages in various user interaction states). Each Frame is made up of Elements—shapes, text, vectors, etc. Elements (or groups of Elements) can be saved as reusable Components. Elements are customized with Styles, like colors or fonts. Styles (or groups of Styles) can be saved as Design Tokens and organized into shareable Libraries for easy reuse.
When you first open a Figma file, this is what you’ll see:
Why Should Developers Care? The Prototype tool is a great way to do user testing and validate ideas before devs write a single line of code. This not only saves dev time by allowing designers to make adjustments to the UI before the development phase (and what’s not to love about that?), but user testing at this stage also offers devs the opportunity to sit down with a designer and a user before they start building.
When devs can see user motivations and pain points happening in real time and be involved in user conversations early in the process, it makes for a much more intuitive and cohesive product. This helps shift the development cycle from reactive (“We have to fix this thing we got a lot of negative feedback about”) to proactive (“We saw during testing that users struggled with this task, so let’s put extra attention into streamlining it”). Not to mention, just being able to explore the prototype whenever you like means you never have to wonder, “Wait, what’s supposed to happen when they click this button?”
If you want to take a closer look at the details of a mockup, you can turn on the Grids with Ctrl+G, which will help you get a feel for the spacing and structure of what you’re building. You can also toggle on Rulers with Shift+R, and show spacing values between elements by selecting the Element and holding down the Option key while you hover over the items around it.
All right, so you’ve explored the file and you feel like you’ve got a solid understanding of what needs to be built and why. Time to start writing some code. Good news—Figma also makes this easier!
For defining your high-level styles, you’ll want the contents of the Libraries—those Design Tokens are the recurring CSS values that you’ll want to turn into variables and/or assign to properties in your global stylesheet. If you select the highest level Page from the left-hand sidebar, the Design Tokens will appear in the right-hand sidebar. You can click on the knobs icon of each one to inspect it and see all the details you’ll need to recreate it in your CSS files.
Unfortunately, there’s no native way in Figma for you to export those Libraries ... fortunately, Unite UX makes it a piece of cake! If you download the Figma plugin, you can export all the data from the Figma file into Unite UX, and then export again from Unite UX. That Unite UX export package will include a ton of useful SASS files (one of which being _tokens.scss
) that you can add directly to your project. Boom, done.
Why Should Developers Care? No more copying and pasting styles! No more trying to come up with unique variable names, only to find out the design team is calling the same thing something completely different! No more trying to match padding values just by staring back and forth between some exported PDF and your browser until they start to look similar! Whew, I’m exhausted just writing all that.
Once you get past the high-level styles and into the nitty-gritty, that’s where the Inspect tool in Figma’s right sidebar is going to be your new best friend. Much like the inspect tool in every major browser, Inspect lets you drill down on a single Element and get all the details—helpfully formatted into CSS properties. You can get this info either as a list of properties, or as automatically generated code, both of which have quick copy options.
Why Should Developers Care? The Inspect tool is where Figma really shines for devs, by summarizing styles into CSS properties and even code snippets! As always, it’s not wise to blindly copy and paste machine-generated code, but this is super useful as a jumping off point to tweak and adjust. Leaps and bounds better than starting from scratch, using some kind of color-picker tool, or (shudder) attempting to match values by eye.
Finally, if there are any images or custom icons in the mockup, you’ll want those exported as well. Ideally, your designers will have marked the assets you need as Exportable—if this is the case, then you can select the Page or Frame that you want to export items from, open the Export Panel with Cmd+Shift+E (Ctrl+Shift+E), and export everything that they’ve marked from one place. If not, you’ll have to export assets one at a time. Select whatever you want to export and scroll down in the right sidebar until you see the Export section. There, you can customize your size and export file type (PNG, SVG, JPG or PDF), and click the Export button right below.
Why Should Developers Care? How many times have you had to put a project on hold in order to DM designers (who are probably busy with something else) and ask them to send you the assets you need? And then when you finally get those assets, you discover that they’re not high enough resolution, or you’re still missing something, or they’ve been exported as JPGs instead of ... well, literally anything else? Forget the back and forth, and instead feel confident getting what you need, when you need it, straight from the source files.
The design/dev handoff doesn’t have to be a pain point if both groups are willing to meet each other halfway. There are plenty of great products that have taken strides toward bridging this gap, but at the end of the day, even the best tool is only useful if you have a contextual understanding of what you’re doing with it. You don’t need to have a deep understanding of design concepts to benefit from getting comfortable with Figma. When developers are empowered to explore and work with the actual design source files, everybody wins!
]]>This article is suited for all levels of expertise using React.js, including beginners. This article promises to break down concepts as simply as possible.
To be able to follow through this article’s demonstration, you should have:
Diving right in, we are going to be building the KendoBnB app component and then publishing it using Netlify.
We will go through the process of setting up the development environment. Open your VS Code application, go to the extensions tab and search for “Kendo UI Template Wizard”.
The Kendo UI team is very passionate about making sure you build accessible web applications that scale easily using the Kendo UI library, and this pushed them to create this super helpful extension to scaffold your app. This is a GUI and totally worth it, especially for beginners.
Note: KendoReact is a commercial UI component library, and as a part of this you will need to provide a license key when you use the components in your React projects. You can snag a license key through a free trial or by owning a commercial license. For more information, you can head over to the KendoReact Licensing page.
Now that you have the template wizard installed in your VS Code, you need to restart the app and then open the Command Palette. Either go to View -> Command Palette, or use shortcut Command + Shift + P for Mac or Ctrl+ Shift + P on a PC. An input box will pop up in your VS Code, and here search for the Kendo UI Template Wizard and click on the launch button.
Choose a project name and type it in the box provided, and then choose where exactly on your machine you want it to be located. After doing that, click on the Next button.
The next step is to choose the framework. For us, we want a React application and so choose React.
Next thing is to select a blank page from the list of grid, form and charts since we will be building the component ourselves, and then click on create.
It will take 3 seconds to create, and your new React project is ready!
If you click “Open project in VS Code,” you’ll be taken to the project folder. Navigate to the components folder and delete all the components ending with .jsx except the Home.jsx file. We are trying to build a simple component which will not need things like header or footer or blank components.
Your app.js file should look like this after the clean up:
import React, {useState} from 'react';
import './App.scss';
import { BrowserRouter as Router, Route } from "react-router-dom";
import Home from './components/Home';
function App() {
return (
<Router>
<div className="content">
<h1>KendoBnB</h1>
<Route exact path="/" component={Home} />
</div>
</Router>
);
}
export default App;
The only route we have specified is the home route. The next thing to do is to open the terminal inside the new project file and run this command to install all necessary dependencies:
npm install
Now we are going to use two important KendoReact UI components to build our KendoBnB component: the React Card component and the React Dialog component.
The KendoReact Card component outputs accessible and easy-to-style markup. It is meant to be used as easily as every other component, be it yours or part of a UI component library. The Card has several configurable elements including header, title, subtitle, body, action, footer and image.
This is the modal element in the KendoReact library so that you can handle pop-up content in the most accessible way in your component. Dialogs communicate specific information and prompt users to take specific actions by interacting with a modal dialog. The KendoReact Dialog component is part of the KendoReact library of UI components. It is distributed through npm under the @progress/kendo-react-dialogs package.
Now to the home component to tie things together. Replace the content of the home.jsx file with the code block below:
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { Dialog, DialogActionsBar } from '@progress/kendo-react-dialogs';
import { Card, CardHeader, CardTitle, CardBody, CardActions, CardImage, CardSubtitle } from '@progress/kendo-react-layout';
class Home extends React.Component {
state = {
visible: false
};
toggleDialog = () => {
this.setState({
visible: !this.state.visible
});
}
render() {
return (
<div style={{ display: 'flex', justifyContent: 'space-evenly' }}>
{/* Modal code goes here */}
<div>
{this.state.visible && <Dialog title={"Please confirm"} onClose={this.toggleDialog}>
<p style={{ margin: "25px", textAlign: "center" }}>Do you want to continue to pay with Paypal?</p>
<DialogActionsBar>
<button className="k-button" onClick={this.toggleDialog}>No</button>
<button className="k-button" onClick={this.toggleDialog}>Yes</button>
</DialogActionsBar>
</Dialog>}
</div>
<div style={{width: '45%'}}>
<Card>
<CardImage src="https://wander-lush.org/wp-content/uploads/2021/01/Medellin-Airbnb-Penthouse-in-Laureles.jpg" />
<div>
<CardHeader>
<h1 CardTitle={true}>Comfy 1 Bedroom Condo Downtown</h1>
<div CardSubtitle={true}>
<span className="reviews">
<span className="k-icon k-i-star" style={{ color: '#ffce2a' }} />
<span className="k-icon k-i-star" style={{ color: '#ffce2a' }} />
<span className="k-icon k-i-star" style={{ color: '#ffce2a' }} />
<span className="k-icon k-i-star" style={{ color: '#ffce2a' }} />
<span className="k-icon k-i-star-outline" />
<div>$200/night (3 nights min.)</div>
</span>
</div>
</CardHeader>
<CardBody>
<p>The right place to be if you're in NYC, it comes with a pool, wifi access and a free parking lot where you can also smoke and have parties with friends.
</p>
</CardBody>
<CardActions>
<button className="k-button k-primary k-flat" onClick={this.toggleDialog}>Book Now</button>
</CardActions>
</div>
</Card>
</div>
<div style={{width: '45%'}}>
<Card>
<CardImage src="https://media.cntraveler.com/photos/5e9907c14ab09800086faf63/master/pass/airbnb-view-37143825.jpg" />
<div>
<CardHeader>
<h1 CardTitle={true}>Modern English Basement Apartment</h1>
<div CardSubtitle={true}>
<span className="reviews">
<span className="k-icon k-i-star" style={{ color: '#ffce2a' }} />
<span className="k-icon k-i-star" style={{ color: '#ffce2a' }} />
<span className="k-icon k-i-star" style={{ color: '#ffce2a' }} />
<span className="k-icon k-i-star" style={{ color: '#ffce2a' }} />
<span className="k-icon k-i-star-outline" />
<div>$200/night (3 nights min.)</div>
</span>
</div>
</CardHeader>
<CardBody>
<p>The right place to be if you're in NYC, it comes with a pool, wifi access and a free parking lot where you can also smoke and have parties with friends.
</p>
</CardBody>
<CardActions>
<button className="k-button k-primary k-flat" onClick={this.toggleDialog}>Book Now</button>
</CardActions>
</div>
</Card>
</div>
</div>
)
}
}
export default Home;
You see the two card elements and we initialized state function for the toggle for the dialog element and the card. The App.js file in the root folder should look like this:
import React, {useState} from 'react';
import './App.scss';
import { BrowserRouter as Router, Route } from "react-router-dom";
import Home from './components/Home';
function App() {
return (
<Router>
<div className="content">
<h2 style={{ display: 'flex', justifyContent: 'space-evenly' }}>KendoBnB</h2>
<Route exact path="/" component={Home} />
</div>
</Router>
);
}
export default App;
You can see the other routes and their imports have been deleted from this file, so ensure to do so too to avoid errors. If you run the app in the development server:
npm start
You’ll get this:
Now that you have the app running as you want, to prepare the app for production, run this command:
npm run build
This will minify all the files needed to deploy an app in production. You will notice a new folder called “build” in the project. Open the Netlify app here. Sign into your free account and click on Sites.
You will see a list of sites you have deployed using the platform, or if you are new you won’t see any projects there. Scroll down the list, and you will see a drag-and-drop section.
Drag the build folder into this space and voila! Your app is published.
This has been an introduction to starting a new React app, using KendoReact UI library to build React components and then deploying the app for free using Netlify. Now you can go ahead and build more products with KendoReact and Netlify. Happy hacking!
]]>A particle of sand—tiny and innocuous. But put a lot of sand particles together and we have something big—a force to reckon with. It is the smallest grains of sand that often add up to form massive beaches, dunes and deserts.
Most .NET developers are looking forward to .NET Multi-platform App UI (MAUI)—the evolution of Xamarin.Forms with .NET 6. Going forward, developers should have much more confidence in the technology stack and tools as .NET MAUI empowers native cross-platform solutions on mobile and desktop.
While it is a long flight until we reach the sands of MAUI, developer excitement is palpable in all the news/content as we tinker and prepare for .NET MAUI. Like the grains of sand, every piece of news/article/video/tutorial/stream contributes towards developer knowledge and we grow a community/ecosystem willing to learn and help.
Sands of MAUI is a humble attempt to collect all the .NET MAUI awesomeness in one place. Here's what is noteworthy for the week of October 18, 2021:
Behold, the next iteration of .NET MAUI—say hello to Preview 9. David Ortinau wrote up the announcement showcasing all the new hotness in .NET MAUI Preview 9, now running on top of .NET 6 RC2 and with VS 2022 Preview 5 tooling. New in this .NET MAUI release are updated implementations of several controls—BoxView, IndicatorView, ImageButton and WebView.
Adding to the UI jazz are new visual effects—Borders, Corners and Shadows, all powered by the new Microsoft.Maui.Graphics library with UI drawing APIs across platforms. Startup times for Android apps get a much needed boost with Startup Tracing which partially AOTs only the parts of your application executed during startup—thus achieving a balance between speed and app size optimization.
The latest .NET MAUI and ASP.NET Core release goodness stands on the shoulder of .NET—.NET 6 RC2 is now out. The RC2 release focuses on quality improvements and carries a 'go live' license for production apps—Rich Lander wrote up the usual detailed .NET 6 RC2 announcement post. .NET 6 ushers in C# 10—the next evolution of the mature C# language.
C# 10 features cater to developer productivity by extending existing capabilities of Records/Properties and enabling Global usings for less boilerplate code. .NET 6 will launch during .NET Conf November 9-11, with VS 2022 launch on Nov 8—.NET devs have a lot to look forward to.
The .NET MAUI Community Toolkit aims to elevate the developer experience with .NET MAUI by providing most commonly needed artifacts ready out of the box. While the core Toolkit team collaborates with .NET teams at Microsoft to move things forward, the .NET MAUI Community Toolkit is very much a community effort.
To that end, Brandon Minnick wrote up the guidelines to contribute to the open source .NET MAUI Community Toolkit—the whole process of creating a new feature is a well documented workflow. Most of the Approved Proposals have been community-driven and implementation help through approved contributions are much appreciated.
Excited about all the .NET MAUI news and not sure where to get started? Melissa Houghton recently spoke at Microsoft Reactor Sydney on .NET MAUI—a great overview of all things .NET MAUI. The talk covered latest news around .NET MAUI and the journey of evolution from Xamarin.Forms, diving into the productivity and performance gains that .NET MAUI brings to the table.
Melissa also talked about how Blazor plays into the .NET MAUI story of sharing code and showed off latest bits—this is a nice way to get started if you are new to the .NET MAUI world.
Developer Shaun Lawrence has built an excellent wordsearch game for Android/iOS with Xamarin.Forms and shared the developer experience during XamExpertDay. Curious to get a detailed look and a step by step guideline on how to build mobile games with Xamarin.Forms? Shaun recently started a blog series to walk developers through building a demo application, while discussing some of the concepts applied for sanity and maximum code reuse.
Real-world apps/games written with Xamarin.Forms require developers to have a handle on a myriad of things, like Data layer, MVVM support, Styling, UI paradigms, Behaviors, Effects and many more—Shaun would cover all the juicy details in upcoming blog posts. Be inspired, developers.
That's it for now.
We'll see you next week with more awesome content relevant to .NET MAUI.
Cheers, developers!
]]>