Post the question in a different way, because the previous one was closed because it was opinion-based.
In the past I have developed several .NET applications that consumes WCF services hosted on IIS with MSSQL database.
Now the company is asking me a technology switch (for licensing reasons - current MS server is getting old and needs to be replaced) and I have do do the same but with a Linux server, so I need that the same .NET applications to connect to this server to retrieve the data in the same way that they do now with MSSQL (service reference).
So I need to rewrite the WCF service to a new technology that could be hosted in Linux. I know for sure that I have to learn a new technology to do that but I would like to be sure I choose the right one.
These are my actual skills :
Writing C# code
Writing VB.NET code
SQL and MySQL
Some Python basics
This is what I have done so far :
Build a Linux test machine with Debian distro and installed Mono and .Net Core
Installed MariaDb database and built table schema
Do you think that ServiceStack could be a good choice to fit my needs?
If so, what are the suggested steps to getting startet with it?
Thanks!
Do you think that ServiceStack could be a good choice to fit my needs?
So ServiceStack runs on .NET Core and Mono but you shouldn't consider Mono for Web Apps as .NET Core is far more performant, resilient & better supported.
ServiceStack includes a code-first ORM in OrmLite that you can use to quickly develop DB Apps which supports MySql/MariaDB.
ServiceStack also supports AutoQuery where it can implement full Queryable Services for your OrmLite data models with just a simple Typed Request DTO declaration.
And in the pre-release version (now available from v5.8.1 on MyGet) it also supports AutoCrud and AutoGen AutoCrud Services which makes it possible to rapidly develop full CRUD APIs with declarative Request DTOs.
All these features are supported and perform even better on .NET Core thanks to its leaner & faster runtime & thanks to its cross-platform support you can take advantage of the simpler & superior tools and Services for hosting & deployment in the Linux ecosystem.
If so, what are the suggested steps to getting startet with it?
I'd recommend following the Getting Started section and reading the Background Concept docs if you're new to ServiceStack to get a background understanding on its design & goals.
Related
I will explain briefly my situation before asking for recommendations:
Context
Among other topics* I have been asked to develop a REST api that will be on the cloud (Azure)
The current (soon legacy) application works with windows service.
Behind this web API/windows service that receive the data and deserialize it (before serializing again when sending the response) there is Pricing Library which is used to compute data provided by custom-xml format.
The problem
I am quite concerned with compatibility issues as I keep encountering errors due to uncompatibilities from external libs with .NetCore 2.0
I had an issue with log4net as the Pricing Lib is using 1.2.13 version while 2.0.8 is already available. I solved this but I now encounter RealProxy in dotnet core? issue
I feel I will keep encountering new issues and it will be really time-consuming to fix them each time. But perhaps I am wrong since I only want to revamp the web API with .netcore 2 (not the pricing lib) ?
My question
Is it really profitable, performance wise, or functionally-wise, to switch now the web API to .NetCore 2.0 knowing that we call a Pricing Lib in 4.6.2 .Net Framework ? Is it worth to bother that much just to be using the trending framework while the former one is rather mature ?
Many thanks for your answers~ !
PS: I have already googled and read the relevant documentation, I am asking about experience from other users
https://learn.microsoft.com/en-us/dotnet/standard/choosing-core-framework-server
*code optimization, configuring automatic build and deployment, markdown doc etc.
I have been trying to anticipate the issues I may face when trying to migrate an existing API developed in .NET framework 4.5 and deployed in an IIS to a serverless architecture based on AWS Lambda.
Currently, the API is divided in: Controller (entry point), service (buz logic) and repository (basically LINQ), and of course some DTO and DAO's, nothing fancy. In addition, I have got some dependencies to external libraries but I don't know if that really matters.
Here is the thing: As I could see when configuring my Lambda, it only accepts .Net Core applications. Ouch! Then, is it necessary to migrate to .Net Core? If it is, can anyone tell me how much development that requires considering my set up?
Is it necessary to migrate to .Net Core?
Yes, as Lambda runs on Linux.
If it is, can anyone tell me how much development that requires considering my set up?
You will need to pay specific attention to the dependencies to external libraries, as they need to support .NET core and might add a substantial load time to your lambda function.
If you have an existing .NET API developed in 4.5, I would strongly advise against trying to migrate the whole API. Lambda's pay-for-what-you-use model is very attractive, but largely incompatible with ASP.NET MVC/WebApi's server model.
I was about to use the existing Serilog's SQL Server sink but I realized that the latest pre-release and stable versions do not support ASP.NET Core.
Is there an alternative to this sink? What am I supposed to do? Should I write a new sink?
The Serilog sink for SQL Server depends on some types not yet in .NET Core. Work started to refactor the sink and remove the dependencies, but since then, the types in question have been added to the next .NET Core version:
https://github.com/dotnet/corefx/pull/12426
Due to this, the Serilog SQL Server sink will most likely remain .NET Framework-only until the next .NET Core/.NET Standard release, after which support will be quick to add.
In the interim, writing a quick implementation of ILogEventSink of your own would be a reasonable way to get unblocked.
I can't tell you what you're supposed do, but I can describe a couple options. The Sql Server Serilog provider on GitHub would be a better place to ask the question of what they intend to do.
Serilog is indeed on the .Net Core train, as many, many other mainstream .Net projects are. You are correct that as of today, the SQL server sink is .Net 4.5 only. You can:
Continue developing your ASP.Net Core project, target .Net 4.5 in your project json, build and deploy to windows OS only, but carry on using SQL server sink.
Many companies are migrating to .Net Core but targeting .Net 4.x.x in order to keep 100% back compatibility with existing packages while the kinks are ironed out in the framework. This has been a viable solution for my large scale projects.
Target .Net Core, and write your own logging repository layer to manage custom SQL and database log dumping code.
If you're in core, this is easier than it sounds, but requires experience with Data Repositories and IoC. Any code that needs to dump logs to the database would have to have some sort of "ILoggingRepository". It does however, duplicate calls to logging methods, in addition to deviation from the ILoggerProvider interfaces in Microsoft.Logging.Abstractions - forgoing the flexibility of log levels and such, unless you decided to re-engineer your own. It's a working solution; I never said it was an elegant one.
Write your own Serilog sink.
I don't have experience with this one, but I have seen code samples that describe details of how to accomplish this. The reason I never pursued this option is due to a fear that by the time I finished writing my beastly database sink, the open-source community would rework the Sql Server version into a fully core-compliant and database independent version. This would be the most heavy-handed solution, but also the most robust.
There may be other sinks available for .Net Core, but if you're looking for the SQL server one specifically, then you most likely are working with constraints that prevent using MongoDB sinks and file providers and such.
I guess the question is not really technical, but rather a philosophical one, then I do not propose an answer, but consideration:
In my humble opinion, Microsoft with its Silverlight killing, UWP orientation and "escape to clouds", admitted defeat of its entire concept of proprietary software development, so liberation of dotnet platform is nothing more than the farewell gift for developers, deceived in their hopes.
By itself, dotnet ecosystem is very promising, but its future has little to do with the Microsoft products, as it was before. At least, I hope as a developer who has been working with Microsoft products more then twenty years. Therefore, common infrastructure libraries that were focused on concrete Microsoft products (I mean MS SQL Server in this current case) are dying now.
Therefore, the conclusion is: if you already have long-term project that tightly coupled with SQLServer, maybe it is better to put some efforts to your current logging solution adaptation, otherwise it is better to look for some logging solution, not dependent on MSSQL. Probably it should support different storages via adapters or something like that.
Try to look at this, they declare Core support in next version, at least this is a live project.
I have a .NET CF C# client. I needed a simple messaging framework that is compatible with ActiveMQ on my server side. I understand that Apache.NMS and Apache.NMS.Stomp supports CF v2.0 but i believe there isn't much documentation to go with them. Can someone throw some light on the options that are available considering the fact that i want to use only ActiveMQ on the server side. (as one more messaging framework is an overkill?)
Apache.NMS.Stomp works quite well on the CF and its your best bet other than writing your own mirco Stomp client for .NET CF. There are tons of examples of its usage in the src bundle, just take a look at all the various unit tests there. You can also direct specific questions to the ActiveMQ user group if you get stuck.
I think (I haven't gone near the compact framework other than playing with it a long time ago) that the CF supports at least a base subset of WCF - if that is the case, there is a WCF NMS Provider available: http://activemq.apache.org/nms/apachenmswcf.html
(src available here: http://www.apache.org/dyn/closer.cgi/activemq/apache-nms/1.1.0/Apache.NMS.WCF-1.1.0-src.zip)
If all of the above is true, WCF is all you'd really need to deal with...
I am planning to practice and learn .NET C#, WCF, ASP.NET web services and Oracle 11g (SQL/PL Sql).
What I am thinking is to work on developing a sample project involving above technologies, so that I can learn technologies at the same type practice them efficiently.
I need guidance to links where I can get some business scenarios or requirements where I can use all the above technologies and implement a sample project.
Thanks in Advance
The first thing I would do is download VMWare Player. It is free and it will allow you to setup a "playground" for you to work with. The next thing I'd do is download Visual Studio Express and install it on your virtual machine. Finally, I would download Oracle 11g which is also free. Install that on your virtual machine too.
Now you have a virtual environment where you can do whatever you want and practice Oracle and .NET to your heart's content without messing up your current system. Once all is setup, you can learn more about Oracle and .NET from the Oracle .NET Developer Center