{"id":92433,"date":"2020-08-27T07:42:01","date_gmt":"2020-08-27T05:42:01","guid":{"rendered":"https:\/\/prohoster.info\/blog\/administrirovanie\/viennanet-nabor-bibliotek-dlya-backenda"},"modified":"2020-08-27T07:42:01","modified_gmt":"2020-08-27T05:42:01","slug":"viennanet-nabor-bibliotek-dlya-backenda","status":"publish","type":"post","link":"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/viennanet-nabor-bibliotek-dlya-backenda","title":{"rendered":"ViennaNET: a set of libraries for the backend","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Hello everyone!<\/p>\n<p><\/p>\n<p>We are the .NET developers community from Raiffeisenbank, and we want to share our set of infrastructure libraries on .NET Core for quickly creating microservices within a unified ecosystem. We've open-sourced it! <\/p>\n<p><\/p>\n<p><noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/raiffeisenbank\/blog\/494830\/\"><img decoding=\"async\" alt=\"ViennaNET: a set of libraries for the backend\" src=\"\/wp-content\/uploads\/2020\/08\/eb063b3083da2c39f7f3c40a560c30ab.png\" style=\"display:block;margin: 0 auto;\" \/><\/a><\/noindex><\/p>\n<p><noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<h3>A Bit of History<\/h3>\n<p><\/p>\n<p>At one time, we had a large monolithic project that gradually transformed into a set of microservices (you can read about the specifics of this process in <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/raiffeisenbank\/blog\/458404\/\">from one of the authors.<\/a><\/noindex>). During this process, we faced the challenge that when creating new microservices, we often had to copy various infrastructure solutions\u2014like logging configurations, working with databases, WCF, etc. One team worked on this project, and everyone was already accustomed to a certain established approach to working with the infrastructure. Therefore, we separated the common code into a dedicated repository, wrapped the collected libraries into Nuget packages, and placed them in our internal Nuget repository.<\/p>\n<p><\/p>\n<p>As time went on, the project gradually fragmented, and there was a desire to create new client-side modules using a modern JS framework and deploy them in the browser. We began transitioning from WCF\/SOAP to REST\/HTTP, which required new libraries for quickly launching services based on AspNet WebApi. The first version on .Net Framework 4.5 was developed almost on the fly by our architect in his spare time, but it already out-of-the-box allowed launching a service with authorization (NTLM), logging, Swagger, IoC\/DI based on Castle Windsor, and configured HTTP clients that propagated various headers for end-to-end logging throughout the project. All of this could be further configured directly in the service configuration file.<\/p>\n<p><\/p>\n<p>However, not everything was smooth: this library turned out to be incredibly inflexible regarding the introduction of new modules. For instance, if a specific middleware needed to be added, a new assembly had to be created, inheriting from the base class that launched the service, which was quite inconvenient. Fortunately, such cases were not very frequent.<\/p>\n<p><\/p>\n<h3>The era of Docker and Kubernetes<\/h3>\n<p><\/p>\n<p>The time has come when the wave of Docker and Kubernetes has also reached us, which we've been closely observing: it was a great opportunity to move forward with technology in .Net Core. This means we need new infrastructure to launch services: some libraries have transitioned from .Net Framework to .Net Standard and .Net Core almost unchanged, while others have seen slight improvements. However, our main goal was to redesign the functionality related to launching services on AspNet Core.<\/p>\n<p><\/p>\n<p>The first step was to consider a concept that would eliminate the main drawback of the previous version: the lack of flexibility. Therefore, it was decided to make the entire library system as independent and modular as possible, assembling the necessary services based on functionality like building blocks.<\/p>\n<p><\/p>\n<p>The main objective is to create a unified approach that describes how to interact with databases, buses, and other services. We aimed for integrations to be quick and painless, allowing developers to focus on writing business logic rather than infrastructure \u2013 it's already ready. A shared repository helps enhance the collaboration experience within teams: when very similar internal infrastructures are used, it's easier to get involved in another team's development process and exchange expertise.<\/p>\n<p><\/p>\n<h3>And why do we need Open Source?<\/h3>\n<p><\/p>\n<p>We want to demonstrate the maturity of our expertise and receive quality feedback: an outsider can bring something new. We're also interested in the development of practices related to microservices and DDD on .NET in the industry; perhaps someone would want to adopt specific parts of the framework. <\/p>\n<p><\/p>\n<h3>Actually, ViennaNET<\/h3>\n<p><\/p>\n<p>Now let's take a closer look at everything. <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/Raiffeisen-DGTL\/ViennaNET\">We've placed the complete source code here<\/a><\/noindex>. <\/p>\n<p><\/p>\n<h4>ViennaNET.WebApi.*<\/h4>\n<p><\/p>\n<p>This set of libraries consists of the \u2018root\u2019 ViennaNET.WebApi, which contains the CompanyHostBuilder class, and a series of configurators ViennaNET.WebApi.Configurators.*, each of which allows adding and configuring specific functionality in the created service. Among the configurators, you'll find connections for logging, diagnostics, types of authentication and authorization, Swagger, etc.<\/p>\n<p><\/p>\n<p>ViennaNET.WebApi.Runners.* includes pre-configured service builders. These packages eliminate the need to remember which configurators to connect each time a new service is created. They do not restrict the functionality of the service builder in any way.<\/p>\n<p><\/p>\n<h4>ViennaNET.Mediator.*<\/h4>\n<p><\/p>\n<p>Libraries that enable the creation of an internal mediator bus for commands and queries within a service. This approach reduces the number of DI injections to just one, for example, in controllers. As a result, various decorators can be added to the requests, standardizing their processing and reducing code volume. <\/p>\n<p><\/p>\n<h4>ViennaNET.Validation<\/h4>\n<p><\/p>\n<p>An assembly that contains a set of classes for creating validation rules and sequences derived from them. It's very convenient for implementing domain validation, as it allows describing each business condition as a simple and separate rule. <\/p>\n<p><\/p>\n<h4>ViennaNET.Redis<\/h4>\n<p><\/p>\n<p>A library with wrappers for convenient interaction with Redis as an in-memory cache.<\/p>\n<p><\/p>\n<h4>ViennaNET.Specifications<\/h4>\n<p><\/p>\n<p>An assembly containing classes that implement the 'Specification' pattern.<\/p>\n<p><\/p>\n<p>This is far from all that we have in our set. You can check the rest out <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/Raiffeisen-DGTL\/ViennaNET\">in the repository on GitHub<\/a><\/noindex>. The release of our libraries for working with databases as OpenSource is planned soon.<\/p>\n<p><\/p>\n<p>Thank you for your attention, we look forward to your comments and pull requests.<\/p>\n<p>Source: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/raiffeisenbank\/blog\/494830\/\">habr.com<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u041c\u044b \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e .NET-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0420\u0430\u0439\u0444\u0444\u0430\u0439\u0437\u0435\u043d\u0431\u0430\u043d\u043a\u0430 \u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0440\u043e \u043d\u0430\u0431\u043e\u0440 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043d\u0430 .NET Core \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0441 \u0435\u0434\u0438\u043d\u043e\u0439 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439. \u0412\u044b\u0432\u0435\u043b\u0438 \u0435\u0433\u043e \u0432 Open Source! \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u041a\u043e\u0433\u0434\u0430-\u0442\u043e \u0443 \u043d\u0430\u0441 \u0431\u044b\u043b \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043c\u043e\u043d\u043e\u043b\u0438\u0442\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u043b\u0441\u044f \u0432 \u043d\u0430\u0431\u043e\u0440 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 (\u043e\u0431 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u0445 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435). \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":92434,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-92433","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u041c\u044b \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e .NET-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0420\u0430\u0439\u0444\u0444\u0430\u0439\u0437\u0435\u043d\u0431\u0430\u043d\u043a\u0430 \u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0440\u043e \u043d\u0430\u0431\u043e\u0440 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043d\u0430 .NET Core \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0441 \u0435\u0434\u0438\u043d\u043e\u0439 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/viennanet-nabor-bibliotek-dlya-backenda\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47ViennaNET: \u043d\u0430\u0431\u043e\u0440 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0434\u043b\u044f backend\u2019\u0430 | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u041c\u044b \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e .NET-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0420\u0430\u0439\u0444\u0444\u0430\u0439\u0437\u0435\u043d\u0431\u0430\u043d\u043a\u0430 \u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0440\u043e \u043d\u0430\u0431\u043e\u0440 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043d\u0430 .NET Core \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0441 \u0435\u0434\u0438\u043d\u043e\u0439 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/viennanet-nabor-bibliotek-dlya-backenda\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2020-08-27T05:42:01+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-08-27T05:42:01+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47ViennaNET: a set of libraries for the backend | ProHoster","description":"Hello everyone! We are the .NET developer community from Raiffeisenbank, and we want to tell you about a set of infrastructure libraries on .NET Core for quickly creating microservices with a unified ecosystem.","canonical_url":"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/viennanet-nabor-bibliotek-dlya-backenda","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47ViennaNET: \u043d\u0430\u0431\u043e\u0440 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0434\u043b\u044f backend\u2019\u0430 | ProHoster","og:description":"\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u041c\u044b \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e .NET-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0420\u0430\u0439\u0444\u0444\u0430\u0439\u0437\u0435\u043d\u0431\u0430\u043d\u043a\u0430 \u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0440\u043e \u043d\u0430\u0431\u043e\u0440 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043d\u0430 .NET Core \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0441 \u0435\u0434\u0438\u043d\u043e\u0439 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439.","og:url":"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/viennanet-nabor-bibliotek-dlya-backenda","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2020-08-27T05:42:01+00:00","article:modified_time":"2020-08-27T05:42:01+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"92433","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":null,"breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-02-28 12:08:24","updated":"2022-10-03 07:52:44","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/92433","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/comments?post=92433"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/92433\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media\/92434"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media?parent=92433"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/categories?post=92433"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/tags?post=92433"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}