#middleware — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #middleware, aggregated by home.social.
-
Авторизация в Go без боли: как Casbin заменяет километры if-проверок
Пока в приложении две роли и три проверки, авторизация умещается в if user.Role == "admin". Но стоит добавить пару ресурсов, ролей и исключений — и условные проверки начинают расползаться по хендлерам, дублироваться и жить своей жизнью. В этой статье разберём, как навести порядок с помощью Casbin: вынесем правила доступа из кода в конфиг, пройдём путь от простого ACL до RBAC с иерархией ролей, соберём HTTP-сервер на Go с авторизационной middleware и обсудим грабли, на которые легко наступить по дороге.
https://habr.com/ru/companies/first/articles/1036046/
#go #casbin #rbac #авторизация #middleware #http #acl #access_control
-
Авторизация в Go без боли: как Casbin заменяет километры if-проверок
Пока в приложении две роли и три проверки, авторизация умещается в if user.Role == "admin". Но стоит добавить пару ресурсов, ролей и исключений — и условные проверки начинают расползаться по хендлерам, дублироваться и жить своей жизнью. В этой статье разберём, как навести порядок с помощью Casbin: вынесем правила доступа из кода в конфиг, пройдём путь от простого ACL до RBAC с иерархией ролей, соберём HTTP-сервер на Go с авторизационной middleware и обсудим грабли, на которые легко наступить по дороге.
https://habr.com/ru/companies/first/articles/1036046/
#go #casbin #rbac #авторизация #middleware #http #acl #access_control
-
Авторизация в Go без боли: как Casbin заменяет километры if-проверок
Пока в приложении две роли и три проверки, авторизация умещается в if user.Role == "admin". Но стоит добавить пару ресурсов, ролей и исключений — и условные проверки начинают расползаться по хендлерам, дублироваться и жить своей жизнью. В этой статье разберём, как навести порядок с помощью Casbin: вынесем правила доступа из кода в конфиг, пройдём путь от простого ACL до RBAC с иерархией ролей, соберём HTTP-сервер на Go с авторизационной middleware и обсудим грабли, на которые легко наступить по дороге.
https://habr.com/ru/companies/first/articles/1036046/
#go #casbin #rbac #авторизация #middleware #http #acl #access_control
-
Авторизация в Go без боли: как Casbin заменяет километры if-проверок
Пока в приложении две роли и три проверки, авторизация умещается в if user.Role == "admin". Но стоит добавить пару ресурсов, ролей и исключений — и условные проверки начинают расползаться по хендлерам, дублироваться и жить своей жизнью. В этой статье разберём, как навести порядок с помощью Casbin: вынесем правила доступа из кода в конфиг, пройдём путь от простого ACL до RBAC с иерархией ролей, соберём HTTP-сервер на Go с авторизационной middleware и обсудим грабли, на которые легко наступить по дороге.
https://habr.com/ru/companies/first/articles/1036046/
#go #casbin #rbac #авторизация #middleware #http #acl #access_control
-
CVE-2026-33032: Authentifizierungslücke in nginx-ui wird aktiv ausgenutzt
Eine fehlende Middleware-Zeile im webbasierten Nginx-Verwaltungstool nginx-ui genügt, damit Angreifer im Netzwerk sämtliche Konfigurationsdateien manipulieren und den Webserver übernehmen können – ganz ohne Anmeldedaten
-
CVE-2026-33032: Authentifizierungslücke in nginx-ui wird aktiv ausgenutzt
Eine fehlende Middleware-Zeile im webbasierten Nginx-Verwaltungstool nginx-ui genügt, damit Angreifer im Netzwerk sämtliche Konfigurationsdateien manipulieren und den Webserver übernehmen können – ganz ohne Anmeldedaten
-
SPFx State Management: Solving State Complexity in the SharePoint Framework
2,018 words, 11 minutes read time.
The Evolution of State in the SharePoint Framework
The transition from the “Classic” SharePoint era to the modern SharePoint Framework (SPFx) represents more than just a change in tooling; it marks a fundamental shift in how developers must manage data persistence and component synchronization. In the early days of client-side customization, state was often handled implicitly through the DOM or global variables, a practice that led to fragile, difficult-to-maintain scripts. Today, as we build sophisticated, multi-layered applications using React and TypeScript, state management has become the primary determinant of application stability and performance. Within a shared environment like SharePoint Online, where a single page may host multiple independent web parts, the complexity of managing shared data—such as user profiles, list items, and configuration settings—requires a disciplined architectural approach. Failing to implement a robust state strategy often results in “jank,” data inconsistency, and a bloated memory footprint that negatively impacts the end-user experience.
When developers rely solely on localized state within individual components, they often inadvertently create “data silos.” This fragmentation becomes evident when a change in one part of the application—for example, a status update in a details pane—is not reflected in a summary dashboard elsewhere on the page. To solve this, developers must move beyond basic reactivity and toward a model of “deterministic data flow.” This means ensuring that every piece of data has a clear, single source of truth and that updates propagate through the application in a predictable manner. By treating state management as a core engineering pillar rather than a secondary concern, teams can build SPFx solutions that are resilient to the inherent volatility of the browser environment and the frequent updates of the Microsoft 365 platform.
Evaluating Local Component State vs. Centralized Architectures
The most common architectural question in SPFx development is determining when to move beyond React’s built-in
useStateandpropsin favor of a centralized store. For simple web parts with a shallow component tree, localized state is often the most performant and maintainable choice. It offers low overhead, high readability, and utilizes React’s core strengths without additional boilerplate. However, as an application grows in complexity, the limitations of this “bottom-up” approach become clear. “Prop-drilling”—the practice of passing data through multiple layers of intermediate components that do not require the data themselves—creates a rigid and fragile structure. This not only makes refactoring difficult but also complicates the debugging process, as tracing the origin of a state change requires navigating through an increasingly complex web of interfaces and callbacks.// Example: The complexity of Prop-Drilling in a deep component tree // This architecture becomes difficult to maintain as the application scales. interface IAppProps { currentUser: ISiteUser; items: IListItem[]; onItemUpdate: (id: number) => void; } const ParentComponent: React.FC<IAppProps> = (props) => { return <IntermediateLayer {...props} />; }; const IntermediateLayer: React.FC<IAppProps> = (props) => { // This component doesn't use the props, but must pass them down. return <DeepChildComponent {...props} />; }; const DeepChildComponent: React.FC<IAppProps> = ({ items, onItemUpdate }) => { return ( <div> {items.map(item => ( <button onClick={() => onItemUpdate(item.Id)}>{item.Title}</button> ))} </div> ); };A centralized state architecture solves this by providing a dedicated layer for data management that exists outside the UI hierarchy. This decoupling allows components to remain “dumb” and focused purely on rendering, while a service layer or store handles the business logic, API calls via PnPjs, and data caching. From a performance perspective, centralized stores that utilize selectors can significantly reduce unnecessary re-renders. Unlike the React Context API, which may trigger a full-tree re-render upon any change to the provider’s value, advanced state managers allow components to subscribe to specific “slices” of data. This granular control is essential for maintaining a high frame rate and responsive UI in complex SharePoint environments where main-thread resources are at a premium.
Implementing the Singleton Service Pattern for Data Consistency
To move beyond the limitations of component-bound logic, lead developers often implement a Singleton Service pattern. This approach centralizes all interactions with the SharePoint REST API or Microsoft Graph into a single, predictable instance that manages its own internal state. By utilizing this pattern, you effectively decouple the Microsoft 365 environment from your React view layer, ensuring that your data fetching logic is not subject to the mounting or unmounting cycles of individual components. In a high-traffic SharePoint tenant, this architecture allows for aggressive caching strategies; the service can determine whether to return an existing array of list items from memory or to initiate a new asynchronous request via PnPjs. This significantly reduces the network overhead and prevents the “double-fetching” phenomenon often seen when multiple web parts or components request the same user profile or configuration data simultaneously.
// Implementing a Singleton Data Service with PnPjs import { spfi, SPFI, SPFx } from "@pnp/sp"; import "@pnp/sp/webs"; import "@pnp/sp/lists"; import "@pnp/sp/items"; export class SharePointDataService { private static _instance: SharePointDataService; private _sp: SPFI; private _cache: Map<string, any> = new Map(); private constructor(context: any) { this._sp = spfi().using(SPFx(context)); } public static getInstance(context?: any): SharePointDataService { if (!this._instance && context) { this._instance = new SharePointDataService(context); } return this._instance; } public async getListItems(listName: string): Promise<any[]> { if (this._cache.has(listName)) { return this._cache.get(listName); } const items = await this._sp.web.lists.getByTitle(listName).items(); this._cache.set(listName, items); return items; } }The strength of this pattern lies in its ability to maintain data integrity across the entire SPFx web part lifecycle. When a user performs a write operation—such as updating a list item—the service handles the PnPjs call and then immediately updates its internal cache. Any component subscribed to this service or re-invoking its methods will receive the updated data without needing a full page refresh. This creates a highly responsive, “app-like” feel within the SharePoint interface. Furthermore, because the state is held in a standard TypeScript class rather than a React hook, the logic remains testable in isolation. You can write unit tests for your data mutations without the overhead of rendering a DOM or simulating a React environment, which is a critical requirement for enterprise-grade software delivery.
Advanced Patterns: Integrating Redux Toolkit for Multi-Web Part Coordination
For the most complex SharePoint applications—those involving multi-step forms, real-time dashboards, or coordination across several web parts—Redux Toolkit (RTK) provides the industrial-grade infrastructure necessary to manage state at scale. RTK standardizes the “reducer” pattern, ensuring that every state mutation is performed through a dispatched action. This unidirectional flow is vital in the SharePoint Framework because it eliminates the unpredictable side effects associated with shared mutable state. By defining “slices” for different domains, such as a
ProjectSliceor aUserSlice, you create a modular architecture where each part of the state is governed by specific logic. This modularity is particularly useful when managing complex asynchronous lifecycles; RTK’screateAsyncThunkallows you to track the exact status of a SharePoint API call—pending, fulfilled, or rejected—and update the UI accordingly.// Redux Toolkit Slice for managing SharePoint List State import { createSlice, createAsyncThunk } from '@reduxjs/toolkit'; import { SharePointDataService } from './SharePointDataService'; export const fetchItems = createAsyncThunk( 'list/fetchItems', async (listName: string) => { const service = SharePointDataService.getInstance(); return await service.getListItems(listName); } ); const listSlice = createSlice({ name: 'sharepointList', initialState: { items: [], status: 'idle', error: null }, reducers: {}, extraReducers: (builder) => { builder .addCase(fetchItems.pending, (state) => { state.status = 'loading'; }) .addCase(fetchItems.fulfilled, (state, action) => { state.status = 'succeeded'; state.items = action.payload; }) .addCase(fetchItems.rejected, (state, action) => { state.status = 'failed'; state.error = action.error.message; }); }, });One of the primary advantages of utilizing Redux in an SPFx context is the ability to leverage the Redux DevTools browser extension. In a complex tenant where multiple scripts and web parts are competing for resources, being able to “time-travel” through your state changes allows you to see exactly when and why a piece of data changed. This transparency is invaluable for debugging race conditions that occur when multiple asynchronous SharePoint requests return out of order. Furthermore, RTK allows for the implementation of persistent state. By utilizing middleware, you can sync your Redux store to the browser’s
localStorageorsessionStorage, ensuring that if a user accidentally refreshes the SharePoint page, their progress in a complex task is hydrated back into the application immediately. This level of sophistication transforms a standard SharePoint web part into a robust enterprise application.Performance Benchmarking: Minimizing Re-renders in Large-Scale Apps
Maintaining a high-performance SPFx web part requires more than just functional state; it requires an understanding of the browser’s main thread and the cost of the React reconciliation process. In a SharePoint page, your web part is often competing with dozens of other Microsoft-native scripts and third-party extensions. If your state management strategy triggers global re-renders for minor data updates, you are effectively starving the browser of the resources needed to remain responsive. Performance benchmarking reveals that the React Context API, while convenient, is frequently the culprit behind significant “jank” in large-scale apps. Because a Context Provider notifies all consumers of a change, even a simple toggle of a UI theme can force a massive, expensive re-evaluation of a complex data grid.
To solve this, professional SPFx development necessitates the use of tactical optimizations such as memoization and selective rendering. By utilizing
React.memofor functional components anduseMemooruseCallbackfor expensive computations and event handlers, you ensure that components only re-render when their specific slice of data has changed. Furthermore, when using a centralized store like Redux or a custom Observable service, you should implement granular selectors. These selectors act as guards, preventing the UI from reacting to state changes that do not directly affect the visible output. Benchmarking these optimizations in a production tenant often shows a reduction in scripting time by 30% to 50%, which is the difference between a web part that feels native to SharePoint and one that feels like an external burden on the page.// Optimization: Using Selectors and Memoization to prevent over-rendering import React, { useMemo } from 'react'; import { useSelector } from 'react-redux'; export const ExpensiveDataGrid: React.FC = () => { // Use a selector to grab only the necessary slice of state const items = useSelector((state: any) => state.list.items); const status = useSelector((state: any) => state.list.status); // Memoize expensive calculations to prevent re-computation on every render const processedData = useMemo(() => { return items.filter(item => item.IsActive).sort((a, b) => b.Id - a.Id); }, [items]); if (status === 'loading') return <div className="shimmer" />; return ( <table> {processedData.map(item => ( <tr key={item.Id}><td>{item.Title}</td></tr> ))} </table> ); }; // Wrap in React.memo to prevent re-renders if parent state changes but props don't export default React.memo(ExpensiveDataGrid);Conclusion: Establishing an Organizational Standard for State
Solving state complexity in the SharePoint Framework is not about finding a “one-size-fits-all” library, but about establishing an engineering standard that prioritizes predictability and performance. Whether your team settles on the explicit simplicity of props, the robustness of a Singleton Service, or the industrial scale of Redux Toolkit, the choice must be documented and enforced across the codebase. A standardized state architecture reduces the cognitive load on developers, accelerates the onboarding process for new team members, and ensures that the custom solutions you deliver to your organization are maintainable long after the initial deployment.
As the Microsoft 365 ecosystem continues to evolve, the web parts that survive are those built on sound architectural principles rather than short-term convenience. By decoupling your business logic from the UI and managing your data lifecycle with precision, you create applications that are not only faster and more reliable but also significantly easier to extend. In the high-stakes environment of enterprise SharePoint development, architectural discipline is the ultimate competitive advantage. It allows you to transform a collection of disparate components into a cohesive, high-performance system that meets the rigorous demands of the modern digital workplace.
Call to Action
If this post sparked your creativity, don’t just scroll past. Join the community of makers and tinkerers—people turning ideas into reality with 3D printing. Subscribe for more 3D printing guides and projects, drop a comment sharing what you’re printing, or reach out and tell me about your latest project. Let’s build together.D. Bryan King
Sources
- Microsoft Learn: SPFx Performance Optimization
- PnPjs Official Documentation
- React Documentation: Scaling State Management
- Redux Toolkit: Official Best Practices
- Fluent UI: Performance Guidance for Large Lists
- Google Developers: Core Web Vitals and Main Thread Activity
- Microsoft: Choosing the Right Framework for SPFx
- CISA: Software Memory Safety and Architecture
- SharePoint PnP Community Web Part Samples
- TypeScript: Structural Type Systems in Large Apps
- React: Optimizing Re-renders with useMemo
- Microsoft: Enterprise Guidance for SPFx Development
Disclaimer:
The views and opinions expressed in this post are solely those of the author. The information provided is based on personal research, experience, and understanding of the subject matter at the time of writing. Readers should consult relevant experts or authorities for specific guidance related to their unique situations.
Related Posts
Rate this:
#AsynchronousState #BrowserMainThread #cachingStrategies #ClientSideDevelopment #CodeMaintainability #ComponentSynchronization #createAsyncThunk #DataConsistency #DataSilos #debuggingSPFx #DeterministicDataFlow #DOMThrashing #EnterpriseApps #EnterpriseArchitecture #EventEmitter #frontEndArchitecture #Hydration #LeadDeveloperGuide #MainThreadOptimization #memoization #MemoryFootprint #Microsoft365Development #MicrosoftGraph #Middleware #MultiWebPartCommunication #NetworkOverhead #OrganizationalStandards #PerformanceBenchmarking #PnPjs #PropDrilling #ReactContextAPI #ReactHooks #ReactReRenders #ReactState #ReduxDevTools #ReduxToolkitSPFx #refactoring #SelectiveRendering #SeniorDeveloperPatterns #SharePointDevelopment #SharePointFramework #SharePointRESTAPI #SingletonServicePattern #softwareEngineering #SPFxStateManagement #StateHydration #StatePersistence #StateScalability #StoreSelectors #technicalDebt #ThreadSafeServices #TypeScript #UIResponsiveness #UnidirectionalDataFlow #UnitTestingSPFx #useCallback #useMemo #webPartLifecycle #webPartPerformance -
Securing @Umbraco media doesn't always need complex packages.
We just implemented a custom .NET middleware that intercepts all /media requests. If the request is missing our custom auth header, it's an immediate 401.
Clean, fast, and keeps the private assets private.
-
Wow, another mind-numbing #GitHub project promising to compress text more efficiently than your grandma's vacuum seal 🕵️♂️🔍. Just what we needed in the AI world: more #middleware to throw into the spaghetti code stew 🍝🤖. Because nothing says "innovation" like reinventing the wheel with extra steps! 🚀🤦♂️
https://github.com/ARPAHLS/skillware #mindnumbingprojects #compression #AIinnovation #spaghettiCode #HackerNews #ngated -
Wow, another mind-numbing #GitHub project promising to compress text more efficiently than your grandma's vacuum seal 🕵️♂️🔍. Just what we needed in the AI world: more #middleware to throw into the spaghetti code stew 🍝🤖. Because nothing says "innovation" like reinventing the wheel with extra steps! 🚀🤦♂️
https://github.com/ARPAHLS/skillware #mindnumbingprojects #compression #AIinnovation #spaghettiCode #HackerNews #ngated -
Wow, another mind-numbing #GitHub project promising to compress text more efficiently than your grandma's vacuum seal 🕵️♂️🔍. Just what we needed in the AI world: more #middleware to throw into the spaghetti code stew 🍝🤖. Because nothing says "innovation" like reinventing the wheel with extra steps! 🚀🤦♂️
https://github.com/ARPAHLS/skillware #mindnumbingprojects #compression #AIinnovation #spaghettiCode #HackerNews #ngated -
Wow, another mind-numbing #GitHub project promising to compress text more efficiently than your grandma's vacuum seal 🕵️♂️🔍. Just what we needed in the AI world: more #middleware to throw into the spaghetti code stew 🍝🤖. Because nothing says "innovation" like reinventing the wheel with extra steps! 🚀🤦♂️
https://github.com/ARPAHLS/skillware #mindnumbingprojects #compression #AIinnovation #spaghettiCode #HackerNews #ngated -
Wow, another mind-numbing #GitHub project promising to compress text more efficiently than your grandma's vacuum seal 🕵️♂️🔍. Just what we needed in the AI world: more #middleware to throw into the spaghetti code stew 🍝🤖. Because nothing says "innovation" like reinventing the wheel with extra steps! 🚀🤦♂️
https://github.com/ARPAHLS/skillware #mindnumbingprojects #compression #AIinnovation #spaghettiCode #HackerNews #ngated -
🥳 New Kitten¹ Release
• Adds `rawBody` to non-multipart POST requests.
This property, which is a Buffer, is necessary if you want to verify signatures (e.g., for webhooks).
I had to fork express-busboy as they already ruled out adding it. The fork (@small-web/kitten-busboy²) also allowed me to type the middleware extension point for Polka³ instead of Express (Kitten uses Polka) so that’s one @ts-ignore removed (hey, dev is a string of little wins) :)
Change log: https://codeberg.org/kitten/app/src/branch/main/CHANGELOG.md#2026-03-18
Caught a bug and feeling a little under the weather at the moment (nothing major, mom and dad – no need to worry) so apologies if I’m not responsive here.
Enjoy!:kitten:💕
¹ https://kitten.small-web.org
² https://codeberg.org/kitten/busboy
³ https://github.com/lukeed/polka#Kitten #SmallWeb #KittenReleases #busboy #polka #express #bodyParsing #middleware #NodeJS #web #dev
-
🥳 New Kitten¹ Release
• Adds `rawBody` to non-multipart POST requests.
This property, which is a Buffer, is necessary if you want to verify signatures (e.g., for webhooks).
I had to fork express-busboy as they already ruled out adding it. The fork (@small-web/kitten-busboy²) also allowed me to type the middleware extension point for Polka³ instead of Express (Kitten uses Polka) so that’s one @ts-ignore removed (hey, dev is a string of little wins) :)
Change log: https://codeberg.org/kitten/app/src/branch/main/CHANGELOG.md#2026-03-18
Caught a bug and feeling a little under the weather at the moment (nothing major, mom and dad – no need to worry) so apologies if I’m not responsive here.
Enjoy!:kitten:💕
¹ https://kitten.small-web.org
² https://codeberg.org/kitten/busboy
³ https://github.com/lukeed/polka#Kitten #SmallWeb #KittenReleases #busboy #polka #express #bodyParsing #middleware #NodeJS #web #dev
-
🥳 New Kitten¹ Release
• Adds `rawBody` to non-multipart POST requests.
This property, which is a Buffer, is necessary if you want to verify signatures (e.g., for webhooks).
I had to fork express-busboy as they already ruled out adding it. The fork (@small-web/kitten-busboy²) also allowed me to type the middleware extension point for Polka³ instead of Express (Kitten uses Polka) so that’s one @ts-ignore removed (hey, dev is a string of little wins) :)
Change log: https://codeberg.org/kitten/app/src/branch/main/CHANGELOG.md#2026-03-18
Caught a bug and feeling a little under the weather at the moment (nothing major, mom and dad – no need to worry) so apologies if I’m not responsive here.
Enjoy!:kitten:💕
¹ https://kitten.small-web.org
² https://codeberg.org/kitten/busboy
³ https://github.com/lukeed/polka#Kitten #SmallWeb #KittenReleases #busboy #polka #express #bodyParsing #middleware #NodeJS #web #dev
-
🥳 New Kitten¹ Release
• Adds `rawBody` to non-multipart POST requests.
This property, which is a Buffer, is necessary if you want to verify signatures (e.g., for webhooks).
I had to fork express-busboy as they already ruled out adding it. The fork (@small-web/kitten-busboy²) also allowed me to type the middleware extension point for Polka³ instead of Express (Kitten uses Polka) so that’s one @ts-ignore removed (hey, dev is a string of little wins) :)
Change log: https://codeberg.org/kitten/app/src/branch/main/CHANGELOG.md#2026-03-18
Caught a bug and feeling a little under the weather at the moment (nothing major, mom and dad – no need to worry) so apologies if I’m not responsive here.
Enjoy!:kitten:💕
¹ https://kitten.small-web.org
² https://codeberg.org/kitten/busboy
³ https://github.com/lukeed/polka#Kitten #SmallWeb #KittenReleases #busboy #polka #express #bodyParsing #middleware #NodeJS #web #dev
-
🥳 New Kitten¹ Release
• Adds `rawBody` to non-multipart POST requests.
This property, which is a Buffer, is necessary if you want to verify signatures (e.g., for webhooks).
I had to fork express-busboy as they already ruled out adding it. The fork (@small-web/kitten-busboy²) also allowed me to type the middleware extension point for Polka³ instead of Express (Kitten uses Polka) so that’s one @ts-ignore removed (hey, dev is a string of little wins) :)
Change log: https://codeberg.org/kitten/app/src/branch/main/CHANGELOG.md#2026-03-18
Caught a bug and feeling a little under the weather at the moment (nothing major, mom and dad – no need to worry) so apologies if I’m not responsive here.
Enjoy!:kitten:💕
¹ https://kitten.small-web.org
² https://codeberg.org/kitten/busboy
³ https://github.com/lukeed/polka#Kitten #SmallWeb #KittenReleases #busboy #polka #express #bodyParsing #middleware #NodeJS #web #dev
-
🗂️ New: Modernizing .NET – Part 15
JSON fails with circular objects. Protobuf-net can’t fix recursive graphs.
Here’s a custom ASP.NET Core Session Store that can.Read → https://medium.com/@michael.kopt/%EF%B8%8F-custom-session-store-for-complex-objects-in-asp-net-core-1349b680ce12
#DotNet #DotNetCore #DotNet8 #DotNet9 #DotNet10 #ASPNet #ASPNetCore #CSharp #Middleware #SessionState -
🗂️ New: Modernizing .NET – Part 15
JSON fails with circular objects. Protobuf-net can’t fix recursive graphs.
Here’s a custom ASP.NET Core Session Store that can.Read → https://medium.com/@michael.kopt/%EF%B8%8F-custom-session-store-for-complex-objects-in-asp-net-core-1349b680ce12
#DotNet #DotNetCore #DotNet8 #DotNet9 #DotNet10 #ASPNet #ASPNetCore #CSharp #Middleware #SessionState -
🗂️ New: Modernizing .NET – Part 15
JSON fails with circular objects. Protobuf-net can’t fix recursive graphs.
Here’s a custom ASP.NET Core Session Store that can.Read → https://medium.com/@michael.kopt/%EF%B8%8F-custom-session-store-for-complex-objects-in-asp-net-core-1349b680ce12
#DotNet #DotNetCore #DotNet8 #DotNet9 #DotNet10 #ASPNet #ASPNetCore #CSharp #Middleware #SessionState -
🗂️ New: Modernizing .NET – Part 15
JSON fails with circular objects. Protobuf-net can’t fix recursive graphs.
Here’s a custom ASP.NET Core Session Store that can.Read → https://medium.com/@michael.kopt/%EF%B8%8F-custom-session-store-for-complex-objects-in-asp-net-core-1349b680ce12
#DotNet #DotNetCore #DotNet8 #DotNet9 #DotNet10 #ASPNet #ASPNetCore #CSharp #Middleware #SessionState -
🗂️ New: Modernizing .NET – Part 15
JSON fails with circular objects. Protobuf-net can’t fix recursive graphs.
Here’s a custom ASP.NET Core Session Store that can.Read → https://medium.com/@michael.kopt/%EF%B8%8F-custom-session-store-for-complex-objects-in-asp-net-core-1349b680ce12
#DotNet #DotNetCore #DotNet8 #DotNet9 #DotNet10 #ASPNet #ASPNetCore #CSharp #Middleware #SessionState -
🧩 New: Modernizing .NET – Part 14
WebHost still works, but WebApplication is better.
Here’s how to migrate your ASP.NET Core app to the modern hosting model.Read → https://medium.com/@michael.kopt/modernizing-net-part-14-migrating-from-webhost-to-webapplication-in-asp-net-core-612a7a8e1b88
#DotNet #DotNetCore #DotNet8 #DotNet9 #DotNet10 #ASPNet #ASPNetCore #CSharp #Middleware -
🧩 New: Modernizing .NET – Part 14
WebHost still works, but WebApplication is better.
Here’s how to migrate your ASP.NET Core app to the modern hosting model.Read → https://medium.com/@michael.kopt/modernizing-net-part-14-migrating-from-webhost-to-webapplication-in-asp-net-core-612a7a8e1b88
#DotNet #DotNetCore #DotNet8 #DotNet9 #DotNet10 #ASPNet #ASPNetCore #CSharp #Middleware -
🧩 New: Modernizing .NET – Part 14
WebHost still works, but WebApplication is better.
Here’s how to migrate your ASP.NET Core app to the modern hosting model.Read → https://medium.com/@michael.kopt/modernizing-net-part-14-migrating-from-webhost-to-webapplication-in-asp-net-core-612a7a8e1b88
#DotNet #DotNetCore #DotNet8 #DotNet9 #DotNet10 #ASPNet #ASPNetCore #CSharp #Middleware -
Learn what middleware is, how it works, its types, benefits, and when to use it in modern application and cloud architectures today.
-
Practicing adaptive audio in FMOD.
-
[Перевод] Организация middleware в Go без зависимостей
Go 1.22 заметно укрепил позиции стандартной библиотеки в роли «достаточно хорошего» веб‑стека: ServeMux научился матчить шаблоны, и зависимость от роутеров ради базовой маршрутизации уже не выглядит обязательной. Но как только в проекте появляется больше пары middleware, начинается знакомая боль — обёртки размножаются, порядок теряется, правки становятся хрупкими. В этой статье разбираем, как собрать управляемые цепочки middleware без alice и как поверх http.ServeMux сделать группировку маршрутов с наследованием middleware в стиле chi — только на стандартной библиотеке и с минимальным количеством кода. Смотреть решение
https://habr.com/ru/companies/otus/articles/988234/
#middleware #стандартная_библиотека_Go #маршрутизация #обработчики #композиция_функций #группировка_маршрутов #зависимости
-
[Перевод] Организация middleware в Go без зависимостей
Go 1.22 заметно укрепил позиции стандартной библиотеки в роли «достаточно хорошего» веб‑стека: ServeMux научился матчить шаблоны, и зависимость от роутеров ради базовой маршрутизации уже не выглядит обязательной. Но как только в проекте появляется больше пары middleware, начинается знакомая боль — обёртки размножаются, порядок теряется, правки становятся хрупкими. В этой статье разбираем, как собрать управляемые цепочки middleware без alice и как поверх http.ServeMux сделать группировку маршрутов с наследованием middleware в стиле chi — только на стандартной библиотеке и с минимальным количеством кода. Смотреть решение
https://habr.com/ru/companies/otus/articles/988234/
#middleware #стандартная_библиотека_Go #маршрутизация #обработчики #композиция_функций #группировка_маршрутов #зависимости
-
[Перевод] Организация middleware в Go без зависимостей
Go 1.22 заметно укрепил позиции стандартной библиотеки в роли «достаточно хорошего» веб‑стека: ServeMux научился матчить шаблоны, и зависимость от роутеров ради базовой маршрутизации уже не выглядит обязательной. Но как только в проекте появляется больше пары middleware, начинается знакомая боль — обёртки размножаются, порядок теряется, правки становятся хрупкими. В этой статье разбираем, как собрать управляемые цепочки middleware без alice и как поверх http.ServeMux сделать группировку маршрутов с наследованием middleware в стиле chi — только на стандартной библиотеке и с минимальным количеством кода. Смотреть решение
https://habr.com/ru/companies/otus/articles/988234/
#middleware #стандартная_библиотека_Go #маршрутизация #обработчики #композиция_функций #группировка_маршрутов #зависимости
-
[Перевод] Организация middleware в Go без зависимостей
Go 1.22 заметно укрепил позиции стандартной библиотеки в роли «достаточно хорошего» веб‑стека: ServeMux научился матчить шаблоны, и зависимость от роутеров ради базовой маршрутизации уже не выглядит обязательной. Но как только в проекте появляется больше пары middleware, начинается знакомая боль — обёртки размножаются, порядок теряется, правки становятся хрупкими. В этой статье разбираем, как собрать управляемые цепочки middleware без alice и как поверх http.ServeMux сделать группировку маршрутов с наследованием middleware в стиле chi — только на стандартной библиотеке и с минимальным количеством кода. Смотреть решение
https://habr.com/ru/companies/otus/articles/988234/
#middleware #стандартная_библиотека_Go #маршрутизация #обработчики #композиция_функций #группировка_маршрутов #зависимости
-
[Перевод] Собираем LLM-агента на Python
Команда Python for Devs подготовила перевод статьи о том, как с помощью middleware в LangChain 1.0 собирать LLM-агентов, готовых к реальному продакшену. В материале разбираются практические паттерны: управление контекстом, защита PII, human-in-the-loop, планирование задач и интеллектуальный выбор инструментов — всё то, что отличает экспериментального агента от надёжного рабочего решения.
-
Базовый RAG-компонент для локального семантического поиска на Питоне
quad_rag_core — лёгкое Python-ядро для локального RAG, которое автоматически отслеживает изменения в папках, индексирует их в Qdrant и поддерживает эмбеддинги в актуальном состоянии. Изначально проект задумывался как плагин для MCP (Model Context Protocol), но стал универсальной основой для любой системы локального семантического поиска. Зачем это нужно В процессе работы с кодовой базой через LLM-агентов и при необходимости локального семантического поиска по файлам проекта обнаружилась проблема. Инструменты агентской разработки вроде Kilo Code предоставляют встроенную функцию семантического поиска, но в компании заявляют что в будущем эта функциональность может стать платной. Сразу задумался о том чтобы сделать свою подсистему поиска. Простые запросы к MCP-серверу на поиск и обновление тут не подойдут - система поиска должна иметь полный контроль над контекстом - она должна автоматически узнавать, что файл удалён, функция изменена или добавлен новый документ, без необходимости перезапуска индексации. От идеи к архитектуре В начале планировался простой MCP-сервер, который принимает команды поиска и обновления, индексирует текстовые файлы и PDF, использует Qdrant как векторное хранилище и эмбеддит локально. В ходе проектирования стало понятно: вся логика отслеживания файлов, парсинга, чанкинга и синхронизации с Qdrant — это переиспользуемое ядро, а не часть MCP-протокола. Так появился quad_rag_core — отдельный Python-модуль, который не знает ничего про MCP или другие внешние интерфейсы, но готов к ним подключаться.
https://habr.com/ru/articles/982476/
#rag #rag_ai #семантический_поиск #middleware #python #qdrant #embeddings
-
Хватит писать try-catch в контроллерах: как я причесал ошибки в Express и перестал бояться деплоя
Знаете это чувство, когда открываешь контроллер в Express проекте, чтобы поправить одну строчку логики, и видишь ЭТО ? Бесконечная вложенность, проверки на существование полей, ручной парсинг ошибок от базы данных и, конечно же, его величество try-catch , который занимает 80% файла. Я тоже через это проходил. В каждом новом микросервисе я копипастил одни и те же функции обработки ошибок. В одном проекте я ловил ошибки Mongoose через err.name === 'ValidationError' , в другом — через instanceof . Где-то мы отдавали { error: "message" } , где-то { status: "fail", msg: "..." } . В какой-то момент мне это надоело. Мне захотелось инструмент, который я могу просто подключить одной строкой, и он сам поймет, что "E11000" от Mongo — это 409 Conflict, а ошибка Zod — это 400 Bad Request. При этом я не хотел тянуть в проект тяжелые зависимости. Так родилась библиотека ds-express-errors . Сегодня я расскажу, зачем я ее написал и почему она может сэкономить вам кучу нервов.
https://habr.com/ru/articles/981456/
#error_handling #express #graceful_shutdown #javascript #nodejs #opensourse #middleware #custom_config_parameters
-
Хватит писать try-catch в контроллерах: как я причесал ошибки в Express и перестал бояться деплоя
Знаете это чувство, когда открываешь контроллер в Express проекте, чтобы поправить одну строчку логики, и видишь ЭТО ? Бесконечная вложенность, проверки на существование полей, ручной парсинг ошибок от базы данных и, конечно же, его величество try-catch , который занимает 80% файла. Я тоже через это проходил. В каждом новом микросервисе я копипастил одни и те же функции обработки ошибок. В одном проекте я ловил ошибки Mongoose через err.name === 'ValidationError' , в другом — через instanceof . Где-то мы отдавали { error: "message" } , где-то { status: "fail", msg: "..." } . В какой-то момент мне это надоело. Мне захотелось инструмент, который я могу просто подключить одной строкой, и он сам поймет, что "E11000" от Mongo — это 409 Conflict, а ошибка Zod — это 400 Bad Request. При этом я не хотел тянуть в проект тяжелые зависимости. Так родилась библиотека ds-express-errors . Сегодня я расскажу, зачем я ее написал и почему она может сэкономить вам кучу нервов.
https://habr.com/ru/articles/981456/
#error_handling #express #graceful_shutdown #javascript #nodejs #opensourse #middleware #custom_config_parameters
-
Хватит писать try-catch в контроллерах: как я причесал ошибки в Express и перестал бояться деплоя
Знаете это чувство, когда открываешь контроллер в Express проекте, чтобы поправить одну строчку логики, и видишь ЭТО ? Бесконечная вложенность, проверки на существование полей, ручной парсинг ошибок от базы данных и, конечно же, его величество try-catch , который занимает 80% файла. Я тоже через это проходил. В каждом новом микросервисе я копипастил одни и те же функции обработки ошибок. В одном проекте я ловил ошибки Mongoose через err.name === 'ValidationError' , в другом — через instanceof . Где-то мы отдавали { error: "message" } , где-то { status: "fail", msg: "..." } . В какой-то момент мне это надоело. Мне захотелось инструмент, который я могу просто подключить одной строкой, и он сам поймет, что "E11000" от Mongo — это 409 Conflict, а ошибка Zod — это 400 Bad Request. При этом я не хотел тянуть в проект тяжелые зависимости. Так родилась библиотека ds-express-errors . Сегодня я расскажу, зачем я ее написал и почему она может сэкономить вам кучу нервов.
https://habr.com/ru/articles/981456/
#error_handling #express #graceful_shutdown #javascript #nodejs #opensourse #middleware #custom_config_parameters
-
Хватит писать try-catch в контроллерах: как я причесал ошибки в Express и перестал бояться деплоя
Знаете это чувство, когда открываешь контроллер в Express проекте, чтобы поправить одну строчку логики, и видишь ЭТО ? Бесконечная вложенность, проверки на существование полей, ручной парсинг ошибок от базы данных и, конечно же, его величество try-catch , который занимает 80% файла. Я тоже через это проходил. В каждом новом микросервисе я копипастил одни и те же функции обработки ошибок. В одном проекте я ловил ошибки Mongoose через err.name === 'ValidationError' , в другом — через instanceof . Где-то мы отдавали { error: "message" } , где-то { status: "fail", msg: "..." } . В какой-то момент мне это надоело. Мне захотелось инструмент, который я могу просто подключить одной строкой, и он сам поймет, что "E11000" от Mongo — это 409 Conflict, а ошибка Zod — это 400 Bad Request. При этом я не хотел тянуть в проект тяжелые зависимости. Так родилась библиотека ds-express-errors . Сегодня я расскажу, зачем я ее написал и почему она может сэкономить вам кучу нервов.
https://habr.com/ru/articles/981456/
#error_handling #express #graceful_shutdown #javascript #nodejs #opensourse #middleware #custom_config_parameters
-
Разбираем net/http на практике: пишем веб-сервис DeadDrop для безопасного обмена сообщениями
Первая часть цикла «Разбираем net/http на практике»: создаём с нуля сервис DeadDrop — аналог Privnote для безопасной передачи самоуничтожающихся сообщений и файлов. На чистой стандартной библиотеке net/http разбираем основы: • запуск HTTP-сервера • маршрутизация в ServeMux • написание middleware (логирование и recovery от panic) • работа с HTML-шаблонами и layout’ами • подключение статики через http.FileServer и embed.FS В итоге получаем работающий сервер с красивой главной страницей, формой создания «ячейки» и базовой архитектурой проекта — всё без внешних зависимостей. Идеально для начинающих и тех, кто хочет глубоко понять внутренности популярных фреймворков вроде Gin и Echo. Пишем код вместе!
https://habr.com/ru/articles/981356/
#golang #go #httpсервер #вебразработка #туториал #middleware #template #embed #petпроект #backend
-
Разбираем net/http на практике: пишем веб-сервис DeadDrop для безопасного обмена сообщениями
Первая часть цикла «Разбираем net/http на практике»: создаём с нуля сервис DeadDrop — аналог Privnote для безопасной передачи самоуничтожающихся сообщений и файлов. На чистой стандартной библиотеке net/http разбираем основы: • запуск HTTP-сервера • маршрутизация в ServeMux • написание middleware (логирование и recovery от panic) • работа с HTML-шаблонами и layout’ами • подключение статики через http.FileServer и embed.FS В итоге получаем работающий сервер с красивой главной страницей, формой создания «ячейки» и базовой архитектурой проекта — всё без внешних зависимостей. Идеально для начинающих и тех, кто хочет глубоко понять внутренности популярных фреймворков вроде Gin и Echo. Пишем код вместе!
https://habr.com/ru/articles/981356/
#golang #go #httpсервер #вебразработка #туториал #middleware #template #embed #petпроект #backend
-
Разбираем net/http на практике: пишем веб-сервис DeadDrop для безопасного обмена сообщениями
Первая часть цикла «Разбираем net/http на практике»: создаём с нуля сервис DeadDrop — аналог Privnote для безопасной передачи самоуничтожающихся сообщений и файлов. На чистой стандартной библиотеке net/http разбираем основы: • запуск HTTP-сервера • маршрутизация в ServeMux • написание middleware (логирование и recovery от panic) • работа с HTML-шаблонами и layout’ами • подключение статики через http.FileServer и embed.FS В итоге получаем работающий сервер с красивой главной страницей, формой создания «ячейки» и базовой архитектурой проекта — всё без внешних зависимостей. Идеально для начинающих и тех, кто хочет глубоко понять внутренности популярных фреймворков вроде Gin и Echo. Пишем код вместе!
https://habr.com/ru/articles/981356/
#golang #go #httpсервер #вебразработка #туториал #middleware #template #embed #petпроект #backend
-
Разбираем net/http на практике: пишем веб-сервис DeadDrop для безопасного обмена сообщениями
Первая часть цикла «Разбираем net/http на практике»: создаём с нуля сервис DeadDrop — аналог Privnote для безопасной передачи самоуничтожающихся сообщений и файлов. На чистой стандартной библиотеке net/http разбираем основы: • запуск HTTP-сервера • маршрутизация в ServeMux • написание middleware (логирование и recovery от panic) • работа с HTML-шаблонами и layout’ами • подключение статики через http.FileServer и embed.FS В итоге получаем работающий сервер с красивой главной страницей, формой создания «ячейки» и базовой архитектурой проекта — всё без внешних зависимостей. Идеально для начинающих и тех, кто хочет глубоко понять внутренности популярных фреймворков вроде Gin и Echo. Пишем код вместе!
https://habr.com/ru/articles/981356/
#golang #go #httpсервер #вебразработка #туториал #middleware #template #embed #petпроект #backend
-
SwooleApp: Легковесный фреймворк для Swoole — разбираем пример приложения
Недавнооткрыл миру SwooleApp — минималистичного фреймворка для PHP, построенного на базе Swoole . Если вы уже работали с Swoole напрямую, то знаете, что это мощный инструмент для создания высокопроизводительных приложений, но иногда хочется иметь чуть больше структуры и удобства, чем предлагает чистый Swoole. Именно эту нишу и занимает SwooleApp. В этой статье я кратко расскажу, что это за проект, как его использовать, и поделюсь ссылкой на рабочий пример приложения, который можно запустить в Docker за несколько минут.
https://habr.com/ru/articles/975080/
#Swoole #PHP #асинхронное_программирование #Task_Workers #микросервисы #пул_соединений #Middleware #вебсервер #REST_API #многозадачность
-
SwooleApp: Легковесный фреймворк для Swoole — разбираем пример приложения
Недавнооткрыл миру SwooleApp — минималистичного фреймворка для PHP, построенного на базе Swoole . Если вы уже работали с Swoole напрямую, то знаете, что это мощный инструмент для создания высокопроизводительных приложений, но иногда хочется иметь чуть больше структуры и удобства, чем предлагает чистый Swoole. Именно эту нишу и занимает SwooleApp. В этой статье я кратко расскажу, что это за проект, как его использовать, и поделюсь ссылкой на рабочий пример приложения, который можно запустить в Docker за несколько минут.
https://habr.com/ru/articles/975080/
#Swoole #PHP #асинхронное_программирование #Task_Workers #микросервисы #пул_соединений #Middleware #вебсервер #REST_API #многозадачность
-
SwooleApp: Легковесный фреймворк для Swoole — разбираем пример приложения
Недавнооткрыл миру SwooleApp — минималистичного фреймворка для PHP, построенного на базе Swoole . Если вы уже работали с Swoole напрямую, то знаете, что это мощный инструмент для создания высокопроизводительных приложений, но иногда хочется иметь чуть больше структуры и удобства, чем предлагает чистый Swoole. Именно эту нишу и занимает SwooleApp. В этой статье я кратко расскажу, что это за проект, как его использовать, и поделюсь ссылкой на рабочий пример приложения, который можно запустить в Docker за несколько минут.
https://habr.com/ru/articles/975080/
#Swoole #PHP #асинхронное_программирование #Task_Workers #микросервисы #пул_соединений #Middleware #вебсервер #REST_API #многозадачность
-
SwooleApp: Легковесный фреймворк для Swoole — разбираем пример приложения
Недавнооткрыл миру SwooleApp — минималистичного фреймворка для PHP, построенного на базе Swoole . Если вы уже работали с Swoole напрямую, то знаете, что это мощный инструмент для создания высокопроизводительных приложений, но иногда хочется иметь чуть больше структуры и удобства, чем предлагает чистый Swoole. Именно эту нишу и занимает SwooleApp. В этой статье я кратко расскажу, что это за проект, как его использовать, и поделюсь ссылкой на рабочий пример приложения, который можно запустить в Docker за несколько минут.
https://habr.com/ru/articles/975080/
#Swoole #PHP #асинхронное_программирование #Task_Workers #микросервисы #пул_соединений #Middleware #вебсервер #REST_API #многозадачность
-
LangChain 1.0: Middleware로 에이전트 제어권을 되찾다
LangChain과 LangGraph 1.0 정식 출시. Middleware로 에이전트 루프를 세밀하게 제어하고, 표준 콘텐츠 블록으로 제공자 독립성 확보. Uber와 LinkedIn이 검증한 프로덕션급 에이전트 프레임워크의 안정성 약속. -
via @dotnet : Upgrading to Microsoft Agent Framework in Your .NET AI Chat App
https://ift.tt/JARZoFE
#MicrosoftAgentFramework #DotNet #AIChatApp #AIIntegration #Chatbot #CSharp #VisualStudio #AzureOpenAI #DependencyInjection #Middleware #SemanticSearch #Software… -
🚀 Ah yes, the 2025 revelation! Turns out you can prevent #CSRF in #Go by... drumroll... using the built-in middleware! 🎉 Who knew that reading the #documentation could save time and effort? 🤔📚
https://www.alexedwards.net/blog/preventing-csrf-in-go #Middleware #TechTips #HackerNews #ngated -
On Day 2 of European Galaxy Days, José Manuel Domínguez presented 'New integrations: eLabFTW and RSpace ELNs, ARC middleware for distributed computing'.
Read more: https://galaxyproject.org/news/2025-04-02-elabftw-integration/
https://galaxyproject.org/news/2025-06-23-rspace-integration/@galaxyfreiburg
#eln #elabftw #arc #EGD2025 #galaxyproject #distributed_computing #rspace #middleware #eosc #fair #electronic_lab_notebook #open_science