
Sign up to save your podcasts
Or


Code Sample
Json Serialization
With Blazor's implementation of WASM, the front end and the backend of a Blazor C# project is separated. This means that for the WASM project to run on the client side it needs to interact with a server to send and receive data. This is possible using API's however it's far too easy to create many api controllers for every reason to call to the server. With this Json Serialization pattern you will create a single API to send/receive data from the front end to the back end. This patterns prevents the creation of hundreds of API endpoints for Blazor WebAssembly applications as they grow.
This demo will be going over what code is needed to be added to both the frontend and the backend. And how to add additional queries to your application.
Thanks to Clear Measure for sponsoring this episode of Programming with Palermo.
This program is syndicated on many channels. To send a question or comment to the show, email [email protected]. We'd love to hear from you.
To use the private and confidential Chaplain service, use the following Gentleman: 512-619-6950 Lady: 512-923-8178
In this episode of Programming with Palermo, Jeffrey discusses the options and limitations of working with enumerated lists in .NET.
You can find the sample code on his github at https://github.com/jeffreypalermo/sample-enumerated-classes
Populating drop-down lists and multi-select lists has always been a challenge in interactive software. Some lists can be hard-code because they do not change (male/female, yes/no, day/night). Other lists have to be more dynamic, such as States the company services. Further, some known options in lists are required for business logic while others can be loaded from a database. Here are the general options you have to choose from the characteristics of them.
# Design options Java enums are very different from C# enums. In some way, Java has more built-in support in the language for richer enums, whereas C# leaves more up to the programmer. Regardless, any need can be satisfied with the right design pattern. The programmer must understand the tensions of the software in order to know the appropriate architectural element to introduce.
## Option 1: C# enumerations C# enums (enumerations) are compiled in code and have a value of an Int32 but can be made smaller by using the smaller integer types (short, etc). They have the name available as well as the integer value. Any change requires the software to be redeployed.
## Option 2: Enumerations with attributes With some custom reflection, one can add any number of attributes onto a enum value. This can allow any number of additional pieces of information to be attached. But new values cannot be dynamically loaded from a database or changes without redeploying the software.
## Option 3: Enumerating C# classes Enumerated classes is a design pattern that uses regular C# classes while making the usage syntax appear like a C# enum. No enum is actually used, but the intellisense experience and the syntax is nearly identical. This approach allows for an arbitrary number of additional properties on an enumerated value while also allowing properties to be updated at runtime as well as additional values in the enumerated listing to be added from any type of database.
# Summary Several very feasible options exist for managing drop-down lists and multi-select lists in applications. Each option comes with different capabilities and limitations before a change would require a redeployment of the software.

Thanks to Clear Measure for sponsoring this episode of Programming with Palermo.
This program is syndicated on many channels. To send a question or comment to the show, email [email protected]. We'd love to hear from you.
To use the private and confidential Chaplain service, use the following Gentleman: 512-619-6950 Lady: 512-923-8178
In today's episode, Jeffrey is going to talk about an architectural solution for code organization and dependency management. You may have witnessed a code base that was so coupled and so difficult to change, changing one thing caused two other things to break in a seemingly different part of the code base that was totally unrelated. Then you become afraid to make changes. After that happens, refactoring to better patterns just stops in an effort to avoid those breakages. When development slows, it produces more bugs than it fixed. Maybe it causes disruption in production. It's a symptom of flawed architecture and flawed architecture doesn't just mean your web app should have been a desktop or a mobile app. It means that there's an architectural element missing. When you find yourself drowning in a mountain of development work, just stop and back up and look for an architectural solution.
Back around 2008, Jeffrey published some articles on Onion Architecture, which has some specific tenants for managing dependencies and the different types of code in an application. Since then, Onion Architecture has been published and referenced in books, articles and tutorials online. There is a specific type of organizational structure for an application and that's what Jeffrey calls Onion Architecture. This leads to more maintainable applications, emphasizing the separation of concerns throughout the system. This architecture is not appropriate for just small websites, tiny applications, or small things that are short-lived or maybe even so targeted, you can basically memorize the whole code base and see it all together. This organizational structure is appropriate for long-lived business applications as well as applications with complex behavior. For example, it emphasizes the use of interfaces for behavior contracts and it forces the externalization of infrastructure.
Thanks to Clear Measure for sponsoring this episode of Programming with Palermo.
This program is syndicated on many channels. To send a question or comment to the show, email [email protected]. We'd love to hear from you.
To use the private and confidential Chaplain service, use the following Gentleman: 512-619-6950 Lady: 512-923-8178
Thanks to Clear Measure for sponsoring this episode of Programming with Palermo.
This program is syndicated on many channels. To send a question or comment to the show, email [email protected]. We'd love to hear from you.
To use the private and confidential Chaplain service, use the following Gentleman: 512-619-6950 Lady: 512-923-8178
Thanks to Clear Measure for sponsoring this episode of Programming with Palermo.
This program is syndicated on many channels. To send a question or comment to the show, email [email protected]. We'd love to hear from you.
To use the private and confidential Chaplain service, use the following Gentleman: 512-619-6950 Lady: 512-923-8178
From the publisher's feed