-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.NET Core/Standard library #36
Comments
Hi @Artur-A and thanks for your message and also thanks for your very valid point. Support for .NET CoreThe feature is planned as part of efforts scheduled after the first milestone for the definition generator. I will create that milestone and assign this issue to that. The priority of this feature is a little low as you can imagine, however here are a couple of questions for you:
NotesThose will help me redefine the priority of this task. .NET Core is a technology I am very interested in and am looking forward to making my hands dirty into that, so I would not mind using Rosetta as a start project. So let me know. |
I see, the plan looks reasonable and good. 1. Why are you using Rosetta? For translating code or for generating definition files? 2. Why are you in need of .NET Core support?
The objects of this class will be transferred via wire and may be converted from string, or may not. The custom guard is used for deserialisation on the server side. Now in order to serialize Whatsapp from a user's input there is a need to have a similar TypeScript (JavaScript) implementation:
The same is for internationalisation and for a lot of other shared logic between a server and a client. |
All right! I see you actually have a real need for this. I will soon start an investigation of the effort to make this happen and let you know. If the amount of work is reasonably low, I will probably prioritize this issue and start working on it :) |
@Artur-A Have you looked at NSwag ( https://github.com/NSwag/NSwag ) ? It might meet your needs for generating TypeScript client code to match your server-side API. |
Thank you @michaelaird, NSwag is a nice tool. My final point is too be able to use most of the shared code between a server (.NET) and a client (ts/js) in C#. Just write it once. NSwag is what Microsoft was doing with Web services and WCF for more than a decade: generating client proxies. For example, let's say we have a validation for Address input on the server side (API). There is a logic written in C# that the string address should have at least 10 symbols and no more than 100 symbols. Then Address should have only English symbols and numbers, no Asian or Arabic. Then there is a logic with a date birth using C# DateTime class. All these checks need to be duplicated on a client side to reduce the bandwidth and good UX. We start to write duplicated classes just in different languages, use moment.js instead of DateTime and so on:
The idea is to reach an isomorphic application as much as it possible and drastically reduce developers time.
This is why this project is so important. |
Hi all Will get back to you when my priority work is done. Thank you |
@Artur-A hi, I read your comments above, I found that your needs are very similar to what I want to achieve-- The C# logic on the server side (such as validation, judgment) also wants to be used again at the web side in the way of TS. I wonder if you find the right thing now. |
Hi @graceleecat, I ended up with TypeScript logic duplication. Webassembly can resolve all isomorphic problems with big Microsoft contribution, but we need to wait, in my estimation, at least 4 years. |
Hi again However I have a few comments here. As far as i could understand, you want to actually integrate Rosetta components in your ASP.NET Core application in order to solve some serialization/deserialization issues. The reason why you need Rosetta in .NET Core is because you would compile Rosetta source files together with your solution. However how about you separate the two applications? You can create a web service on top of which Rosetta sits which handles the calls you need for converting C# code into TS. From your ASP.NET Core app you can invoke this web service and get files transpiled. Would it work? |
Hi @andry-tino,
Thank you for your awesome project.
Roslyn now supports .NET Core cross platform applications.
Do you have plans to support .NET core in your project?
The text was updated successfully, but these errors were encountered: