YO .net core 2.x demo project with react/redux? - yeoman-generator

This is a "Veracity Platform" question - which I guess has a fairly small audience.
I'm using the veracity platform's application generator (based on Yeoman) to generate a sample application for .net core 2.x, using node.js.
yo #veracity/veracity:netcore-webapp
This creates a good basic .net core 2.x MVC project. Is there a way to further specify that I want to additionally include the "React/Redux" project template, like I would when creating a project in Visual Studio? That way the client app and the front-end webpack stack get started for me, which is nice.
Thanks in advance for any suggestions.

We do not have these configurations included in the generator yet. Uservoice will be added to Developer.veracity.com soon, but for now you may forward such feature requests also in the github project of the generator. Open an issue, and I will see when we can get it in to the backlog.
https://github.com/veracity/generator-veracity
Brede Børhaug - Manager Veracity for Developers

Related

How to set up Phoenix (elixir) with surrealdb?

We want to use surrealdb as our database but how would we use it in Phoenix? What configurations are needed? If you have any Experiences with this pls feel free to share :)
I am working on SurrealDB library for Elixir. You can see how install and configure it on github: https://github.com/ricardombiot/surreal_ex
If you wants works with phoenix, you can create a project without ecto (using --no-ecto flags) and after includes library dependence and start your project!
For big projects/big-teams, I would recommend creates an umbrella project where you have your application will be divide on independent modules (E.g. A project for Web, other for REST, other for each service as users, mailing, booking.. so on…). The modular architecture improves testeability, reusability, extensibility of each part of your application.
Note: I had working on Library only one week (Nov 26, 2022) then consider that maybe some things can change on next versions.

Visual Studio plugin/extension to convert XML to YAML

I was wondering if there a simple way how to convert XML comments (triple forward slashes) to YAML. I checked the Visual Studio Marketplace and Nuget Gallery and did not find anything relevant.
To give you a high level picture I am developing a set of APIs on Visual Studio and then publishing them on Azure Functions. On Azure Funtions I have enabled OpenAPI definition which generates a YAML file. The problem is the YAML is quite basic and moreover I would like to update the YAML on Azure whenever I re-publish my APIs. Is there an automated how to achieve this? Thanks in advance.
I think the tool you're looking for is Swashbuckle.
Seamlessly adds a Swagger to WebApi projects! Combines ApiExplorer and Swagger/swagger-ui to provide a rich discovery, documentation and playground experience to your API consumers.
In addition to its Swagger generator, Swashbuckle also contains an embedded version of swagger-ui which it will automatically serve up once Swashbuckle is installed. This means you can complement your API with a slick discovery UI to assist consumers with their integration efforts. Best of all, it requires minimal coding and maintenance, allowing you to focus on building an awesome API!
Here's the original version. There's also a Swashbuckle.AspNetCore which you should probably take a look at first, since...
With the introduction of ASP.NET Core, I've now shifted my focus to the Core-specific project - Swashbuckle.AspNetCore.

HL7 FHIR .NET Models - include profiles created using Forge (DSTU 2)

I have been working with the HL7 FHIR .NET API reference implementation - utilizing the existing resource models embedded in the library. Now, I am trying to use the Forge tool to modify the resources (contraints/extensions) to suit my requirements.
I noticed that the HL7 publishing mechanism does not generate C# models from DSTU 2 onwards and was wondering - what is the best way of converting profiles created using Forge into C# resource classes such that they may be included into the HL7.Fhir.Model assembly that is part of the reference implementation.
The generation of the models not being part of the official build is correct.
This has now moved to https://github.com/ewoutkramer/fhir-net-api where the rest of the API is maintained more easily.
It is done using T4 templates on the output from the official builds.
There is a simple process for updating the models with the new versions of the spec, and we keep it fresh as people need it, and for each connectathon we publish a new build in NuGet and have a branch of the code in GitHub.
(Its a powershell script that downloads all the latest build outputs and puts them in the appropriate folders, then you need to run the t4 templates in Visual Studio)
Such as this one for the May Connectathon in Montreal
https://github.com/ewoutkramer/fhir-net-api/tree/ft-connectathon-may2016
This is able to be done yourself with a little assistance.
As for generating code for a profile, we haven't done that as yet, but will theoretically be possible.
Don't know that I'd advise this at the moment while the profiles are in so much development and change.

ASP .NET 5 WEB API creating help page

I just got started working on ASP.NET 5. I want to have a help page for my methods, I have seen few examples for creating help pages but most of them are MVC specific. I have gone through Microsoft.AspNet.WebApi.HelpPage package, it creates an Area for help page but I am not using MVC pattern.
Any suggestions how can I create help page other than this area approach?
I would suggest looking at Swagger and SwaggerUI. Swagger is an open standard, using JSON to document an API, used by the likes of PayPal and Microsoft (check out Logic apps in the azure portal).
There are some open source implementations for .Net (both of which I have used), which will self document your API, just by adding the NuGet packages to your project and a little bit of configuration:
https://github.com/domaindrivendev/Swashbuckle
https://github.com/domaindrivendev/Ahoy
Swashbuckle is the original project and Ahoy is the new version targeting ASPNET5. When downloading the package from NuGet you will still get Swashbuckle, just make sure you tick "include pre-release", and if you need any documentation look at the original GitHub project.
SwaggerUI (which is also included in Swashbuckle) adds an interface which you can use to navigate and test your API, by default this is available from "/swagger/ui" when your project is running.
Here is a sample repo in GitHub I put together showing how it can be used: https://github.com/mattridgway/ASPNET5-SwaggerUI

Using HttpClient in a Xamarin core project

I am doing a project for multiple platforms where I have followed best practices and created a core project to contain all the code that is the same on all platforms.
To do the network communication I would like to use HttpClient which seems to be the recommended approach for communicating with web services going forward.
I am NOT doing a PCL but just a standard C# library to contain the core project. However it seems that there is no common implementation of HttpClient but only platform specific ones. I cannot reference and use it in my core but only in my Android and iOS projects.
I would very much prefer to have all networking code in my core project and as I see it there are two options - neither of which I like.
Make a common interface that I can use in the core project that is implemented as a wrapper on both Android and iOS.
Use another technology that is supported in the core project - I am thinking webclient or the like.
What is the recommended approach and why hasn't Xamarin made HttpClient available as a common library?
Hope someone can help,
Thanks
I recommend checking out ModernHttpClient https://github.com/paulcbetts/modernhttpclient
It is a cross-platform networking library for iOS and Android. From the project:
This library brings the latest platform-specific networking libraries
to Xamarin applications via a custom HttpClient handler. Write your
app using System.Net.Http, but drop this library in and it will go
drastically faster.
You should be able to use System.Net.Http in your core library just fine, I've done it recently.
Make sure your core library is a .Net 4.5 project. There is a setting in project options for selecting the .Net version. After checking this, all you should have to do is reference System.Net.Http.dll.
If that doesn't solve your issue, are you on Windows or Mac(Xamarin Studio)?
I'm afraid you can't use HttpClient on Mono at the moment due to licensing restrictions. There is a UserVoice suggestion that you can vote on if you like.

Resources