Never Mind the Bollocks: here's the Domain Driven DesignAndrea Saltarello
La lettura del Blue Book può generare reazioni che vanno dal "Cargo cult" (a.k.a. "non avrai altro Modello all’infuori di me") a "’sta roba non mi serve: io faccio gestionali, non applicazioni che lanciano i razzi sulla Luna".
Previa una attualizzazione dei concetti del Blue Book, che ha ormai compiuto 10 anni, in questa sessione affronteremo leggende metropolitane e falsi miti e implementeremo DDD mostrando poche slide e tanto codice.
Dal RenderFragment ai Generics, tips for Blazor developersAndrea Dottor
Sessione tenuta alla Blazor Conference 2021 del 13.04.2021.
(https://www.aspitalia.com/eventi/87/Blazor-Conference-2021-Online.aspx)
Una sessione dove verranno presentati una serie di tips per migliorare e facilitare la scrittura delle nostre applicazioni: da codice html dinamico, al miglioramento ed organizzazione dello stesso. Il tutto per poter sfruttare ogni bit che Blazor può dare. Dal RenderFragment ai Generics. Consigli che arrivano da esperienze reali
Codice: https://github.com/andreadottor/XE.Dottor.Demo.BlazorWebApp
ASP.NET Core 2.0 è stato ufficialmente rilasciato e porta con se parecchie novità come le Razor Pages, template aggiornati e l'integrazione con Application Insights migliorata. In questa cercheremo capiremo la vera maturità di questo framework, e quanto questo rilascio sia importante per noi dev.
Con la nascita di .NET Core l'utilizzo del framework .NET è sbarcato in modo ufficiale anche su altre piattaforme.
Scrivere applicazioni moderne con SDK e tool nativi su altre piattaforme è diventato la normalità.
Lo vedremo realizzando un semplice applicazione .NET Core su Linux ed analizzando varie possibilità di deploy su altre piattaforme Linux based con il minimo sforzo e senza limitazioni.
Never Mind the Bollocks: here's the Domain Driven DesignAndrea Saltarello
La lettura del Blue Book può generare reazioni che vanno dal "Cargo cult" (a.k.a. "non avrai altro Modello all’infuori di me") a "’sta roba non mi serve: io faccio gestionali, non applicazioni che lanciano i razzi sulla Luna".
Previa una attualizzazione dei concetti del Blue Book, che ha ormai compiuto 10 anni, in questa sessione affronteremo leggende metropolitane e falsi miti e implementeremo DDD mostrando poche slide e tanto codice.
Dal RenderFragment ai Generics, tips for Blazor developersAndrea Dottor
Sessione tenuta alla Blazor Conference 2021 del 13.04.2021.
(https://www.aspitalia.com/eventi/87/Blazor-Conference-2021-Online.aspx)
Una sessione dove verranno presentati una serie di tips per migliorare e facilitare la scrittura delle nostre applicazioni: da codice html dinamico, al miglioramento ed organizzazione dello stesso. Il tutto per poter sfruttare ogni bit che Blazor può dare. Dal RenderFragment ai Generics. Consigli che arrivano da esperienze reali
Codice: https://github.com/andreadottor/XE.Dottor.Demo.BlazorWebApp
ASP.NET Core 2.0 è stato ufficialmente rilasciato e porta con se parecchie novità come le Razor Pages, template aggiornati e l'integrazione con Application Insights migliorata. In questa cercheremo capiremo la vera maturità di questo framework, e quanto questo rilascio sia importante per noi dev.
Con la nascita di .NET Core l'utilizzo del framework .NET è sbarcato in modo ufficiale anche su altre piattaforme.
Scrivere applicazioni moderne con SDK e tool nativi su altre piattaforme è diventato la normalità.
Lo vedremo realizzando un semplice applicazione .NET Core su Linux ed analizzando varie possibilità di deploy su altre piattaforme Linux based con il minimo sforzo e senza limitazioni.
Here you can see how easy it is to do development to Mac using free tools and frameworks provided by Microsoft.
What is all About? - Fast website development using .Net Core, Visual Studio Code; from the installation to continuos deployment on Azure.
Applying DDD and CQRS can not only make the resulting design of our system simpler and more effective but, freeing us from the burdenof the “one model fits all” approach, also allows architects to adopt different strategies when it comes to business logic modeling. Though lot has been written about DDD and CQRS, missing working code publicly available seems to be the elephant in the room: in this talk, we’ll find out how to implement the “Command side of the Force” by means of a proper Domain Model and getting to the point of switching from an entity based modeling to an event based one.
The Fine Art of Time Travelling: implementing Event SourcingAndrea Saltarello
If there is a common practice in architecting software systems, it is to have them store the last known state of business entities in a relational database: this practice trades the easiness of implementation with the cost of losing the history of such entities. Event Sourcing provides a pivotal solution to this problem, giving systems the capability of restoring the state they had at any given point in time. Furthermore, injecting mock-up events and having them replayed by the business logic allows for an easy implementation of simulations and “what if” scenarios.
Ask The Expert - Typescript: A stitch in time saves nineGianluca Carucci
This document discusses TypeScript design goals and features. It begins by explaining that TypeScript aims to use JavaScript behavior and programmer intentions to guide its design rather than mimicking existing languages. It then lists goals of aligning with ECMAScript proposals and using a consistent, fully erasable structural type system. The document provides examples of TypeScript types, unions, intersections, and discriminated unions. It also discusses using functional programming with algebraic data types, functors, and monads to implement validation in TypeScript. Homework suggestions are provided at the end.
Learn how to design a web solution that exploits the ASP.NET stack: in this talk we’ll find out how to set up an effective, idiomatic design that take advantage of both “out of the box” tools (e.g. MVC, Entity Framework) and bleeding edge, third party ones. Needing a SPA? We’ll understand how to take advantage of existing toolkits. Responsive design? Let’s talk Bootstrap looking at how it provides a useful and highly customizable taxonomy for UI elements. Having troubles implementing an efficient data access layer due to a lot of business rules? We’ll learn how to use LINQ as a mean to decompose those rules in simpler ones that can be composed in a flexible and efficient way. Are you concerned about performance and scalability issues? We’ll see how to implement CQRS in order to take advantage of ad hoc data models and introduce a service bus so to decouple front-end systems from back-end ones.
This document discusses implementing event sourcing in .NET. It provides an overview of event sourcing and CQRS, noting that events capture past occurrences that affect the domain. A demo is shown of a sample event sourcing application using NServiceBus for messaging. The document recommends buying rather than building event store and messaging toolkit components, and lists options for each including SQL Server, MongoDB, RavenDB, MSMQ, NEventStore, and NServiceBus.
What is .NET Core?
Tool required for developing .NET Core application.
Understanding Command for using (CLI)
How to create you first Console application and Web Application using Command Line Interface (CLI)
Running ASP.NET Core MVC application using Command Line Interface (CLI)
How to create you first Console application and Web Application using Visual studio 2015
Understanding Project structure of ASP.NET Core MVC
.NET Core is a new framework inside .NET Ecosystem. It helps developers to the new challenges of a Cloud First World, and it is not a replacement for the .NET Framework.
ASP.NET Core Services e Linux per il Mobile - Pietro Libro - Codemotion Rome...Codemotion
ASP.NET Core è il nuovo framework open-source e cross-platform per la creazione di applicazioni Cloud, Web, IoT e Backend per applicazioni mobili composto da elementi modulari che permettono di avere la massima flessibilità e il minimo overhead. Come sfruttare tutti questi pregi, per creare un servizio web da pubblicare nel Cloud e consumabile da un'applicazione Android ? Lo scopriremo insieme durante la sessione.
Prepariamoci al cambiamento. ASP.NET MVC e ASP.NET Web API saranno unificati in un unico framework chiamato ASP.NET MVC 6, e questo è solo la prima di una serie di novità che stanno per arrivare.
Tutto si semplifica. Le performance migliorano. Un altro salto tecnologico in avanti portato da ASP.NET 5.
In questa sessione, infatti, vedremo tutte le novità che ASP.NET MVC 6 porta con se, e cercheremo di andare in dettaglio in modo da capire cosa voglia dire realizzare (da zero) o migrare (un'applicazione essitente) a questa nuova versione
An overview of technologies and best practices for the development of a full-stack web application using JavaScript. How to realize an entire Application Server with a single programming language, the use of event-driven logic and the potential of Node.js.
Performance:
Perché è importante - Cosa misurare e come si fa - Evoluzione delle performance di ASP.NET Core - Comparazione di ASP.NET Core con gli altri framework - Cosa rende ASP.NET Core molto più performante di ASP.NET - Ulteriori miglioramenti in corso di realizzazione.
Back to the Future: Migrare da WebForm ad ASP.NET Core gradualmente Andrea Dottor
Molte applicazione sono (ancora) sviluppate in WebForm e non possono essere convertite automaticamente ad ASP.NET Core. Una riscrittura completa in molti casi è impossibile o impensabile da attuare. In questa sessione vedremo come migrare in modo graduale queste tipologie di applicazioni verso ASP.NET Core, andando in dettaglio nelle varie problematiche che solitamente si possono presentare. La sessione deriva da un'esperienza reale, che ha permesso di conoscere (nel bene o nel male) le difficoltà che si nascondo in queste migrazioni.
Evento: https://www.xedotnet.org/eventi/one-day-enterprise-application/
Here you can see how easy it is to do development to Mac using free tools and frameworks provided by Microsoft.
What is all About? - Fast website development using .Net Core, Visual Studio Code; from the installation to continuos deployment on Azure.
Applying DDD and CQRS can not only make the resulting design of our system simpler and more effective but, freeing us from the burdenof the “one model fits all” approach, also allows architects to adopt different strategies when it comes to business logic modeling. Though lot has been written about DDD and CQRS, missing working code publicly available seems to be the elephant in the room: in this talk, we’ll find out how to implement the “Command side of the Force” by means of a proper Domain Model and getting to the point of switching from an entity based modeling to an event based one.
The Fine Art of Time Travelling: implementing Event SourcingAndrea Saltarello
If there is a common practice in architecting software systems, it is to have them store the last known state of business entities in a relational database: this practice trades the easiness of implementation with the cost of losing the history of such entities. Event Sourcing provides a pivotal solution to this problem, giving systems the capability of restoring the state they had at any given point in time. Furthermore, injecting mock-up events and having them replayed by the business logic allows for an easy implementation of simulations and “what if” scenarios.
Ask The Expert - Typescript: A stitch in time saves nineGianluca Carucci
This document discusses TypeScript design goals and features. It begins by explaining that TypeScript aims to use JavaScript behavior and programmer intentions to guide its design rather than mimicking existing languages. It then lists goals of aligning with ECMAScript proposals and using a consistent, fully erasable structural type system. The document provides examples of TypeScript types, unions, intersections, and discriminated unions. It also discusses using functional programming with algebraic data types, functors, and monads to implement validation in TypeScript. Homework suggestions are provided at the end.
Learn how to design a web solution that exploits the ASP.NET stack: in this talk we’ll find out how to set up an effective, idiomatic design that take advantage of both “out of the box” tools (e.g. MVC, Entity Framework) and bleeding edge, third party ones. Needing a SPA? We’ll understand how to take advantage of existing toolkits. Responsive design? Let’s talk Bootstrap looking at how it provides a useful and highly customizable taxonomy for UI elements. Having troubles implementing an efficient data access layer due to a lot of business rules? We’ll learn how to use LINQ as a mean to decompose those rules in simpler ones that can be composed in a flexible and efficient way. Are you concerned about performance and scalability issues? We’ll see how to implement CQRS in order to take advantage of ad hoc data models and introduce a service bus so to decouple front-end systems from back-end ones.
This document discusses implementing event sourcing in .NET. It provides an overview of event sourcing and CQRS, noting that events capture past occurrences that affect the domain. A demo is shown of a sample event sourcing application using NServiceBus for messaging. The document recommends buying rather than building event store and messaging toolkit components, and lists options for each including SQL Server, MongoDB, RavenDB, MSMQ, NEventStore, and NServiceBus.
What is .NET Core?
Tool required for developing .NET Core application.
Understanding Command for using (CLI)
How to create you first Console application and Web Application using Command Line Interface (CLI)
Running ASP.NET Core MVC application using Command Line Interface (CLI)
How to create you first Console application and Web Application using Visual studio 2015
Understanding Project structure of ASP.NET Core MVC
.NET Core is a new framework inside .NET Ecosystem. It helps developers to the new challenges of a Cloud First World, and it is not a replacement for the .NET Framework.
ASP.NET Core Services e Linux per il Mobile - Pietro Libro - Codemotion Rome...Codemotion
ASP.NET Core è il nuovo framework open-source e cross-platform per la creazione di applicazioni Cloud, Web, IoT e Backend per applicazioni mobili composto da elementi modulari che permettono di avere la massima flessibilità e il minimo overhead. Come sfruttare tutti questi pregi, per creare un servizio web da pubblicare nel Cloud e consumabile da un'applicazione Android ? Lo scopriremo insieme durante la sessione.
Prepariamoci al cambiamento. ASP.NET MVC e ASP.NET Web API saranno unificati in un unico framework chiamato ASP.NET MVC 6, e questo è solo la prima di una serie di novità che stanno per arrivare.
Tutto si semplifica. Le performance migliorano. Un altro salto tecnologico in avanti portato da ASP.NET 5.
In questa sessione, infatti, vedremo tutte le novità che ASP.NET MVC 6 porta con se, e cercheremo di andare in dettaglio in modo da capire cosa voglia dire realizzare (da zero) o migrare (un'applicazione essitente) a questa nuova versione
An overview of technologies and best practices for the development of a full-stack web application using JavaScript. How to realize an entire Application Server with a single programming language, the use of event-driven logic and the potential of Node.js.
Performance:
Perché è importante - Cosa misurare e come si fa - Evoluzione delle performance di ASP.NET Core - Comparazione di ASP.NET Core con gli altri framework - Cosa rende ASP.NET Core molto più performante di ASP.NET - Ulteriori miglioramenti in corso di realizzazione.
Back to the Future: Migrare da WebForm ad ASP.NET Core gradualmente Andrea Dottor
Molte applicazione sono (ancora) sviluppate in WebForm e non possono essere convertite automaticamente ad ASP.NET Core. Una riscrittura completa in molti casi è impossibile o impensabile da attuare. In questa sessione vedremo come migrare in modo graduale queste tipologie di applicazioni verso ASP.NET Core, andando in dettaglio nelle varie problematiche che solitamente si possono presentare. La sessione deriva da un'esperienza reale, che ha permesso di conoscere (nel bene o nel male) le difficoltà che si nascondo in queste migrazioni.
Evento: https://www.xedotnet.org/eventi/one-day-enterprise-application/
Slide e riferimenti al codice del Meetup del 28/02/2019 del Vue JS Milano dove parlo di creazione di componenti, passaggio di parametri, computed properties
CQRS, ovvero: 2 stack, uno per "leggere" e l'altro per "scrivere". Se per "scrivere" abbiamo l'imbarazzo della scelta (Domain Model, Command, Event Sourcing, ...) per leggere, invece, apparentemente c'è poco da dire. "Apparentemente", appunto. Parliamone :-)
A prima vista, MVC “is all about the presentation layer”. In realtà, per trarre il massimo giovamento da questo toolkit è necessario progettare l’intera soluzione utilizzando criteri ad hoc.
Code Contracts and Generics: implementing a LINQ-enabled RepositoryAndrea Saltarello
In questa sessione vedremo come implementare il Repository pattern in modo da creare un Data Access Layer interrogabile mediante query LINQ, delegando l'effettiva esecuzione delle stesse ad O/RM quali Entity Framework e/o NHibernate.
In questa sessione vedremo come realizzare un Data Access Layer basato su una implementazione del Repository pattern ed in grado di essere interrogabile mediante query LINQ, eventualmente delegate ad O/RM quali Entity Framework e/o NHibernate. Vedremo inoltre come fare utilizzo dei Code Contracts del FX4 per specificare "una tantum" le regole comuni a tutti i repository di un Domain Model.
Layered Expression Trees: una terza via (idiomatica) verso il DDDAndrea Saltarello
Abbiamo il nostro splendido Domain Model, e possiamo passare la vita a definire DTO per usarlo in modo “sostenibile”. Oppure possiamo metterlo (un po’) in disparte ed adottare CQRS, ammesso che non ci venga mai da dire: “che spreco”. Oppure possiamo optare per una terza via idiomatica: Layered Expression Trees. Parliamone.
The document discusses the history and concepts behind object-relational mapping (ORM) and ORMs. It begins by describing the mismatch between the object-oriented and relational models. It then covers early work on object-relational mapping to bridge this gap. This led to the development of ORM tools that allow defining object-relational mappings and querying object graphs that are persisted to databases. Key concepts discussed include object identity, object shadows, query objects, repositories, partitioning query results, the unit of work pattern, and identity maps. Code examples demonstrate these concepts using NHibernate and LINQ.
1. 18 NOVEMBRE 2016
ASP.NET Core essentials
Andrea Saltarello
Solution Architect @ Managed Designs
https://twitter.com/andysal74
2. Talk.About();
• Anatomia di una applicazione ASP.NET Core
• Architettura di ASP.NET Core
• Cenni a MVC Core
P.S.: demo scaricabili qui: http://nsk.codeplex.com (appena mi
convertono il progetto da TFSVC a Git )
3. Anatomia di una applicazione ASP.NET Core
Una applicazione ASP.NET Core:
1. Può «girare» sia su .NET Core sia su .NET Framework
2. Limitatamente a .NET Core, può essere sviluppata su: Linux, macOS,
Windows
3. È una «normale» applicazione console “ospitata” da un server e
configurata mediante codice
5. La Dev story: gli editor
Per sviluppare, abbiamo varie opzioni:
1. Supporto per: Sublime, Atom, Emacs, Vim e Brackets
2. Solo supporto xproj
3. macOS: solo csproj; Windows: xproj per v2015, csproj per v2017
Linux macOS Windows
CLI + OmniSharp¹ solo .NET Core solo .NET Core solo .NET Core
Xamarin Studio solo .NET Core²
Visual Studio Code solo .NET Core solo .NET Core X
Visual Studio³ solo .NET Core X
6. La Dev story: il deploy
(ASP).NET Core è distribuito in due versioni:
1. LTS: supportate per 3 anni *o* per 1 anno dopo il rilascio della LTS successiva.
L’attuate versione LTS è la 1.0.1
2. Current: supportate, all’interno della corrispettiva LTS, per 3 mesi a partire dal
rilascio della «current» successiva
.NET Core only:
• il deploy permette sia di usare l’installazione del FX a livello di macchina, sia una
locale alla applicazione
• non esistono drop release, tutte le versioni sono installate side-by-side
[ https://www.microsoft.com/net/core/support ]
9. …ospitata da un server…
Sono i «container»: ASP.NET Core fornisce i seguenti:
• Kestrel (managed, xplat)
• WebListener (httpsys, 1.1+)
10. …e configurata mediante codice
Per configurare una applicazione usiamo:
• project.json per specificare le reference, da VS 2017/Mac GA in poi ye
olde csproj
• Startup.cs (o omologa) per configurare i middleware
1. ConfigureServices()
2. Configure()
• [OPT] appsettings.json per «informazioni» di configurazione
• ASPNETCORE_ENVIRONMENT
11. Middleware
Sono funzioni che:
• implementano la delegate RequestDelegate
• vengono aggiunti alla request pipeline di ASP.NET Core
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
app.Run(async (context) =>
{
await context.Response.WriteAsync("Hello World!");
});
}
13. Middleware
ASP.NET Core fornisce out of the box alcuni middleware, tra i quali:
• Identity
• MVC
• ResponseCaching (1.1+)
• ResponseCompression (1.1+)
• Rewrite (1.1+)
Per convenzione, vengono registrati in ConfigureServices ed attivati in
Configure
[ https://blogs.msdn.microsoft.com/webdev/2016/11/16/announcing-asp-net-core-1-1/ ]
14. ConfigureServices(), parte 2
La registrazione dei middleware serve, sostanzialmente, a configurarne le
dipendenze (nel senso IoC) tipicamente mediante extension method ad hoc (es:
AddMvc, AddIdentity, …)
E’ basata su un IoC container built-in, che permette di:
1. Registrare dei tipi indicando lo scope delle istanze da generare:
• AddInstance
• AddSingleton
• AddScoped
• AddTransient
2. Esporre le dipendenze di:
• Ctor
• Parametri action: FromServicesAttribute
• View: @inject
E’ possibile sostituire il container built in con uno di terze parti:
https://github.com/aspnet/DependencyInjection/blob/dev/README.md
16. ASP.NET MVC Core
E’ il middleware fornito out of the box da ASP.NET Core per implementare
applicazioni basate sulla variante Model 2 del pattern MVC (quella di Struts,
Rails, Monorail, …)
API molto simile a MVC 5 di ASP.NET 4, ma con alcune differenze strutturali:
• pipeline MVC-WebAPI integrata
• supporto a controller POCO
• dependency Resolver Injection
Per vederlo in azione, guardare qui:
http://www.ugidotnet.org/video/189329326/NET05--ASP-NET-MVC-Core-1