اشتراک‌ها
استفاده توامان دات نت و داکر

Many developers I talk to are either using Docker actively or planning to adopt containers in their environment. Containers are an important trend in our industry and .NET is part of that. Microsoft and Docker have been working together so that you’ll have a great experience using Docker with .NET apps. 

استفاده توامان دات نت و داکر
اشتراک‌ها
JSON Web Token چیست؟

JSON Web Token (JWT) is an open standard (RFC 7519) that defines a compact and self-contained way for securely transmitting information between parties as a JSON object. This information can be verified and trusted because it is digitally signed. JWTs can be signed using a secret (with HMAC algorithm) or a public/private key pair using RSA. 

JSON Web Token چیست؟
نظرات مطالب
ASP.NET MVC #20
نگارش 4.
این System.Web.Helpers, Version=1.0.0.0 رو هم که به System.Web.Helpers, Version=2.0.0.0 در لوکال تغییر میدم مشکلی وجود نداره، اما روی هاست اگر اضافه نکنم همون خطای قبلی رو میده و اگر هم اضافه کنم خطای زیر رو میده .
Could not load file or assembly 'System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies
فایل‌های پوشه bin لوکال رو هم به bin سرور منتقل کردم اما باز هم نشد!
لینکی که معرفی کردی رو هم بررسی کردم. mvc4 بود .

پاسخ به بازخورد‌های پروژه‌ها
چند متد الحاقی پیشنهادی
متد پیش فرض دات نت برای بررسی مقادیر String مناسب است. شاید با ترکیب دو متد IsNullOrWhiteSpace  و IsNullOrEmpty بتوان متد بهتری ساخت. متد پیشنهادی من به صورت زیر است:
        /// <summary>
        /// It returns true if string is null or empty or just a white space otherwise it returns false.
        /// </summary>
        /// <param name="input">Input String</param>
        /// <returns>bool</returns>
        public static bool IsEmpty(this string input)
        {
            return string.IsNullOrEmpty(input) || string.IsNullOrWhiteSpace(input);
        }

اشتراک‌ها
پیشنهاد اضافه شدن type به JavaScript

Today we’re excited to announce our support and collaboration on a new Stage 0 proposal to bring optional and erasable type syntax to JavaScript. Because this new syntax wouldn’t change how surrounding code runs, it would effectively act as comments. We think this has the potential to make TypeScript easier and faster to use for development at every scale. We’d like to talk about why we’re pursuing this, and how this proposal works at a high level.

 

پیشنهاد اضافه شدن type به JavaScript
اشتراک‌ها
بررسی Visual Studio 2022 Preview 1

Visual Studio 2022 Preview 1 was released recently. While normally I hold off on talking about preview releases and other items that are going to change rapidly like .NET 6, I think it is important to know what VS2022 is all about so you know what to expect in the coming months. So in this video, we are going to see VS2022 in action, we will see what the new features are, and we will talk about what this means for VS2019. 

بررسی Visual Studio 2022 Preview 1
اشتراک‌ها
درک Coupling و Cohesion

I invited some of my friends to discuss the nebulous concepts of coupling and cohesion in software design. How do we think about these topics? How do we understand the terms? How do we use that in our work as programmers? How do we teach it to others? How much does any of it even matter?


Our invited guests: Corey Haines, Curtis Cooley, Dale Emery, J. B. Rainsberger, Jim Weirich, Kent Beck, Nat Pryce, Ron Jeffries. 

درک Coupling و Cohesion
اشتراک‌ها
نام اندروید Q به اندروید ۱۰ تغییر کرد

Over the last decade, Android's open platform has created a thriving community of manufacturers and developers that reach a global audience with their devices and apps. This has expanded beyond phones to tablets, cars, watches, TVs and more—with more than 2.5 billion active devices around the world. As we continue to build Android for everyone in the community, our brand should be as inclusive and accessible as possible—and we think we can do better in a few ways. 

نام اندروید Q به اندروید ۱۰ تغییر کرد
نظرات مطالب
اعتبارسنجی مبتنی بر JWT در ASP.NET Core 2.0 بدون استفاده از سیستم Identity
- در مقدمه مطلب «ذخیره سازی اطلاعات در مرورگر توسط برنامه‌های Angular» در مورد محدودیت حجم‌های حالت‌های مختلف ذخیره سازی اطلاعات در سمت کلاینت، بیشتر توضیح داده شده‌است.
- روش پیاده سازی dynamic permission شما و قرار دادن اطلاعات آن در توکن، در این حالت بی‌مورد است. از این جهت که به نظر قصد ندارید از اطلاعات آن در سمت کلاینت استفاده کنید (محدود کردن دسترسی به صفحات یک برنامه‌ی SPA و نه یک برنامه‌ی MVC). توکن و هرچیزی که در آن است جهت کاربردهای سمت کلاینت بیشتر باید مورد استفاده قرارگیرند تا سمت سرور. این بحث JWT برای برنامه‌های Angular و کلا SPA (تک صفحه‌ای وب) بیشتر استفاده می‌شود (سمت سرور Web API خالص، سمت کاربر SPA خالص). اگر برنامه‌ی شما چنین چیزی نیست، از آن استفاده نکنید.
چون اطلاعات دسترسی به صفحات به نظر سایت MVC شما مطلقا کاربردی در سمت کلاینت ندارند، آن‌را به توکن اضافه نکنید. در عوض در متد CanUserAccess، قسمت user.HasClaim را با کوئری گرفتن از بانک اطلاعاتی جایگزین کنید.
- مثال سمت کلاینت بحث جاری در سری «احراز هویت و اعتبارسنجی کاربران در برنامه‌های Angular» عمیق‌تر بررسی شده‌است و هدف از قسمت‌های مختلف توکن آن‌را جهت استفاده‌ی در سمت کلاینت (استفاده از نقش‌ها جهت دسترسی به صفحات برنامه‌ی سمت کلاینت Angular، استفاده از تاریخ انقضای توکن جهت بررسی اعتبار آن، استفاده از نام نمایشی قرار گرفته‌ی در توکن برای نمایش آن در سمت کلاینت و غیره)، بهتر درک خواهید کرد. در سمت سرور با داشتن Id شخص، مابقی را می‌توان از بانک اطلاعاتی کوئری گرفت و نیازی به سنگین کردن توکن نیست.