ASP.NET Community Standup - Exploring the ABP web app framework

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] [Music] do [Music] do [Music] [Music] [Applause] [Music] so [Music] and hello welcome to the asp.net community stand-up i'm john galloway i'm a pm on the.net community team and i'm really excited today to welcome on my friend all the way from istanbul halil speaking about abp framework so hello joe welcome so i last saw you in istanbul i feels like forever ago but and uh today just just a special memory of my time over there i drank way too much turkish coffee so i made a special one today so so this is really exciting um and so and abp like i i've followed over the years and it's really grown you've you've just had some recent releases um so awesome well i will start as i always do with community links and we'll go through those and then we'll turn it over to you and learn more about avp so these are the community links i'm featuring for today and we'll get right to them this is one that came to me over twitter uh so this is damselfly and this is interesting it's a blazer.net 6 web app for photo management so the big thing recently they added in multi-user support so this you can have multiple different users with some with like read-only different you know different types of user accounts so it's very performant it handles all kinds of different uh image types etc so really neat this is a very cool project keep an eye on it uh oleg has been tweeting about.net recently i've been following for a while i love his tweets they're just um they're very uh so he'll do these short little graphics and they'll just explain here's you know here's a new feature and here's how the code looks before and after so i um i just love you know like occasionally things will just pop up in my in my twitter feed and i'll just learn or understand something a little bit better so i very much encourage following him all right http 3 support in.net 6. so http keeps marching on we had 1.1 forever then we got http 2 which allows like batching and um framing and so sending multiple different things in one connection which is nice but then there's a problem they call it the head of line problem where basically if you miss one thing then it's got to redo the whole kind of block so http 3 uses quick which is built with udp and tls so a lot of neat magical things going on under the hood protocol wise uh the the real takeaway is that there's now support for it and so this is uh in.net six and so uh this post goes through the support bolts and kestrel on the server and then also in the http 3 client and then of course http 3 relies on the os and and you know the web server supporting as well and so then there's multiple additional things to to look through there all right this is one that's kind of near and dear to my heart i've been uh using azure functions with dotnet5 and net 6 and it's pretty cool that you can do that now well i've used net 5 because net 6 support just came out but what's neat with azure functions is they have this new isolated model where you can host it's it's separate between the host and the process you're running before it was all kind of one big process and so that that's really cool to be able to support new versions um it's always been frustrating for me over time waiting for you know there'll be a new.net release and i'd be waiting for functions to support it and now because of this isolated model they can do that so awesome anthony and team uh speaking of anthony here's another anthony uh sir anthony doretti uh talking about streaming jason responses with angular so i've shared some things on this recently about streaming jason um using jason ld uh using um using streaming support and so uh so now with this here here's an example showing doing this with angular so implementing it in an application um and i like this it's got a short little um video showing this as it's going across so just streaming information via jason built into.net six i love by the way seeing all these all our friends from around the world popping in um got malaysia and turkey and and all over and um so thank you very much this is wonderful um okay almost done with my community links uh so andrew locke has been going through under the hood a lot of um a lot of more advanced stuff that's built into net six so there's the web application builder which makes it very easy to do these kind of lightweight models um and so what anthony's been doing is kind of digging into how does it work how does the code behind it work etc let's so uh here here he explores the web application builder he's got some great diagrams in here uh showing you know here's the public api for it and then the things he really digs into here are the configure web or web host builder and configure host builder and these kind of serve as escape hatches that allow you for if you need to use something that was in a previous version that was done using the previous builder you can get in and do that so you can still use web application builder and then you can go down and configure things at a more deep level so explaining how that works and showing some example code he also just digs into the source code and talks through you know how how bootstrapping works and how all the different parts of it are set up so i encourage reading this and i'm sure i will read this post again in the future when i'm re uh using web host builder and i need to use some some code that uh i need to get the backboard compatibility for so and then the last link i'm sharing is just abp i o and i'll i'll turn it over to you hello because um i figured you'd go into this in more depth but um you've got a great website there that explains what you're doing and also has some great docs and tutorials i feel like that's a common problem with um you know with both uh open source and you know like a lot of projects have pretty lacking documentation it's not always up to date the tutorials aren't great and i think your project is a really good example of one that does make it easy to get started thank you because documentation is very hard maybe harder than coding so it really is just creating great pro projects but you cannot have time to document it yeah yeah well so so uh should i share your screen now do you want to yeah all right okay uh shall i start go right ahead thank you uh today i will talk about a abp framework i will make some introduction then i will show some live coding and presentation mixed talk let's start with the first question first of all abp is an open source web application framework for asp.net core so you may ask why do we need an application framework isn't asp.net core sufficient for or requirements okay uh when you create a new project with plain asp.net core if you are creating a serious project you will build a lot of infrastructure uh based on that amputee solution first of all you should decide the architecture you should prepare a solution structure maybe you want to apply a layered architecture with the domain driven design or another development style so you should care about that then you should explore and adapt some libraries and essential tools you want to use on this project then you need also need to set set up a test infrastructure to create automated tests and you will care about how to deploy your application to kubernetes or azure or another environment this is just the beginning actually you typically want to not repeat yourself as a developer we hate so don't repeat yourself we should uh generally need to create some infrastructure for not for automating some cross-cutting concerns like authorization validation some exception handling so uh the purpose here to reduce the repeating code uh [Music] i also we typically in a serious software project need to integrate to external systems like rabbit mq radius or another tool or third party providers we should generally create some obstructions to simplify our application code and also we generally create some base classes for common service types and helpers to implement that architecture correctly by all the developers so the problem of this approach is making it reusable is very hard because when we create a good architecture in a project then we start a new project so we start from scratch we may just copy everything but it doesn't it just don't work in practical actually because uh we cannot document that solution structure and a lot of uh code is actually highly coupled to our specific project so it's not being reusable and also every developer has her own coding style so uh determining a coding standard and convention is not easy among developers and also document documenting that architecture and infrastructure is not easy so some big companies like banks creating their own infrastructure and internal framework for that purpose but most of companies have no such a chance and they need to start from scratch or should use some pre-built infrastructure actually this was uh again just technique because you will have some common non-business requirements for example if you want to create a multi-tenancy system is really a dedicated work to create a multi-tenant infrastructure like if you typically want to create background job quiz feature toggling infrastructure permission based authorization system a lot of more and when you come to user interface you will create a ui layout as a responsible and modern layout with team beta team you should work on login register user permission management pace and much more so abp framework actually tries to fill the gap between the plain asp.net core and enterprise software requirements it offers a modern and maintainable software architecture and provides the necessary infrastructure pooling documentation examples articles to implement that infrastructure and architecture correctly it is a great community i will mention later again uh we are actually continuously discussing with the community to decide what to do next in that architecture the architecture is evolving continuously and it works on latest.net core we have just upgraded to that net six in recent days so uh just after the esp asp.net core release we will release a stable version of avp framework with dot net six uh we are trying to use the tools you already know like ant framework uh bootstrap auto mapper uh rabbit mq ident to server and some already known and major products rather than creating everything uh ourselves that's a good idea because it's it makes the learning curve easier and easy adaptation abp's architecture stands on four common concepts first of all it's based on domain-driven design principles and it is a layered solution architecture based on dvd second it's modular uh this is one of the topics uh we decided to rewrite the entire entire framework framework to make it more modular currently when you create a new solution you have a lot of functionality but all of them are coming from individual modules i will show in the demo so the most important features one of the most important features of abp abps multi-tenancy it has everything to create a multi-tenant infras multi-tenant application uh multi-tenancy is used generally to create software-as-a-service applications and also it's microservice ready you know it's popular it's uh it's already adapted actually uh so abp provides the necessary infrastructure and tooling for creating microservice solutions we are already creating example solutions i will mention that later it's currently it's actually a ui and database independent but it comes with pre it comes with three ui options out of the box mvc actually razor bass uh is a server-side rendered html and angular and blazer it is web assembly and server support support and also it works with anti-framework for it can be combined with topper when you want to make low-level queries and it also works with mongodb for noise sql databases avp framework was first released as asp.net boilerplate it has been eight years ago and it evolved to abp i o by the time so in this talk i am talking about the abp framework uh this was a quick introduction uh now i want to uh introduce some highlights to make you understand what abp actually do do for us uh i will show a concept then i will make a demo for it okay yeah in case so first of all i have to say we've got people watching from all over the world which is really exciting um some things that you called out there that are just really powerful like first of all multi-tenancy is really hard to do right in asp.net so you can think you did multi-tenancy right and then accidentally you're leaking information between different tenants or you know what i mean you're not you're not a fully yeah that's one of the most important concepts we have hardly worked on that uh yeah it's completely isolates tennis tenant data's but not only database it's isolates cache is all it also isolates uh event pass and whatever you think the whole framework is developed the multi-tenancy in mind that's very important and it makes your application multi-tenant unaware this is one of the big benefits you just write a regular code you just make little touch to your entities like implementing an eye multi-tenant interface then your entity is becoming multi-tenant so actually it's it's multi-tenancy is very strong one other thing that you talked about is that you have a a good architecture it's a it's a sophisticated architecture but it's easy to get started with and it's documented well and i've worked in enterprises before i worked in financial companies where we had meetings twice a month or something to argue about the architecture and everybody would argue i think that the domain object should go here well i think that the services should go here and it's a waste of time really for a lot of businesses it's great to just say here's here's a tested architecture it's used by a lot of businesses it's it's you know it's um it's been tested and advanced over time and we don't need to do that in our business we can just you know build on top of that so i i i just uh wish i had those hours back that i wasted sitting in meetings arguing about architecture when you know it's it's not something that every business needs to solve that's just great points yeah all right go ahead i just i i think there's some really really cool things uh this start uh from client to server communication uh think about a typical web request we have a blazer web assembly application we want to consume some rest api on the server side actually we have we do a lot of similar thing in every method call for example we deal with rest endpoints we deal with get or post request we deal with json serialization exception handling how to handle the exception should we show a message to user or what about error codes and a lot of problems actually uh abp completely automates that i will show in the demo and also in the server side there are some pre-built middlewares and filters which makes uh completely automated or simplifies validation authorization exception handling some audit logging features and the database connection and transaction management i will just make a quick demo to demonstrate how we can consume apis from blazer application okay we have some some questions and i assume you're probably covering this later but some people are asking you know is it free and what's the difference between the free and commercial versions and that sort of thing um uh uh the open source uh the framework is completely free open source and it will be like that always the abp commercial is providing some prerequisite modules uh some teams ui teams some code generation tooling and support based on the framework it's not an alternative it's not something like free version or commercial version no it's not like that actually the commercial package or commercial subscription directly use the framework so framework is very strong and all the hard and low level stuff is done in the framework side the commercial site uh provides permit modules so you don't uh invest your time to create some common business modules like file management system like ident server management ui or some uh team system like that but the framework actually provides a very good value uh i i can i come this topic later if we have time okay okay let's let's start the demo uh first of all uh abp has a cli so we can easily create new projects you see there is an empty folder here and i'm just typing avp new app i want to use blazer if i want i can specify server but i don't want to now the laser is web assembly by default and i want to show blazer oh sorry i thought you misspelled blazer i i couldn't see that looks good it opens the documentation uh now the solution is created uh you see all the layers are have pre set up test projects including and framework or mocked by sqlite in memory database and all the tests is arranged and this is the layers and utilities of the solution i have already opened this solution so i can just open the solution now i want to create a server site api and consume from the blazer application we have two projects here application.contracts project is important this project is shared by server and client applications this is very a powerful feature of blazer so we can share contracts between client and server so so ibp takes this and makes it better by directly using interfaces i will show let's create a values appservice i will just copy paste some code so don't invest your time assume that we have a values application service we are getting a value and increase it it's very basic just i want to show the communication part i'm sorry but can you zoom in the um text a little bit more is it good now a little bit more even sorry okay yeah i know it's crazy okay now we have defined our application service interface now we can implement it i am driving my application services from the application service base class of the avp framework this brings me some conventional features and i am implementing the i value absorbs just i will copy the code it's very simple code but i will copy because i have a value and i'm getting it and increase it with another method this is just a plain class this is not an api controller it's not an mvc controller now i am running the whole site actually the server side is done okay when i run the server side i see a pre-integrated swagger ui and also i see a values api with get post and automatically created api controller from the application service by naming and other conventions i want i will not go to details but you typically write application services plain classes and it creates the rest api for us then we can go to servers to go to client side the blazer application first of all i want to run without making anything i just wanted to show it okay the laser application uh seems empty at the beginning with the welcome page but is translated to different language when i click to login it's redirecting to the server side for open id connect authorization authentication which is pretty standard it's using iran to server for authenticating here it's all integrated at the beginning so now i have i can see uh the preview module paste because i have logged logged in as admin i can see role management page user management page i can click a user and set it as permissions i can create new tenants i will show about this and some email settings this is my minimalist startup template and not all modules are installed uh just for identity tenant management and settings folders are installed here i want to log out and return the web assembly application now i will delete this page and create some simple functionality that consumes the server side i'm just deleting let's start from the c sharp code here i am in the browser actually but i can just inject the same application service uh first of all blazer uh doesn't allow a constructor injection by default abp replace its dependency injection provider so we can use the constructor injection uh here i want to just define a private variable here and i will overwrite on initialize it and okay what i want is just like injecting a typical service just like it is in the same application and calling its methods that's all abp handles all the uh functionality it's understand this is a get request it's if i pass some parameters it's uh converting to json make a http request get its response it adds authorization headers if available it adds localization multi-tenancy headers do a lot of things but this is just is not shown to us it's just a regular method call now i want to add another method here increase the volume it's same i am just calling the increase method and getting the value again and the code side is actually done i can just open the razor side and you know blazer i'm showing the current value and i have a button here this button component is blaze rice you have already made a show with blaze rust abp blazer ui is completely based on the blazer ice library it's very good library and provides obstruction over uh the bootstrap you know so we we can write a bootstrap code in a type save manner color prior primary and on click i am calling the increase method that's all now i rerun the application so and while you're doing that um it's important to for people joining later or whatever so you're showing a blazer example but it also supports mvc razer pages and then also definitely i i just want to show blazer since yes popular and you like blazer of course yeah i just want to make sure everyone knew also works with yeah pages let me show network request you see that we are in blazer web assembly application and clicking a button uh okay you see we are getting a web request i don't understand why this all show okay in the blazer application we can just increase the value it's making a real http request from client side what we have done is actually really simple let me show from the uh github desktop okay it's not easy to see let me show we have done in the server side we have created a simple service we can just share the same application contract application service interface with the client and we have reused the application service in the client side uh just regular method call and all works all the complexity is handled by the abp framework it's that simple local generation you know this kind of tools are generally creating some client-side code with a tool some proxy generation this is called client-side proxies let's improve this example to add more feature let's see how exception handling works for example i want to add on i'm in the server side no not yet and i'm just checking if while you is greater than 50 troll new okay now i'm just throwing an exception on the server side i'm not just you typically write a try catch here handle exception and send a proper response to the client but abp automatically handles all the exceptions so you typically don't do anything user friendly exception is a special kind of exception it directly shows this message to the user so in the client side also you don't have to do anything it works in every ui laser mvc or angular the server side is actually okay just i want to restart the server to take okay i don't need to refresh the ui okay when i reach to 50 okay i cannot uh increase it more i'm getting the error okay that's good uh we haven't done any exception hunting code we it automatically shows error message to user everything works as expected if we for example if we draw a sql exception it doesn't show the sql statement to the user it just hides details and shows a nice message so don't worry there are kind of exceptions and it also returns a proper http response to the client actually all the things you typically manually do is automatically handled you don't see so much thing but this is the value because there is no code we write everything works automatically so i also want to show an authorization for example i want to restrict the usage of this method from non-authenticated users to do that we can just use authorize attribute see that this is a playing class this is an application service not controller but authorized attribute still works this is standard attribute of asp.net core okay this prevents non silent users cannot execute this method but i want to define a permission because abp has a low level and fine tune actually permission system there is a permission definition provided i want to show the permission system we can define permissions for example can increase value this is our unique name for this permission when we define a permission we can set a display name for that uh this display name can be localized uh avp use json files simple json files for localization so just i am typing can increase the value this is name of the permission okay okay now i'm restarting the server side sorry uh i'm just copying the permission name here so this permission is actually a policy you already know policies in asp.net core this is automatic policies all permissions are can be used as policies nice okay so i've used policies before but i had to write code for them so what you're showing there is configuring those policies in a json file and it's it's definitely actually json file for was for localization what i have done is just one line definition i created a new permission with a name and this is optional actually this is sufficient but i have created a localized name and localized it in the json file and okay i now added an authorized attribute with a policy name or permission name now i open the blazer application try to increase but it's say it's not unauthorized we will we should improve this message i see that but actually normally you should not put this button here if the user has no permission okay let's do that oh let's show another thing before that we got an unauthorized exception this is actually a for all okay anyway okay we got an unauthorized response i will log in with admin now i have all the permissions but i still don't have this permission the messages change it because i have logged in actually i have authenticated but i i have not authorized yet okay to authorize myself i can use the role management page i can set permissions on the role page and i see demo up here can increase the volume the text we have entered the json file it automatically comes to permission management ui when i save the dialog i can return the page i need to refresh because it's caching permissions the belizer now i can increase the value i have the permission so this permission system is very powerful and customizable it works with role bases by default but i also can override per user for example uh we have a john user as polosoft and we can set john's permission per user if a permission is not inherited from a role we can specify for the user and we have we had one question come in earlier it's kind of specific but asking about the hosting so is it possible to host like your front end with blazer in something like cloudflare um yeah i definitely can we are actually actively using cloudflare in our company so no problem it can it can be hosted anywhere in azure or kubernetes uh so it works everywhere this is standard.net core application actually not so different so we have added authorized authorization uh here it's very simple we can edit in class level this is a standard so i don't want to mention but the powerful stuff is we are just defining permissions and it appears on the ui we can just assign to rows and everything works exactly as expected and also i want to show some fancy ui features like normally you do a lot of code for to make this happen for example let's make a confirmation because increase abp has a lot of useful utility services for that like that one of them is message api dot confirm are you sure to increase okay i just copy inside if block and i also want to show a notification after the increase notify that success inquiry okay wait okay that's all just rerun the blazer application this kind of utilis utility service is very important because in every project we repeat all of them again and again there are a lot of such services so it shows a confirmation i can cancel or accept yeah a notification appears here it's integrated to known libraries like uh toaster and civic alert a blazer right side is not using cigarette but for mvc side it's using like that so let's i'm checking if anything yeah the one last thing is that on this demo uh we have automatically working audit logging system let me show the database uh we have an avp audit lock system when you install this module which is pre-installed when you create a new solution it has some tables to lock every action in the application for example for audit log table we see all the actions here we call it increase method we log the new to the application we see all the http status codes and browser information if user has logged in we can see which user was that how much milliseconds it gets to execute this method all these kinds of stuff are automatically locked but it's not limited to that we see all the application service method called with all the parameters we can see all the entities changed in this request we can see all the properties of these entities to track which user changes which entity's property and so on this is especially useful and almost all enterprise enterprise companies are needing that functionality so it just works out of the box if we just don't want that we can just disable audit logic but it is enabled by default it just works like this uh we've had a few questions come in about identity server and of course identity server is a little complicated because there's a paid version and that sort of thing so it's you're integrated with identity server but it's not fully required right you work with the microsoft identity uh actually it depends uh for a messy ui it's optional because msui can authenticate the user itself but for uh blazer we have no alternative yet because blazer you know for best practice for single page applications is open id protocol with out tool and this is provided by island server for now it's not yeah there are some libraries but it cannot be accomplished with plain microsoft ident library it's not such a functionality to make your application a uh authentication server you know you you may use azure or some online providers but if you want to add the server side functionality in your applications uh actually this is not possible with plain identity library no but we are expecting from microsoft to make a solution for that so okay um okay a few questions came in about like personal information um so this is one um this is about logging how do you control like log retention and that sort of thing and then he also had an earlier question about um gdpr and yeah it works like that for example everything is logged by default but you can just enable disable or give some filters for example if we have a dto here like personal info dto is serialized into json and login login in the database by default for example it has a [Music] string password and it has name here okay you want to uh lock the name but you don't want to lock the password is the disable auditing is also works here for property base so if you add this here or here it's not logged oh okay there is a functionality i don't remember if it is completed it also can encrypt some values with declarative uh way but i i don't remember now if it was completed okay great okay any more question well there are a few i i don't want to interrupt you too much um there's so jimmy's asking what do you see as abp sweet spot are you targeting database cred apps something broader um and then you know great response here nasa's using it so you know i mean but what are some of the like key best fits and what are some areas that it's not the best fit yeah actually we are targeting enterprise uh softwares not a simple maybe one uh one month or two month length small projects yeah it it's they can also get benefit but or feature set is actually for enterprise softwares which you you want to create maintainable software a long-term software but for simple cloud applications actually it's easier with abp framework because let me show for example public class controller not controller op service can inherit from product service with some generic entity and dto properties then all the crude functionality uh in the server side completed that it brings all the functionality here so it has it's very detailed and customizable so for simple crude applications you write less code actually uh i think abp is proper for every kind of application for everyone i suggest just to check it to understand if it it fits their application i don't know if you'll have time to show it but i i played with the the new cms features and that makes it that extends what you could do with it quite a bit it seems like because it includes um like in the web page i can create blogs and pages and all kinds of you know it's yeah it's an ongoing project cmskit i will come to that later at the end of the presentation sorry sorry one more question but so a few more questions on like um on gdpr so specific you talked about auditing but so say for instance can i as a user go through and delete my data and all that sort of thing actually abp framework doesn't hold much data about the user just audit logging and user table and they are pretty standard so they should care about this topic themselves because they will know their data and avp doesn't provide a prebuilt solution for that okay okay let's continue with simple application service and see what how abp framework helps us with a simple use case you see a typical application service that creates a book in the database first of all this is inherited from application service so abp knows that this class is an application service and behaves based on that for example it automatically registers this service to depends injection as a transient source so you don't deal with dependency injection you can just use a repository interface for your aggregate groups and entities so you for most of the standard operations you can just use the generic repositories it has authorization and permission system i have just made a demo about it used with attributes it has a unit of work system that's very great because you write no code for database connection and transaction management you just write your code if you just throw an exception abp roll backs all the operations in that request if you don't throw an exception it's just committed in the database it just works by convention and can be controlled and fine-tuned by attributes but most of the time you don't have to worry about that it automatically validates all the inputs it also checks if it is null uh and it's a valid throat uh standard data annotations and also it's integrated with fluent validator uh most of people like that library so it almost automates the validation if it's not valid your method is not called at all uh you don't have to check if the model is valid and so on uh it's automatically audit logit logout i have already shown that the exception management system automatically handles all exceptions communicates to the client and handles gracefully in the client side there are different kind of exceptions and exception scores but it's a complicated stuff now i have already shown the localization system uh it has object to object mapping obstruction and works with automapper library by default and there are a lot of common features that you can use in the application services for such a small code abp actually makes it easier or completely automates a lot of repeating code after that i want to show the second important topic in this talk uh it's internal microservice messaging i have also already demonstrated that we can call application services from client side just like calling a method it handles all the rest operation it's same for microservices actually if you want to synchronously call from microservice a to micro service pay just share the application contracts with the target with the client microservice and just call the applications cyrus functionality all the complicated stuff including island server authentication and everything is handled by the abp framework the second way of messaging microservices is async way this is called messaging or event publishing we typically publish events uh events from microservices using some rabbitmq or kafka or some message broker you know we publish events and consume events from other microservices every micro service has its own database so generally we make some changes in the database and publish and event related to this uh this change uh what what is the problem here the the essential problem is the infrastructure that is we if we don't use a rebuild solution for that we should deal with reconnection problems uh retry problems uh dealing with low level apis of rabbit mq client library for publishing and subscribing events you if you uh check a source code of a service project you see a lot of obstructions around this event system so abp solves all these problems and also there is an important problem which is solved with abp 5 is the transaction problem let me summarize it microservice a makes some change in the database and publishes an event about this change the problem here is that the first data source is sql database for example the second one is another standalone application a message broker like robbie tempu so there is no way to establish a transaction scope that includes both of database operation and event publishing so you may end up with making change on the database but cannot publish the event or a vice versa you may publish the event but when you want to commit the transaction you get an exception so you publish it an event of an uh of an operation which is actually not completed so you you want you should deal with uh rollback events and a lot of stuff the uh one one of the solution of that problem is uh old box and inbox patterns uh there are some libraries around for here for net but abp provides a preview solution for that beginning from the five version this was one of the most wanted feature of the framework abp provides an even pass so we publish events throughout avp's event pass it doesn't immediately publish but actually writes an outbox quiz and this right operation is included in the same unit of work or with another reward uh the same transaction with the with your actual operation so uh is all of none if the transaction fails the message disappears and all your operation is rolled back so it's guaranteed that if your operation succeeds the message is written to the outbox then abps background workers gets this message from outbox and sent to message broker bits retry mechanism rabbitmq may be offline at that time and when it becomes online the messages are guaranteed to be delivered and also uh inbox pattern is vice versa and this is also one of the important patterns because when you get a message if you directly execute it there is there is a problem you may duplicate the execution because in some cases rabbit mq sends message to you but you may not send the acknowledgement message to the rubytempu so it retries the same message and you re-execute the same event again so this is another problem abp solves this by inbox pattern and also it checks if this message was received before and it retries until the success point so also ebp works with this work with the cluster 101 so it uses distributed locking for that so if you have a multiple instance of that microservice it has that problem because it uses some distributed lock system to execute the qui in one microservice in a time and also it has auto events that means for example there are some typical events if you have a product entity for example you typically publish create delay and update events app automates the publishing these events for all entities when you enable foreign entity this is one also a good point about the messaging i might show demo it may be complicated for this talk but i want to show some simple code at least yeah i have a demo service it's creates a to-do item in the database and that's all i i just configured abp framework to automatically publish uh to die the events for the to the item that means if i create delete or update that kind of entity it automatically publish events to the event bus with the inbox and outbox patterns in executed and also it doesn't publish actually the entity class because entity class is not well serializable and it can be dangerous to share all the details of our entity so we can create a detail-like object and it can automatically map this entity to a d2 object so uh publishing is actually automatically done i have not shown that the handling handling site is simple uh avp provides an i distributed event hunter interface which is a generic class a generic interface you read right here the event type and you have a handle event method and then you can just execute the event you can throw exception safely if you throw exception it will be retried and everything works as expected so you just execute the event handling logic uh now it's like that if you want to manually publish and uh event there is a distributed event plus class interface then you can just call it's publish method and with an object to transfer uh then it's published to eventbus actually it's very simple to use and provides all the implements all the details for us and also sometimes we may we may publish events uh insight entity we cannot inject services to entity you know so abp provides some methods for that that comes from the base classes like at distributed event if you if i call a distributed event method uh in my entity it's quit uh quit inside the current unit of work and once i commit transaction it's automatically published to the distributed event bus so avp actually provides end-to-end infrastructure for messaging between microservices any question about here it may it may be fast but i want to use the time efficiency well now that so that's really interesting and i think what you're showing is important because like you've shown the microservice implementation and then you can run into these more advanced problems and what's nice is you've already had to work through this as you're building this with your customers etc and you've solved you've made it easy so when you run into these sorts of problems you can handle that this is really serious problem and every developer trying to solve it themselves i am getting too many feedbacks about that and now it will be available with abp five uh we had a few questions i think from the chat it looks like these are all things that are not in yet or on the roadmap but um uh one was uh graphql support no not yet it's not inside or short-term term roadmap actually i i'm not sure about graphql but we will work work with grpc but not graphql yet okay and then there's a question about cqrs and seekers was always we have been it has been in our roadmap actually this is also one of the most wanted feature and this will be a complementary feature of the framework but we haven't started it yet because uh framework does a lot of things actually currently and adding a feature is a such a great such a big feature is very serious decision we haven't started it yet but it's in our road map okay one other roadmap sort of question is um like mongodb and cosmos db it also works what with mongodb all the modules has mongodb provided mongodb is the first classicism from the beginning so it's not problem with that for cosmos tv we have some uh we have tried a few times to be honest but the work was left as half so we didn't continue we are expecting from anti-framework team they are working on cosmos db integration if they successfully do that it will already work because we are working it into framework great okay uh one one other question then i'll turn it back to you um on on your thing that you were just showing what happens if things get stuck in the message bus yeah actually uh in which stage i can ask for example if we cannot publish message broke if we cannot reach to message broker it tries to reconnect and when it connects it gets from outbox and sends to the message broker it tries again and again until a delivery acknowledgement is uh received so actually there is no problem here if rabbit mq loses the message so what i should what we can do okay all right wow okay so that is a lot of stuff um okay and you said we have about say 10 more minutes or so if you want to oh okay i will i will be fast uh you can go a little bit 15. okay uh as i said it's fully supports multi-tenancy it determines the current tenant based on domain name cookies or from some resources it automatically isolates data database it can also work with multiple databases where a tenant have a dedicated database or some tunnels are sharing the same database it dynamically selects the right database and it also can store configuration based on tenants the goal is to create a multi-tenancy unaware application it's actually possible now and the multi-tenancy infrastructure works like that the same code works with multi-tenant or single tenant cases uh so uh it's really powerful but i cannot call details it also provides a teaming system i don't i want to go faster the teaming system is important because we are creating a modular system and module developer should now know about the team because every application can select another ui team uh this is most customized part of an application you know so we have created that teaming system which defines layouts common libraries all the teams are depending on we have created header toolbar menu widget systems bonding and minification systems we have uh taught that teaming system a lot and created a standard teaming system so you this was the user interface you have already seen in my demo but with a installing another package another ui team package it becomes like that it's more production ready this is we are calling lepton team this is lepton x team it will be available with a abp 5 it has also dark team support this is another team based on abp framework so we i see some community members are creating some team integrations so abp's team structure is very strong i want to show it in action it will just take one minute uh i will show demo from the abp commercial to show the team team's power [Music] this is based on abp but has more modules like software the service module ident server management module language management module and a lot of more i want to show the team side you see we have a dynamic team here we want a dark team yeah it's here just changing all the fly we want top menu and box layout that's all and we want left menu yeah there are a lot of ui teams here for the avp commercial site i i want to show the tenancy side for example i create i can create a new tenant and when i create i can select a connection string so the tenant has a dedicated database and i log out the application i want to switch to that tenant uh for demo purposes i am manual switching but if i use it production it will be determined from the sub or domain name so we don't have to manually change the tenant now i switched to volus of tenant and i can log in with this tenant's admin user and i have i now see a different functionality for example i cannot see some pages like tenant management page because this is already a tenant i have different role lists i have different users i have different settings i can change the theme and it doesn't in fact affect the other tenants a lot of more i can see my own audit blogs and so on so the teaming system is very detailed i i want to skip this features there are a lot of features there are a lot of features because enterprise applications requires these features in every application we deal with background job quiz system some blob storing system uh sending emails or sms messages and so on uh i want to mention what's coming with avp5 uh it will be based on button 6 bootstrap 5 currently we are using bootstrap 4. this is a breaking change unfortunately but we have to do it with this module change we are working on that to make it easy for developers distributed event parts outbox inbox patterns i mentioned we i have uh shown dynamic proxies is already available in javascript site we are we are creating static proxies which generates codes uh this is some this has some use case in some points we are creating the new theme and we are creating an example solution uh like a shop on containers like issue upon abp uh it will be it will be clone of the age of containers application and a simplified column to demonstrate how it is done with the abp framework with simpler last slide i want to show some resources to learn abp framework i was just about to ask you to and so that and if you um so there's the uh the documentation and then there's that eshop i will mention about that documentation is really great you can just explore it it's very detailed and also it's covering uh not only abp framework but also some software development best practices and so on there is an abp community website community.abpio which is which presents some articles and tutorials or video posts created by our team and also by community so you can just follow this to learn some uh problems solved with the abp framework like projectile integration and so on or using some workflow engine with abp framework or replacing item server this was similar to your question uh and so on uh another source is a book that was created by me uh is it has more than 100 pages it's basically uh a practical guide for implementing domain driven design with the abp framework uh actually it shows explicit examples and uh detailed suggestions uh about implementing all the details load level that is including aggregates and domain services application services ddd uh data transfer objects specification pattern and a lot of more if you want to implement ddd i definitely suggest that also i am actively writing a book uh from picked publishing it will be published in the beginning of next year mastering abp framework when it's published you can buy that from amazon another learning stuff is abp block we are publishing uh some articles and new features about that for example we are working on an abp issue upon abp project as i mentioned it contains three microservices at the beginning you it's extensible you can add your microservices it has multiple gateways and applications inside it using a different database for all microservices it's integrated with island server and actually it will contain kubernetes deployment configuration and a lot of more we are actively working on it i think it will be completed in a few months currently it works with thai for development purpose another interesting project based on abp is cms kit project uh i have been always asked that if abp is a cms i said always set uh not they are comparing with you know orchard project which is cms focused while it's in the last version it is focused uh it's split the cms site from the core framework anyway we we decided to create a cmskit module that's not the cms solution but it provides low level components that you create your own cms i i we we thought this uh better because if you want to use cs just use wordpress it's a full feature but if you want to create a cms that's well integrated with your.net solution that's that's a perfect start point it's you can create dynamic pace blocks you can have a tagging system any you can talk any kind of thing you can talk blog posts you can talk pace everything you can comment under everything you can just add comment under a blog page or a standard page or an and other stuff last night and the walkthrough was really smooth the one thing i had i got stuck for a second was i had to give myself permission i had to go into the admin and give myself cms permission but once i did it's it's really cool and it includes uh you can add things to the navigation and all kinds of stuff yeah it's it brings some uh pace like comments everything is extensible and composable for example you can compose command system with reactions so you users can react to your comments that's very cool uh and so on we will have more components and documentation in the future it's in the early stage another thing is abp is a modular system and it has a lot of open source modules cms kit was one of them and one of them is interestingly the documentation system documentation system is actually a module of abp framework it's open source and free uh it's a very good documentation system it includes searching it's responsive uh it can integrate to integrate to github you see contributors or you can just click and contribute to the documentation just like microsoft's documentation system it supports versioning multiple language and a lot of more features it's just open source and free and it's a good example of abp modules there are a lot of modules like that and also there are some commercial modules this is how we gain money on top of this open source project for example there is a as i said for a file management module like you have a google drive like file management module in your application you can just share files with your users and so on and there are there is a say that payment modules language management for module for example you can just translate your ui on the fly and so there are a lot of modules here and actually this was my presentation about the abv framework you can just check this resources to learn the abp framework we are leading this project as a bolosoft company the company is based on actually this project uh and it's growing we have now 20 technical guys dedicated on that open source project and commercial modules and it's growing i i think um i really appreciate that but so sometimes people say oh i only want open source if it's completely free or whatever and i really over time have learned that having a sustainable company that's able to provide support and you know that i know is going to stay around and like you said definitely you know that yeah so i i really think that you've struck a really good balance there where you have an open source core and a lot of functionality that's available for free and then if i am an enterprise or a business that wants to pay for support and advanced modules that's great so i i really appreciate that yeah actually there are a lot of companies are trusting to abp framework and abp commercial like there are very big companies like siemens pwc or plus air i don't want to call this if it is okay maybe it's not true to say it here uh but i can say that uh let's let's see that uh we have re rewriting the entire framework framework uh beginning from five years ago but we still maintain the a spin at boilerplate this is very important because there are a lot of people trusted to that framework and created a lot of projects we cannot just throw it and started a new project it's still continues and in the last months it's it becomes a part of.net foundation you already know that yeah thank you microsoft about that uh maybe we with the abpio we try to enter to the net foundation so it is still continuously developed and uh it's up to date it's just over uh currently upgrading to dot net six so uh that shows that uh we are doing a serious work and we just don't uh throw out projects yeah well we have to we have to wrap up because we have uh visual studio toolboxes starting in a few minutes so um but thank you very much uh for a great presentation and also just for for your support of the community over all these years it's it's a really it's exciting to see a project grow over time and build this community and and um so i thank you john very much this was a great opportunity for us because promoting open source libraries is not easy and my we are very happy that microsoft is supporting this kind of projects and we are closely following your weekly standoffs and thank you very much yeah thank you and thank you to your team also i know alfred and friends everyone was in the background answering questions and and very much appreciate that okay bye-bye all right goodbye uh let me play the goodbye and uh we'll stick around for our visual studio toolbox okay [Music] [Music] you
Info
Channel: dotNET
Views: 6,208
Rating: 4.9471364 out of 5
Keywords:
Id: vMWM-_ihjwM
Channel Id: undefined
Length: 83min 37sec (5017 seconds)
Published: Tue Sep 28 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.