Tuesday, July 18, 2017

HTML5 - Syntax


      The HTML 5 language has a "custom" HTML syntax that is compatible with HTML 4 and XHTML documents published on the Web, but is not compatible with the more esoteric SGML features of HTML 4.

       HTML 5 does not have the same syntax rules as XHTML where we needed lower case tag names, quoting our attributes,an attribute had to have a value and to close all empty elements.

        HTML5 is coming with lots of flexibility and would support the followings: 
  • Uppercase tag names.
  • Quotes are optional for attributes. 
  • Attribute values are optional. 
  • Closing empty elements are optional. 

        DOCTYPE is older versions of HTML were longer because the HTML language was SGML based and therefore required a reference to a DTD.

       HTML 5 authors would use simple syntax to specify DOCTYPE as follows: 

Note: All the above syntax is case-insensitive.

Character Encoding: 

      HTML 5 authors can use simple syntax to specify Character Encoding as follows:

 Note: Above syntax is case-insensitive.

The <link> tag:
     Note: HTML 5 removes extra information required and you can use simply following syntax:

The <script> tag:
     This is common practice to add a type attribute with a value of "text/javascript" to script elements as follows:

Note: HTML 5 removes extra information required and you can use simply following syntax:

Basic HTML Document:
     Let's try to run below basic HTML code. Save it in an HTML file htest.htm using your favorite text editor. Finally open it using a web browser like Internet Explorer or Google Chrome, or Firefox etc. It must show the output.

HTML5 – Overview

HTML5 – Overview:     

       HTML is a hypertext markup language used for structuring and presenting content on the World Wide Web(WWW). HTML has the fifth addition call HTML5. Hypertext refers to the way in which Web pages are linked together. Thus, the link available on a webpage is called Hypertext. As its name suggests, HTML is a Markup Language which means you use HTML to simply "mark-up" a text document with tags that tell a Web browser how to structure it to display.

   Originally, HTML was developed with the intent of defining the structure of documents like headings, paragraphs, lists, and so forth to facilitate the sharing of scientific information between researchers.

   Now, HTML is being widely used to format web pages with the help of different tags available in HTML language.

New Features Of HTML5:

   HTML5 introduces a number of new elements and attributes that helps in building a modern websites. Following are great features introduced in HTML5.

  • New Semantic Elements: Like <header>, <footer>, and <section>. 
  • Forms 2.0: Improvements to HTML web forms where new attributes have been introduced for <input> tag. 
  • Web-Socket : A a next-generation bidirectional communication technology for web applications. 
  • Canvas: This supports a two-dimensional drawing surface that you can program with JavaScript
  • Persistent Local Storage: To achieve without resorting to third-party plugins. 
  • Server-Sent Events: HTML5 introduces events which flow from web server to the web browsers and they are called Server-Sent Events (SSE). 
  • Micro-data: This lets you create your own vocabularies beyond HTML5 and extend your web pages with custom semantics. 
  • Drag and drop: Drag and drop the items from one location to another location on a the same webpage.
  • Geo-location: Now visitors can choose to share their physical location with your web application. 
  • Audio & Video: You can embed audio or video on your web pages without resorting to third-party plugins. 

Monday, July 17, 2017

Simple C Program for understand C Programming

C Program rules:

      Before we start writing C program code we must remember the following rules that are applicable to all C programs:
  1. Each instruction in a C program is written as a separate statement. Therefore a complete C program would comprise of a series of statements.
  2. The statements in a program must appear in the same order in which we wish them to be executed; unless of course the logic of the problem demands a deliberate ‘jump’ or transfer of control to a statement, which is out of sequence.
  3. Blank spaces may be inserted between two words to improve the readability of the statement. However, no blank spaces are allowed within a variable, constant or keyword.
  4.  All statements are entered in small case letters.
  5.  C has no specific rules for the position at which a statement is to be written. That’s why it is often called a free-form language.
  6. Every C statement must end with a;. Thus; acts as a statement terminator.
    Let’s start writing first C program. It would be simply calculate simple interest for a set of values representing principle, number of years and rate of interest.

C Code:

/* Calculation of simple interest */
/* Author Mike Date: 18/07/2017 */
main( )
int p, n ;
float r, si ;
p = 1000 ;
n = 3 ;
r = 8.5 ;

/* formula for simple interest */

si = p * n * r / 100 ;

printf ( "%f" , si ) ;

Now, Let's learn how this program is works ...... 

  • Comment on the program should be enclosed within /* */.For example, the first two statements in our program are comments.
  • Though comments are not necessary, it is a good practice to begin a program with a comment indicating the purpose of the program, its author and the date on which the program was written.
  • Any number of comments can be written at any place in the program. For example, a comment can be written before the statement, after the statement or within the statement.
  • Often programmers seem to ignore writing of comments. But when a team is building big software well commented code is almost essential for other team members to understand it.
  • Technically speaking main( ) is a function. Every function has a pair of parentheses ( ) associated with it.
  • Any variable used in the program must be declared before using it. 
  • Any C statement always ends with a ;.
  • * and / are the arithmetic operators. The arithmetic operators available in C are +, -, * and /. C is very rich in operators. There are about 45 operators available in C. 
  • Once the value of si is calculated it needs to be displayed on the screen. Unlike other languages, C does not contain any instruction to display output on the screen. All output to screen is achieved using ready-made library functions. One such function is printf( ). We have used it display on the screen the value contained in si.
  • In addition to format specifiers like %f, %d and %c the format string may also contain any other characters. These characters are printed as they are when the printf( ) is executed.
  • printf( ) can not only print values of variables, it can also print the result of an expression. An expression is nothing but a valid combination of constants, variables and operators.
    Thus, 6, 9 + 3, c and a + b * c – d all are valid expressions.

Sunday, July 16, 2017

C Programming Language || What is C and Facts about C language.

C programming: 

Before start to write serious programs in C, it would be interesting to find out what really C is, how it came into existence and how does it compare with other computer languages. In this blog I will briefly outline these issues.
Most important aspects of any language are the way it stores data, the way it operates upon this data, how it accomplishes input and output and how it lets you control the sequence of execution of instructions in a program. 

What is C?

C is a programming language developed at AT & T’s Bell Laboratories of USA in 1972. It was designed and written by Dennis Ritchie. In the late 70’s C began to replace the more familiar languages of that time like PL/I, ALGOL. It wasn’t made the ‘official’ Bell Labs language. Dennis seems to have been rather surprised that so many programmers preferred C is older languages like FORTRAN or PL/I, or the newer ones like Pascal and APL. But why C seems so popular is because it is reliable, simple and easy to use.

A computer falls definitely into the category of complex objects and it can be thought of as working at many different levels. The terms low level and high level are often used to describe these onion-layers of complexity in computers. Low level is maybe easiest to understand: it describes a level of detail which is buried down amongst the working parts of the machine. A higher level describes the same object, but with the detail left out.

C is called a high level, compiler language. The aim of any high level computer language is to provide an easy and natural way of giving a program of instructions to a computer. The language of the raw computer is a stream of numbers called machine code. As you might expect, the action which results from a single machine code instruction is very primitive and many thousands of them are required to make a program which does anything substantial. It is therefore the job of a high level language to provide a new set of black box instructions.

Computers are designed to handle and process large amounts of information quickly and efficiently, but they can't do anything until someone tells them what to do. That's where C comes in. C is a programming language that allows a software engineer to efficiently communicate with a computer.

C is a highly flexible and adaptable language. C is one of the most widely used languages in the world and is fairly stable. An improved C language called C++ has been invented, but it is still in development, and its definition is still being worked on.

C++, originally known as C with Classes, adds a number of new features to the C language, the most important of which is the class. Classes facilitate code reuse through object-oriented design (OOD).

This processing makes some types of programming easy, but it makes static checking of programs difficult, and you need to be able to tell exactly what your program is doing if you are working on embedded control applications. So some people consider C++ the better language because it does things automatically and C doesn't. Other people consider C better for precisely the same reason. So C will be with us for a long time to come.

Facts about C:

  1. C was invented to write an operating system called UNIX.
  2. C is a successor of B language which was introduced around the early 1970's.
  3. The language was formalized in 1988 by the American National Standard Institute (ANSI).
  4. The UNIX OS was totally written in C.
  5. C is the most widely used and popular System Programming Language.
  6. Most of the state-of-the-art software has been implemented using C.
  7. Most popular Linux OS and RDBMS MySQL have been written in C.

Saturday, July 15, 2017

Definition of the User View of a System || Object-Oriented Programming

Definition of the User View of a System:

     The user view represents the goals and objects of several of users and their requirements form the system. The user view represents that the system with which the user interacts.

System Users:

     System Users can be human users or other systems that interact directly with the system. The role of a system user is defined based on the functions performed.
      For example, consider the billing system of the department store from where you buy general groceries. The storekeeper who updates the stock details will be the system user.


     Actors are the elements that lie outside the system, and therefore are called the external entities of a system. They are used to model system users. Actors interact directly with the system, exchange message and request for some action to be performed.  For example, in the billing system of the department stores, the clerk who enters the product details will be an actor.

   External entities that do not interact directly with the system cannot be termed as actors of the system. For example, in the billing system of the department stores, as a customer, you will not be an actor because you cannot interact with the system directly.
      The actors fall into four main categories:
  1. Principal actors – People who directly interact with the system are called principal actors. In the billing system example, the clerk is the principal actor.
  2. Secondary actors – people who are involved in maintenance of the system are the secondary actors. In the billing system example, the stores in-charge who provides the paper for printing the bill is the secondary actor.
  3. External hardware – The hardware that is a part of system other than the computer that runs an application is called an external hardware. In the billing system example, the printer that is used for printing the bill is external hardware.
  4. Other systems – The external systems with which your system needs to interact for its working are called systems.

Let's clear more by solving the problem: 

    Question: One of the sources used by BMW for recruiting personal is the internal job posting process. Whenever a vacancy arises, the Human Resources (HR) head of the region informs all the employees of that region and also sends the information to the regional HR heads inviting applications. The other regional HR heads then place the vacancy information on the notice board or through the websites. All interested employees send their application with resume to the HR head of the region where the vacancy exists.

Now, identify the various actors interacting with the system? 


How to identify Actors:

     To identify actors, you should first identify the context of the system and then understand the environment of the system in which the actors exist.

The Context of a System:
      A system addresses a problem and provides solutions to the problem within a framework. This framework is referred to as the context of a system. The context of the problem within the system must be defined and understood first. Then the solution to the problem should be worked out.

     In our problem statement, the context of the system is the HR department where the vacancy exists.

The Environment of a System:
     The environment of system specifies the functionality of the system from the user’s point of view. The framework consists of the elements that lie inside the system and are responsible for the working of the system, as well as the elements that lie outside the system and what these elements expect the system to provide.

    In our problem statement, the environment of the system includes the HR heads and employees who lie outside the system. The internal job posting processes lies inside the system.

Who is an actor?

     In our problem statement, the actors would be the HR head of the region where a vacancy arises, the HR heads of other regions and the employees as all these entities interact with system directly.

Who is not an actor?

    External entities that do not interact directly with the system cannot be termed as actors of the system. Some results would be happened for identified:
  1. Regional HR head where a vacancy exists denoted as RHR (V).
  2. Other Regional HR head, denoted as RHR (O).
  3.  All employees of BMW, denoted as EMP.

 Use Cases:
      Use cases consist of elements that lie inside the system and are responsible for the working of the system. This is the functionality and behavior of the system. Therefore, use cases are nothing but the actions that the system performs to generate results requested by the actors of the system.

     Use cases represent all the possible events that can occur in all possible scenarios. They represent all interactions that can take place between an actor and the system.

      A relationship represents a logical connection between use cases and actors. Relationship is unidirectional.

    The following are examples of use cases in billing system of a department store:
  1.  Enter Bill Details.
  2. Calculate Total Amount.
  3. Print Bill.

Diagrammatic Conventions for Drawing Use Case Diagrams:

    The user view of a system consists of use case diagrams. A use case diagram contains actors, use cases and their relationship. The diagram describes the behavior of the system, as seen by its end users and developers, as well as their expectations of the system. In short, the use case diagram represents the functionality provided by the system to external entities.

    Use case diagrams consist of actors and use cases. Actors are represented as stick personal and use cases as ellipses. 

Use Case Diagram:

Friday, July 14, 2017

An Introduction To UML || Why Very Important To Understand UML For Modeling Language ???

An Introduction To UML || Why Very Important To Understand UML For Modeling Language ???

An Introduction To UML - Unified Modeling Language : 

   UML is a standard modeling language used for modeling software systems of varying complexities. Systems can range from enterprise information systems to distributed web-based systems. UML provides a set of notations and rules for using the same. The focus is on creating simple,  well documented and easy to understand software models. 

   The users of object-oriented modeling languages faced with increasingly complex applications started experimenting with alternative approaches to analysis and design. Many users of the modeling languages had trouble finding one that met their needs completely. A few of the prominent modeling approaches used were the Booch method given by Grady, Object-Oriented software engineering by Ivar and the object modeling technique by James.  Each one of these methods and languages had their strengths and weakness.

   Origin and Evolution Of UML :

   In the early 1990’s, as the sharing of ideas increased, work started towards evolving a common standard. The UML efforts when Rumbaugh Joined Rational Corporation in the year 1994  and Ivar joined Rational in 1995.

   Grady, James and Ivar developed UML, which is a standard modeling language and first version was released in June 1996.

  A UML consortium was established with the support of major software companies. The companies viewed as important to their business and dedicated resources towards the development of UML. The companies included digital equipment corporation,  Hewlett-Packard, Microsoft, Oracle and Rational Corporation.

   The UML consortium prepared and presented the revised version of UML to the Object Management Group (OMG). OMG has accepted UML as a standard modeling and has taken over the maintenance of the UML.

Goals Of UML :
   UML is a non-proprietary language. All the companies that are a part of the UML consortium are incorporating. UML as a standard in their development processes. The goals of The UML are :
  1. To provide a simple and ready-to-use expressive visual modeling language that allows the user to visualize the system.
  2. To be process-independent.
  3. To be language-independent.

What does UML Represent :

    UML provides a set of vocabulary and rules for using the modeling language. The vocabulary and the rules focus on representing the logical and physical elements of the system.

UML is used to :
  1. visualize the software system with well-defined symbols that are used to represent various elements of a system. Therefore, a developer or tool can unambiguously interpret a model written by another developer, using UML.
  2. Specify the software system and help in building precise, unambiguous and complete models.
  3. Construct models of the software system that can directly communicate with variety of programming language.
  4. Document models of the software system by expressing requirements of the system during its development and deployment stage. 

Where is UML Used:
     Some of the most common domains where UML is being currently used are :
  1. Banking services
  2. Defense Systems
  3. Distribute Web-Based services
  4. Enterprise Information Systems
  5. Medical Systems
  6. Aerospace Systems

Views in UML :

   UML can be used to depict different aspects of a software intensive systems through various kinds of views. The views typically used are:
  1. The users views – represents the goals and objectives of the system from a user’s view port.
  2. The structural view – represents the static or idle state of the system
  3. The behavioral view – represents the dynamic or changing state of the view.
  4. The implementation view – represents the distribution of the logical elements, such as sources code structure and run time implementation structure of the system
  5. The environment view – represents the distribution of the physical elements of the system. The environment view depicts nodes that from a part of the physical hardware requirements for the deployment of the system. 

The context of a system :

   A system addresses a problem and provides solutions to the problem within a frameworks. This framework is referred to as the context of a system. The context of the problem within the system must be defined and understood before a solution is worked out. 

The Environment Of a System :
     The environment of a system specifies the functionality of the system from the user’s point of view. The environment consists of the elements that lie inside the system and are responsible for the working the system, as well as elements that lie outside the system and what elements expect the system to provide. 

Relationship between SDLC and UML :
     The notations provided by UML are used to depict various views of s system. Different views map to different phases of SDLC.

   For example : in the elaboration phase, a set of diagrams may be used to depict the proposed design. In the construction phase, a different type of diagram may be used to depict software components.

Note: Before you start a programming you must understand all basic concepts therefore, I am trying to describe every basic concept. Thank you !!!!

Object-Oriented Modeling || What Is Object-Oriented Modeling ??

Object-Oriented Modeling || What Is Object-Oriented Modeling ??

   Models help you to visualize and specify different parts of a system. Models also show how different parts are related to one another and help in visualizing their working. For example, if you had to explain the working of a car, it would be easier to explain if you had a model of car on paper, in front of you.

   Similarly, any object-oriented software system consists of objects, which are instantiated from classes object-oriented modeling aims at representing such systems as models based on a set of notations and rules.

   Modeling is breaking a complex problem into small elements that are easy to understand and arriving at the solution of the problem. To arrive at the solution you need to do a lot of analysis. UML is a modeling language that can be used to define models in the software engineering domain. It defines various models for a system.

  1. The class model describes the static structure.
  2. The state model represents the dynamic behavior of objects.
  3. The use case model explains the requirements of the user.
  4. The interaction model describes messages flows.
  5. The implementations model contains work units.
  6. The deployment model contains details that pertain to process allocation.
Let's learn more about modeling concepts using UML in next blog... Stay tune...