Sunday, October 16, 2016

Chapter 13

Chapter 13: Computer Programs and Programming Languages

As all of you might heard of programmers anywhere even in movies. Programmer is the one who create computer program (a series of instructions that directs a computer to perform task) using various programming language (the language or instruction that tells computer how and what to do with specific action) such as Java, C or C++. Simple said, programming language is used to communicate with a computer.

Types of programming languages and development tools:
A) Low level languages
1) Machine language- first generation of programming language. Only language the computer directly recognises.
2) Assembly language- second generation of programming language. Use of symbolic instructions.
3) Source program- contains the code to be converted to machine language.

B) Procedural languages- instructions that tell computer what and how to do.
1) Third generation language- a compiler translates an entire program before executing it, and an interpreter converts and executes one code statement at a time.
2) C programming language- used to write many of today's programs.
3) COBOL (COmmon Business Oriented Language)- designed for business application with easy to read English like statements.

C) Object oriented programming languages- allow reuse and modification of existing object. Advantages are objects can be reused, programmers create applications faster, work well in RAD (Rapid Application Development) environment and most program development tools are IDEs (Integrated Development Environment).
1) Java- an object oriented programming language developed by Sun Microsystem. Just In Time (JIT) compiler converts byte code into machine dependent code.
2) Microsoft .NET framework- allows almost any type of program to run on the Internet or an internal business network, as well as computers and mobile devices. Features include CLR (Common Language Runtime) and Classes.
3) C++- an extension of C programming language.
4) C#- based on C++ and was developed by Microsoft.
5) F#- combines the benefit of an object oriented language with those of a functional language.
6) Visual studio- Microsoft suite's of program development tools.
There are:
i) Visual Basic- based on BASIC programming language.
ii) Visual C++- based on C++.
iii) Visual C#- based on C#.
7) Visual programming language- uses a visual or graphical interface for creating all source code.
8) Borland's Delphi- program development tool that is ideal for building large scale enterprise and web applications in RAD environment.
9) Power Builder- program development RAD tool. Best suited for web-based, .NET and large scale enterprise object oriented applications.

D) Other programming languages and development tools
1) Fourth generation languages- non procedural languages that enable users and programmers to access data in database. Such as SQL (Structured Query Language).
2) Classic programming languages include Ada, ALGOL, APL, BASIC, Forth, FORTRAN, Hyper Talk, LISP, Logo, Modula-2, Pascal, PILOT, PL/1, Prolog, RPG and Small Talk.
3) Application generator- a program that creates source code or machine code from a specification of the required functionality. Often bundled as part of DBMS (Database Management System).
4) Macro- a series of statements that instructs an application how to complete a task. Can be created in two ways, record the macro with macro recorder and write the macro.

E) Web page development
1) HTML (Hypertext Markup Language)- special formatting language to format documents for display on the Web.
2) XHTML (Extensible HTML)- markup language that allows website to be displayed more easily on mobile devices.
3) XML (Extensible Markup Language)- allows web developers to create customised tags and use predefined tags to display content appropriately on various devices. Applications of XML are RSS 2.0 and ATOM.
4) WML (Wireless ML)- a subset of XML and is used to design pages for micro browsers.
5) CGI (Common Gate Interface)- used to send and receive information between computer and a web server. Such as Scripts, Applets, Servlets and ActiveX controls.
How a CGI scripts work:
i) Programmer stores CGI program in special folder on the web server such as /cgi-bin.
ii) Webmaster create a link between CGI program and web page. When a user displays the web page, CGI program automatically starts.
iii) User requests are sent to CGI program. CGI program will contact database and request the information for the user.
iv) CGI program receives information from database, assembles it in markup language format and sends it to user's web browser.
6) Various languages that are used to write Scripts, Applets, Servlets and ActiveX controls.
For example:
i) Java Script.
ii) Perl.
iii) PHP (Hypertext Preprocessor).
iv) Rexx.
v) Tcl.
vi) VBScript.
7) Dynamic HTML (DHTML)- allows web developers to include more graphical interest and interactivity.
8) CSS (Cascading Style Sheets)- contains the formats for how a particular objects should be displayed.
9) Ruby on Rails (RoR)- provide technologies for developing object oriented, database driven web sites.
10) Web 2.0- allows web sites to provide a means for users to share personal information, modify web site content and it has application software built into the site. Examples are mentioned in Chapter 2.
11) API (Application Program Interface)- a set of routines, protocols and tools for building software applications. It specifies how software components should interact.
12) Web page authoring software- can create sophisticated web pages that include images, video, audio, animation and other effects.
For example:
i) Dreamweaver.
ii) Expression Web.
iii) Flash.
iv) Share Point Designer.

F) Multimedia program development
1) Multimedia authoring software- allows programmers to combine text, graphics, animation, audio and video in an interactive presentation.
For example:
i) Tool Book.
ii) Director.

Program development- consists of a series of steps programmers use to build computer programs.
Steps:
A) Analyse requirements
1) Reviews the requirements.
2) Identifies input, processing and output. A.k.a IPO chart.

B) Design solution
1) Design a solution algorithm.
2) Structured design- where programmer begins with general design before moving towards detailed design.
3) Hierarchy chart- show program modules graphically.
4) Object oriented design- programmer packages the data and program into a single object. A.k.a encapsulation.
5) Sequence control structure- shows one or more actions following each other in order.
6) Selection control structure- tells program which action to take based on certain conditions.
Types:
i) If-then-else- If not A, then B.
ii) Case- If not A, B, C then D.
7) Repetition control structure- enables a program to perform one or more actions repeatedly as long as a certain condition is met.
Types:
i) Do-while.
ii) Do-until.
8) Flowchart- graphically shows the logic in a solution algorithm.
9) Pseudo code- uses a condensed form of English to convey program logic.
10) Unified Modeling Language (UML)- standard notation for object modeling and development.

C) Validate design
1) Check for logic error using test data.
Steps:
i) Develop various sets of test data.
ii) Determine the expected results.
iii) Step through the algorithm.
iv) Compare the results.
v) Repeat steps for each set of test data.

D) Implement design
1) Using a program development tool that assists the programmer by:
i) Generating or providing some or all code.
ii) Writing the code that translates the design into a computer program.
iii) Creating the user interface.
2) Extreme programming- a strategy where programmers immediately begin coding and testing as soon as requirements are defined.

E) Test solution
1) To ensure program runs correctly and is error free.
2) Some errors are syntax errors and logic errors.
3) Debugging- is required to remove the bugs found in a program.
4) Beta- a program that has most or all of its features and functionality implemented. Beta mostly found in new software or games to test the performance as well as the market.

F) Document the solution
1) Review the program code.
2) Review all the documentation.

No comments:

Post a Comment