How to handle Static Files in ASP.NET Core
Hello friends, I hope you all are having fun. In today's tutorial, we are going to have a look at
How to handle Static Files in ASP.NET Core. It's our 4th tutorial in ASP.NET Core series. If you inspect your localhost page displaying Hello World, then you will see that there isn't any HTML code in it. Instead, it's just displaying Hello World in text format.
In today's tutorial, we will have a look at How to add HTML, JavaScript, CSS or any other static file in ASP.NET Core. In our previous tutorial, we have discussed
Middleware in ASP.NET Core, so if you haven't studied that then have a look at it first, as we are gonna use some new middleware components today. So, let's get started:
How to handle Static Files in ASP.NET Core
- By default, ASP.NET Core doesn't allow us to handle / serve static pages and we can add this functionality using Static File Middleware.
- In the Solution Explorer, right click on your Project's Name and then click on Add > New Folder and rename it to wwwroot, as shown in below figure:
- All the static files ( JavaScript, CSS, HTML, Images etc. ) in ASP.NET Core has to be placed inside this wwwroot folder, which is called Content Root Folder, and this folder has to be directly inside the project's root folder i.e. Project's Name.
- Now let's create three folders inside this wwwroot folder for CSS, JavaScript & Images, as shown in below figure:
- In the above figure, you can see that I have created three folders and have also added an image in the images folder.
- You could change these folders' names but its a convention to use these names, it helps in keeping things organized.
- So, now let's access this image in the browser i.e. open this link http://localhost:51640/images/image1.jpg but still you won't get the image, instead it will still display Hello World.
- In order to access this static file i.e. image1.jpg, we have to add a new middleware in the request processing pipeline.
- So, open your Startup.cs file and in the Configure Method, add Static Files Middleware, as shown in below figure:
- You can see in above figure that I have added app.UseStaticFiles() middleware, it's a builtin middleware of ASP.NET Core, which enables the web App to use static files in wwwroot folder.
- After adding this Middleware, now when you open your image link then you will get your image in the browser, as shown in below figure:
Default Home Page in ASP.NET Core
- We can also create a default HTML Home Page in ASP.NET Core using a builtin middleware Default Page.
- This Default Page middleware search for one of the following files in wwwroot folder:
- index.htm
- index.html
- default.htm
- default.html
- If the middleware finds any of the above titled files in wwwroot folder, it will make that file default page or homepage.
- So, let's first create an index.html file in the wwwroot folder, as shown in the image on right side.
- In order to add this index.html file, right click on wwwroot folder and then Add > New Item.
- In the next window, make a search for html page and rename it to index.html.
- Here's the code for that HTML file, I have just added the required HTML along with an H1 tag.
- Now let's add the Default Page Middleware in our Configure Method in Startup.cs file.
- The Configure Method is shown in figure on right side & you can see that I have removed the End Points Middleware.
- Moreover, I have added a new Default File Middleware before Static File Middleware.
- This Default File Middleware doesn't serve the default file itself, instead it just change the request path towards default file, this file is then served by Static Files Middleware, next in the pipeline.
- So, if you place this Default Files after Static Files, then it won't work because files are served first and then default path is set. So, again emphasizing on this point: Position of Middleware matters a lot.
- So, now if you run your web Application, then you will get this index.html file as home page, shown in below figure:
- Now let's have a look at another ASP.NET Core builtin middleware named File Server Middleware.
File Server Middleware
- File Server Middleware combines the functionality of three middlewares in ASP.NET Core, which are:
- Default Files Middleware.
- Static Files Middleware.
- Directory Browser Middleware. ( it gives us information about directories i.e. file no. etc. )
- You can see in the code that I have removed Default Files & Static Files Middlewares & replaced them with File Server Middleware.
Now let's have a look at How to Customize these Middlewares:
How to Customize Middleware ???
- We have discussed it in Middleware lecture that each Middleware starts with "Use" keyword and they are all extension methods.
- Now, in order to Customize these Middleware objects, we need to use respective Options Objects.
- So, let's change the default homepage file to any other file, here's the code:
- After the Routing Middleware, I have created a new instance of File Server Options.
- You can see that, it has the Middleware Name i.e. File Server & then "Options" keyword.
- Similarly, for Default Files Middleware, we have DefaultFilesOptions object for customization.
- After creating the new instance, I have cleared the default file name first and then added a new file name "tep.html".
- You must have created this HTML file in your wwwroot folder, so that File Server Middleware could access it.
- Finally, I have provided this fileServerOptions object as a parameter to UseFileServer Middleware.
- So, that's how we can Customize our home page as well as middleware.
- So, key point to note here is: Middleware starts with "Use" keyword, while its customizing object ends with "Options" keyword.
So, that was all about How to handle Static Files in ASP.NET Core. In the next lecture, we will have a look at this Developer Exception Page Middleware, present at the start of our request processing pipeline. Till then take care & have fun !!!
Middleware in ASP.NET Core
Hello friends, I hope you all are doing great. In today's tutorial, we are going to have a look at what are
Middleware in ASP.NET Core. It's our 3rd tutorial in ASP.NET Core series. In order to understand the Middleware, we have to open the Startup.cs file present in Solution Explorer.
In our previous lecture, we have discussed the Code in Startup.cs and I have told you thhat we will discuss the Configure method later, so now we have to understand that code first. So, first let's define middleware components and then have a look at that code:
Middleware in ASP.NET Core
- Middleware in ASP.NET Core are simple software components used to control HTTP requests and handle both incoming requests as well as outgoing responses.
- Each middleware is a separate object, has a specific role assigned to it and are placed one after another in the request processing pipeline, as shown in below figure:
- The middleware components are used for different purposes i.e. Authentication, Logging in, Verification, File Upload ( .js, .css ) etc.
- These middleware components operate in fix order from top to bottom, so the incoming request is first received by the 1st Middleware and after proper processing on the request, it is forwarded to the 2nd Middleware.
- A middleware can also skip the request and without any processing, forward it to next middleware.
- For a proper working cloud based web application, we have to add a lot of middleware components, which we will see in coming lectures.
- There are many builtin middleware components available in ASP.NET Core as Nuget packages and we can also design custom middleware components in it.
- So, now let's open the Startup.cs file and have a look at the Configure Method, as shown in below figure:
- You can see in the above code that we have a Startup Class, which has two functions in it, which we have discussed in our previous tutorial.
- So, now let's have a close look at the code in Configure Method, it currently has three middleware components in it.
- The first middleware components is placed inside IF loop and is shown in figure on right side.
- You can see in the IF Loop we have Developer Exception Page, it's a builtin ASP.NET Core Middleware Component.
- By convention, each middleware component start with "Use" word in ASP.NET Core, so if you are designing a custom middleware component, then its better to follow this practise.
- We will study this Developer Exception Page in detail later, but for now you just need to know that its a middle ware component which shows an exception page to the developer and as it's inside IF Loop so it will be available only in Developers Environment, we will study Environment in coming lectures.
- One more thing, we are using app and then dot operator to use Middleware in ASP.NET Core.
- Second Middleware Component is app.UseRouting(), so the middleware name is Routing.
- Finally the third middleware is End Points, which is displaying Hello World! on the page.
- These Middlewares in the Configure Method, collectively create a pipeline structure i.e. there are executing one after another from top to bottom, this pipeline structure is called Request Processing Pipeline.
So, that was all about Middleware in ASP.NET Core. If you got into any trouble, then ask in comments and I will help you out. In the next article, we will have a look at How to add static files in ASP.NET Core. Till then take care & have fun !!!
How To Calculate Liquidated Damages in Construction?
Hello everyone, I hope you all are doing great. Today, I am going to share with you about "How To Calculate Liquidated Damages in Construction?" In almost all construction contracts that will be a clause that provides that the contractor will pay liquidated damages to the owner of the project in case there is a breach of contract. In construction, a breach of contract, which leads to the owner claiming liquidated damages, usually relates to a failure to complete a project in contractual time (that is, failing to complete works and handing over the house to the client at the date agreed on the contract).
When calculating liquidated damages, the client bases them on a daily or weekly rate – the amount a contractor is required to pay will depend on the value of the property they are constructing.
However, the client cannot use liquidated damages as a penalty, and that is why they need to learn how to calculate liquidated damages. In short, they have predetermined damages set when the contractor and owner are entering into a contract. The damages are based on actual losses the client is likely to incur in the unlikely event that the contractor does not complete a project on time. Some of the losses the client might incur have to do with:
- Rent on temporary accommodation
- Extra running costs
- Removal costs
While the damages are based on a weekly or daily rate, the formulae might be more complicated in cases where there is partial possession or where the works are phased. After liquidated damages calculation, the client needs to document the method of calculation in case they ever need proof of calculations in court.
Importance of Calculating Liquidated Damages
It is essential for every owner to learn how to calculate liquidated damages in construction. For liquidated damages to be enforceable in court, the court requires that they are a reasonable amount. If the amount looks exorbitant or if the wrong liquidated damages calculation formula was used, the court will not enforce liquidated damages. Again, the damages are not penalties or punishment to the contractor – that is why the right liquidated damages formula has to be applied.
In instances where a contract prevents the client from claiming liquidated damages, or where the actual losses have a huge difference from the estimated liquidated losses, the client might claim for unliquidated (actual) damages through the court. Unliquidated damages are actual damages, whose amount is not pre-agreed and is determined by the courts.
A genuine liquidated damages calculation is needed to show that the damages are not penalties. In cases where the courts feel that calculating liquidated damages was done to punish the contractor, the claim will be dismissed.
Calculations will include:
- Storage costs
- Fees
- Loss of rent
- Loss of income
- Finance costs
- Rentals costs
- Fees and fines from third parties
The link between the foreseen losses and the breach of contract has to be established – otherwise, a remote link between the damages and the breach of contract will not work. You can learn more about liquidated damages from this article.
How Liquidated Damages Calculation Works
- When learning how to calculate liquidated damages, the most crucial factor is time. When writing the contract for a construction project, the contractor and the client have to negotiate the duration it will take until completion of the project. In this case, the project is not completed on time; the owner stands to lose opportunities and money.
- Besides the client, contractors will also lose money if a project extends past the contractual date – they will need to pay workers for longer than they anticipated. As such, both the client and the contractor have a reason to complete a project on time.
- In essence, the owner will try to ensure that contractors take all the risks associated with a project that is not completed on time. For them to transfer their risk to the contractor, they have to include a clause on the contract that lets them claim liquidated damages. The client, thus, has to know how to calculate liquidated damages in construction.
- The liquidated damages clause will define the damages, and when the clause is activated, the client will deduct money from what they owe the contractor. The money will be withdrawn until the project is complete.
- It is therefore crucial that when calculating liquidated damages, the client only includes what they will be able to recover in case the construction project is not completed on time. For the liquidated damages clause to be included in the contract, the contractor and the client have to agree on a reasonable amount.
- Most public agencies will always have a liquidated damages clause in their contracts. The contract will be forced to pay a fixed amount for every day they do not complete a project. These damages will make sure that the contractor follows the project schedule as outlined in the contract.
- Public agencies will use the clause to ensure that the contractor compensates them for any damages or losses they incur when a project is delayed.
- However, the liquidated damages calculation formula has to show good faith – otherwise, it will be viewed as malicious punishment to the contractor by the client.
- There is no standard liquidated damages formula seeing as different situations are different. As a client, you will estimate the damages you are likely to incur based on your special situation. For instance, a client who is building a residential house to settle their family might calculate the losses as rent they will have to pay for all the days the client will delay the project.
- In another case, a client who is building residential houses to rent out might calculate damages based on the rent they will miss.
Conclusion
Once you have learned how to calculate liquidated damages (which involves figuring out the best-liquidated damages calculation formula for your situation), you will be good to go. However, even after using the right liquidated damages formula, if the actual damages significantly exceed the estimated losses, you need to claim for unliquidated damages after the project.
For contractors, of the project delay was not your fault (say a natural disaster resulted in the delay), you can request an extension that does not involve you paying for liquidated damages.
If you have a question regarding this post feel free to comment below. We are looking forward to hearing from you.
Create First Web Application in ASP.NET Core
Hello friends, I hope you all are having fun. In today's tutorial, we will create our First Web Application in ASP.NET Core. It's our 2nd tutorial in ASP.NET Core series and in our previous tutorial, we have had a detailed
Introduction to ASP.NET Core.
We have also installed Microsoft Visual Studio Community Edition 2019 in our previous tutorial and today we will create our first web application in it. After creating this web application, we will also have a look at its files and will understand the contents. So, let's create our First Web Application in ASP.NET Core:
Creating Web Application in ASP.NET Core
- First of all, start your Visual Studio which we have installed in previous tutorial.
- A pop up window will open up, where you can open your recent project or can create a new project, as shown in below figure:
- Here, click on the button says "Create a new project" and a new window will open up.
- This new window will ask for the type of application, you want to create i.e. Console App, Web App, Blazer App etc.
- As we want to create an ASP.NET Core Web Application so, I am going to select 3rd option in the list, as shown in below figure:
- After selecting ASP.NET Core Web Application, now click on the Next Button.
- On the next window, we have to provide the name & location for the project, as shown in below figure:
- Now click on the Create Button and in the next window, we need to select the template for your web application.
- Rite now, we are going to select the Empty Project, as I want to start from the scratch but in our incoming tutorials, we will cover almost all these templates.
- You will also need to uncheck the check box says "Configure for HTTPS", as shown in below figure:
- So, select the Empty Template for your ASP.NET Core web application and click the Create Button.
- As you can see at the top of above figure that we are using ASP.NET Core 3.1 that's the latest stable .NET framework SDK.
- When you click on the Create Button, Visual Studio will create your web application, as shown in below figure:
- As we have selected the Empty template, that's why we don't have much files in the solution explorer and this web app won't do anything except printing " Hello World " on execution.
- In order to execute our first web application, we need to click on the IIS Express play button, at the top menu bar.
- Our default browser will open up and Hello World will be printed in it, as shown in below figure:
- The link of this page is localhost:51640, as its on localhost rite now and the its port is 51640.
- We will discuss the flow of How this web app works and what's IIS Express in our coming lectures.
So, rite now we have a simple working web application in ASP.NET MVC which simply prints Hello World. Now let's understand the files automatically created by Visual Studio in Empty Template:
ASP.NET Core Project File
- If we have a look at the Solution Explorer, the we can see that visual studio has created few files for us, as shown in below figure:
- In order to open the project file, we have to right click on the Project's name and then click on Edit Project File.
- A new code file will open up with an extension .csproj, cs stands for C# & proj for project. This file is called the ASP.NET Core Project File.
- In previous versions of ASP.NET, we have to unload our project in order to open this project file but in Core, we can simply click on this Edit option to open Project File.
- If programming language is visual basic, then extension of project file will be .vbproj, vb for visual basic & proj for project.
- The only element we have in our web application's project file is Target Framework and the value we have set is netcoreapp3.1.
- This element, as the name implies, decides the target framework for our app and if you remember, while creating this project, we have selected .NET Core Framework 3.1.
- This value inside Target Framework tag is called Target Framework Moniker (TFM ), so the TFM of .NET Core 3.1 is netcoreapp3.1.
ASP.NET Core Program File
- Next file we are gonna open is Program.cs, its a C# class file, thus has an extension of .cs.
- Now let's have a look at its code:
- As you can see in above code that we have a class named Program and inside this class we have our Main Method.
- This Main Method is the entry point of our compiler i.e. when our web App executed then this Main method is called.
- If you have worked on any previous versions of .NET framework, then you must have seen this Main method there as well, in fact this web App executes as a console application.
- Within this Main Method, we have called CreateHostBuilder Method, its implemented below Main Method and returns an object that implements IHostBuilder.
- We are passing command line arguments to this CreateHostBuilder Method and then building our web host, which is going to host our web application and finally we are running our web app.
- If we have a look at the CreateHostBuilder Method, then you can see that we are using webBuilder Method and then calling the extension Method Startup.
- This WebBuilder Method is responsible for creating the web host on which our web app is going to host.
- This Startup extension method is available in our next file named Startup.cs, so let's discuss it's code:
ASP.NET Core Startup File
- Below Program File, we have Startup.cs file in our Solution Explorer.
- So, let's open this file and here's its code:
- This Startup Class is called by the CreateHostBuilder Method in Program File.
- Inside this Startup class we have two methods, ConfigureServices & Configure.
- ConfigureServices Method is used for the configuration of services, required for our web application.
- Configure Method is used to configure the request processing pipeline for our web application.
- This method has Hello World in it, which is actually printing on the page, we will discuss this method in coming tutorials in detail.
ASP.NET Core launchSettings,json File
- launchSettings.json file is placed inside Properties, so open this file.
- This file is only required for development purposes on the local machine, when we are publishing our web App then we don't need this file.
- This file actually contain the settings for the hosting environment, as shown in below figure:
- You can see in above code that first we have iiSettings and then profiles.
- In profiles, we have two profiles named IIS Express & TheEngineeringProjects, which is also the name of our project.
- When we run our project from visual studio, then this IIS Express profile is called and if you remember, the port number was same as in iisSettings i.e. 51640.
- But if you run this app from Console, then TheEngineeringProjects profile will be called and in that case port number will be 5000.
ASP.NET Core appSettings.json File
- That's the settings file for ASP.NET Core web application.
- We use this file to store some hard coded values or settings etc., we will discuss it in detail later.
So, that was all for today. I hope you have completely understood the basic structure of our ASP.NET Core web application. In the next tutorial, we will have a look at Middleware in ASP.NET Core. Till then take care & have fun !!!
Introduction to ASP.NET Core
Hello everyone, I hope you all are doing great. Today, I am going to start this new series on ASP.NET Core and it's our first tutorial in this series. I will start from basics and will slowly move towards complex concepts. So, if you haven't worked on ASP.NET then you don't need to worry about that but you must have some basic knowledge of C# and object oriented programming.
I will use Visual Studio 2019 for these tutorials, it's community version is free to use and I will use C# language for developing ASP.NET Core web applications. So, let's first have a look at what is ASP.NET Core:
Introduction to ASP.NET Core
- ASP.NET Core (originally deemed as ASP.NET xNext & was going to named as ASP.NET 5) is an open source, modular, cross platform and high performance Framework used to build advanced cloud based Internet Applications i.e.
- Web Application.
- Android Application.
- IOS Application.
- It's built ( rewrite ) completely from scratch by Microsoft & its vast community (as its open source) and combines ASP.NET MVC & ASP.NET Web API in a single package, which were previously available as separate entities.
- Although Core is a completely new framework but still it has quite a lot of resemblance with ASP.NET so if you have already worked on ASP.NET then Core won't be that difficult for you.
- As ASP.NET Core is an open source framework, so you can download or update its code from respective repositories on Github.
Why use ASP.NET Core ?
Let's have a look at few benefits of using ASP.NET Core:
1. Cross Platform
- The first & foremost advantage of ASP.NET Core is Cross Platform accessibility. In ASP.NET, you can only host your application on Windows platform but that's not the case with ASP.NET Core, you can host its applications across different platforms i.e.
- Linux.
- Windows.
- macOS.
- UBuntu.
- Or any self host server.
2. Unified Programming Model
- ASP.NET Core follows Unified Programming Model, that's why both MVC & API Controller classes inherit from single Controller base class, which returns IActionResult.
- IActionResult, as the name implies, is an Interface and has a lot of implementations and two of most commonly used are:
- In case of Web Apis, we get JsonResult and in case of Web MVC we can get both of them.
- In previous versions of ASP.NET, we have separate Controller classes for Web MVC & Web API.
3. Dependency Injection
- ASP.NET Core also has builtin support for dependency Injection, which makes it too flexible and conventional to use.
- Normally we use class constructors to inject dependencies and is called Constructor Injection.
- We will cover them in detail in upcoming tutorials, so if you are not getting this stuff then no need to worry.
4. Modular Framework
- ASP.NET Core also follows modular framework and uses middle-ware components which makes the flow of the app smooth.
- Microsoft has provided a lot of built-in middle-ware components for different purposes i.e. authentication, verification, File Fetching etc.
- We can also create custom middle-ware components as well in AP.NET Core.
5. Open Source
- ASP.NET Core is an open source framework and thus has a vast community on GitHub and Forum etc., that's why it's evolving rapidly and has become extremely powerful.
- You can get detailed and instant help on Core online quite easily.
6. Development Environment
- We can use Microsoft Visual Studio or Microsoft Visual Code for building our ASP.NET Core Applications.
- We can also use third party editors i.e. sublime etc. for ASP.NET Core.
Prior Knowledge Required for this Course
- If you haven't studied ASP.NET then no need to worry as we are gonna start from scratch and will cover all concepts.
- But you must have good understanding of C# concepts, so if you are not that good in C# then you should first read this C# Tutorial.
- Similarly, you should also have some basic knowledge of Html, CSS, Javascript, Jquery, XML etc. These are all simple languages so you must first their basic tutorials as well.
Setting up Environment for ASP.NET MVC
- We can use any Integrated Development Environment (IDE) for ASP.NET MVC i.e. visual studio, visual code, sublime, atom etc.
- We will also need to install .NET Core SDK, which is a software development kit.
- Microsoft Visual Studio Community Edition is free to use and you can download it from its official website.
- Once you downloaded a simple setup of around 1.5MB, you need to run that .exe file and it will start downloading the setup files, as shown in figure on right side.
- Once it's downloaded all the required files to start the setup, a new window will open up as shown in below figure:
- That's called workload area of Visual Studio, here you need to select which tools, you want to install on your machine.
- I am going to select these 3 options from this list:
- As of this tutorial, the latest version available is Microsoft Visual Studio Community Edition 2019 and .NET Framework version is 4.7.2 (latest stable version), which will be automatically installed along with visual studio.
- If you are using any third party editor i.e. sublime, then you need to download the .NET Core SDK and install it on your machine.
- .NET Core SDK is available for Windows, Linux, macOS and Docker.
So, that was for today. I hope you have enjoyed today's tutorial and are ready to get your hands dirty with ASP.NET Core. In our next tutorial, we will create our first project in ASP.NET Core and will write some code. Till then take care & have fun !!!
Role of Search Engines in Our Society
Hello friends, I hope you all are performing well in your life. In today’s tutorial, we will have a look at detailed The Role of Search Engines in Our Society. this digital world, where the most advanced technologies are shaping our lives every day, search engines have become increasingly important for our everyday life. Search engines like Google are the first place where people go to find anything and everything they need.
From entertainment and fun to work, working, education, medicine, and more, search engines are our online universities and libraries of knowledge where people can get any information they need within mere seconds.
Then, there's also the fact that we're exposed to information anywhere we look or go. T-shirt slogans, traffic signs, text messages, websites, newspapers, advertisements, this modern industrialized society is based on data.
If we take into consideration that data is the new currency in this new virtual reality of ours, a person has a hard time keeping up with all this information. Well, one of the best ways to keep up is by understanding the importance of search engines.
Information Management
With such vast amounts of information we encounter every day, most people find it virtually impossible to remember all the details they need to know. Email addresses, phone numbers, figures, dates, names, the list goes on and on.
They need tools to store all that information and retrieve it on demand. The internet is swarming with useful tools like Microsoft Outlook that people use to manage their email, and so on.
Companies have project managers that use various innovative and advanced information management tools to help employees locate and obtain pertinent information. People can count on these tools to get what they want.
Well, the same can be said for search engines. Internet users, both mobile and online, use these engines to find anything online – from a piece of information or service to a new job, product, even a date.
The Ever-increasing Number Of Searches
Google did a recent survey, and according to this research, there are more than one trillion searches performed per year. If we convert this number to a search per day, it will be something like three billion searches a day.
The whole world depends on search engines. It's not only internet users that use search engines to find useful information. Businesses use them too.
They use search engine optimization to promote what they do and attract wider audiences. SEO helps organizations make the most of their marketing efforts and so much more.
These useful engines are so necessary that there are different types of search engines, depending on the kind of information you're looking for.
The best example is Octopart.com, a search engine that people use to find electronic parts. Instead of looking for information on Google, people can use this specific search engine to search across hundreds of distributors and thousands of manufacturers.
It offers you the ability to browse a wide range of electronic parts and components by category. If you're looking for integrated circuits or passive components or anything electromechanical, Octopart will provide it within mere seconds.
We can safely say that search engines make our lives much easier, more educated, and informed. They help us learn and educate ourselves by offering an abundant source of information.
If we take the fact that most people are either mobile or online or both today, they have such power of knowledge right at their fingertips. Search engines have become readily and widely accepted in this contemporary, digital culture of ours.
Find Any Information you Need In Seconds
When we take a better look at it, search engines aren't just about looking for information on demand. They also act as a filter. The internet is loaded with a wealth of available information. Sifting through it would take a tremendous amount of time and effort.
Instead of that, a search engine helps any individual find any information they need in mere seconds by filtering through all that wealth of available information and only presenting the data that is of value to them.
More importantly, search engines like Google only crawl and search for information on the highest quality, trusted websites. The search results you get on Google are reliable and trustworthy but, more importantly, up-to-date, accurate, and relevant.
This is crucial for all who use search engines, especially businesses in different industries.
The most advanced search engines like Google maintain databases of web pages regularly to make sure the information they deliver is relevant and according to the users' interest.
Google uses smart and complex algorithms to assess web pages and websites to rank them for relevant search keywords and phrases. We can safely conclude that the world, as we know it today, depends on search engines to keep turning.
Now you may have understood
The Role of Search Engines in Our Society. That how important it is for use and how it is making our life easier.
Introduction To TLS, SSL, and HTTPS
Hello friends, I hope you all are doing great in your home. In today’s tutorial, we are going to look at a detailed Introduction to TLS, SSL, and HTTPS. Let’s break down what HTTPS, SSL, and TLS really mean, how they work, and why encryption is so important.
Have you ever wondered why some web addresses are different from others? Let’s discuss it with detail.
What is TLS, SSL and HTTPS
Online attacks are increasing day by day and easy to execute. Because of this, businesses around the world are heavily scrutinizing online transactions involving confidential data to ensure that customers are as secure as possible. Websites without proper security are leaving valuable digital assets vulnerable. Hackers can target customers through email phishing campaigns or intercept private information passed along through a site. All it takes is a single breach to devastate a business. If your website is not safe, secure, and reliable, users will likely avoid it.
In a nutshell, the internet can be a rather dangerous place. Over the past few years, Google has taken steps to shed light on this issue and keep everyone on the websafe. Google’s large browser market share means they have a significant influence on how the Internet operates and where it’s going in the future. Visual security indicators are more apparent now than ever to equip consumers with information to decide what companies they trust with their business.
HTTPS
(An example of a secure website from ssl.com)
The very first part of every web address indicates whether the site uses Hyper Text Transfer Protocol (HTTP) or Hyper Text Transfer Protocol Secure (HTTPS). In both instances, data is sent between your browser and the website you are on but HTTP websites are generally not considered encrypted or secure. Trust is the foundation of the Internet economy, and to ensure it, you need end-to-end security. HTTPS ensures that ongoing online communication between server and browser is encrypted and secure.
Google also began to use HTTPS as a lightweight ranking signal in the search algorithm. Its algorithm prioritizes websites that used encryption, which, together with a whole variety of metrics, helps to outrank those without.
SSL vs TLS
Here is when Secure Socket Layer (SSL) or TLS (Transport Layer Security) come into play. To establish an HTTPS connection, you will have to first purchase an SSL or TLS certificate from a trusted provider. Once the certificate is set up, data will be transmitted by using HTTPS which makes your website less vulnerable to cyber attacks.
SSL ensures secure communication almost the same way TLS does, and the differences between the two protocols are small and rather technical. Despite all the similarities they do differ from each other in some respects. Both protocols provide authentication and encryption when transferring data and work by tying a cryptographic digital key to a website’s identifying information. The Internet Engineering Task Force simply created TSL as the successor of SSL; therefore, nowadays, it is considered the encryption standard, although the term SSL is still widely used.
TLS, or the older SSL, both are technologies for encrypting the link between a web server and a web browser. When a browser accesses a server over HTTPS, a sequence called a “handshake” occurs, which establishes a cypher suite (a set of algorithms) for each communication. For the authentication, they utilize a pair of keys (a public key and private key, created together as a pair) that manage the connections. Public keys are encryption tools that use one-way encryption, while the original sender can “sign” data with a private key to secure it.
When you add a certificate to a website, you are encrypting sensitive information, which can include transaction and bank information, credit card information, usernames, passwords, contact information, or anything else being passed between a user and your site. With it, you safeguard your business and your customers’ information by making sure that any data transferred between parties remains impossible to read by hackers.
There are a few visual indicators that indicate a secure website. In addition to displaying your web address as HTTPS, all browsers will show the following trusted visuals cues:
- Padlock / green browser bar
- Company name
- Trusted site seal
Many browsers trigger security warnings when a user attempts to enter a site with an unsecured connection. Google Chrome, for example, flags all non-encrypted websites as unsafe and even displays a Non Secure warning to deter customers from visiting them. The goal is to have your website served to as many people as possible and to give customers a great experience as intended.
TYPES OF CERTIFICATES
Every website should have an SSL or TLS certificate, but there are a variety of certification options that differ in type, price, and level of validation. Any certificate will prevent browser warnings from driving traffic away from their sites, however, a website that deals with particularly sensitive information, such as an e-commerce site, requires a certificate that indicates a security standard with visual SSL indicators. When choosing the best SSL / TLS certificate, two aspects should be considered; validation level and functionality.
Validation Level
- Domain Validated (DV): requires proof of control over the domain. DV is a good, fairly easy option for small sites that don’t collect personal data.
- Organization Validated (OV): requires light business authentication, which results in verified business information being listed in the certificate details. It is a good option for Enterprise environments and intranets.
- Extended Validation (EV): because a trusted certificate authority has fully vetted your organization, browsers will give your website special treatment, displaying your organization's name in the address bar.
Functional
- Single-Domain (SD): can be installed on a single domain and is available at all three validation levels.
- Multi-Domain (MD): can encrypt up to 250 domains with a single certificate.
- Wildcard (WC): can secure a single domain and all accompanying first-level sub-domains, but is only available in DV and OV.
- Multi-Domain Wildcards (MDWC): can encrypt up to 250 domains, plus any accompanying sub-domains, but is only available in DV or OV.
There are free and cost-effective SSL solutions which satisfy the bare minimum requirements, but if you want your company to rise above the basic industry standards, as well as offer more security for your website and gain confidence in your brand, you should invest in the right certificate for your needs. 101domain offers a buyer’s guide that goes over everything you need to know to decide on your ideal certificate type.
Since security certification is a dynamic and constantly evolving aspect of web security, it is essential to do your homework before you purchase just any SSL / TLS certificate.
This is all for today and if you have any question regarding this post, you can comment down below and ask me. I am looking forward to hearing from you.
Future of Online PCB Industry in 2019
Hello friends, I hope you all are doing great. In today’s tutorial, we will have a look at
Future of Online PCB Industry in 2019. The first
printed circuit board was created by the Paul Eisler in 1943 until its creation it has become more sophisticated and advanced. Nowadays there are many
types of PCB like
single-sided,
double-sided,
multilayer PCB are exiting. The current PCB is available at less cost and more designing options than its creation time. If we look ten years back different PCB design like HDI (High-Density Interconnector), microvias, and Field Programmable Gate Array were considered most expensive but nowadays they are easily available to all over the world.
With the new inventions of electronic industries, the use and demand of PCB also increased. The basic element in every engineering project and the electronic component is printed circuit board over which all components of the circuit are designed. In today's post, we will have a look at the future of different PCB industries and their products. So let's get started with the
Future of Online PCB Industry in 2019.
Future of Online PCB Industry in 2019
- The printed circuit board has future and its industry will grow widely in coming days as the electronic industry growing day by day and without PCB electronic devices can not be manufactured.
- Current PCB is available in very less price and different packages and also have space for further development in its designing and components attached to it.
- Due to different inventions in electronic industries, there is also variation in the design of PCB essential.
- There are also new manufacturing techniques introducing to industries due to different printed circuit board complicated structures.
- So we describe some areas that will explain the future of the printed circuit board and its industry.
PCBWay
- PCBWay is famous printed circuit board manufacturing company that provides PCB prototype, PCBA, SMD stencil and Flexible PCB packaging at the same time.
- This manufacturer provides its services to almost one seventy countries. It processing almost twenty-one hundred orders in a single day.
- I have used many other PCB manufacturer's services for my projects, but I feel that PCBWay is best in all services like less price, order delivered in a given time, and all featured were present in the product that was I asked them to be added in my order.
- You can see in a given figure the PCB that I purchased from PCBWay.
- I am impressed with the quality of the boards, the delivery time and response to all my questions. Best price excellent service and speedy delivery. When I need another board I will certainly use this supplier.
- PCBWay strives to be the easiest manufacturer for you to work with. PCBWay – PCB Prototype the Easy Way!
- The main products manufactured by the PCBWay are HDMI, Server board, lift CPU Main control board, punch CPU, Industrial Motherboard, Lenovo, DSP board, GPRS Communication Products, wifi Module.
PCB Board Cameras
- Such types of cameras that are assembled on the circuitry board are known as PCB (printed circuit board) cameras.
- These cameras comprise on the aperture, image senor, and lenses and have the ability to make videoes and photos.
- The size of these cameras we can design according to our requirements. It means that we can construct a camera such size that can easily fit into the circuit of any electronic device like an example of this is a mobile camera.
- After the inventions of these cameras, they become very common for picture and video capturing. Nowadays their video and image quality has become very high than previous cameras.
- After few years board camera will further grow and many new features will come to these cameras that will also increase the features of electronic device that used this product.
3D Printed Electronics
- In the current era, one of the most interesting technology is three-dimensional printing. 3D printing technology is probably one of the most exciting technological innovations in recent years.
- Due to three-dimensional printing, numerous new innovations have been given to our electronic industries such as firearms and ammo.
- The three-dimensional printing is one of famous innovations of printed circuit boars like three dimensional PE, three dimensional (3D) printed electronics that are directing us how electric system will grow in the next few years.
- The three dimensional PE offers numerous scientific and assembling advantages to PCB users as well as PCB producers. Such as new design of PCB, high efficiency, etc.
PCB Autoplacers
- Most of the printed circuit board manufacturer use autoplacers for in their circuit board to this autoplacer will distribute the equal electronic functionality over the complete layout of the board. It makes the processing of circuit board easier.
- But the use of this component of the board is a little bit difficult and expensive, but its use increase processing speed by integrating electric and mechanical CAD (computer-aided design).
High-Speed Capabilities
- Nowadays everyone is trying to save his time and asking for everything to work fast as well operation of technology.
- To fulfil this faster operation demand of users there is need of variation in the features of a printed circuit board as it is the basic component in every electronic instruments and device.
Biodegradable PCBs
- Nowadays waste products of different electronic products and AKA e-waste (Byproducts from electronic gadgets are dangerous to our health and our climate) are a serious issue for us.
- This wastage material consists of electronic instruments like laptops, television, mobile phone and other portable instruments that consists of some elements that are not good for our health and environment.
- As this electronic wastage creating problem to reduce this e-scrapping has been used in different industries.
- The printed circuit board is a very important part of this electronic wastage some material used in the construction of PCB not disposed of properly so they make polluted our water and environment.
That is the detailed tutorial on the Future of Online PCB Industry in 2019 in this tutorial I have explained each and everything related to PCB and its future industry. If you have any question about it ask in comments.
Businesses Should Get the Help of a Ruby on Rails (RoR) Development Company
Hello friends, I hope you all are doing great. In today's tutorial, we are gonna have a look at Why Businesses Should Get the Help of a Ruby on Rails (RoR) Development Company. But before going into the details, let's first have a look at what is Ruby on Rails.
Ruby On Rails is a server side web development framework, designed in Ruby Programming language and is distributed under MIT License. It was first emerged in 2000 and brought a revolution in web application development.
Basics of Ruby On Rails
- Ruby on Rails was first introduced in 2000, it was actually extracted by David Heinemeier Hansson from his own work named as Basecamp.
- It was properly launched in December 13, 2005 as an open source web development framework, and got immensely popular in web developers because of its flexibility & friendliness.
- Today, many successful online businesses are using this framework and are flourishing, few of them are:
- Twitter.
- Netflix.
- Shopify.
- Airbnb.
- Twitch.
- Latest version of Ruby on Rails was released on August 16th, 2019, named as Ruby on Rails 6.0.
Why use Ruby on Rails ?
- According to a survey in 2017, conducted by Stack Overflow, Ruby on Rails is in top 10 most popular programming languages.
- There are many factors involved, in making Ruby that popular, let's have a look at them one by one:
Time Efficient
- If you ask from any ror development company, then they will agree on the fact that Ruby reduces the development time by 25% to 40%.
- That's because, it has a wide developers community and a lot of pre-built plugins, which can easily be utilized & hence saves a lot of time.
Framework Consistency
- Ruby on Rails Framework is too consistent in its operation and emphasizes on Convention over Configuration.
- Because of its consistency, it's quite easy for the developers to understand pre-designed applications and then make amendments according to their requirements.
App Customization
- Ruby on Rails got extensive online developers community and they are keep on launching new features in it.
- So, if you are planning on adding some new feature in your Ruby App, then you should first make an online search, as I am sure it has already been designed for you.
Ruby on Rails (RoR) Development Company
- Now the question arises that if Ruby on Rails is that simple & efficient, then Why we need to Get Help of a Ruby on Rails (RoR) Development Company.
- If you already have your website setup on some other platform, such as Wordpress, Laravel etc. then it's quite difficult & time consuming to completely transfer it to Ruby platform.
- So, it's always a best practice to first hire some professional ror development company, which could provide you the complete App and after that you can hire professionals for tweaking purposes.
- Hiring a professional, not only saves time but also reduces the security glitches/loopholes.
- If you work on it on your own, then there's a massive chance that you left some loopholes in your application for the hackers and they exploit your web App using those loopholes.
- So, because of security & time issues, it's always best to hire professionals, get your App completed and flourish your business.
So, that was all for today. If you have any questions, please ask in comments and we will try to resolve them as soon as possible. Till next tutorial, take care & have fun !!!
Introduction to ADC0804
Hello friends, I hope you all are doing great. In today’s tutorial, we will have a look at
Introduction to ADC0804. In electronic engineering different modules used to conversion of analog signal into a digital signal. These tools are recognised as analog to digital converter or ADC. Thes signal converter also used to find the value of input current and voltage. Normally the output of these converters are 2 binary numbers but other values are also possible. These analog to digital converter are available in different structure scheme but mostly they are available in integrated circuits packaging.
The working ability of these signal converter depends on their bandwidth and signal to noise ration (SNR). Their bandwidth can be fined by their sample rate (sample rat is the elimination of a continuous-time signal to a discrete-time signal). The signal to noise ratio can be measured by the resolution (resolution of the converter designates the number of discrete values it can create over the series of analog values), accuracy of signal, aliasing (It is an effect that makes different signals to become indistinguishable). In today's post, we will have a look ADC0804 analogue to digital converter, its pinout working, applications, advantage and some other related parameters. So let's get started with
Introduction to ADC0804.
Introduction to ADC0804
- The ADC0804 is integrated circuitry that used to transform anlog input into the digital output. This eight-bit analog to digital converter has twenty pinouts.
- This integrated circuit is mostly used in different microcontrollers such as Raspberry Pi etc. To triggering this ADC module there is no need of external clock this module has its own clock.
- This component is the best choice if you are looking such analog to digital converter having the finest resolution and eight bits.
- Earlier microcontrollers do not consist of analoge digital converter that used separate hardware for this purpose but currently, microcontrollers comprise of the ADC converter.
- These signal converter mostly used for temperature measurements like in homes or industries to measure the temperature of heating elements used in different machines. In automobiles like a car, it also used for measurement of temperature.
- This module is not used only for the temperature calculation but used in such applications where analog signal is used.
Pinout of ADC0804
- These are the main pinouts of this module that are described here with the detailed.
Pin No: |
Pin Name: |
Parameters |
Pin#1 |
Chip Select Pinout |
If more than one analog to digital converter is working with this module. |
Pin#2 |
Read command pinout |
This pinout should be grounded to read the analog signal. |
Pin#3 |
Write command |
For data, conversion this pinout has a large pulse. |
Pin#4 |
Clock in command |
The exterior clock signal can be linked at this pinout. |
Pin#5 |
Interrupt |
Interrupt command is provided at this pinout. |
Pin#6 |
Vin positive |
For differential analog input attach analog to digital converter here. |
Pin#7 |
Vin negative |
For differential analog input, link to ground terminals. |
Pin#8 |
Gnd |
At his pinout analog ground terminal is connected. |
Pin#9 |
reference voltage |
This pinout is used to provide reference voltage during analog to digital conversion. |
Pin#10 |
Gnd |
At this ground pinout, the digital ground is connected. |
Pin#11 to 18 |
Data bit 0 to bit 7 |
Seven output Data bit pins from which output is obtained |
Pin#19 |
Clock R |
This is RC timing resistor input pinout for interior clock generator. |
Pin#20 |
Data Pin 6 |
This pinout is used to connect input plus five volts for analogue to a digital module. |
Features of ADC0804
- These are some features of ADC0804 that describe with detail.
- This module can easily connect with other microcontroller and can also work alone in any circuitry.
- This is eight-bit analog to digital converter module.
- At this module, interior clock exists there is no need of special clock oscillator.
- Its digital output values change from zero to two fifty-five volts.
- This module is available in twenty pinouts PDIP (dual inline packaging) and SOIC (small outline integrated circuits) packaging.
- It takes one hundred ten microseconds for the conversion of analoge to digital values.
- Its interior clock frequency is six fort kilo-hertz.
- It can measure the voltages from zero to five volts by operating on the five volts input supply.
Working of ADC0804
- Now we discuss the working of ADC0804 with the detailed.
- As we discussed above that this module consists of the interior clock and there is no need of any separate clock.
- But if for use of this interior clock we have to connect RC circuitry with this module. This module must be linked with the plus five volts power supply and both ground pinouts linked with the ground terminal of circuitry.
- For the construction of resistance-capacitor (RC) circuitry use ten-kilo resistance and capacitor of hundred pico-farads after that attached the pinouts CLK R and CLK in as shown in a given figure.
- The pinouts CS and R should be linked with the ground. The reference pinout is not connected with any point since it will be linked with the plus five volts.
- In given circuitry you can observe that the input analog voltage is provided at the IN (+) pinout and digital output will be obtained at the DB0 and DB7 pinouts.
- You can also see that the second terminal of a source is connected with the ground for analog to digital conversion.
- Before starting of analog to digital transformation the WR pinout should be high this condition can be obtained by linking this pinout with the input or output pinout of Microprocessing Unit and it set to high value.
- In the circuit you can also see that potentiometer is linked to varying the voltage from zero to five volts at the input pinout.
- In the given figure, you can also see that voltage value is 1.55 volts and its corresponding binary value is (01001111) .
- Now we discuss how we can convert this binary value into the analog,
- As our binary value is (01001111)
- First of all, we convert it into decimal.
Binary to Deci = (0 x128)+(1 x 64)+(0 x 32)+(0 x16)+(1 x 8)+(1 x 4)+(1 x 2)+(1 x1)
= 79
Analoge value will be= Deci x step size
= (79) x (19.53)mV
= (1.54)V
- As you can observe that obtained value is (1.54 volts) and 1,55 volts is measured value both of these are approximately close to each other.
Applications of ADC0804
- These are some applications of ADC0804, let's discuss with the detailed.
- It can function with an eight-bit processor.
- Normally it used with the different microprocessors like Raspberry PI, Beagle Bone, etc.
- It can easily be linked with the sensing devices, voltage sources and transducers.
So, friends, it is the detailed tutorial on the ADC0804 if you have any question about ask in comments. Thanks for reading.