Kategorie
Bez kategorii

Task 10

Continuation of AngularJS

Example number 29

<html ng-app="countryApp">
  <head>
    <meta charset="utf-8">
    <title>Angular.js Example</title>
    <script src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.1/angular.min.js"></script>
    <script>
      var countryApp = angular.module('countryApp', []);
      countryApp.controller('CountryCtrl', function ($scope, $http){
        $http.get('countries.json').success(function(data) {
          $scope.countries = data;
        });
      });
    </script>
  </head>
  <body ng-controller="CountryCtrl">
    <table>
      <tr>
        <th>Country</th>
        <th>Population</th>
        <th>Flag</th>
        <th>Capital</th>
      </tr>
      <tr ng-repeat="country in countries">
        <td>{{country.name}}</td>
        <td>{{country.population}}</td>
        <td><img ng-src="{{country.flagURL}}" width="100"></td>
        <td>{{country.capital}}</td>
      </tr>
    </table>
  </body>
</html>

This example represents the simple way to add next column in table by model for countries capitals. Data is extracted from countries.json file where been stored.

Demo version

Another example on next page.

Kategorie
Bez kategorii

Task 9

AngularJS is a JavaScript-based open-source front-end web application framework used for building dynamic web applications. It was originally created by Google and was released in 2010 as a first version. AngularJS allows developers to use HTML as the template language and extend its syntax to express components of their application clearly and succinctly. It aims to simplify the development and testing of complex web applications by providing a framework for client-side MVC (Model-View-Controller) and MVVM (Model-View-ViewModel) architectures, along with powerful features like two-way data binding, dependency injection, directives, and services. AngularJS has gained widespread popularity and is widely used for building single-page applications (SPAs) and enterprise-level applications. In 2016, Google released a completely rewritten version of AngularJS, called Angular, which is a more modern, modular and efficient framework, but both AngularJS and Angular are still in use.

The task is to desribe selected problems from given link:

https://curran.github.io/screencasts/introToAngular/exampleViewer/#/
Kategorie
Bez kategorii

Task 8

Everyone have diffrent exrecise. My task was to the building a little menu with a some JSON, LINQ and the JQuery Template Plugin. Moreover I have to represent an example of using Keyboard events in case of my previous experience.

On next page you can check source code.

Kategorie
Bez kategorii

Task 7

jQuery is a popular and widely used JavaScript library that simplifies the process of creating interactive and dynamic web pages. It was initially released in 2006 by John Resig and has since become one of the most commonly used JavaScript libraries in web development.

The core principle behind jQuery is to simplify the process of selecting and manipulating HTML documents, handling events, creating animations, and making AJAX requests. By providing a simple and intuitive API, jQuery allows developers to write less code while achieving the same results.

jQuery is implemented as a JavaScript file that can be included in a web page using a script tag. Once loaded, jQuery provides a global object called $ that can be used to access the library’s features. To select HTML elements, developers can use CSS-style selectors, such as $(’div’) to select all div elements on a page.

One of the main benefits of jQuery is its cross-browser compatibility. It abstracts away many of the differences between browsers, allowing developers to write code that works consistently across different platforms. Additionally, jQuery has a large and active community of developers who contribute to the library and provide support to others.

Overall, jQuery is a powerful and widely used JavaScript library that simplifies web development and makes it easier to create dynamic and interactive web pages.

On next page you can check source code with task 7.

Kategorie
Bez kategorii

Task 6

JSON stands for JavaScript Object Notation. It is a lightweight, text-based format for representing structured data. JSON is based on a subset of JavaScript programming language syntax, but it is language-independent and can be used with most programming languages. JSON is commonly used for data exchange between a client and a server in web applications, but it can also be used for data storage and configuration files. JSON has a simple and easy-to-read format, making it popular among developers for its simplicity and ease of use.

The task was to describe how the examples works.

Kategorie
Bez kategorii

Task 5

AJAX, which stands for Asynchronous JavaScript and XML, is a powerful technology used in web development to create interactive and dynamic web pages. With AJAX, web developers can create web pages that can dynamically update content without requiring a full page refresh, providing a more seamless and responsive user experience.

The technology is based on a combination of JavaScript, XML or JSON, and server-side technologies such as PHP or ASP.NET. By using AJAX, developers can create web pages that can make requests to a web server in the background without interrupting the user’s interaction with the page. This allows for the creation of applications that are more responsive and interactive.

AJAX is commonly used in modern web applications to create features such as auto-complete search boxes, real-time chat systems, and dynamic page content updates, among others. The technology has also been adopted by many popular web applications and frameworks, including Google Maps, Facebook, and Twitter.

While AJAX can be a powerful tool, it is important to use it appropriately, as it can increase the complexity of web development and introduce security vulnerabilities if not implemented correctly. However, with proper use, AJAX can significantly improve the user experience of web applications and provide developers with a powerful tool for creating dynamic and interactive web pages.

On next page you can check source code with AJAX.

Kategorie
Bez kategorii

Task 4

The task number 4 was to create a responsive page containing the contents of the three first exercises

Responsive web design is about creating web pages that look good on all devices! A responsive web design will automatically adjust for different screen sizes and viewports.

On next page you can check source code.

Kategorie
Bez kategorii

Task 3

The task number 3 was to Generate a list of numbers in JavaScript using a random function. Next this list should be sorted using sorting algorithms and printed sorted list on screen. Everyone receives two methods of sorting to create code. In my case is Bubble-sort and Quick-sort.

Additionaly task was upgraded by time measure for sorting process.

On next page you can check source code.

Kategorie
Bez kategorii

Task 2

The task was to improve code from task 1 by adding CSS styles and create table base on <div> construction.

Additionally, CSS styles should be defined in external file.

On next page you can check source code.

Kategorie
Bez kategorii

Task 1

The task was to create a table containing “Name” as text field, “Surname” as Text field, “Age” as drop down menu, “Sex” as radio button and “Hobby” as checkbox.

The submission have to be done by two buttons (“OK” and “Cancel”), where the “OK” button will display the table data in a pop-up window after clicking.

Example table is presented on picture number 1.

On next page you can check source code.