<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Shahrukh Alam on Medium]]></title>
        <description><![CDATA[Stories by Shahrukh Alam on Medium]]></description>
        <link>https://medium.com/@shahrukhalam_35790?source=rss-391450003b42------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*vTHKh4qIfqRvYySC.</url>
            <title>Stories by Shahrukh Alam on Medium</title>
            <link>https://medium.com/@shahrukhalam_35790?source=rss-391450003b42------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 18:57:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shahrukhalam_35790/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Microsoft releases new cumulative updates for several Windows 10 versions (changelog)]]></title>
            <link>https://medium.com/@shahrukhalam_35790/microsoft-releases-new-cumulative-updates-for-several-windows-10-versions-changelog-92fe8d91e7d9?source=rss-391450003b42------2</link>
            <guid isPermaLink="false">https://medium.com/p/92fe8d91e7d9</guid>
            <dc:creator><![CDATA[Shahrukh Alam]]></dc:creator>
            <pubDate>Wed, 18 Mar 2020 09:59:40 GMT</pubDate>
            <atom:updated>2020-03-18T09:59:40.054Z</atom:updated>
            <content:encoded><![CDATA[<p>Microsoft today released new cumulative updates for several supported versions of Windows 10. These updates improve application and device compatibility with Windows updates. This update also fixes an issue that causes an error when printing to a document share. You can download these updates for Windows 10 version 1809, Windows 10 version 1803, Windows 10 version 1709 and Windows 10 version 1607. You can find the full changelog below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/0*QmzptcouCQ_gpakg.png" /></figure><p><a href="https://support.microsoft.com/en-us/help/4541331"><strong>Windows 10, version 1809 — KB4541331 (OS Build 17763.1131)</strong></a><strong>:</strong></p><p>This non-security update includes quality improvements. Key changes include:</p><ul><li>Addresses an issue that causes an error when printing to a document repository.</li><li>Addresses a drawing issue with the Microsoft Foundation Class (MFC) toolbar that occurs when dragging in a multi-monitor environment.</li><li>Addresses an issue that prevents the touch keyboard from appearing during sign in when the user is prompted for the password.</li><li>Addresses an issue that causes new child windows to flicker and appear as white squares on server devices that are configured for stark visual contrast.</li><li>Addresses an issue that displays incorrect folder properties in File Explorer when the path is longer than MAX_PATH.</li><li>Addresses an issue that causes calendar dates to appear on the wrong day of the week in the clock and date region of the notification area when you select the Samoa time zone.</li><li>Addresses an issue with reading logs using the <strong>OpenEventLogA()</strong> function.</li><li>Addresses an issue that prevents machines that have enabled Credential Guard from joining a domain. The error message is “The server’s clock is not synchronized with the primary domain controller’s clock.”</li><li>Addresses an issue that might cause a delay of up to two minutes when signing in or unlocking a session on Hybrid Azure Active Directory-joined machines.</li><li>Addresses an issue that causes authentication to fail when using Azure Active Directory and the user’s security identifier (SID) has changed.</li><li>Addresses an issue that might cause domain controllers (DC) to register a lowercase and a mixed or all uppercase Domain Name System (DNS) service (SRV) record in the _MSDCS.&lt;forest root domain&gt; DNS zone. This occurs when DC computer names contain one or more uppercase characters.</li><li>Addresses an issue that causes authentication in an Azure Active Directory environment to fail and no error appears.</li><li>Addresses an issue that causes high CPU utilization when retrieving a session object.</li><li>Addresses high latency in Active Directory Federation Services (AD FS) response times for globally distributed datacenters in which SQL might be on a remote datacenter.</li><li>Improves the performance for all token requests coming to AD FS, including OAuth, Security Assertion Markup Language (SAML), WS-Federation, and WS-Trust.</li><li>Addresses a high latency issue in acquiring OAuth tokens when AD FS front-end servers and back-end SQL servers are in different datacenters.</li><li>Restores the constructed attribute in Active Directory and Active Directory Lightweight Directory Services (AD LDS) for <strong>msDS-parentdistname</strong>.</li><li>Addresses an issue to prevent SAML errors and the loss of access to third-party apps for users who do not have multi-factor authentication (MFA) enabled.</li><li>Addresses an issue with evaluating the compatibility status of the Windows ecosystem to help ensure application and device compatibility for all updates to Windows.</li><li>Addresses an issue that prevents Microsoft User Experience Virtualization (UE-V) settings from roaming to enable the signature files that are used for new messages, forwarded messages, and replies.</li><li>Addresses an issue with high CPU usage on AD FS servers that occurs when the <strong>backgroundCacheRefreshEnabled</strong> feature is enabled.</li><li>Addresses an issue that creates the Storage Replica administrator group with the incorrect <strong>SAM-Account-Type</strong> and <strong>Group-Type</strong>. This makes the Storage Replica administrator group unusable when moving the primary domain controller (PDC) emulator.</li><li>Addresses an issue that prevents some machines from automatically going into Sleep mode under certain circumstances because of Microsoft Defender Advanced Threat Protection (ATP) Auto Incident Response (IR).</li><li>Addresses an issue that prevents some machines from running Microsoft Defender ATP Threat &amp; Vulnerability Management successfully.</li><li>Improves support for non-ASCII file paths for Microsoft Defender ATP Auto IR.</li><li>Addresses an issue that, in some scenarios, causes stop error 0xEF while upgrading to Windows 10, version 1809.</li></ul><p><a href="https://support.microsoft.com/en-us/help/4541333"><strong>Windows 10, version 1803 — KB4541333 (OS Build 17134.1399)</strong></a><strong>:</strong></p><p>This non-security update includes quality improvements. Key changes include:</p><ul><li>Addresses an issue that causes an error when printing to a document repository.</li><li>Addresses an issue that causes a KERNEL_SECURITY_CHECK_FAILURE (139) stop error when Windows resumes from Sleep and turns on certain Bluetooth headsets.</li><li>Addresses an issue that might cause a delay of up to two minutes when signing in or unlocking a session on Hybrid Azure Active Directory-joined machines.</li><li>Addresses an issue that causes authentication in an Azure Active Directory environment to fail and no error appears.</li><li>Addresses an issue that prevents machines that have enabled Credential Guard from joining a domain. The error message is “The server’s clock is not synchronized with the primary domain controller’s clock.”</li><li>Addresses an issue with evaluating the compatibility status of the Windows ecosystem to help ensure application and device compatibility for all updates to Windows.</li><li>Addresses an issue that prevents Microsoft User Experience Virtualization (UE-V) settings from roaming to enable the signature files that are used for new messages, forwarded messages, and replies.</li><li>Addresses an issue that prevents some machines from automatically going into Sleep mode under certain circumstances because of Microsoft Defender Advanced Threat Protection (ATP) Auto Incident Response (IR).</li><li>Addresses an issue that prevents some machines from running Microsoft Defender ATP Threat &amp; Vulnerability Management successfully.</li><li>Improves support for non-ASCII file paths for Microsoft Defender ATP Auto IR.</li></ul><p><a href="https://support.microsoft.com/en-us/help/4541330"><strong>Windows 10, version 1607 — KB4541330 (OS Build 16299.1775):</strong></a></p><ul><li>Addresses an issue that causes File Explorer to close unexpectedly when using roaming profiles between different versions of Windows 10.</li><li>Addresses an issue that might cause a delay of up to two minutes when signing in or unlocking a session on Hybrid Azure Active Directory-joined machines.</li><li>Addresses an issue that prevents machines that have enabled Credential Guard from joining a domain. The error message is “The server’s clock is not synchronized with the primary domain controller’s clock.”</li><li>Addresses an issue with evaluating the compatibility status of the Windows ecosystem to help ensure application and device compatibility for all updates to Windows.</li><li>Addresses an issue that prevents Microsoft User Experience Virtualization (UE-V) settings from roaming to enable the signature files that are used for new messages, forwarded messages, and replies.</li><li>Addresses an issue that prevents some machines from running Microsoft Defender ATP Threat &amp; Vulnerability Management successfully.</li></ul><p><a href="https://support.microsoft.com/en-us/help/4541329"><strong>Windows 10, version 1607 — KB4541329 (OS Build 14393.3595):</strong></a></p><ul><li>Addresses an issue that might cause domain controllers (DC) to register a lowercase and a mixed or all uppercase Domain Name System (DNS) service (SRV) record in the _MSDCS.&lt;forest root domain&gt; DNS zone. This occurs when DC computer names contain one or more uppercase characters.</li><li>Addresses an issue that prevents machines that have enabled Credential Guard from joining a domain. The error message is “The server’s clock is not synchronized with the primary domain controller’s clock.”</li><li>Addresses an issue with running an application in RemoteApp that might cause the application window to flicker and <strong>DWM.exe</strong> might stop working on the session host.</li><li>Addresses an issue with evaluating the compatibility status of the Windows ecosystem to help ensure application and device compatibility for all updates to Windows.</li><li>Addresses an issue that prevents Microsoft User Experience Virtualization (UE-V) settings from roaming to enable the signature files that are used for new messages, forwarded messages, and replies.</li><li>Addresses an issue with high CPU usage on Active Directory Federation Services (AD FS) servers that occurs when the <strong>backgroundCacheRefreshEnabled</strong> feature is enabled.</li></ul><p>Thanks to <a href="https://mspoweruser.com/microsoft-releases-new-cumulative-updates/">https://mspoweruser.com/microsoft-releases-new-cumulative-updates/</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=92fe8d91e7d9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[10 Tips of Clean Code]]></title>
            <link>https://medium.com/@shahrukhalam_35790/10-tips-of-clean-code-f509c18f5b3d?source=rss-391450003b42------2</link>
            <guid isPermaLink="false">https://medium.com/p/f509c18f5b3d</guid>
            <category><![CDATA[tips]]></category>
            <category><![CDATA[practic]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[pro]]></category>
            <dc:creator><![CDATA[Shahrukh Alam]]></dc:creator>
            <pubDate>Wed, 11 Mar 2020 05:07:58 GMT</pubDate>
            <atom:updated>2020-03-11T05:08:36.977Z</atom:updated>
            <content:encoded><![CDATA[<p>Here in this article, I will discuss how you can write clean code with these simple steps.</p><p>* You are responsible for code quality.</p><p>* Use meaningful names.</p><p>* Write code that expresses intent</p><p>* Code should Speak for itself</p><p>// less comments = less maintenance</p><p>* Leave the code better than you found it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*d_B6jl-d9z_3ylZW" /></figure><p>* Single-responsibility code</p><p>* Tests</p><p>* Work on the big-picture skeleton, then fill in the details later.</p><p>*Independent components that can be used in different places</p><p>*Mater your craft.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — —</p><p>If you like this article then send me a bunch of claps. :-)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f509c18f5b3d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Web Assembly : The Big Picture]]></title>
            <link>https://medium.com/@shahrukhalam_35790/web-assembly-the-big-picture-9a4d7d68494?source=rss-391450003b42------2</link>
            <guid isPermaLink="false">https://medium.com/p/9a4d7d68494</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[webassembly]]></category>
            <category><![CDATA[wasm]]></category>
            <dc:creator><![CDATA[Shahrukh Alam]]></dc:creator>
            <pubDate>Wed, 27 Nov 2019 09:26:12 GMT</pubDate>
            <atom:updated>2019-11-27T09:26:12.084Z</atom:updated>
            <content:encoded><![CDATA[<h3>Web Assembly : The Big Picture</h3><p><strong><em>“I think it is the next generation of web”</em></strong></p><blockquote>WebAssembly nothing but running the machine code direct in the browser like C++,Rust code you can directly run on browser with the help of wasm.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0ZmZndkji_MUN0Jx.png" /><figcaption>Pic credit : Hacker Noon</figcaption></figure><h3>Web Assembly or WASM is the future of web.</h3><h3>WebAssembly</h3><p>WebAssembly, developed by the W3C, is in the words of its creators a “compilation target.” Developers don’t write WebAssembly directly; they write in the language of their choice, which is then compiled into WebAssembly bytecode. The bytecode is then run on the client — typically in a web browser — where it’s translated into native machine code and executed at high speed.</p><p>WebAssembly code is meant to be faster to load, parse, and execute than JavaScript. When WebAssembly is used by a web browser, there is still the overhead of downloading the WASM module and setting it up, but all other things being equal WebAssembly runs faster. WebAssembly also provides a sandboxed execution model, based on the same security models that exist for JavaScript now.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RLLXXNr65OUuvuIm.png" /><figcaption>the flow of wasm</figcaption></figure><blockquote>Here is my HTML Page</blockquote><pre>&lt;!DOCTYPE <em>html</em>&gt;</pre><pre>&lt;html <em>lang</em>=&quot;en&quot;&gt;</pre><pre>&lt;head&gt;</pre><pre>&lt;meta <em>charset</em>=&quot;UTF-8&quot;&gt;</pre><pre>&lt;meta <em>name</em>=&quot;viewport&quot; <em>content</em>=&quot;width=device-width, initial-scale=1.0&quot;&gt;</pre><pre>&lt;meta <em>http-equiv</em>=&quot;X-UA-Compatible&quot; <em>content</em>=&quot;ie=edge&quot;&gt;</pre><pre>&lt;title&gt;wasm&lt;/title&gt;</pre><pre>&lt;/head&gt;</pre><pre>&lt;body&gt;</pre><pre>&lt;h1&gt;Welcome to my first Web Assembly Project&lt;/h1&gt;</pre><pre>&lt;kbd&gt;//go to console and type &#39;mul(4,4)&#39; then you will get &#39;16&#39; and understand how web assembly works&lt;/kbd&gt; &lt;br&gt;&lt;br&gt;</pre><pre>&lt;kbd&gt;&lt;a <em>href</em>=&quot;https://www.github.com/sakiakamonster&quot;&gt;https://www.github.com/sakiakamonster&lt;/a&gt;&lt;/kbd&gt;</pre><pre>&lt;script <em>src</em>=&quot;wa.js&quot;&gt;&lt;/script&gt;</pre><pre>&lt;/body&gt;</pre><pre>&lt;/html&gt;</pre><blockquote>Just hold ctrl+shift+i and go to console and check.</blockquote><blockquote>Here is my javascript code</blockquote><pre><em>//code for import of web assembly  file into js</em></pre><pre>let mul;</pre><pre>function loadWasm(filename)</pre><pre>{</pre><pre><em>return</em> fetch(filename)</pre><pre>.then(response =&gt; response.arrayBuffer())</pre><pre>.then(bits =&gt; WebAssembly.compile(bits))</pre><pre>.then(module =&gt; { <em>return</em> new WebAssembly.Instance(module)})</pre><pre>};</pre><pre>loadWasm(&#39;test.wasm&#39;)</pre><pre>.then(instance =&gt; {</pre><pre>mul = instance.exports._Z3mulii;</pre><pre>})</pre><blockquote>You can notice the _Z3mulii is call in js code where as the same keyword is present in the WebAssembly code.</blockquote><blockquote>Here is the WebAssembly Code</blockquote><pre>(module<br> (table 0 anyfunc)<br> (memory $0 1)<br> (export &quot;memory&quot; (memory $0))<br> (export &quot;_Z3mulii&quot; (func $_Z3mulii))<br> (func $_Z3mulii (; 0 ;) (param $0 i32) (param $1 i32) (result i32)<br>  (i32.mul<br>   (get_local $1)<br>   (get_local $0)<br>  )<br> )<br>)</pre><blockquote>Firefox x86 Assembly</blockquote><pre>wasm-function[0]:<br>  sub rsp, 8                            ; 0x000000 48 83 ec 08<br>  mov ecx, esi                          ; 0x000004 8b ce<br>  mov eax, ecx                          ; 0x000006 8b c1<br>  imul eax, edi                         ; 0x000008 0f af c7<br>  nop                                   ; 0x00000b 66 90<br>  add rsp, 8                            ; 0x00000d 48 83 c4 08<br>  ret                                   ; 0x000011 c3</pre><blockquote><em>You can also get my repository on github</em></blockquote><blockquote><a href="https://github.com/sakiakamonster/WebAssembly-Demo">https://github.com/sakiakamonster/WebAssembly-Demo</a></blockquote><p>if you like this article then please give a bunch of claps.</p><p>Thank You</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a4d7d68494" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to Arduino.]]></title>
            <link>https://medium.com/@shahrukhalam_35790/introduction-to-arduino-df49d91d747c?source=rss-391450003b42------2</link>
            <guid isPermaLink="false">https://medium.com/p/df49d91d747c</guid>
            <category><![CDATA[uno]]></category>
            <category><![CDATA[microcontrollers]]></category>
            <category><![CDATA[arduino]]></category>
            <dc:creator><![CDATA[Shahrukh Alam]]></dc:creator>
            <pubDate>Tue, 26 Nov 2019 10:58:05 GMT</pubDate>
            <atom:updated>2019-11-26T10:59:13.297Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/551/0*5IOkTDUIaK80I6WN.png" /><figcaption>Arduino UNO Development Board</figcaption></figure><blockquote>In this article I will discuss about <strong>Arduino</strong>.</blockquote><p>An Arduino is an open-source micro controller development board. In plain English, you can use the Arduino to read sensors and control things like motors and lights. This allows you to upload programs to this board which can then interact with things in the real world. With this, you can make devices which respond and react to the world at large.</p><p>For instance, you can read a humidity sensor connected to a potted plant and turn on an automatic watering system if it gets too dry. Or, you can make a stand-alone chat server which is plugged into your internet router. Or, you can have it tweet every time your cat passes through a pet door. Or, you can have it start a pot of coffee when your alarm goes off in the morning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/565/0*tNcYbRMjt5JupNkO.png" /><figcaption>The IDE of Arduino.</figcaption></figure><p>Arduinosupport basically C language because C is used in hardware and embedded system so we use C in Arduino.</p><p><em>The above program is for blink of an led for 1 sec.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/566/0*R8KQWZb-nNhDN6kW.png" /><figcaption>Arduino Lilypad</figcaption></figure><p>Basically Lilypad is used in Smartwatches and many more gadgets.</p><h3>The key features are −</h3><ul><li>Arduino boards are able to read analog or digital input signals from different sensors and turn it into an output such as activating a motor, turning LED on/off, connect to the cloud and many other actions.</li><li>You can control your board functions by sending a set of instructions to the microcontroller on the board via Arduino IDE (referred to as uploading software).</li><li>Unlike most previous programmable circuit boards, Arduino does not need an extra piece of hardware (called a programmer) in order to load a new code onto the board. You can simply use a USB cable.</li><li>Additionally, the Arduino IDE uses a simplified version of C++, making it easier to learn to program.</li><li>Finally, Arduino provides a standard form factor that breaks the functions of the micro-controller into a more accessible package.</li></ul><blockquote>Thank you if you like my article then hit on clap button.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df49d91d747c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fundamentals of REST API]]></title>
            <link>https://medium.com/@shahrukhalam_35790/fundamentals-of-rest-api-15f46c5d4af3?source=rss-391450003b42------2</link>
            <guid isPermaLink="false">https://medium.com/p/15f46c5d4af3</guid>
            <category><![CDATA[https]]></category>
            <category><![CDATA[rest]]></category>
            <category><![CDATA[json]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Shahrukh Alam]]></dc:creator>
            <pubDate>Tue, 26 Nov 2019 07:30:48 GMT</pubDate>
            <atom:updated>2019-11-26T07:30:48.016Z</atom:updated>
            <content:encoded><![CDATA[<p>Before moving to REST API you should have minimum knowledge of HTTP(hypertext transfer protocol) and little bit knowledge of API (application programming interface).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/579/0*ktAVSj7Y0b2bWf13.png" /><figcaption>REST : API</figcaption></figure><p>REST stand for <strong>Re</strong>presentational <strong>State Transfer.</strong></p><p>Basically, A<strong> REST API</strong> defines a set of functions to process requests and responses via <strong>HTTP</strong> protocol.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3xTWWyBbLP04abJZ.png" /><figcaption>REST API Design</figcaption></figure><h3><strong>What is REST?</strong></h3><p><strong>REST</strong> is a programming style which describes how data should be transferred between two systems on the Internet. The key principles of REST are as follows:<br>Client–server : There must be a clear separation between client and server such that clients are not concerned with data storage and servers are not concerned with the User Interface.<br>Stateless: State information is not stored on the server. A client request must contain all information like session to service the request.</p><h3><strong>Request Methods</strong></h3><ul><li>GET is used to read from the server a single item (known as <em>resource</em> in API speak) or a list of items (known as a <em>collection</em>). When reading a specific resource, the unique identifier of the resource is specified as part of the URL. GETs normally do not have a request body.</li><li>POST is used to write to the server a new resource. Details of the new resource are included the request body. The server’s response should include the unique identifier of the newly created resource.</li><li>PUT and PATCH are both used to update a resource. The unique identifier of the resource is usually specified in the URL and the updated fields are given in the request body.</li><li>DELETE is used to delete a resource with the unique identifier of the resource being specified in the URL and request having no body. Some APIs also use the DELETE method to delete a number of resources at once. In this case, the unique identifiers of each resource to be deleted are specified in the request body.</li></ul><h3>HTTP Responses</h3><p>An HTTP response consists of a status line, response headers and, in most cases, a response body.</p><p><strong>Response Status</strong><br>The status line of a response includes the <em>status code</em> which indicates the overall result of processing the request. Response status codes are grouped into five categories with the first digit of the code indicating the class of response,</p><ul><li>1xx The request has been received and is being processed. Codes in this range are rarely seen.</li><li>2xx The request was successfully processed.</li><li>3xx Redirection to another URL is required. (Redirections are normally handled automatically by the various tools we use to interact with APIs and hence it is unusual when working with APIs to be presented with a status code in the 3xx range).</li><li>4xx There was an error in the request.</li><li>5xx The server was unable to fulfil the request due to a problem on the server side.</li></ul><h3>REST and HTTP are not same !!</h3><p>A lot of people prefer to compare HTTP with REST. REST and HTTP are not same.</p><p><strong>REST != HTTP</strong></p><p>Basically HTTP is a protocol and REST is a web architecture.</p><blockquote><strong>Thanks so much for taking the time to read my article! If you enjoyed reading it, you can support me by giving this article a bunch of claps.</strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=15f46c5d4af3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ASP.NET Core ‘AJAX’ using jQurey]]></title>
            <link>https://medium.com/@shahrukhalam_35790/asp-net-core-ajax-using-jqurey-a6cc24e8c2cb?source=rss-391450003b42------2</link>
            <guid isPermaLink="false">https://medium.com/p/a6cc24e8c2cb</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[jquery]]></category>
            <category><![CDATA[json]]></category>
            <category><![CDATA[aspnetcore]]></category>
            <category><![CDATA[ajax]]></category>
            <dc:creator><![CDATA[Shahrukh Alam]]></dc:creator>
            <pubDate>Tue, 26 Nov 2019 04:36:36 GMT</pubDate>
            <atom:updated>2019-11-26T04:54:22.574Z</atom:updated>
            <content:encoded><![CDATA[<h3>ASP.NET Core ‘AJAX’ using jQuery</h3><p>In this article I will clarify our knowledge about using and posting a form with jQuery and Ajax.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/340/1*mbN-J4ImsTa6wE-Fq44jjA.png" /></figure><p>Before we dive into AJAX using jQuery. Let’s understand what is AJAX and JSON.</p><p><strong>What is AJAX?</strong></p><p>AJAX stands for Asynchronous JavaScript and XML basically it is a <strong>XHR</strong>(XMLHttpRequest) call which send your request in background without loading the whole page.</p><p><strong>What is JSON?</strong></p><p>Basically <strong>JSON</strong> is collection of Array and Object. <strong>JSON</strong> stands for Java Script Object Notation. It is used for sending or reeving data from server to client or vice-versa . <strong>JSON</strong> is lightweight and it is structured.</p><p><strong>What is jQuery?</strong></p><p>Well, jQuery is a library for writing JavaScript, Written as “write less, do more”, jQuery is to make easier to use JavaScript.It supports AJAX and animation as well as DOM manipulation and traversing.</p><p><strong>What is JavaScript?</strong></p><p>JavaScript is an object-oriented computer scripting language commonly used to create interactive effects within web browsers.It give state to the web.Now days javascript can run on server like NodeJS.</p><p><strong>So Lets Jump Into AJAX Call in ASP.NET Core</strong></p><p>Excited???</p><p><strong>Let’s have a sample example:</strong></p><p>We have a submit button in our JQuery AJAX Core application. Let’s try to show a message when it is clicked.</p><p>Here is our button with defined <strong>id=”btnSubmit”</strong>:</p><ol><li>&lt;input type=”submit” value=”Create” <strong>class</strong>=”btn btn-default” id=”btnSubmit” /&gt;</li></ol><p><strong>Now we need to write some script to do that, here is some JavaScript code:</strong></p><ol><li>var myBtn = document.getElementById(‘btnSubmit’);</li><li>myBtn.addEventListener(‘click’, function(e) {</li><li>alert(‘Hello world’); //Show the alert popup</li><li>});</li></ol><p>By this code the result will show “<strong>Hello</strong>”:</p><p>Now if we can get the same result by using jQuery instead of it. Let’s have a look:</p><ol><li>$(‘#btnSubmit’).click(function( ) {</li><li>alert(“Hello world”); //Show the alert popup</li><li>});</li></ol><p><strong>Let’s focus on Ajax:</strong></p><p>AJAX stands for “Asynchronous JavaScript and XML”. AJAX is about exchanging data with a server, without reloading the whole page. It is a technique for creating fast and dynamic web pages.</p><p>In .NET, we can call server side code using two ways:</p><ol><li>ASP.NET AJAX</li><li>jQuery AJAX</li></ol><p>In this article we will focus on JQuery Ajax.</p><p><strong>$.ajax () Method:</strong></p><p>JQuery’s core method for creating Ajax requests. Here are some jQuery AJAX methods:</p><ul><li><strong>$.ajax()</strong> Performs an async AJAX request.</li><li><strong>$.get()</strong> Loads data from a server using an AJAX HTTP GET request.</li><li><strong>$.post() </strong>Loads data from a server using an AJAX HTTP POST request.</li></ul><p>To know more <a href="https://learn.jquery.com/ajax/jquery-ajax-methods/">click</a>.</p><p><strong>$.ajax () Method Configuration option:</strong></p><p>Options that we use:</p><ul><li>async:</li><li>type:</li><li>url:</li><li>data:</li><li>datatype:</li><li>success:</li><li>error:</li></ul><p>Let’s have details overview:</p><p><strong>async</strong></p><p>Set to false if the request should be sent synchronously. Defaults to true.</p><p>Note that if you set this option to false, your request will block execution of other code until the response is received.</p><p><strong>Example:</strong></p><ol><li>async: <strong>false</strong>,</li></ol><p><strong>type</strong></p><p>This is type of HTTP Request and accepts a valid HTTP verb.</p><p>The type of the request, “<em>POST</em>” or “<em>GET</em>” defaults to “<em>GET</em>”. Other request types, such as “<em>PUT</em>” and “<em>DELETE</em>” can be used, but they may not be supported by all the web browsers.</p><p><strong>Example:</strong></p><ol><li>type: “POST”,</li></ol><p><strong>url</strong></p><p>The URL for the request.</p><p><strong>Example:</strong></p><ol><li>url: “/Home/JqAJAX”,</li></ol><p><strong>data</strong></p><p>The data to be sent to the server. This can either be an object or a query string.</p><p><strong>Example:</strong></p><ol><li>data: JSON.stringify(model_data),</li></ol><p><strong>dataType</strong></p><p>The type of data you expect back from the server. By default, jQuery will look at the MIME type of the response if no dataType is specified.</p><p>Accepted values are text, xml, json, script, html jsonp.</p><p><strong>Example:</strong></p><ol><li>dataType: “json”,</li></ol><p><strong>contentType</strong></p><p>This is the content type of the request you are making. The default is ‘<em>application/x-www-form-urlencoded</em>’.</p><p><strong>Example:</strong></p><ol><li>contentType: ‘application/json; charset=utf-8’,</li></ol><p><strong>success</strong></p><p>A callback function to run if the request succeeds. The function receives the response data (converted to a JavaScript object if the DataType was JSON), as well as the text status of the request and the raw request object.</p><ol><li>Success: function (result) {</li><li>$(‘#result’).html(result);</li><li>}</li></ol><p><strong>error</strong></p><p>A callback function to run if the request results in an error. The function receives the raw request object and the text status of the request.</p><ol><li>error: function (result) {</li><li>alert(‘Error occured!!’);</li><li>},</li></ol><p><strong>Let’s Post Values using jQuey,Ajax:</strong></p><p>We often use the jQuery Ajax method in ASP.NET Razor Web Pages. Here is a sample code:</p><ol><li>&lt;input type=”submit” id=”btnSubmit” value=”Add Employee” /&gt;</li><li>&lt;script type=”text/javascript”&gt;</li><li>$(document).ready(function() {</li><li>$(function() {</li><li>$(‘#btnSubmit’).click(function(<strong>event</strong>) {</li><li><strong>event</strong>.preventDefault();</li><li>var Employee= {</li><li>ID: ‘01–1643’,</li><li>Name: ‘Shahrukh’,</li><li>Age: 22</li><li>};</li><li>$.ajax({</li><li>type: “POST”,</li><li>url: “/Home/JqAJAX”,</li><li>data: JSON.stringify(Employee),</li><li>dataType: “json”</li><li>contentType: ‘application/json; charset=utf-8’,</li><li>success: function(data) {</li><li>alert(data.msg);</li><li>},</li><li>error: function() {</li><li>alert(“Error occured!!”)</li><li>}</li><li>});</li><li>});</li><li>});</li><li>});</li><li>&lt;/script&gt;</li></ol><p><strong>Controller Action:</strong></p><ol><li>// GET: Home/JqAJAX</li><li>[HttpPost]</li><li><strong>public</strong> ActionResult JqAJAX(Employee emp) {</li><li><strong>try</strong> {</li><li><strong>return</strong> Json(<strong>new</strong> {</li><li>msg = “Successfully added “ + emp.Name</li><li>});</li><li>} <strong>catch</strong> (Exception ex) {</li><li><strong>throw</strong> ex;</li><li>}</li><li>}</li></ol><h3>Thanks so much for taking the time to read my article! If you enjoyed reading it, you can support me by giving this article a bunch of claps.</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a6cc24e8c2cb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>