[{"content":"Expertise alienation is the condition in which an individual, due to possessing more knowledge and skills in a specific field than an average person, finds it challenging to connect or find others who can communicate with them on the same level or assist them. This does not imply that the person has given up on self-improvement; on the contrary, they continue to learn new things and challenge themselves. However, during this process, the number of individuals who can accompany them in both personal and professional life decreases, and the person may experience a sense of loneliness.\nIndividuals who have developed solutions in different industries, frequently changed jobs, and experienced various startup scenarios or those who have been involved in different projects in a large company are at a higher risk of expertise isolation.\nCareer Impacts #These individuals may find it more challenging to secure employment than expected. Many employers may perceive a highly competent individual in every field as a potential threat, and these concerns are not entirely unfounded.\nIf such an individual leaves a job, their absence can lead to significant financial losses. Continuing from where this person left off will be difficult for a new team or existing team members. Rediscovering the problems and solutions found by this person and understanding the reasons behind the decisions made will be necessary.\nIndividuals with expertise isolation may perceive an invitation to work within an average team as a problem since they believe they can handle shared tasks faster and better on their own. They may think that other team members will slow them down and make them unhappy, so they prefer not to work in such roles.\nSocial Interaction These individuals enjoy sharing knowledge and helping others but may make impulsive decisions, trying to support hardworking individuals like themselves. These impulsive decisions can lead to increasing isolation.\nThese individuals generally do not reveal everything they know upfront, and you learn about their expertise as you inquire.\nThe Importance of Expertise Isolation #When individuals experience expertise isolation, they continue to improve themselves, examine other jobs, provide constructive criticism, and present examples and alternatives. This situation is the key to progress in the business world and technology. Individuals facing expertise isolation can add value to the business world by developing new products and leading technology in various sectors. Therefore, individuals experiencing expertise isolation can gain a significant advantage in the competitive environment of the business world.\nHowever, along with these advantages, there are also some challenges. These individuals may struggle to find others who specialize like them, and their adaptation processes may be longer when changing jobs. At this point, it is important for employers and team leaders to seek out individuals experiencing expertise isolation and integrate them into the team. These individuals can make significant contributions to their teams with the deep knowledge and experiences they have acquired. Still, the hunger and satisfaction for continuous learning and development within them must be nurtured.\nPsychological Effects #Another overlooked aspect is that these individuals may experience psychological stress in their positions and within the scope of their abilities.\nNever satisfied with their current position, they will always seek better and increase their anger at each stage where they cannot progress.\nLet\u0026rsquo;s review statements from famous philosophers about recognizing one\u0026rsquo;s potential.\nRalph Waldo Emerson: \u0026ldquo;The person who is self-reliant is a teacher unto himself.\u0026quot;\nCarl Jung: \u0026ldquo;True maturity is achieved only by a person who discovers an internal presence and realizes his potential.\u0026quot;\nAbraham Maslow: \u0026ldquo;Discovering one\u0026rsquo;s true potential is the highest urge of a human being.\u0026quot;\nOscar Wilde: \u0026ldquo;Unless you are the master of your potential, you will be the servant of others.\u0026quot;\nIt is evident how important your potential and expectations of yourself are.\nHowever, what if, despite being aware of your potential and working hard, you cannot reach where you want to be? What if your small problems, economic difficulties, or social issues continue, and you struggle to cope with them? If you think you have not received the reward for the effort you have put in for years and feel like you are striving in vain, how will you behave?\nDuring this time, it is easy to see many people on social media who have earned serious incomes and social statuses in the technology sector. Why can\u0026rsquo;t you achieve this? If you continuously work, improve yourself, and think that you are no different from genuinely successful people, what is delaying your success?\nThese and similar thoughts can be much more dominant and destructive in individuals experiencing Expertise Isolation.\nWho is around you, the environments you are in, and the factors that limit your horizon are crucial factors affecting the answer to this question. We may not want to accept this, but if we look at it realistically, it will be clear.\nSometimes society may not be ready for a highly successful technological solution. Sometimes you may not be providing the solutions needed by the people where you want to be or may not see their problems.\nDo not think that I consider myself superior to others. It is clear that individuals who make more effort and work harder will develop themselves more. You also know that there is no final point you can reach in the technology field. There will always be individuals ahead of you, us, me.\nAs someone who has been serving in this industry for many years, has developed solutions, and worked day and night to improve myself, I know that many people are in the same situation, and we are not alone.\n","date":"10 December 2023","permalink":"https://19785411.runaho-dev.pages.dev/writing/expertise-alienation/","section":"Writing","summary":"The more you know, the fewer people can keep up. Expertise creates a kind of isolation — not loneliness exactly, but a shrinking pool of people who can meet you where you are. This is what I call expertise alienation, and I think most serious practitioners quietly recognize it.","title":"Expertise Alienation"},{"content":"As software developers, we all aspire to create the best project. We want to write perfect code and deliver an outstanding product by using the latest technologies, the best architectures, and the best practices.\nThink about various structures and architectures you\u0026rsquo;ve heard or experienced: CQRS, Minimal API, Micro Service, SSR, SPA, Rest, GraphQL, and more.\nWhen learning these technologies or using them in a project, you might have been enchanted by the idea that every project should be done this way. If that\u0026rsquo;s the case, you may have fallen into a misconception.\nBefore starting a project, we must not forget that our main job is to provide solutions. We are solving a problem or a set of problems, so understanding the problem well and determining how we will reach a solution is crucial.\nUsing entities, CQRS, or GraphQL in every project won\u0026rsquo;t always be the right choice. For a small project handling basic CRUD operations, you can build an SSR project without preparing a web service, or if flexibility is desired, a simple web service can be created with a small REST API and JWT.\nComplex structures used in previous projects, although familiar, can become a burden in small projects. It is important to understand the problem and choose the solution with a proper workload analysis.\nStarting a large project with a monolithic structure or a single service can lead to an excessive workload and duplicated code blocks in areas like validation, business logic, and feature implementation. Eventually, almost the entire project may need to be refactored.\nWhile understanding the problem is crucial for producing a solution, the chosen path to produce the solution should align proportionally with the project\u0026rsquo;s requirements and the business side.\nThe project\u0026rsquo;s delivery time, stages, forecasts, and the technologies and methods used can be disrupted or reach irreversible points.\nThis is precisely why the pursuit of the best can be a trap, for reasons like these and similar ones. Solutions produced without understanding the problem will eventually hit a roadblock.\nEndless Projects #Unfinished tasks, new projects, shelved, outdated, abandoned projects—mostly, the attention-grabbing points are where the solution attempted with the tech stack matches.\nLet\u0026rsquo;s consider this as a corporate decision. The necessity of solutions used in a project being proportional in terms of workforce on the employer side comes into play here. In a large project, how can we divide the project? How many people have access to this information and have the ability to intervene and add innovations?\nIn some projects, these questions are crucial, so making the right decisions from the start is crucial for the project to succeed.\nIn small projects, working as a team to reduce the workload can have the opposite effect. Cycles of waiting for each other within the team start, and efficiency decreases. When evaluating all these aspects, the question of what to do naturally comes to mind.\nTo solve the problem, it is important to estimate the foreseeable size of the project and adopt a realistic approach. Rather than adding infinite features to a product, if your solution is substantial, presenting it in small solutions as a whole product will be a good example.\nUnderstanding the problem well and analyzing the solution, determining the capabilities the solution will provide, and how it will provide them are crucial.\nThen, think about where additions can be made to the structure. If the project does not meet the desired feature, avoiding modifying the project and creating another solution to integrate into the project is essential.\nIn short, the algorithm of the product or at least its features should emerge as clearly as possible first. Then, the development process can proceed in a more transparent and understandable way.\n","date":"5 December 2023","permalink":"https://19785411.runaho-dev.pages.dev/writing/creating-best-project-perfection/","section":"Writing","summary":"The obsession with the perfect architecture is itself the obstacle. Every experienced developer has been enchanted by CQRS, Minimal API, microservices — the idea that every project deserves this level of craft. Most do not, and knowing the difference is the actual skill.","title":"Creating the Best Project Obsessed with Perfection"},{"content":"I learned Go in 10 days — here\u0026rsquo;s exactly what I built and how.\nGetting Started with Go (Day 1-2)\nI started my journey by immersing myself in Go. For the first couple of days, I watched tutorial videos, read documentation, and practiced the basics of Go syntax for about 6 hours each day. I was pleasantly surprised by how intuitive and simple the language was, making it easy to grasp the fundamentals quickly. A Tour of Go for the C# Developer - Jeremy Clark - NDC London 2021\nBuilding a High-Performance Web Service (Day 3-4)\nOn day three, I dived into practical application. I decided to build a web service using Echo, a high-performance framework for Go. Over the course of two days, I learned how to use service classes, create custom types, implement middleware for request handling, set up logging, apply rate limiting, render HTML templates, manage user sessions, and implement JWT authentication. This experience was invaluable for understanding how Go can be applied in real-world projects. High performance, minimalist Go web framework\nExploring Database Modeling with ENT (Day 5-6)\nTo take my skills further, I explored ENT, a code-first approach to database modeling and querying in Go. I dedicated two days to learning how to define database schemas, perform CRUD operations, and use migrations to evolve the database schema over time. This was a crucial step in understanding how Go can work seamlessly with databases. An entity framework for Go\nComparing Database Libraries (Day 7)\nI decided to experiment with different database libraries in Go to understand their features and performance. I explored libraries like Upper DB and GORM, comparing their strengths and weaknesses. This allowed me to make informed choices in future projects based on specific requirements. UPPER DB -Data access layer for PostgreSQL, CockroachDB, MySQL, SQLite and MongoDB with ORM-like features.\nGORM ORM library for Golang, aims to be developer friendly\nCreating Dynamic Web Pages with HTMX (Day 8)\nDay eight was all about frontend development. I integrated HTMX, a library that lets you access modern web features with HTML. I learned how to use templating engines like Tailwind, Daisy, and Go Razor to create dynamic and responsive web pages. This was a crucial skill to complement my backend development expertise. Echo\nTailwind\nDaisy UI\nHTMX\nTailwind\nDaisy\nGoRazor\nFull-Stack Web App with Iris (Day 9-10)\nFor the final leg of my journey, I tried out Iris, another popular web framework for Go. Over two days, I built a full-stack web application using Iris. I delved into templating, created controllers, implemented JWT authentication for secure user authentication, and set up routing to make a fully functional web app. There is Iris example Links. Iris\nTemplates\nAUTH\nBootstrapper\nConfiguration\nLogging\nRouting\nViews\nDatabases\nNow I feel confident and ready to take on more challenge with Go. It\u0026rsquo;s such a fun and powerful language that I can\u0026rsquo;t wait to learn more about it!\nTen days of hard work, learning, and dedication might seem like a daunting task, but remember, the path to success is paved with small steps and persistence. Keep pushing forward, and you\u0026rsquo;ll amaze yourself with what you can accomplish. 🚀💪\n","date":"15 October 2023","permalink":"https://19785411.runaho-dev.pages.dev/engineering/my-go-learning-journey/","section":"Engineering","summary":"Ten days, one language, several working programs. I came from a decade of C# and expected Go to feel foreign — instead it felt like a corrective. A record of what I built, what surprised me, and what Go does differently that is worth paying attention to.","title":"My 10-Day Journey of Learning Go: Building Web Apps and More!"},{"content":"About the post #In this blog post, I will show you how to use HttpResults.Results for Minimal API Methods in .NET Core HttpResults.Results is a class that provides a set of typed results for common scenarios, such as Ok, BadRequest, Problem, ValidationProblem, etc. These results can be used to return consistent and meaningful responses from your API methods, without having to write a lot of boilerplate code.\nTo demonstrate the usage of HttpResults.Results, I will create a simple login method that takes a LoginInput object as a parameter, and returns a LoginPayload object if the login is successful, or an appropriate error result if not. The LoginInput object contains the email and password of the user, and the LoginPayload object contains an AuthToken object that has the JWT token and other information about the user.\nThe login method will use an IDataContext interface to access the database, and an ITokenService interface to generate the JWT token. These interfaces are injected into the method using dependency injection. The IDataContext interface has a Login method that takes the email and password, and returns a User object if the login is valid, or throws an exception if not. The ITokenService interface has a GenerateToken method that takes the user details and returns a JWT token.\nThe login method will also use a MiniValidator class to validate the LoginInput object, and return a ValidationProblem result if there are any validation errors. The MiniValidator class is a simple wrapper around FluentValidation that allows you to define validation rules using lambda expressions.\nWhat is Minimal API in .NET Core? #Minimal API is a lightweight and minimalistic way of building HTTP APIs in .NET Core. It is designed to simplify the process of creating APIs without the overhead of traditional ASP.NET Core applications. With Minimal API, you can define your routes and handlers in a more concise and straightforward manner.\nThere is a example for Minimal API.\nvar builder = WebApplication.CreateBuilder(args); var app = builder.Build(); app.MapGet(\u0026#34;/hello\u0026#34;, () =\u0026gt; { return \u0026#34;hello world\u0026#34;; }); app.Run(); Using HttpResults.Results for Minimal API Methods in .NET Core #In the world of .NET, Minimal API has gained popularity for its simplicity and ease of use. One important aspect of building web applications is handling HTTP responses effectively. In this article, we will explore how to use HttpResults.Results to handle HTTP responses in Minimal API methods.\nThere is an example for HttpResults.Results with Minimal API.\nusing Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Http; var builder = WebApplication.CreateBuilder(args); var app = builder.Build(); app.MapGet(\u0026#34;/hello\u0026#34;, async Task\u0026lt;Results\u0026lt;Ok, ProblemHttpResult, BadRequest, ValidationProblem\u0026gt;\u0026gt; { var results = new List\u0026lt;HttpResult\u0026gt; { HttpResults.Results.Ok(new { message = \u0026#34;Hello, world!\u0026#34; }), HttpResults.Results.BadRequest(new { error = \u0026#34;Bad request\u0026#34; }), HttpResults.Results.ValidationProblem(new ValidationProblemDetails(new Dictionary\u0026lt;string, string[]\u0026gt; { { \u0026#34;username\u0026#34;, new[] { \u0026#34;Username is required\u0026#34; } }, { \u0026#34;password\u0026#34;, new[] { \u0026#34;Password must be at least 8 characters long\u0026#34; } } })), HttpResults.Results.Created(new { message = \u0026#34;Resource created\u0026#34; }) }; return results; }); app.Run(); Handling HTTP Responses with HttpResults.Results #In Minimal API methods, you often need to send appropriate HTTP responses back to clients based on the outcome of your operations. HttpResults.Results is a powerful tool that simplifies this task by providing a convenient way to create and return HTTP results.\nLet\u0026rsquo;s take a look at an example Minimal API method for user login:\napp.MapPost(\u0026#34;/login\u0026#34;, async Task\u0026lt;Results\u0026lt;Ok\u0026lt;LoginPayload\u0026gt;, ProblemHttpResult, BadRequest\u0026lt;RequestMessage\u0026gt;, ValidationProblem\u0026gt;\u0026gt; (LoginInput loginInput, IDataContext dataContext, ITokenService tokenService) =\u0026gt; { // Validation using MiniValidator MiniValidator.TryValidate(loginInput, out var errors); if (errors.Any()) { return Results.ValidationProblem(errors); } try { var user = await dataContext.Login(loginInput.Email, loginInput.Password); var token = new AuthToken(tokenService.GenerateToken(user.Email!, user.FullName!, user.Picture, user.UUID, user.RolesAsString)); return Results.Ok(new LoginPayload(token)); } catch (TaskCanceledException ex) { return Results.BadRequest(new RequestMessage(ex.Message, ProblemConstants.AuthTitle)); } catch (Exception ex) { return Results.Problem(ex.Message, ProblemConstants.AuthTitle); } }); In this example, we have a Minimal API endpoint for user login. We use HttpResults.Results to create different types of HTTP responses based on the outcome of the login operation.\nResults.ValidationProblem(errors) is used to return a validation problem response if there are input validation errors.\nResults.Ok(new LoginPayload(token)) is used to return a successful response with a token payload.\nResults.BadRequest(new RequestMessage(ex.Message, ProblemConstants.AuthTitle)) is used to return a bad request response in case of a TaskCanceledException.\nResults.Problem(ex.Message, ProblemConstants.AuthTitle) is used to return a generic problem response for other exceptions.\nMiniValidator #The LoginInput class is a simple class that represents the login request from the client. It has properties such as Email and Password.\nHere is the code for the LoginInput class:\npublic class LoginInput { [Required] [EmailAddress] public string Email { get; set; } = null!; [Required] [MinLength(6)] [MaxLength(20)] public string Password { get; set; } = null!; } The LoginInput class also has some data annotations to specify validation rules for its properties. For example, [Required] means that the property cannot be null or empty, [EmailAddress] means that the property must be a valid email address, etc.\nThe MiniValidator by Damian Edwards is a simple \u0026amp; awesome wrapper around FluentValidation that allows you to define validation rules using lambda expressions.\nThere is a example for validation.\nMiniValidator.TryValidate(loginInput, out var errors); if (errors.Any()) { return Results.ValidationProblem(errors); } Implementing the Login Operation #To provide a better understanding, let\u0026rsquo;s briefly review the implementation of the Login method, which is called within the Minimal API handler:\npublic async Task\u0026lt;User\u0026gt; Login(string email, string password) { var user = await DatabaseContext.Users.Where(w =\u0026gt; w.Email == email).FirstAsync(); if (user is null) { throw new TaskCanceledException(\u0026#34;Account not found!\u0026#34;); } if (!user.IsMailValid) { throw new TaskCanceledException(\u0026#34;Account not valid!\u0026#34;); } var isPasswordCorrect = (user.Hash == HashService.HashString(password, user.Salt)); if (!isPasswordCorrect) { throw new TaskCanceledException(\u0026#34;Password or Email wrong!\u0026#34;); } return user; } In the Login method, we perform various checks and validations and throw specific exceptions based on the outcome. These exceptions are then caught in the Minimal API handler, and appropriate HTTP responses are generated using HttpResults.Results.\nJSON Result Examples #Here are some examples of the JSON responses that correspond to the HTTP results we discussed:\nValidation Problem Response #{ \u0026#34;errors\u0026#34;: { \u0026#34;Email\u0026#34;: [ \u0026#34;The Email field is required.\u0026#34;, \u0026#34;The Email field must be a valid email address.\u0026#34; ] } } Successful Response Status: 200 OK #{ \u0026#34;token\u0026#34;: \u0026#34;eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InVzZXJAZXhhbXBsZS5jb20iLCJmdWxsbmFtZSI6IlVzZXIgTmFtZSIsInBpY3R1cmUiOiJodHRwczovL3d3dy5naXRodWIuY29tL3dwLWNvbnRlbnQvdXBsb2Fkcy9tYXN0ZXIvaW1hZ2VzL3VwbG9hZHMvMjAwMDAwMDAvcHVibGljL2ltYWdlL3VwbG9hZHMvMjAxOS8wMy9wbHVnLmpwZyIsInVVSUQiOiJ1c2VyLXVVSUQiLCJyb2xlcyI6WyJhZG1pbiJdfQ.ZPtUdajPYIQ_Rje9rDrUN8yYf5R2FtstY4Wi54TykLc\u0026#34; } Bad Request Response Status: 400 Bad Request #{ \u0026#34;message\u0026#34;: \u0026#34;Account not found!\u0026#34;, \u0026#34;title\u0026#34;: \u0026#34;Auth Title\u0026#34; } Problem Response Status: 500 Internal Server Error #{ \u0026#34;message\u0026#34;: \u0026#34;An unexpected error occurred.\u0026#34;, \u0026#34;title\u0026#34;: \u0026#34;Auth Title\u0026#34; } Conclusion #Handling HTTP responses effectively is crucial when building web APIs, even in Minimal API projects. HttpResults.Results simplifies the task of creating and returning HTTP responses, making your code more readable and maintainable. By using this approach, you can provide meaningful feedback to clients and ensure a smooth API experience.\nIn this article, we\u0026rsquo;ve explored how to use HttpResults.Results for Minimal API methods in .NET Core. We\u0026rsquo;ve also seen how it can be applied in a real-world scenario, such as handling user login operations.\nTo clarify briefly; With these two methods you can develop complex web services incredibly fast. The Minimal API, combined with MiniValidator, provides a great convenience, and when Results is used on top of them, we write more controllable code for the front-end, and at the same time, we minimize our error probability and check every possibility.\nThank you for reading.\n","date":"7 October 2023","permalink":"https://19785411.runaho-dev.pages.dev/engineering/minimal-api-minivalidator-dotnet/","section":"Engineering","summary":"HttpResults.Results gives Minimal API methods typed, consistent return shapes without boilerplate. Pair it with MiniValidator and you get clean validation flow in a few lines. This post shows exactly how the wiring works with real examples.","title":"Using HttpResults.Results for Minimal API Methods with MiniValidator in .NET Core"},{"content":"Hello, first of all, I should tell you that I have been developing projects for more than 7 years and I really enjoyed blazor. 2 server product, 2 wasm product, 2 maui product i developed. I would like to share the problems I have experienced in general.\nBegining #Initial impression may be positive, but as development progresses, serious problems can arise. I\u0026rsquo;ve developed two applications using Blazor Server, Blazor WASM, and Blazor MAUI.\nVSCode Or Visual Studio #Encountering issues with vscode and intellisense is a major concern. At times, the components you define and accessible components may appear as errors, although there are no errors during the build and the project functions correctly. This discrepancy can be confusing, and some correct code may appear incorrect, leading to ignoring these errors.\nBlazor Server #The authentication process in Blazor Server is troublesome because the entire application runs over the signalr socket. When the socket connection is lost, the user is also disconnected (e.g., page refresh, opening in a new tab).\nTo address this, storing the user\u0026rsquo;s claim model in the browser\u0026rsquo;s session storage with protected storage can solve the refresh problem. However, writing your own authentication middleware is necessary. If you want to open a separate signalr hub in your Blazor Server project and use it, you need to specify another authentication method because the socket connection does not reach the user. To overcome this, I resolved the issue by using authentication in ticket logic with JWT.\nAdditionally, rendering can become challenging since authentication is rendered in the browser while the component is rendered on the server. This requires rendering each component twice, with the first rendering lacking authentication. Authentication is dynamically retrieved from the browser at the end of the first render using JavaScript in the background and rendered again. This might explain why the component sometimes works and sometimes doesn\u0026rsquo;t. In some cases, you might need to use while in others, manually checking the service injection in an extra component is necessary. also @attribute [Authorize] this is not working sometimes too. It\u0026rsquo;s important to note that these problems cannot be completely solved with JWT or OAuth. Furthermore, there have been instances where the code provided in Microsoft\u0026rsquo;s documentation didn\u0026rsquo;t work, such as in the case of creating an in-memory state container service MSDN ASP.Net Core 7 In-memory state container service, where the direct statechanged method on the component side didn\u0026rsquo;t work as shown in the example. The solution is to write a separate handler:\nprivate async void OnMyChangeHandler() { await InvokeAsync(() =\u0026gt; { StateHasChanged(); }); } Unfortunately, what works in one place may not work in another. Communication issues between the browser and itself during the rendering process, along with the lack of sufficient NuGet packages, make accessing certain browser APIs difficult.\nRazor #If the initial parameter in many components is empty due to the component\u0026rsquo;s lifetime, it becomes necessary to implement checks and controls during rendering. However, this approach may appear somewhat hacky and not ideal from a coding standpoint.\nWriting code like the following at the beginning of a component is not ideal:\nif (mylist == null) { return; } else if (mylist.Any()) { \u0026lt;NoItemComponent/\u0026gt; return; } /// Your Component Starts Here To avoid this, you can consider checking and calling the component where it\u0026rsquo;s invoked, passing the complete list directly. However, personally, I prefer a more dynamic approach by passing the required data as a parameter and retrieving it from an injected service within the component. Unfortunately, after the OnParametersSetAsync method, the list becomes null, necessitating a preliminary check.\nIdeally, i wish we could handle this directly with directives, similar to Angular. For example:\n\u0026lt;div @foreach=\u0026#34;mylist\u0026#34;\u0026gt; // code \u0026lt;/div\u0026gt; \u0026lt;div @if=\u0026#34;\u0026#34;\u0026gt; // Some Codes \u0026lt;/div\u0026gt; When we do it this way and define the list as nullable, we should be able to continue our operations without any errors. Of course, if it is not null, we will have control, but since these operations take place asynchronously after pulling the data, it will provide a more controlled development opportunity without errors in the component rendering parts. It is better to have the parts under my control after pulling or pulling the data. It is really sad to resort to tricks like this so that the component does not get a direct error while loading.\nBlazor WASM #While some of these problems are alleviated when switching to Blazor WASM since it works entirely in the browser, new issues arise, particularly with async multi-thread operations due to browser limitations. The in-memory state container service problem persists here as well. Additionally, since it\u0026rsquo;s a single-page application (SPA), extensive code separation with the API becomes necessary for security purposes, which I also coding this way generally.\nBlazor MAUI #Now, let\u0026rsquo;s discuss Blazor MAUI. Reusing components from the web application is great, but it\u0026rsquo;s also the most unstable part. It\u0026rsquo;s unbelievable that the project may not even compile when you open it after a week. Signing is a painful process, and even following the documentation precisely, you may need to compile it using the terminal. Unfortunately, whatever you try in the options section or csproj doesn\u0026rsquo;t provide a solution. I\u0026rsquo;ve compiled and published the application for both Android and iOS, and both were challenging experiences, particularly the iOS part. Signing is already laborious, and although I understand this, there is no clear solution to learn from. You can try methods mentioned in the documentation, YouTube, or Stack Overflow, but none of them are guaranteed to work, and you may encounter problems with all of them.\nIn reality, signing problems are not limited to Blazor but this is the worst i ever seen.\nTo summarize; # Insufficient libraries. An unstable IDE. Code that may work one day but not the next. Examples provided in documentation that may not work in practice. These issues generate feelings of insecurity during the development of a enterprise product and may drive you towards considering an alternative framework.\n","date":"19 June 2023","permalink":"https://19785411.runaho-dev.pages.dev/engineering/blazor-development-challenges/","section":"Engineering","summary":"I have shipped six Blazor products — Server, WASM, and MAUI — and I genuinely like the technology. But the gap between the promise and the day-to-day reality is real, and most articles about Blazor do not talk about it honestly. This one does.","title":"Unveiling the Challenges of Blazor Development: Navigating Through Insufficient Libraries and Unstable Experiences"},{"content":"Razor Pages Page Model NDPE #In this experiment, we will create a todo project with the Razor Pages Page Model Design pattern and explore its advantages and disadvantages. The Razor Pages Page Model is a design pattern for developing web applications using the .NET framework.\nIf you started directly with this post, I strongly recommend you to read the first post.\nTesting .NET Core Web Design Patterns Details\nRazor Pages is a popular web design pattern in .NET development, offering an easy-to-understand structure for building web applications.\nOur first example is /todos/index, which demonstrates how to perform CRUD operations on a single page. This example is accessible from the main menu and is a great starting point for beginners.\nOur second example, /todo, uses AJAX to perform the same CRUD operations. While this is a commonly used method in Razor and MVC, it does have some drawbacks. Interacting inside the page using forms can cause serious problems when trying to do everything on a single page. For example, finding the value of a checkbox in the list and reversing it instead of accessing it directly can create issues that are unacceptable when developing a complete product.\nTo avoid such problems, recommend the third example: the Model/Action pattern suggested by Microsoft. This pattern requires creating a separate cshtml for your model, your page, and for each operation. For instance, todo/add.cshtml, todo/update.cshtml, todo/remove.cshtml, todo/index.cshtml, and todo/list.cshtml. While this approach may not have a reactive structure, it is a more solid structure recommended in Razor Pages and MVC.\nIt is worth noting that using Razor Pages without controllers can have its advantages and disadvantages. While it offers a simple and intuitive structure, there are limitations to what can be accomplished on a single page. In addition, refreshing the page can result in the method name appearing directly in the URL. Sure, here\u0026rsquo;s an edited version of the section:\nPros and Cons of the Tested Methods #1. Creating a Structure Using Multiple Forms Inside a Page # Pros:\nAbility to perform CRUD operations on a single page Properties defined on the Page Model can be accessed by other requests No need to write Ajax requests No need to worry about rendering HTML with JavaScript Cons:\nManaging and writing multiple form tags on the same page can be difficult The page has to be refreshed, resulting in the page-handler being appended to the URL (e.g., /todos?handler=add) Issues can arise when navigating back and forth in the browser, such as: Resubmitting the form, which may lead to extra testing if the logic is corrupted in the calculated data Rendering old HTML, which may result in requests being sent for non-existent data Overall, this method can be useful for simple applications, but it may become cumbersome to manage as the application grows. Additionally, the need to refresh the page and the potential for issues with navigation make it less optimal compared to other methods.\nI would like to add the following as a note on this subject. One of the methods that can be done so that the digits do not appear in the url is to redirect the method back to get. But when we do this, the objects defined on the page model will be set again, which causes the objects to not maintain their current values. Again, it is a preferable subject.\n2. Creating a structure using Ajax for performing operations on a single page # Pros:\nThe page is not refreshed, providing a smoother user experience. Visual features such as loading indicators and click blocking can be added. Changes in the data (such as addition, deletion, etc.) are reflected immediately. The HTML code is cleaner and more concise. Cons:\nThe use of JavaScript is necessary for rendering elements dynamically on the page, which requires additional coding and testing. The development of a dynamic structure using Ajax requires significant amounts of code. In order to pass data to the server-side, it must be converted to JSON or rendered using both Razor and JavaScript. It is important to thoroughly test and validate Ajax requests to prevent errors such as duplicate requests or failed requests due to network issues. 3. Using the Model/Action pattern # Pros:\nOrganizes the project and reduces the amount of code to write by creating separate pages for each process. Provides a solid structure and allows for safe error control and validation. Once the structure is learned, it offers convenience as the same structure is used in all transactions. Cons:\nCannot be used reactively from a single page. Separation of everything can lead to longer user operations and extended learning time. Although this can become a plus once learned, it may be difficult to learn at first and can become tedious due to the amount of repetition over time. Conclusion #Thank you for following our series on Razor Pages Page Model. In this post, we covered three different methods for creating a web application with Razor Pages: using multiple forms on a single page, using Ajax for dynamic updates, and separating each action into its own model/action page.\nEach method has its own advantages and disadvantages, and we hope that this series has helped you understand which method is best for your specific needs. Regardless of the method you choose, creating a proper structure is important for efficient and maintainable development.\nIf you missed any of the previous posts, you can find them below:\nI hope you found this series helpful and informative. If you have any questions or feedback, please don\u0026rsquo;t hesitate to reach out. And stay tuned for our next series on .NET web development!\nGithub - NDPE Razor Pages\n","date":"24 March 2023","permalink":"https://19785411.runaho-dev.pages.dev/notes/experiments-ndpe-1/","section":"Notes","summary":"Razor Pages Page Model under the microscope: three approaches, real trade-offs, one honest conclusion.","title":"NDPE [1] - .NET Web Design Pattern Razor Pages Page Model"},{"content":"Project Details for .NET Core Design Patterns Experiments NDPE #Greetings! In this blog post series, we will be testing various .NET Core web design patterns to evaluate their pros and cons. For our experiment, we will create a ToDo project.\nOur aim is to test a project that connects to a database with a simple ORM and performs CRUD operations using different web design patterns. We want to find out which pattern is best suited for a particular project size and how easily we can achieve our goals using that pattern.\nPurpose of This Experiment #This experiment has been developed to find out what can be done in each design pattern with minimal effort while developing projects. We aim to evaluate the development process and workload of each pattern and conclude which pattern supports the fastest and easiest method for performing CRUD operations.\nOur main objective is to create a project that allows us to add, remove, and update ToDo items in the fastest and simplest way possible. We prefer to perform all these tasks on a single page to simplify the user experience.\nTechnologies and Frameworks Used in This Experiment # ASP.NET Core Razor Pages Page Model Entity Framework Core Bootstrap .NET Starter Layouts Minimal API In-Memory Database Provider Project Setup #Our project will use a simple ToDo model with in-memory Entity Framework Core. We will also use a shared project to reduce code repetition and shorten the development process. The shared project will include the web service request methods and the database.\nFor the Web API, we will be using the Minimal API design pattern with the following endpoints:\nConclusion #In this blog post, we have introduced our project for testing various .NET Core web design patterns. Our main objective is to create a ToDo project that allows us to perform CRUD operations in the fastest and simplest way possible. We have also listed the technologies and frameworks we will be using in this experiment and provided source links for each of them.\nStay tuned for our next blog post, where we will dive deeper into the Razor Pages Page Model design pattern and discuss its pros and cons.\nGithub .NET Core Design Patterns Experiments\n","date":"20 March 2023","permalink":"https://19785411.runaho-dev.pages.dev/notes/experiments-ndpe-0/","section":"Notes","summary":"Setup and goals for the .NET Design Patterns Experiment: testing Razor Pages, MVC, and Minimal API on a single ToDo project.","title":"NDPE [0] - .NET Core Web Design Patterns Details"},{"content":"Setup #Greetings, First, let me talk about the project in basic terms. We aim to try a project that connects to a database with a simple orm and performs crud operations in many technologies and to extract the pros and cons for us.\nWhat is the real purpose of this experiment?\nThis experiment; # It can contribute to choosing which of the .net web patterns to use in which project size. It has been developed to find out what can be done in which pattern with little effort while developing projects. Of course, we can reach the same results with all patterns by trying hard. But what I want to show here is how we can evaluate and conclude the processes with the natural functioning of the pattern we are trying. How the developer evaluated this process and how much workload it created. What we are testing is the fastest and easiest method the pattern supports, rather than the best or idealized hardest method. Tested business; #Functionality is what we are testing in this project. How can we add, remove and update Todo in the fastest and simplest way?\nWe prefer to be able to do it all easily on a single page.\nOur models will be simple and short. Let\u0026rsquo;s get to work.\nDatabase #Simple one model Todo.cs in-memory Entity Used.\nWeb API #Simple Minimal API Design Pattern with these endpoints;\ntodoitems (Get,Post) todoitems/complete (Get) todoitems/{id} (Put,Delete). Shared Code #Web service request method\u0026rsquo;s and Database is on Shared project for reduce code repetition and to shorten the development process both to use the same code and to ensure that the tests give more accurate results and to shorten the process.\nFront End #Simple Bootstrap .NET Starter Layouts\nRazor Pages Page Model #I prepared three tests on Razor pages.\nThe first one is /todos/index which you can access from the first menu. Here we do crud operations on a single page.\nOur second example is the link /todo where we do the same operations with ajax. Obviously this is a method that is constantly used in razor and mvc.\nThe third is the MVC and Pages Design pattern that you can access with Todos/add Todos/update, which is both recommended by microsoft and generally recommended.\nYou create a folder, list it with Index, do the crud operations related to the add update remove files and you will have a proper structure.\nThere are some advantages and disadvantages of using models of pages without using controllers in development.\nFrankly, interacting inside the page using forms causes serious problems when you try to do everything on a single page. First of all, we had to find the value of the checkbox in the list and reverse it instead of accessing it directly, in order to update the isDone checkbox when the todo is clicked. This and some similar solutions are unfortunately unacceptable when you develop a complete product.\nIn addition, it is a serious problem that the page is refreshed and the method name is directly in the url.\nUnfortunately, in order not to deal with such problems, you need to go to the ajax example. If you are going to make a dynamic page and throw multiple requests in it, you have to do it with javascript and give up all the advantages of razor. In the result methods in Ajax, you must add or delete elements in the html with js or print another message. When you do these, you don\u0026rsquo;t actually use razor.\nWhat remains is the model/action pattern suggested by microsoft. Here you need to create a separate cshtml for your model, your page, and for each operation. such as todo/add.cshtml, todo/update.cshtml, todo/remove.cshtml, todo/index.cshtml, todo/list.cshtml.\nWhen we proceed in this way, yes, we do not have a reactive structure, but this is the structure recommended in razor pages as in MVC. We have a more solid structure.\nPros and cons of the tested methods; #1.Creating a structure using more than one form inside a page; #Pros;\nTo be able to perform these operations in a single page somehow. The properties defined on the Page Model are accessible by other requests. Not writing Ajax request. We don\u0026rsquo;t have to worry about rendering html with javascript. Cons;\nWhen there are more than one form tag on the same page, it becomes difficult to manage and write. The page has to be refreshed. Writing the page-handler to the url when the page is refreshed. eg: /todos?handler=add Problems of operations such as going back and forward from the browser:; \u0026ndash; resubmitting the form: (the need for extra testing if the logic is corrupted in the calculated data), \u0026ndash; rendering of old html: (sending requests about non-existent data), 2.To create a structure where we can do these things on a single page using Ajax. #Pros;\nThe page is not refreshed. Visual additions such as loading, click blocking, etc. can be made. Operations such as addition, subtraction, etc. can be viewed immediately. Html looks cleaner. Cons;\nNow, instead of rendering using C#, it is necessary to create html elements with javascript and print them on the screen. It is necessary to control the listing and functionality and create a dynamic structure. Too much js code needs to be written and tested. Since the data comes from the model when the page is opened, it must either be converted to json and sent to the method, or it is necessary to do the rendering with both razor and js, which causes the same job twice. It is necessary to check the request on the Ajax side, is it gone? didn\u0026rsquo;t he go? Is the answer wrong? Is the internet down? It is loaded in these processes and codes must be written to prevent it from being sent again. 3. Separating the pages that take action in the form of model/action one by one. #Pros;\nCreating a separate page for each process ensures that the project is organized and the codes can be prepared faster with less writing. It has a more solid structure and operations such as error control and validation can be done safely. Once the structure is learned by the end user, it provides convenience as the same structure is used in all transactions. Cons;\nCannot be used reactively from a single page. Separation of everything causes prolongation of the operations performed by the user and prolongs the learning. Although this can turn into a plus once learned, it is difficult to learn at first and becomes boring because it causes too much repetition over time. MVC #SPA Blazor #SSR Blazor #Blazor MAUI Hybird APP #API Pattern #.NET Web Design Patterns Experiments (MVC, Razor Pages Page Model, Blazor)\nIn this blog post, I will explore some of the web design patterns that can be used with .NET technologies such as ASP.NET Core and Blazor. I will also create some test todo projects to demonstrate how these patterns work in practice.\nWhat are web design patterns?\nWeb design patterns are reusable solutions or best practices for common web development problems. They help developers to write clean, maintainable and scalable code that follows the principles of separation of concerns, modularity and reusability.\nSome of the most popular web design patterns are:\nModel-View-Controller (MVC): This pattern separates an application into three components: model (data), view (user interface) and controller (business logic). The controller handles user requests, interacts with the model and returns a view to display. MVC is widely used for building dynamic web applications with ASP.NET Core. Razor Pages Page Model: This pattern is similar to MVC, but instead of using controllers and views, it uses Razor Pages. Razor Pages are files with a .cshtml extension that contain both HTML markup and C# code. Each Razor Page has a corresponding Page Model class that contains the logic for handling requests. Razor Pages can make coding page-focused scenarios easier and more productive than using controllers and views. Blazor: This pattern is a framework for building interactive web UIs using C# instead of JavaScript. Blazor can run on the server-side or on the client-side using WebAssembly. Both Blazor WebAssembly and Server use Razor components, which are reusable UI elements that can contain HTML markup and C# code. Blazor enables full-stack development with .NET. How do they work with test todo projects?\nTo compare these web design patterns, I will create three simple todo projects using ASP.NET Core MVC, Razor Pages Page Model and Blazor WebAssembly respectively.\nThe projects will have the following features:\nA home page that displays a list of todo items A form to add a new todo item A button to mark a todo item as completed A button to delete a todo item The projects will use an in-memory list as the data source for simplicity.\nASP.NET Core MVC\nThe ASP.NET Core MVC project consists of four files:\nModels/TodoItem.cs: This file defines the TodoItem class that represents a single todo item with properties such as Id, Title and IsCompleted. Controllers/TodoController.cs: This file defines the TodoController class that inherits from Controller base class and contains methods for handling requests related to todo items. Views/Todo/Index.cshtml: This file defines the view for displaying the list of todo items using HTML markup and Razor syntax. Views/_Layout.cshtml: This file defines the layout for all views using HTML markup and Razor syntax. The following code snippets show some parts of these files:\nModels/TodoItem.cs\n","date":"18 March 2023","permalink":"https://19785411.runaho-dev.pages.dev/notes/web-development-techniques/","section":"Notes","summary":".NET web patterns compared side by side: which one fits which project, and why the choice matters early.","title":"Which Technique to choose between the Web Development?"},{"content":"Welcome to this article, we now prefer to be able to do things without using code behind for smaller jobs.\nFor example, when developing SPA projects or simple websites, corporate sites, blog sites etc. Just updating sites with CI/CD has simplified a lot of things for us, so how can we prepare areas that need coding and database such as contact form etc. on a website with only developed front-end side. There are actually many open source projects for this process, but today I will talk about formspree.io.\nformspree.io has chosen to approach things a little differently and very simply.\nWhen you sign up and verify your site through the dashboard, you get a form creation screen. But in this form creation screen, you don\u0026rsquo;t add elements etc. They have a different approach, you just create the form and get the endpoint. Whatever you send to this endpoint, they keep the form request, parses it in the panel and shows it to you. In this way, you don\u0026rsquo;t have to worry about adding it with iframe or designing a form on the dashboard.\nWhen a new record arrives, it is sent to the e-mail address you have specified. If you want, you can get the key for captcha and add it.\nThe nice thing is that you can also connect your form with popular plug-ins for free. Now, some question marks have come to your mind directly from what I have said. How will we add conditions such as this field is mandatory and this field is related to this field. This area is unfortunately not free of charge, if you want to write rules in the form you have to pay a fee. Form Rules From formspree.io\nAlso, when you approve the form, you see the captch on their page, not on your form If you want to get them out of the way, you have to pay. So let\u0026rsquo;s talk about the pros and cons together. #Pros # It can be used in small projects for free. Popular plugins are free. Reducing the time to be added to the form development while developing the project. It can be used not only as an HTML form but also as a react component. Cons # Nice features are paid. The form submission page redirects to their site. (If you paid you can customize that page.) Captcha is rendered on their site. I must say I highly recommend it.\n","date":"15 March 2023","permalink":"https://19785411.runaho-dev.pages.dev/notes/developer-tools/","section":"Notes","summary":"Tools I actually use — editors, terminals, and utilities that earn their place in the workflow.","title":"Making Forms Without Having Code Behind?"},{"content":"Hello, first of all, I would like to tell you why I entered this challenging process.\nFor those who don’t want to read the article, I will give you the link to the application directly, but I prefer you to read it first and then click on it.\nAFUP Google Play\nBlazor has always struck me as a great technology.\nThe idea of publishing native Blazor applications with MAUI is incredible.I immediately said I had to learn this technology and started researching. I wrote small applications, to-do app etc. But then I asked myself why don’t I write an application that people will use. The plan was now ready, I was going to write an app, submit it to all the stores, create a reference for myself and literally take over every stage of an app development from start to finish.\nNormally my job is just to develop apps, I have written mobile apps in the past but I have never published them myself.\nWhat will the app do? #Even though the idea of development was good, if I was going to create a product, I had to figure out what the application would do.At this point I wanted to move on from data security and file sharing over the internet. I discovered services where I can upload and share files for free.\nLetsUpload Share-Online MyFile Mega Upload FileChan They all work the same on each other’s api side, so there is a possibility that I can make the user choose where to upload the files.\nAnd the application was prepared in my head.\nFiles will be uploaded and archived, a service provider will upload and store the archive over the internet. It will then be able to look at what it has shared in the past or re-upload an archive to another provider.\nLooking at it this way, it seems like an incredibly easy and short process, but it took me almost 3 months and i rewrote the app 4 times from scratch. It is much more difficult than we thought to make a complete product from scratch on your own.\nHow will it look like? #The biggest problem for me has always been how an app will look. As a programmer, designing has never been something I wanted to do.\nFortunately, there are resources where I can find designs for free, but it took me a long time just to search for them. Of course, the problem doesn’t end when you find a template, you need to translate it into your app, into the template you have in mind.\nYou have to adjust your logo, tweak the design and make your app’s features interactive.\nClick here for the dashboard.\nThis design is nice but for me the free version didn’t have enough content so I started looking for an uploader.\nI found a nice uploader on codepen.io and I had to seriously change it.\nUpload CSS Animation UI (codepen.io)\nNow that the basic content is ready, let’s start coding.\ncomparison of the design and the finished application\nGetting used to a new technology #Yes, everyone knows that new technology means new ideas and new beauties, but it also means new problems and you can be sure that there are tons of them here.\nAfter compiling once, getting errors in recompiling, cleaning the project and compiling again.\nNot being able to inspect when running the project on mac.\nNot being able to access log commands such as console write, debugger not connecting sometimes, application locking in case of error, debugger closing due to crash in some cases.\nRecompiling the application and uploading it to the emulator every time. We are talking about a serious waste of time.\nI’m not talking about signing the application, my God, it’s a pit. But despite everything, this technology promises and achieves incredible things.\nFor example, you can write your project in one place and make both a mobile application and a website.\nIn my application, the share button directly runs a native component and looks different on each platform.\nIt is great that you can develop as an interface and do platform-based coding and load classes according to the platform.\nThe most important feature is that the CSharp codes you write inside work directly as assembly.\nYou will understand that the Http requests are not used here, compared to other technologies.\nCombining Blazor and Xamarin can really be the smartest thing Microsoft has ever done.\nThat’s what keeps you going despite all these troubles.\nLet’s move to development #We have come to the most important point.\nWe said security is important, we said let’s be anonymous, we even made the name of the app related to this. So where will we keep the data and how will we ensure security?\nObviously, I went for a simplicity here and preferred to keep the data inside the application rather than keeping it on the internet.It may be a little disappointing, but what if I say I keep the data in sqlite?\nAt this point you have to say how come I was able to use sqlite on all android and iOS/MAC devices? SQLitePCLRaw.provider.e_sqlite3.netstandard11 and SQLitePCLRaw.bundle_green Their libraries come to our rescue.\nSimply put, all libraries developed with net standards can easily work cross platform.\nIn short, I hosted tables and data with sqlite in the .db file inside the application.\nNot enough, I use this db in all stages, how?\nI create an empty archive record when selecting the files. I convert the uploaded files into a byte array and convert them into a single archive and keep the archive as a byte array in a separate table so that I can re-upload or read the archive whenever I want. So single archive multiple uploads.\nAFUP Extracting selected files to ram.\nSince I was going to extract the files one by one to ram and finally create the archive, I needed to convert the browser file files to byte array and here in the transient file upload process class that you will read a little later, I also prepared it so that I can get the conversion status of these files.\nIn this way, while the files are being selected, they are being converted to bytes and at the same time we can see their status with the progress bar.\nLet’s proceed to uploading the archive.\nI created a transient file upload processor.\nWith this class, I would manage all the states and build the application on this class.\nThis class would manage the selected files, start archiving, show whether the archive was ready or not and start uploading them over the internet.\nIt would act as a kind of state machine in itself.\nWell, we had to do these operations async and on the other hand we needed to be able to navigate in the application, at first this class was not transient and for this reason it was not possible to navigate to other pages, I re-coded the class and built it to work as transient.\nI’ve been through all these steps, I’ve struggled with a lot of bugs, but I’ve successfully turned it into a working and optimized system.\nCreate Archive\nStart uploading\nSo far so good, but when we say again where can I see the archives I have uploaded, we are preparing a page for this.\nUpload Ended\nAnd where do I see my archives, maybe I want to upload them to another source, what do I do then? You can call me this is an over engineering but I think it’s a nice feature and I wanted it from the beginning. in case the upload process is interrupted, or the file is deleted, etc. the archives should be able to be uploaded to other sources again.\nAFUP Archives\nThis page has created a lot of bugs for me.\nIf the file is already archived, it comes here, if it is already uploading, the provider should not be able to change it, and so on, I had to test many situations and develop accordingly.\nWe’ve finished the basic functions and the rest is trivial stuff #Unfortunately, when you make the actual functions of your application work, you are not making an application.Unfortunately, in order to turn an application into a product, you also need to do unnecessary but necessary work, which I call trivia. 😆\nYou need to include references to the libraries you use, respect copyrights and mention the producers.\nAFUP referances\nThat’s not enough, you need to prepare a privacy policy as if your app will be used by idiots and get consent so that you don’t have a headache tomorrow.\nAFUP Consent\nI created a support page for those who want to support.\nBuy Runaho a coffe?\nSo now the application side is finished, but is our product finished?\nProduct entering the markets #Now we can move on to the more trivia-filled part.As I see it, publishing your application in the markets is a separate torture.\nFirst I created a developer account for the Play Store, then I added the app, then Google asked me for my ID and I gave them a photo. Not enough, I had to answer a ton of questions for my app.\nObviously, these processes are automated after a while for people who are constantly dealing with this business, but for me it was nothing but a waste of time.\nOf course, let’s not skip this stage, since not everyone adds a consent text into the application, they want you to prepare and add a serious privacy policy.\nThen i found this site : App Privacy Policy Generator (app-privacy-policy-generator.firebaseapp.com)\nFrom there, after I went ahead and got the consent text, I edited it nicely and made it ready.I uploaded it to Google drive because it’s not a website, it’s a resource accessible through a domain and since I didn’t think of a domain for this project and I saw that others had done it this way, I jumped at the opportunity.\nHow will your app look in the store? #Welcome to the show business side of things.\nHere you really have to take a ton of screenshots and go through the mock-ups and create the images that best express you. I found a great tool for that too.\nAppMockUp Studio (Beta) (app-mockup.com)\nFrom this point on, after writing the articles introducing your application, here is your page.\nAFUP (Anonymous File Upload)\nWrapping Up! #Obviously, if you have read this far, I thank you very much.\nIt is wonderful that you are sharing this beautiful day with me.\nIn the coming days, I will gradually share the development problems I have experienced in this process.\nEven though it was an ordeal for me, I am now a developer who can go through all the stages from start to finish and I have learned a new technology.\nDoing this in my spare time while working has also given me a lot of confidence.\nThe apple port of the app is also ready, but its store page is a bit more detailed, so that part seems to take a bit longer.\nPlease don’t forget to leave a comment if you want to.\nTake care and see you soon. 👋\n","date":"6 December 2022","permalink":"https://19785411.runaho-dev.pages.dev/engineering/maui-blazor-app-published/","section":"Engineering","summary":"Publishing a native Blazor app with .NET MAUI is possible. The gap between possible and smooth is real.","title":"I Developed/Published Application with .NET MAUI Blazor"},{"content":"Hi, in this article, we will look at how we can access files when we want to do operations such as reading, writing, etc. with .NET Core.\nHow to access a file in wwwroot? #The first thing you need to do is to set the IWebHostEnvironment interface as a parameter to the construction field of your page or class and set it as private readonly. In this way, we can use it wherever we want after the page is initialized.\nprivate readonly IWebHostEnvironment _webHostEnvironment; public IndexModel(IWebHostEnvironment webHostEnvironment) { _webHostEnvironment = webHostEnvironment; } In this way, we will set the Web Host Environment private object while the page is loading. Now when we want to access a file path we can do it this way.\n_webHostEnvironment.WebRootPath + $@\u0026#34;\\files\\pdfs\\{PDFName}.pdf\u0026#34; How to access a file in the project’s directory?\nThis is a much simpler MapAbsolutePath method, at the end of the string. its use is slightly different, but simple and catchy.\nvar dbPath = \u0026#34;~/db.sqlite\u0026#34;.MapAbsolutePath(); In general, we have seen how we can access file paths from the back-end when you want to read or write files.\nYou can support by writing a comment, I wish you a pleasant reading.\n","date":"26 November 2021","permalink":"https://19785411.runaho-dev.pages.dev/engineering/dotnet-backend-file-access/","section":"Engineering","summary":"Reading, writing, and navigating files in .NET — paths, streams, and the edge cases that bite you.","title":"How to access files in the backend on .NET Core?"},{"content":"Hello, in this article we will look at how we can use session with .net core.\nIf you, like me, have spent a lot of time with the .net framework for a long time, and a session is a must.\nSo let’s see how to implement Session in Net Core #To use Session in .Net Core, we first need to go to Startup.cs and find the ConfigureServices Method.\nWe can say that this method is the area where we specify the technologies to be used while the project is running, let’s use Razor Pages, whether it’s Anti Forgery, I will use it in Session, etc. In this scenario, we will add Session.\nFor the adding process, we call the AddSession method from the IServiceCollection, which is the parameter, by giving options.\nYou can name the cookie that .Net Core will hold the session id, you can give an idletimeout with TimeSpan. I gave an absurd number because I don’t want it to drop easily in this project.\nNow we can use Session in our projects.\npublic void ConfigureServices(IServiceCollection services) { services.AddRazorPages(); services.AddSession(options =\u0026gt; { options.Cookie.Name = \u0026#34;.MySessionName.Session\u0026#34;; options.IdleTimeout = TimeSpan.FromSeconds(987654321); options.Cookie.IsEssential = true; }); services.AddAntiforgery(o =\u0026gt; o.HeaderName = \u0026#34;XSRF-TOKEN\u0026#34;); } How to set and get Session in .NET Core? #Usage is slightly different.\nWhile creating the session, we need to specify its type, obviously, this allows us to use the session more controlled.\nFor example, if you are going to keep the UserID as an int.\nHttpContext.Session.SetInt32(\u0026#34;UserID\u0026#34;, person.id); It is set as above. There are 3 set methods in total. Set, SetInt32, and SetString. We can also access the data when we call the same methods Get Instead of Set.\nint UID = (int)HttpContext.Session.GetInt32(\u0026#34;UserID\u0026#34;); What you should pay attention to here is that the return may be an empty int. In other words, in case of the possibility of making a request before the session occurs, usages such as pure cast: (int) may cause errors, I wanted to show the simple usage as an example.\nYou can simply use Session in .Net Core like this, Thanks for reading, I would appreciate it if you could comment.\n","date":"25 November 2021","permalink":"https://19785411.runaho-dev.pages.dev/engineering/dotnet-core-session/","section":"Engineering","summary":"Session in .NET Core is opt-in and slightly different from the old framework. Here is how to set it up correctly.","title":"How to Use Session in .NET Core?"},{"content":"Hi, today I am here with an extremely simple article.\nWhile writing foreach, you may need to access the index sometimes, although using for blocks makes more sense in such cases, it is possible to access the index while using foreach.\nNormally I wouldn’t write about this topic, but it has been discussed a little on stackoverflow.\nFor this, it is necessary to have a little understanding of the using of lists.\nIf we need to explain with a simple example, let’s say you print the users to the table and you want to print the index.\nforeach (var user in Model.Users) { \u0026lt;tr\u0026gt; \u0026lt;td\u0026gt; @Html.DisplayFor(modelItem =\u0026gt; user.Name) \u0026lt;/td\u0026gt; \u0026lt;td\u0026gt; @Html.DisplayFor(modelItem =\u0026gt; user.Surname) \u0026lt;/td\u0026gt; \u0026lt;tr\u0026gt; } This is how I created a foreach with razor.\nAll you have to do is find the index of the element in your hand from Users and add one if we want it to start at once instead of zero. For this, we use IndexOf and add one.\nModel.Users.IndexOf(user)+1 Finally, our Foreach looks like this:\nforeach (var user in Model.Users) { \u0026lt;tr\u0026gt; \u0026lt;td\u0026gt; @(Model.Users.IndexOf(user)+1) \u0026lt;/td\u0026gt; \u0026lt;td\u0026gt; @Html.DisplayFor(modelItem =\u0026gt; user.Name) \u0026lt;/td\u0026gt; \u0026lt;td\u0026gt; @Html.DisplayFor(modelItem =\u0026gt; user.Surname) \u0026lt;/td\u0026gt; \u0026lt;tr\u0026gt; } You can use this in any situation. With IndexOf, you can find the index of an element selected from a list.\nHave a great day 👋\n","date":"23 November 2021","permalink":"https://19785411.runaho-dev.pages.dev/engineering/csharp-foreach-index/","section":"Engineering","summary":"Accessing the index inside a foreach loop in C# — the clean way, and why for is not always the answer.","title":"Accessing the index of an element when using foreach in C#"},{"content":"Hi, in this article, I will talk about my thoughts about .NET Core Razor Pages, its pros, cons and what it adds to me, and I wish you a pleasant reading.\nIf you are in the process of change like me or are wondering about my change, it will be a long article.\nIf I have to talk about myself, I have been developing web applications with Web Forms technology since 2015. Time and time, I was looking at MVC and finding it too complex for the projects I developed, so I was used in one or two projects and walked away. If you don’t have an old but incredibly large project as an ORM, I would establish my database relations with the LINQ 2 Data Context, which does not cause problems and even saves a lot of time, I would develop Procedure-based database architecture and separate SQL from C# as much as possible.\nI’d use Linq2DC as the ORM. If you don’t have an old but incredibly large project, it’s an ORM that doesn’t cause problems and even saves a lot of time. I used to establish my database relations with this ORM and develop the database architecture based on Procedure.\nThe reason why I am telling all this is that I am used to comfort and I can quickly develop in my own Safe Zone.\nIf you have used Linq2DC, you can understand me. Dragging a table, procedure etc. on the designer is enough for it to turn into a class. If you say what is the problem, let me explain directly. You can’t use Linq2DataContext in Net Core, even you try hard to use an entity compared to web form.\nJust for these reasons, I continued to develop with Web Form.\nSo how did I get out of the Safe Zone? #There are many old projects in the company I work for now, and we need to deal with the mdb(access) databases in the old projects for some jobs. In these cases, the most hated historical artifact oledb codes come into play, as you know, this drove me crazy, so I spent 2–3 days and wrote a Micro ORM for myself.\nThen I liked this Micro ORM idea and I prepared a version of Micro ORM that works with Sql Client and can be used where it can be read and Lamda Expression.\nI entered the Micro ORM world as a buyer, saying that if I wrote these, others did better. I discovered a world of well-working Micro ORMs. I decided on OrmLite and started using it. Just then, an idea came to my mind, can I use this Micro-ORM in Core?\nWhile Core was being developed, I tried it 2–3 times in old versions, so I tested the compatible versions of Nuget Packages when they were not yet developed, and said it needed more development and left it. Please keep in mind that I have developed projects with a world Nuget Package without any problems. Now that OrmLite has removed my ORM problem, even though it is not as simple as drag and drop, I was not going to make the SQL query both hard coded and Migration, I felt like I had killed two birds in one stone. Now I could really introduce Core into my development processes.\nI am not far from the back-end part of Core, since I have been in Web API Development before, I can say that Core felt like writing pure C# to me.\nWhat are the pros and cons of Core Razor Pages? #When I tested it in a small project, I saw how powerful Razor Pages became when combined with the core, and I can say I was surprised. Now Web Form projects really feel like a waste of time.\nAll your public variables are passed to the front-end. If you give a variable that you bind as an attribute from the back-end to the form element as a name attribute, your variable is automatically parsed and filled from the form element during the form request.\nThis event shortens the development time incredibly. Instead of saying t_name.Value and reaching the value of the textbox, doing a world check and then filling your class, imagine that your class comes directly to full. The Web Form Scriplet engine was already driving us crazy. Thanks to Razor’s flexibility in this regard, dealing with both the front-end and the back-end becomes incredibly simple. You can provide controls to your html input according to your model’s field. You can forget to mess around with ASP.NET Validation components or Jquery Validation as well.\nExample Property Binding;\n.cshtml;\n\u0026lt;form class=\u0026#34;form-horizontal\u0026#34; method=\u0026#34;post\u0026#34;\u0026gt; \u0026lt;div class=\u0026#34;form-group\u0026#34;\u0026gt; \u0026lt;label for=\u0026#34;Name\u0026#34; class=\u0026#34;col-sm-2 control-label\u0026#34;\u0026gt;Name\u0026lt;/label\u0026gt; \u0026lt;div class=\u0026#34;col-sm-10\u0026#34;\u0026gt; \u0026lt;input type=\u0026#34;text\u0026#34; class=\u0026#34;form-control\u0026#34; name=\u0026#34;Name\u0026#34;\u0026gt; \u0026lt;/div\u0026gt; \u0026lt;/div\u0026gt; \u0026lt;div class=\u0026#34;form-group\u0026#34;\u0026gt; \u0026lt;label for=\u0026#34;Email\u0026#34; class=\u0026#34;col-sm-2 control-label\u0026#34;\u0026gt;Email\u0026lt;/label\u0026gt; \u0026lt;div class=\u0026#34;col-sm-10\u0026#34;\u0026gt; \u0026lt;input type=\u0026#34;text\u0026#34; class=\u0026#34;form-control\u0026#34; name=\u0026#34;Email\u0026#34;\u0026gt; \u0026lt;/div\u0026gt; \u0026lt;/div\u0026gt; \u0026lt;div class=\u0026#34;form-group\u0026#34;\u0026gt; \u0026lt;div class=\u0026#34;col-sm-offset-2 col-sm-10\u0026#34;\u0026gt; \u0026lt;button type=\u0026#34;submit\u0026#34; class=\u0026#34;btn btn-default\u0026#34;\u0026gt;Register\u0026lt;/button\u0026gt; \u0026lt;/div\u0026gt; \u0026lt;/div\u0026gt; \u0026lt;/form\u0026gt; cshtml.cs;\n[BindProperty] public string Name { get; set; } [BindProperty] public string Email { get; set; } public void OnPost() { ViewData[\u0026#34;confirmation\u0026#34;] = $\u0026#34;{Name}, information will be sent to {Email}\u0026#34;; } One of the biggest pluses is that when you add a WebMethod to request the page in Web Form, you had to make Static, of course, since the sessions of the Session in the static state and the Dynamic State are not the same, you had to send the extra user to the back-end somehow. Core totally got ahead of that. It adds a RequestVerificationToken input to the page and when you make a request with this input, all session values of the client etc. work as they are.\nSince the page structure of Razor Pages is similar to Web Form, you will not be surprised.\nBasically, if we need to talk about its structure.\nIn the wwwroot folder you have static files (CSS,img etc).\nThe inside of Pages is routing, each folder can actually be thought of as a page.\nIn our example above, if you send a request to /Dashboard, Index.cshtml will be opened. cshtml front end, cshtml.cs is the area where our back-end codes are located. It is obvious that it is more suitable for the SOLID structure. For example, you created the Workers folder and you will do the worker processes. You open the necessary pages in it.\nWorkers \u0026gt; Index.cshtml, AddUpdate.cshtml, Detail.cshtml etc.\nIf you have transportation, it is possible to access it with a query such as /Workers/Detail?id=54, and your queries can also be accessed directly, just like propertybinding.\nThere is an incredible difference in performance, there is a clear and noticeable increase.\nDue to its general structure, it works as Non Manegement Code. You should create a separate pool for each project. If you look at the output, it gets output as exe and dll.\nProjectViews.dll separates front end and back-end like project.dll. The only annoying part is that you have published your project and you will upload it to ftp. In this case, you have to stop the project from iis, and you can do this without connecting to the server, of course, if you transfer a file named app_offline.htm to the project’s directory from ftp, the project will stop automatically. In this way, you can perform the update process. It seems that we have no choice but to stop the project right now, I really want that to be the case.\nBasically, my transition to Core and what I want to tell you, there is a topic that I can go into a whole world of detail, but I do not want to prolong this article.\nPros # Performance It cuts development time incredibly. He is extremely prone or even pushing to develop with SOLID principles. Multi-Platform Razor Engine Cons # You may have trouble publishing a project, every time you create a new project, you have to do a few publish settings. When you update the project, you cannot overwrite the files. Since it gives views as dlls, you should get republish for even the slightest html change. For a detailed review, I suggest you take a look at the page prepared by Microsoft.\nThank you so much for reading this far.\n","date":"23 November 2021","permalink":"https://19785411.runaho-dev.pages.dev/engineering/webforms-to-razor-pages/","section":"Engineering","summary":"Switching from Web Forms to Razor Pages: what transfers cleanly, what requires a different mental model.","title":"I left the Web Form and switched to Razor Pages."},{"content":" Journey A non-violent game\nToday I will tell you about my experiences playing the game called Journey.\nTo briefly describe the game, we can say that it is a simple journey game. So, what has this game done differently, why is it a work of art for me and how has it managed to become one of my favorite games?\nThere are many reasons for this: The drawings, the fluency of the animations, the music, the storyboard, the shortness, the mentality behind the game, in short, the whole game.\nLet’s open a little more.\nWhat makes this Game a work of art is that it offers you a complete life experience. To give an example, it is like a movie that has no sequel and ends by telling its story. When you start the game, you don’t even know what your character can do, and the game doesn’t tell you much. It develops slowly, you learn the story of the game, you try to complete your journey with your character, and when you complete the journey, you feel satisfied and you really feel that it’s over.\nThe reason why it is so good is that every stage is in the dose, the music is great, the drawings are great, the narration is great, the transitions are great. Let me leave a screenshot from the game.\nSo what was this game about? #What is the logic of going from point A to point B in a game?\nThey aimed at a point that many games failed to achieve, we can learn directly from “Jenova Chen”, who is the Game Designer of the Journey.\nIn him speech at the GDC conference, Jenova Chen stated that he realized that the emotions that current games cause and target are generally violent, although the companies do not want to produce online content such as violence, etc.\nThey wanted to experience a different feeling, the sense of discovery. But a game where you just wander around alone wouldn’t be impressive enough. Journey also brought a solution to this situation with an interesting mechanic, there is no interface in the game in general and the game is co-op, the most interesting part of the job is that another player who is close to the part you are playing comes to your game, suddenly the sand is moved by someone. and you see that another player is trying to discover the game from afar, and suddenly you start to explore it together with another player.\nThey wanted to experience a different feeling, the sense of discovery. But a game where you just wander around alone wouldn’t be impressive enough. Journey also brought a solution to this situation with an interesting mechanic, there is no interface in the game in general and the game is co-op, the most interesting part of the job is that another player who is close to the part you are playing comes to your game, suddenly the sand is moved by someone. and you see that another player is trying to discover the game from afar, and suddenly you start to explore it together with another player.\nSince there is no collision between the players in the game, the players cannot harm each other and even get boosts when they touch each other, so you can get different experiences every time you play.\nSometimes you can’t come across anyone and you have to overcome all the difficulties on your own. Sometimes you come across players in white dress who are masters of the game and you have the opportunity to see all the Easter eggs at once.\nEveryone who plays this game helps each other because people playing this game have no choice but to be nice to each other.\nThis game ultimately becomes a journey and a memory about your experiences on this journey.\nHere’s how I would describe your chances of playing Journey over and over. Think about your favorite place to go, it could be a cafe, a beach or whatever, the more you go to that favorite place with other people or alone, the more likely you are to play this game again.\nIf you are interested in game development, definitely watch the conferences about the Joruney game, I say that both the marketing and the developers had very good experiences in this project.\nIf you are a developer or game development enthusiast #It is an important conference where you can see the decisions that “Jenova Chen” wanted to tell while designing Journey, the problems she experienced in the tests, extending the release date of the game, etc.\nA technical conference where “John Edwards” talks about how they managed to render sand so big and stylish in Journey for the Playstation 3. The game already tells everything I want to tell about this game.\nIf you want to give yourself a relaxing and peaceful time, I would definitely say try this piece.\n","date":"22 November 2021","permalink":"https://19785411.runaho-dev.pages.dev/notes/gaming/","section":"Notes","summary":"Journey is not a game about reaching the end. What the walk itself does to you.","title":"'Journey' From a Game to a Work of Art"},{"content":"Before that, I want to ask you another question. Why does programming have languages and why do we call c# , java and similar languages as a “languages”?\nWhat is programming for me? #At first, I saw programming languages as a dictionary and memorized the equivalents of the codes. I’ve been doing this for a long time and developing software has become a very different field for me. After one year of experience, I understood that software development is talking to a computer.\nWhen I wanted to do something for myself after the courses and projects that progressed with the logic of memorization, that’s when I started to understand something. I have developed mobile applications, databases, web applications, computer applications and many more by myself. Service and desktop applications made me feel like I was talking to the computer the most.\nIt can be explained with many examples, but software is actually like talking to a computer. When I understood why it was called a language, my methods of self-development also changed.\nAt the beginning of Writing, I told you that I see languages as dictionaries and memorize them. When I got involved, I tried to memorize actions and solve structures instead of memorizing the meanings in dictionaries. Let me give an example, the word to walk has different meanings in many languages, but everyone knows the action of walking. All people know action, the definition changes.\nMy humble advice;\nDon’t waste time with definitions, learn actions.\nIn my eyes, programming is a free language. It allows you to talk to a machine that can talk to you without expecting anything in return and can do all the actions you want with the right terms.\nHumans has created an amazing machine that acts according to actions. And having said so much, let me take you to a moment.\nYou went to work in the morning, talked to the computer for 1–2 hours, and while you are writing code because of the sunlight hitting the window, your face reflects on the screen, even if it is an annoying visual, it cannot be said that you did not enjoy it. The reason is that you can see the reflection of someone who has chatted with a computer of your own free will and chatted with a machine that understands you, maybe a person associates himself with a machine and is happy with it.\nTake care of yourself, remember that you can talk to the computer as much as you want, after all, it is a machine.\n","date":"21 November 2021","permalink":"https://19785411.runaho-dev.pages.dev/writing/what-is-programming-for-a-programmer/","section":"Writing","summary":"We call C#, Java, and Python languages — and that word choice is not accidental. Language implies grammar, meaning, and a community of speakers. Thinking about why we borrowed this term reveals something real about how we understand what programming actually is.","title":"What is programming for a programmer?"},{"content":"Hi, in today’s article, I will share my experiences using the ??= operator that came with C# 8.0.\nSometimes in C# we mean that if an object is empty then set to another object otherwise we want to continue using that object.\nNow let’s make an example. #This operator briefly functions as assign the right object if the left object is empty, otherwise return the left one.\nfor example we have a property named Name.\npublic string Name {get;set;} When we try to access this property while it is empty, we will encounter vs ArgumentNullException when we try to convert it. We also have a check like (Name != Null) so that the program does not give an error. For this and similar cases, we need to say if it is null, do this, otherwise, do this.\nFor example, you will pull the user’s name with the id found in the session (not real usage).\nprivate string name; public string Name { get { if (name == null) { name = datacontext.users.FirstOrDefault(u =\u0026gt; u.UserId == sessionID).name; } return name; } } Thanks to the above process, we pulled the user name from the database and assigned it to the private variable, so we also prevented going to the database when trying to access the name again.\nSo how do we shorten this code, so short if was introduced?? operator came into our lives with C# 7.\nprivate string name; public string Name { get { return name ?? (name = datacontext.users.FirstOrDefault(u =\u0026gt; u.UserId == sessionID).name); } } We don’t need if blocks anymore in this case. The point you need to pay attention to here is that you cannot assign the right result directly to the left. If the left is blank, it executes the code on the right. For this reason, there is an assignment in the form of name = in the right field.\nNow let’s come to the use of ??= ;\nprivate string name; public string Name { get { return name ??= datacontext.users.FirstOrDefault(u =\u0026gt; u.UserId == sessionID).name; } } Here, we have said that if the object is empty, fill it with this.\nLet’s look at how we use it in a real project. #In an online exam system I developed, I prepared the DataContext with linq2db, added it to the scope via startup, and opened a separate class called Participant. This class also requests datacontext in the constructor phase.\nHere, I request the user’s answers on the methods more than once and look at the situations such as what questions the user answered with commands such as any, count etc.\nIf I don’t encapsulate, every time I call Answers, I will have pulled data from the database again. I had to do a simple encapsulation as I would reach it more than once in the same page. I was able to do this very simply with the ??= operator.\nprivate List \u0026lt;UserAnswer\u0026gt; _answers; public List \u0026lt;UserAnswer\u0026gt; Answers =\u0026gt; _answers ??= _connection.UserAnswers.Where(w =\u0026gt; w.UserID == ParticipantID).ToList(); I’m thinking of preparing and posting a video about linq2db soon. I can say that I have never seen such a simple, effective and fast ORM on .Net Core, if anyone is already curious, they can have a look by clicking here.\nIf you want to learn more about Null Coalescing Operators, you can refer to Microsoft Docs.\nDo not forget to comment and express your thoughts.\nHave a great day 👋\n","date":"20 November 2021","permalink":"https://19785411.runaho-dev.pages.dev/engineering/csharp-null-coalescing/","section":"Engineering","summary":"The ??= operator in C# 8: what it does, when to use it, and when it is cleaner than a null check.","title":"C# 8.0 ??= Null Coalescing Operators \u0026 Encapsulation"},{"content":".NET MAUI Blazor Native Prompt\nHi all, welcome to this short but I think it will be useful for you.\nI will show how we can use alerts and prompts in a simple native way when developing applications for Cross Platform.\nThis is what we trying to achive:\nFirst of all we need the create an interface for using all the platform’s named as : IPromptService\nAnother reason why we use interfaces in particular is that if we want, we can turn it into a web application using shared ui without changing the code.\nWhen you integrate shared ui into the web application, all you have to do is rewrite the service and you will not have a problem in your application because it will use the same interface.\npublic interface IPromptService { Task ShowAlertAsync(string title, string message, string cancel = \u0026#34;OK\u0026#34;); Task\u0026lt;bool\u0026gt; ShowConfirmationAsync(string title, string message, string accept = \u0026#34;Yes\u0026#34;, string cancel = \u0026#34;No\u0026#34;); Task\u0026lt;string\u0026gt; ShowPromptAsync(string title, string message, string accept = \u0026#34;Yes\u0026#34;, string cancel = \u0026#34;No\u0026#34;); void ShowAlert(string title, string message, string cancel = \u0026#34;OK\u0026#34;); void ShowConfirmation(string title, string message, Action\u0026lt;bool\u0026gt; callback, string accept = \u0026#34;Yes\u0026#34;, string cancel = \u0026#34;No\u0026#34;); } Now that we have created our interface, let’s use it to create a class in the MAUI project.\nI specifically mention the MAUI project in case you have a fragmented structure like me.\nThe reason why it is here is that we will actually use Xamarin at this point we will run our alerts with Xamarin.\npublic class PromptService : IPromptService { // ----- async calls (use with \u0026#34;await\u0026#34; - MUST BE ON DISPATCHER THREAD) ----- public Task ShowAlertAsync(string title, string message, string cancel = \u0026#34;OK\u0026#34;) { return Application.Current.MainPage.DisplayAlert(title, message, cancel); } public Task\u0026lt;bool\u0026gt; ShowConfirmationAsync(string title, string message, string accept = \u0026#34;Yes\u0026#34;, string cancel = \u0026#34;No\u0026#34;) { return Application.Current.MainPage.DisplayAlert(title, message, accept, cancel); } public Task\u0026lt;string\u0026gt; ShowPromptAsync(string title, string message, string accept = \u0026#34;Yes\u0026#34;, string cancel = \u0026#34;No\u0026#34;) { return Application.Current.MainPage.DisplayPromptAsync(title, message, accept, cancel,maxLength:100); } // ----- \u0026#34;Fire and forget\u0026#34; calls ----- /// \u0026lt;summary\u0026gt; /// \u0026#34;Fire and forget\u0026#34;. Method returns BEFORE showing alert. /// \u0026lt;/summary\u0026gt; public void ShowAlert(string title, string message, string cancel = \u0026#34;OK\u0026#34;) { Application.Current.MainPage.Dispatcher.Dispatch(async () =\u0026gt; await ShowAlertAsync(title, message, cancel) ); } /// \u0026lt;summary\u0026gt; /// \u0026#34;Fire and forget\u0026#34;. Method returns BEFORE showing alert. /// \u0026lt;/summary\u0026gt; /// \u0026lt;param name=\u0026#34;callback\u0026#34;\u0026gt;Action to perform afterwards.\u0026lt;/param\u0026gt; public void ShowConfirmation(string title, string message, Action\u0026lt;bool\u0026gt; callback, string accept = \u0026#34;Yes\u0026#34;, string cancel = \u0026#34;No\u0026#34;) { Application.Current.MainPage.Dispatcher.Dispatch(async () =\u0026gt; { bool answer = await ShowConfirmationAsync(title, message, accept, cancel); callback(answer); }); } } With the class fed from the interface we created, we can now use alert and prompt in the project we want and write logic according to the returns.\nAnd of course it is important to define our service in MauiProgram.cs.\nbuilder.Services.AddSingleton\u0026lt;IPromptService, PromptService\u0026gt;(); Now we can use this service in both ways.\nWe can add it from the code behind of our page or component. Or we can add it directly to the razor file using @code and razor.\nI will go through code behind actually both same.\nI go to the .cs file of the Component where I want to print the prompt \u0026amp; I’m injecting our Prompt Service.\n[Inject] private IPromptService promptService { get; set; } Now I can display the prompt on the screen natively by calling the ShowPromptAsync method in this way wherever I want the prompt to appear.\nWithout making any extra adjustments works smoothly on iOS, Android, MAC and windows. If you proceed in the order I have described, you will not have any problems.\nFeel free to leave feedback.\nSee you soon.\n","date":"20 November 2021","permalink":"https://19785411.runaho-dev.pages.dev/engineering/using-native-prompt-with-net-maui-blazor/","section":"Engineering","summary":"Triggering the native device prompt from .NET MAUI Blazor — bridging the gap between web and native.","title":"Using Native Prompt with .NET MAUI Blazor"},{"content":"I\u0026rsquo;m a software developer who builds things and thinks about what they mean.\nSince 2015, I\u0026rsquo;ve been writing code professionally — mostly in C# and .NET, with detours into Go, distributed systems, and cross-platform mobile with MAUI Blazor. But the work that has stuck with me isn\u0026rsquo;t defined by a language or a stack. It\u0026rsquo;s defined by the problems it solved and the questions it raised.\nWhat I\u0026rsquo;ve Built #RouteHub — A link management and redirect intelligence platform. SaaS. Real users. The kind of project where you learn what \u0026ldquo;production\u0026rdquo; actually means.\nBlacked — A privacy-first content moderation tool. The goal was simple: give people control. The implementation taught me that \u0026ldquo;simple\u0026rdquo; is rarely simple.\nSaaS Exam Platform — Adopted by 15+ educational institutions. Built to handle concurrent load, flexible question types, and the kind of edge cases that only appear when thousands of people use your software on the same morning.\nVoting System — Deployed for one of the world\u0026rsquo;s largest international organizations. Correctness isn\u0026rsquo;t optional when the stakes are real.\nThese aren\u0026rsquo;t side projects I abandoned. They\u0026rsquo;re systems I designed, shipped, and maintained — with all the humility that comes from watching something you built fail in ways you didn\u0026rsquo;t expect, then fixing it.\nHow I Think #I care about software that\u0026rsquo;s understandable. Not just to machines — to the people who have to maintain it, extend it, or use it without reading a manual.\nI\u0026rsquo;m drawn to the edges: where a technical decision becomes a design decision, where a design decision becomes a philosophical one. Why do we abstract things the way we do? What assumptions are baked into our tools? What does it mean to build something \u0026ldquo;well\u0026rdquo;?\nThese aren\u0026rsquo;t rhetorical questions. I write about them in Writing.\nWhy \u0026ldquo;runaho\u0026rdquo;? #It started as a username — something I typed into a registration form in my early teens and kept using because it stuck. Over time it became less of a handle and more of a signature. Every commit, every project, every forum post. It\u0026rsquo;s not a brand. It\u0026rsquo;s just me, consistently.\nWhen I needed a domain for this site, it was the obvious choice. runaho.dev is where I put things I want to stand behind.\nThis Site # Writing — Essays on philosophy, craft, and what it means to build software in a world that increasingly runs on it.\nEngineering — Technical posts. Real problems, real solutions. .NET, C#, Go, APIs, architecture.\nNotes — Shorter observations, experiments, things I found worth writing down but not turning into essays.\nProjects — A more complete picture of what I\u0026rsquo;ve built.\nGet In Touch # GitHub LinkedIn Email ","date":null,"permalink":"https://19785411.runaho-dev.pages.dev/about/","section":"runaho.dev","summary":"Who I am, what I've built, and why this space exists.","title":"About"},{"content":"Not side projects. Things that went into production, served real users, and taught me what I couldn\u0026rsquo;t learn from books.\nRouteHub #Link management and redirect intelligence platform. SaaS, built from scratch. RouteHub handles short links, deep link routing, analytics, and campaign tracking — with an emphasis on correctness and privacy.\nBuilt with Go on the backend, deployed on distributed infrastructure. The kind of project that starts as \u0026ldquo;a simple redirect service\u0026rdquo; and becomes a lesson in system design, edge cases, and what it means to own something end-to-end.\nroutehub.link · GitHub\nBlacked #Privacy-focused content moderation tool. The premise: people should have control over what they see, not just what they post. Blacked gives users the ability to define and enforce their own content rules.\nBuilt with .NET and Blazor. The challenge wasn\u0026rsquo;t the algorithm — it was the UX. Moderation tools are only useful if they\u0026rsquo;re fast enough to not get in the way.\nGitHub\nSaaS Exam Platform #Assessment software for educational institutions. Adopted by 15+ universities and training organizations. Handles thousands of concurrent users during exam windows, supports multiple question types, and integrates with institutional auth systems.\nBuilt with ASP.NET Core and Razor Pages. The hardest part wasn\u0026rsquo;t the features — it was building something that faculty could actually trust under pressure.\nInternational Voting System #Election software for a large international organization. Deployed for an organization with members across multiple countries. Correctness, auditability, and zero downtime weren\u0026rsquo;t stretch goals — they were the baseline.\nBuilt with .NET. Working on this taught me more about requirements gathering and stakeholder trust than any technical problem ever has.\nOther Work #Most of my professional work is in SaaS infrastructure, internal tooling, and enterprise .NET systems. Not everything is open or public — but the patterns and lessons show up in Engineering.\n","date":null,"permalink":"https://19785411.runaho-dev.pages.dev/projects/","section":"runaho.dev","summary":"Things I've built, shipped, and maintained. Not side projects — systems that went into production and stayed there.","title":"Projects"}]