Thursday, October 21, 2021

Introduction to JQuery

HTML, CSS, and JavaScript are the three fundamental languages of the web. We structure our websites with HTML, style them with CSS, and add interactive functionality with JavaScript. In fact, most animations and any action that happens as a result of a user clicking, hovering, or scrolling are constructed with JavaScript.

jQuery is the “Write Less, Do More” JavaScript library. It is not a programming language, but rather a tool used to make writing common JavaScript tasks more concise. jQuery has the added benefit of being cross-browser compatible, meaning you can be certain the output of your code will render as intended in any modern
What is jQuery?

  • jQuery is a fast, small, lightweight, and feature-rich JavaScript library. It is designed to simplify the client-side scripting of HTML. It makes things like DOM traversal and manipulation, event handling, animation, and Ajax much simpler. With a combination of versatility and extensibility, jQuery has changed the way that millions of people write JavaScript. As of May 2019, jQuery was used by 73% of the 10 million most popular websites.
  • jQuery was created by John Resig in 2006 with the motto “Write less, do more”.
  • The main purpose of jQuery is to make JavaScript faster, easier, more concise, more effective, and more attractive. jQuery helps the developers to make websites more dynamic and interactive with jQuery.
  • jQuery takes a lot of common functionalities of Vanilla JavaScript which required many lines of code and wraps them into pre-defined and built-in methods which you can call in a single line of code in jQuery. 

Why jQuery?

jQuery Syntax is designed to make it easier to achieve a wide collection of functionalities. Let us now see one by one, why we should learn jQuery and use it over vanilla JavaScript.

  1. LIGHT-WEIGHT: jQuery is a very lightweight library of JavaScript. Its minified file is just about 19 kB.
  2. SHORT SELECTORS: jQuery provides us a shorter syntax to select any element of our DOM (Document Object Model). Thus, using jQuery, we can easily target any of the DOM elements
  3. DOM MANIPULATION: jQuery makes the DOM manipulating really with short and simple syntax by its selector engine named Sizzle.
  4. DOM TRAVERSING: jQuery provides us built-in and predefined keywords to traverse through the DOM, which is really hassle-free for the developers.
  5. EVENT HANDLING: jQuery provides us an extremely easy and elegant way to Handle any keyboard or mouse event in our web application such as clicking on a button or pressing the enter key or firing the blur event.
  6. AJAX SUPPORT: jQuery helps us to develop dynamic and interactive web applications with the latest AJAX technology. AJAX calling with jQuery is much easier than vanilla JavaScript.
  7. ANIMATION: jQuery has a sea of built-in animation effects that can provide your website an elegant look.
  8. PLUG-INS: jQuery provides a lot of plug-ins to use in our web applications to make high-level effects, advanced and themeable widgets
  9. CROSS-BROWSER SUPPORT: JQuery has cross-browser support, works efficiently in IE 6.0+, FF 2.0+, Safari 3.0+, Chrome, and Opera 9.0+ browser.


jQuery History

jQuery was first released in January 2006 by John Resig at BarCamp NYC. It is currently headed by Timmy Wilson and maintained by a team of developers.

Nowadays, jQuery is widely used technology. Most of the websites are using jQuery. So, you can say that out of the lot of JavaScript frameworks, jQuery is the most popular and the most extendable. Many of the biggest companies on the web use jQuery.

Some of these companies are:

  • Microsoft
  • Google
  • IBM
  • Netflix

 

JQuery Prerequisite

It is always advised to a fresher to learn the basics of web designing before starting to learn jQuery. He should learn HTML, CSS and JavaScript first. But, if you belong to a technical background, it is up to you.

If you are a fresher and want to study these subjects first.

 

How to use jQuery?

There are two ways to use jQuery.

  • Local Installation − You can download jQuery library on your local machine and include it in your HTML code.
  • CDN Based Version − You can include jQuery library into your HTML code directly from Content Delivery Network (CDN).

Local Installation

Go to the https://jquery.com/download/ to download the latest version available.


Now put downloaded jquery-3.6.0.js file in a directory of your website, e.g. /jQquery.


Example

Now you can include jQuery library in your HTML file as follows −

<html>
  <head>
    <title>The jQuery Example</title>
    <script type="text/javascript" src="./jquery/jquery-3.6.0.js"></script>

    <script type="text/javascript">
      $(document).ready(function () {
        document.write("Hello, World!");
      });
    </script>
  </head>

  <body>
    <h1>Hello</h1>
  </body>
</html>

This will produce following result −


CDN Based Version

You can include jQuery library into your HTML code directly from Content Delivery Network (CDN). Google and Microsoft provides content deliver for the latest version.



We are using Google CDN version of the library throughout this tutorial.

Example

Now let us rewrite above example using jQuery library from Google CDN. 

<html>
  <head>
    <title>The jQuery Example</title>
    <script src="https://code.jquery.com/jquery-3.6.0.js"></script>

    <script type="text/javascript">
      $(document).ready(function () {
        document.write("Hello, World!");
      });
    </script>
  </head>

  <body>
    <h1>Hello</h1>
  </body>
</html>

This will produce following result −




Tuesday, August 31, 2021

Website Development Process

In this article, we’ll take a look at how the general website development process may look like. In the world of the internet, the significance of having an online presence is profoundly perceived. Each business needs a website whether you are an online internet business or an offline store. The website design has grown more strategic, complex, and demanding, good usability has become the price of competitive entry.

In any case, designing a website isn’t a simple task. The ideal website isn’t just a visual show-stopper. So, while usability is important, it is no longer the key differentiator it once was, utility is equally important.

Future of Website Design

The future of great Web design is tied in with creating customer engagement and a manner that obviously impacts business results and measurable objectives. The interactive online environment offers a larger number of occasions to impact clients’ dynamic where you can save tremendous worth by ensuring that our websites are optimized.

The website should be accessible to anyone and responsive to use; the layout and flow deeply impact the overall view of the site. There are a few things to keep in mind before you start designing a website and the objectives you set out, in the beginning, are of utmost importance.

The layout design is the way illustrations, text, and buttons are organized on your page. The layout makes your site look great, yet a strong design additionally makes it simple to utilize in light of the fact that the data is shown which synch well, buttons are in places that individuals anticipate that them should be, pictures are put so they help individuals comprehend what you’re attempting to convey without hard-to-read text.

What enhancements would you make while designing a website to guarantee the site’s drawn out more and relevant traffic?

Things to keep in mind while designing your website

1.             Wireframe

2.             Layout

3.             Content

4.             Responsiveness

 

Wireframe

A website wireframe is a visual prototype of a web page that focuses on content, layout, and behavior. It usually doesn't include any styling, color, or graphics. It's like a blueprint to a house that shows the plan for plumbing and electricity without the interior design.

A website wireframe can also show the relationship between pages, allowing you to navigate between a series of mockups with clickable components. A wireframe is constructed using basic boxes, lines, and other shapes to create an outline of the functional parts of a web page without wasting time creating an intricate, polished design. It's often the first step in the website design and web development process.

The wireframe helps communicate design concepts to a team, clients, or management. Best available Wireframe Tools are: 

  • Adobe XD
  • InVision Studio
  • Sketch
  • Figma
  • Canva


Layout

A website layout is the arrangement of all visual elements on the webpage and the resulting relationships between them. Through the intentional positioning of page elements, the layout can enhance the site’s message, as well as its usability.

Layout is a key component of website design. It determines the sequence in which page elements are registered amongst visitors, which elements draw the most attention, and the overall balance achieved in the design.


Put plainly, a good website layout can lead visitors’ focus in the right direction. It can help them gravitate towards what matters most first, and then continue to the following sections in order of significance.

HTML Layout Techniques

There are four different techniques to create multicolumn layouts. Each technique has its pros and cons:

  • CSS framework
  • CSS float property
  • CSS flexbox
  • CSS grid


Content

Web content refers to the textual, aural, or visual content published on a website. Content means any creative element, for example, text, applications, images, archived e-mail messages, data, e-services, audio and video files, and so on.

Web content is the key behind traffic generation to websites. Creating engaging content and organizing it into various categories for easy navigation is most important for a successful website. Also, it is important to optimize the web content for search engines so that it responds to the keywords used for searching. 

There are two basic kinds of web content:

Text: Text is simple. It is added on the webpage as text blocks or within images. The best written content is unique textual web content that is free from plagiarism. Web content added as text can also include good internal links that help readers gain access to more information.

Multimedia: Another kind of web content is multimedia. Simply put, multimedia refers to any content which is not text; some examples include:

  • Animations: Animations can be added with the help of Flash, Ajax, GIF images as well as other animation tools.
  • Images: Images are considered the most popular option to incorporate multimedia to websites. Clip art, photos, or even drawings can be created by means of a scanner or a graphics editor. It is recommended to optimize the images so that the users can download them quickly.
  • Audio: Different types of audio files can be added as part of the web content so as to increase the desirability of the website.
  • Video: It is the most popular multimedia contents; however, when adding video files, the publishers should make sure that they efficiently on various browsers.

Web content management (WCM) is essential to run a website successfully. To manage web content, publishers should organize content in line with the requirements of the audience.

This includes usage of common content, terminology, and positioning; consistent navigation; link management; and finally, metadata application. There are a wide range of WCM tools available for effectively handling web content

 

Responsiveness 

Responsive Web design is the approach that suggests that design and development should respond to the user’s behavior and environment based on screen size, platform and orientation.

The practice consists of a mix of flexible grids and layouts, images and an intelligent use of CSS media queries. As the user switches from their laptop to iPad, the website should automatically switch to accommodate for resolution, image size and scripting abilities. One may also have to consider the settings on their devices; if they have a VPN for iOS on their iPad, for example, the website should not block the user’s access to the page. In other words, the website should have the technology to automatically respond to the user’s preferences. This would eliminate the need for a different design and development phase for each new gadget on the market.


Monday, August 2, 2021

Why FullStack Web Development?

If students know coding and love to do programming that’s good but these qualities are not enough to get the best Job. Because now companies are looking for logical minds with a wide range of skills. They don’t deal with the conservative candidates. So students need to prepare themselves accordingly and keep themselves updated with the latest technological advancement and the software or applications companies are working on.


Well! We are breathing in a revolutionized world where everything is digitized, and where the Internet is the need of the hour for everyone. Businesses are moving to an online platform to promote their brands and outreach the customer globally. This technology advancement has impacted the whole world and brings the latest amendments every other day in the software programs. That’s why more and more people want to learn Web Development and adept career as a Web Developer as most of the organizations are looking forward to Front-End developer, Back-End developer, PHP Developer, (.)Net developer, Cloud Architect, Devops Engineer and many more. 

The demand for Full-stack Developers is on the rise. And companies are in desperate need of talented professionals who can work with both Front-End and back-End due to which their demand is hiking. According to the research, there is a 20% growth in demand for Full-stack developer compared to the last couple of years.




However, Full-stack Developer holds various skills and knowledge of languages like HTML5, CSS, JavaScript, Angular, and React which comes under front-end development. For back-end, they also possess knowledge regarding NodeJs, Express, phyton, Java, PHP, and multiple databases such as MongoDB, SQL, etc. The role of the full-stack developer is to look at every aspect of software development within an organization.

 


GOOGLE LINKS

8,000+ Full Stack Developer jobs in India (143 new) - LinkedIn

in.linkedin.com › jobs › full-stack-developer-jobs


Apply to 64218 FullStack Web Developer Jobs on Naukri.com

www.naukri.com › full stack web developer Jobs

 

Full Stack Developer Jobs (Mar 2021) - Monster India

www.monsterindia.com › search › full-stack-developer-



FullStack Developer Jobs February 2021 - Indeed

in.indeed.com › Full-Stack-Developer-jobs

 

Full stack web developer Jobs in India | Glassdoor

www.glassdoor.co.in › Job › india-full-stack-web-developer


Saturday, March 13, 2021

React Router

As opposed to traditional multi-page applications, SPAs only maintain one HTML file, commonly index.html. Instead of serving a different HTML file for each path, SPAs depend on client-side routing. React Router is a popular client-side routing library.

Routing is a process in which a user is directed to different pages based on their action or request. ReactJS Router is mainly used for developing Single Page Web Applications (SPA).  React Router is used to define multiple routes in the application. When a user types a specific URL into the browser, and if this URL path matches any 'route' inside the router file, the user will be redirected to that particular route.

Why use React router?

React Router plays an important role to display multiple views in a single page application. Without React Router, it is not possible to display multiple views in React applications. Most of the social media websites like Facebook, Instagram uses React Router for rendering multiple views.

React Router uses component structure to call components, which display the appropriate information. React router also allows the user to utilize browser functionality like the back button, and the refresh page, all while maintaining the correct view of the application.

React Router Installation

React contains three different packages for routing. These are:

1.  react-router: It provides the core routing components and functions for the React Router applications.

2.    react-router-dom: It is used for web applications design.

3.    react-router-native: It is used for mobile applications.

Step 1: Install React Router

It is not possible to install react-router directly in your application. To use react routing, first, you need to install react-router-dom modules in your application. The below command is used to install react router dom.


  npm install react-router-dom

Step 2: Make Four components.

In our project, we will create four more components in the directory called Pages along with App.js, which is already present.

Pages/Home.js

import React from "react";

export default function Home() {
  return (
    <div>
      <h1>Home Page</h1>
    </div>
  );
} 

Pages/About.js

import React from "react";

export default function About() {
  return (
    <div>
      <h1>About Page</h1>
    </div>
  );

} 

Pages/Contact.js

import React from "react";

export default function Contact() {
  return (
    <div>
      <h1>Contact Page</h1>
    </div>
  );
} 

Pages/Navbar.js

import React from "react";

export default function Navbar() {
  return (
    <nav className="navbar navbar-expand-lg navbar-dark bg-dark">
      <div className="container-fluid">
        <ul className="nav navbar-nav">
          <li className="nav-item">
            <a href="/" className="nav-link" exact>
              Home
            </a>
          </li>
          <li className="nav-item">
            <a href="/about" className="nav-link" exact>
              About
            </a>
          </li>
          <li className="nav-item">
            <a href="/contact" className="nav-link" exact>
              Contact
            </a>
          </li>
        </ul>
      </div>
    </nav>
  );
}


Step 3: Setup App.js for Routing

App.js

import React from 'react';
import Navbar from "./Pages/Navbar";
import Home from "./Pages/Home";
import About from "./Pages/About";
import Contact from "./Pages/Contact";

function App() {
  return (
      <div className="App">
         <Navbar />
         <Home />
         <About />
         <Contact />
      </div>
  );
}

export default App; 

For Routing, open the app.js file and import all the four component files in it. Here, you need to import line: 


  import { BrowserRouter as RouterSwtichRoute } from "react-router-dom";

which helps us to implement the Routing. Now, our app.js file looks like below.

BrowserRouter as Router

First, you'll need to set up your app to work with React Router. Everything that gets rendered will need to go inside the <BrowserRouter> element, but we just rename BrowserRouter as Router only to reduce the long name of the BrowserRouter. so wrap your App in those first. It's the component that does all the logic of displaying various components that you provide it with.

import React from "react";
import { BrowserRouter as RouterSwtichRoute } from "react-router-dom";

import Navbar from "./Pages/Navbar";
import Home from "./Pages/Home";
import About from "./Pages/About";
import Contact from "./Pages/Contact";
function App() {
  return (
    <Router>
      <div className="App">
        <Navbar />
        <Home />
        <About />
        <Contact />
      </div>
    </Router>
  );
}
export default App;


Switch

Next, in your App component, add the Switch element (open and closing tags). These ensure that only one component is rendered at a time. It checks each route for a match sequentially and stops once the first match is found.

function App() {
  return (
    <Router>
      <div className="App">
        <Navbar />
        <switch>
          <Home />
          <About />
          <Contact />
        </switch>
      </div>
    </Router>
  );
}

You notice that we put <Navbar /> component outside the switch, because we want that navbar will be visible on each component that render.

Route

It's now time to add your <Route> tags. These are the links between the components and should be placed inside the <Switch> tags.

To tell the <Route> tags which component to load, simply add a path attribute and the name of the component you want to load with component attribute. The <Route> will return null in case the specified URL doesn’t match the defined path.

 

function App() {
    return (
      <Router>
        <div className="App">
          <Navbar />
          <switch>
            <Route path="/" exact component={Home} />
            <Route path="/about" exact component={About} />
            <Route path="/contact" exact component={Contact} />
          </switch>
        </div>
      </Router>
    );
  }  

When the route matches /, the application shows the Dashboard component. When the route is changed by clicking the “About” link to /about, the Dashboard component is removed and the About component is inserted in the DOM.

Notice the exact attribute. Without this, path="/" would also match /about, since / is contained in the route.  However, we want  ‘/’ to match only our render function, hence using ‘exact’ explicitly achieves this.

Step 4: Adding Navigation Link

Link

Sometimes, we want to need multiple links on a single page. When we click on any of that particular Link, it should load that page which is associated with that path without reloading the web page. To do this, we need to import <Link> component in the Navbar.js file. The Link component is used to trigger new routes. You import it from react-router-dom, and you can add the Link components to point at different routes, with the to attribute. It is the equivalent of anchor tags: <a> </a>.

So now we should update Navbar.js for providing Navigation link in react application by replacing <a> tag to <Link> Tag and 'href' to 'to' attribute.  

Pages/Navbar.js

import React from "react";
import { Link } from "react-router-dom";

export default function Navbar() {
  return (
    <nav className="navbar navbar-expand-lg navbar-dark bg-dark">
      <div className="container-fluid">
        <ul className="nav navbar-nav">
          <li className="nav-item">
            <Link to="/" className="nav-link" exact>
              Home
            </Link>
          </li>
          <li className="nav-item">
            <Link to="/about" className="nav-link" exact>
              About
            </Link>
          </li>
          <li className="nav-item">
            <Link to="/contact" className="nav-link" exact>
              Contact
            </Link>
          </li>
        </ul>
      </div>
    </nav>
  );
} 

404 Page Not Found

A common use case for when you’re building a web app is to have a “catch all” route that will be rendered if none of your other routes match. A common example of this would be a 404 page.

To create a client side "404 not found" fallback all you need to do is make use of a <Route /> component with a non-greedy matching path. Create your NotFound component, i.e. the page which will display 404 error message:

Pages/NotFound.js

import React from "react";

export default function NotFound() {
  return (
    <div>
      <h3>404 page not found</h3>
      <p>We are sorry but the page you are looking for does not exist.</p>
    </div>
  ); 

Let's add <NotFound /> component to routes configuration, using * as a value of the path parameter to get a non-greedy matching.


It is important to remember that the 404 route needs to be declared in the very bottom of your routes configuration, so the <Route /> is only mounted if any of the routes' path declared above are not matched:

App.js

import NotFound from "./Pages/NotFound";

function App() {
  return (
    <Router>
      <div className="App">
        <Navbar />
        <switch>

          {/* Other Page Routes */}

          <Route component={NotFound} />
        </switch>
      </div>
    </Router>
  );
}
export default App; 

See the example below, try to enter some non valid url to see 404 page: