knowt logo

Software Development (WJEC)

Introduction to Software Development

Software development is the process of conceiving, specifying, designing, programming, documenting, testing, and bug fixing involved in creating and maintaining applications, frameworks, or other software components.

Stages of Software Development Lifecycle (SDLC):

  • Planning: This initial phase involves defining the project scope, objectives, and deliverables. Key activities include feasibility studies, project planning, and resource allocation.

  • Analysis: In this phase, the requirements for the system are gathered and analyzed. Techniques such as interviews, surveys, and document analysis are used to understand what the users need.

  • Design: Based on the requirements gathered, the system's architecture and design are created. This includes designing the system architecture, user interfaces, databases, and defining data flow.

  • Implementation: This phase involves writing the actual code based on the design documents. Developers use programming languages and tools to create the software.

  • Testing: The software is tested to identify and fix bugs. This includes unit testing, integration testing, system testing, and acceptance testing.

  • Deployment: Once the software passes all testing phases, it is deployed to a live environment where it becomes operational.

  • Maintenance: After deployment, the software may need updates and fixes. Maintenance involves correcting issues, improving functionality, and ensuring the system remains operational over time.

Software Development Methodologies

Waterfall Model: A linear sequential approach where each phase must be completed before the next begins. It is structured and easy to manage but lacks flexibility for changes during development.

Agile Methodology: An iterative approach that emphasizes flexibility, customer feedback, and small, rapid releases. Agile focuses on continuous improvement and collaboration.

Scrum: An Agile framework that uses fixed-length iterations called sprints, typically lasting 2-4 weeks. It includes roles such as Product Owner, Scrum Master, and Development Team, and ceremonies like Sprint Planning, Daily Standups, and Sprint Retrospectives.

Extreme Programming (XP): Focuses on customer satisfaction through continuous delivery of functional software. It emphasizes technical excellence and includes practices like pair programming, test-driven development (TDD), and frequent releases.

Programming Concepts

Variables and Data Types:

  • Variables: Named storage locations in memory that hold data. Examples include int age = 25; or string name = "Alice";.

  • Data Types: Define the type of data a variable can hold. Common data types are integers, floating-point numbers, characters, strings, and booleans.

Control Structures:

  • Conditional Statements: Used to perform different actions based on different conditions. For example, if-else statements.

  • Loops: Used to execute a block of code repeatedly. Common loops are for, while, and do-while.

Functions and Procedures:

  • Functions: Blocks of code that perform a specific task and return a value. For example, int add(int a, int b) { return a + b; }.

  • Procedures: Similar to functions but do not return a value. They perform actions.

Object-Oriented Programming (OOP):

  • Classes and Objects: A class is a blueprint for objects, and an object is an instance of a class. For example, class Car { } and Car myCar = new Car();.

  • Inheritance: Allows a class to inherit properties and methods from another class. For example, class ElectricCar extends Car { }.

  • Polymorphism: Allows methods to do different things based on the object it is acting upon. For example, method overloading and overriding.

  • Encapsulation: Bundling data and methods that operate on the data within one unit (class), and restricting access to some of the object's components.

  • Abstraction: Hiding the complex implementation details and showing only the necessary features.

Data Structures and Algorithms

Basic Data Structures:

  • Arrays: Fixed-size data structures that hold elements of the same type. For example, int[] numbers = {1, 2, 3, 4};.

  • Lists: Dynamic data structures that can grow and shrink in size. For example, ArrayList<Integer> list = new ArrayList<>();.

  • Stacks: Follow the Last In First Out (LIFO) principle. Operations include push, pop, and peek.

  • Queues: Follow the First In First Out (FIFO) principle. Operations include enqueue and dequeue.

Complex Data Structures:

  • Trees: Hierarchical data structures with nodes connected by edges. The top node is the root, and nodes without children are leaves.

  • Graphs: Consist of vertices (nodes) and edges (connections). Can be directed or undirected.

  • Hash Tables: Store key-value pairs and allow fast retrieval based on the key.

Common Algorithms:

  • Sorting Algorithms:

    • Bubble Sort: Simple sorting algorithm that repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order.

    • Quick Sort: A divide-and-conquer algorithm that picks a pivot element and partitions the array into sub-arrays.

    • Merge Sort: A divide-and-conquer algorithm that divides the array into sub-arrays, sorts them, and then merges them.

  • Searching Algorithms:

    • Linear Search: Searches for an element by checking each element in the list sequentially.

    • Binary Search: Searches for an element by repeatedly dividing the search interval in half. Requires a sorted list.

  • Algorithm Complexity: Describes the performance of an algorithm in terms of time and space. Big O notation is used to classify algorithms (e.g., O(n), O(log n), O(n^2)).

Software Design Principles

Modularity: Breaking down a program into separate modules that can be developed, tested, and maintained independently. Each module should have a single responsibility.

Coupling and Cohesion:

  • Low Coupling: Modules should have minimal dependencies on each other, making them easier to maintain and modify.

  • High Cohesion: Each module should perform a single task or a group of related tasks, improving clarity and reusability.

Design Patterns:

  • Creational Patterns: Deal with object creation mechanisms. Examples include Singleton (ensures a class has only one instance) and Factory Method (creates objects without specifying the exact class).

  • Structural Patterns: Deal with object composition and structure. Examples include Adapter (allows incompatible interfaces to work together) and Composite (treats individual objects and compositions uniformly).

  • Behavioral Patterns: Deal with object interaction and responsibility. Examples include Observer (defines a dependency between objects so that when one changes state, all dependents are notified) and Strategy (defines a family of algorithms and makes them interchangeable).

Development Tools and Environments

Integrated Development Environments (IDEs): Software applications that provide comprehensive facilities to programmers for software development. Features typically include a source code editor, build automation tools, and a debugger. Examples include Visual Studio, Eclipse, and IntelliJ IDEA.

Version Control Systems: Tools for managing changes to source code over time, allowing multiple developers to work on the same project simultaneously. Common version control systems are Git and SVN. Key concepts include repositories, branches, commits, merges, and pull requests.

Software Testing

Types of Testing:

  • Unit Testing: Testing individual components or modules of the software to ensure they work as expected. Tools like JUnit (for Java) and pytest (for Python) are commonly used.

  • Integration Testing: Testing combined parts of an application to determine if they function together correctly. Ensures that different modules or services interact properly.

  • System Testing: Testing the complete system as a whole to ensure it meets the specified requirements. This includes end-to-end testing of the application.

  • Acceptance Testing: Testing conducted to determine whether the system meets the business requirements. Typically involves user testing to validate the system's functionality.

Testing Techniques:

  • Black Box Testing: Testing without looking at the internal code structure. Focuses on input-output verification.

  • White Box Testing: Testing with knowledge of the internal code structure. Focuses on testing internal paths, conditions, and branches.

  • Automated Testing: Using software tools to run tests automatically, which helps in continuous integration and delivery. Tools include Selenium (for web applications), JUnit, and pytest.

Database Management

Database Models:

  • Relational Databases (SQL): Use tables to store data, with relationships between tables defined by foreign keys. Examples include MySQL, PostgreSQL, and SQLite.

  • NoSQL Databases: Designed for unstructured data and provide flexible schemas. Types include document stores (e.g., MongoDB), key-value stores (e.g., Redis), and wide-column stores (e.g., Cassandra).

SQL Basics:

  • SELECT: Retrieves data from one or more tables. Example: SELECT * FROM users;.

  • INSERT: Adds new data to a table. Example: INSERT INTO users (name, age) VALUES ('Alice', 30);.

  • UPDATE: Modifies existing data in a table. Example: UPDATE users SET age = 31 WHERE name = 'Alice';.

  • DELETE: Removes data from a table. Example: DELETE FROM users WHERE name = 'Alice';.

  • JOIN: Combines rows from two or more tables based on a related column. Example: SELECT users.name, orders.amount FROM users JOIN orders ON users.id = orders.user_id;.

  • WHERE: Filters records based on a specified condition. Example: SELECT * FROM users WHERE age > 25;.

  • GROUP BY: Groups rows that have the same values in specified columns into summary rows. Example: SELECT COUNT(*), country FROM users GROUP BY country;.

  • HAVING: Filters groups based on a specified condition. Example: SELECT country, COUNT(*) FROM users GROUP BY country HAVING COUNT(*) > 5;.

Web Development Basics

Frontend Development:

  • HTML: The standard markup language for creating web pages. Defines the structure of web content.

  • CSS: A stylesheet language used to describe the presentation of a document written in HTML. Controls layout, colors, fonts, and more.

  • JavaScript: A programming language that enables interactive web pages. Used for client-side scripting.

  • Frameworks: Libraries and tools that simplify web development. Examples include React, Angular, and Vue.js.

Backend Development:

  • Server-side Languages: Languages used to create the backend of web applications. Examples include Python (Django, Flask), Java (Spring), Node.js (Express), and PHP.

  • Frameworks: Tools that provide a structure for building and maintaining web applications. Examples include Django (Python), Spring (Java), and Express (Node.js).

APIs:

  • RESTful APIs: Representational State Transfer APIs that use HTTP requests to perform CRUD (Create, Read, Update, Delete) operations. They follow standard HTTP methods like GET, POST, PUT, DELETE.

  • GraphQL: A query language for APIs that allows clients to request only the data they need. Provides a more flexible and efficient alternative to REST.

Security in Software Development

Common Security Threats:

  • SQL Injection: A code injection technique that exploits a security vulnerability in an application's software. Attackers can execute arbitrary SQL code.

  • Cross-Site Scripting (XSS): An attack where malicious scripts are injected into trusted websites. Can lead to session hijacking, data theft, and other security issues.

  • Cross-Site Request Forgery (CSRF): An attack that tricks the user into performing actions on a web application in which they are authenticated.

Best Practices:

  • Input Validation: Ensuring that all user input is validated and sanitized to prevent malicious data from being processed.

  • Authentication: Verifying the identity of users before allowing them access to the system. Methods include passwords, multi-factor authentication, and biometrics.

  • Authorization: Ensuring that users have permission to perform certain actions. Implementing role-based access control (RBAC) can help manage user permissions.

  • Encryption: Protecting data by converting it into a coded format that is unreadable without a decryption key. Use SSL/TLS for secure communication and encrypt sensitive data stored in databases.

Professional and Ethical Issues

Code of Ethics: Understanding the ethical considerations in software development, such as respecting user privacy, producing high-quality software, and avoiding harm.

Intellectual Property:

  • Copyright: Legal protection for original works of authorship, including software code.

  • Patents: Legal protection for new inventions or discoveries, including unique software algorithms.

  • Licenses: Legal agreements that specify how software can be used, modified, and distributed. Examples include open-source licenses (MIT, GPL) and proprietary licenses.

DA

Software Development (WJEC)

Introduction to Software Development

Software development is the process of conceiving, specifying, designing, programming, documenting, testing, and bug fixing involved in creating and maintaining applications, frameworks, or other software components.

Stages of Software Development Lifecycle (SDLC):

  • Planning: This initial phase involves defining the project scope, objectives, and deliverables. Key activities include feasibility studies, project planning, and resource allocation.

  • Analysis: In this phase, the requirements for the system are gathered and analyzed. Techniques such as interviews, surveys, and document analysis are used to understand what the users need.

  • Design: Based on the requirements gathered, the system's architecture and design are created. This includes designing the system architecture, user interfaces, databases, and defining data flow.

  • Implementation: This phase involves writing the actual code based on the design documents. Developers use programming languages and tools to create the software.

  • Testing: The software is tested to identify and fix bugs. This includes unit testing, integration testing, system testing, and acceptance testing.

  • Deployment: Once the software passes all testing phases, it is deployed to a live environment where it becomes operational.

  • Maintenance: After deployment, the software may need updates and fixes. Maintenance involves correcting issues, improving functionality, and ensuring the system remains operational over time.

Software Development Methodologies

Waterfall Model: A linear sequential approach where each phase must be completed before the next begins. It is structured and easy to manage but lacks flexibility for changes during development.

Agile Methodology: An iterative approach that emphasizes flexibility, customer feedback, and small, rapid releases. Agile focuses on continuous improvement and collaboration.

Scrum: An Agile framework that uses fixed-length iterations called sprints, typically lasting 2-4 weeks. It includes roles such as Product Owner, Scrum Master, and Development Team, and ceremonies like Sprint Planning, Daily Standups, and Sprint Retrospectives.

Extreme Programming (XP): Focuses on customer satisfaction through continuous delivery of functional software. It emphasizes technical excellence and includes practices like pair programming, test-driven development (TDD), and frequent releases.

Programming Concepts

Variables and Data Types:

  • Variables: Named storage locations in memory that hold data. Examples include int age = 25; or string name = "Alice";.

  • Data Types: Define the type of data a variable can hold. Common data types are integers, floating-point numbers, characters, strings, and booleans.

Control Structures:

  • Conditional Statements: Used to perform different actions based on different conditions. For example, if-else statements.

  • Loops: Used to execute a block of code repeatedly. Common loops are for, while, and do-while.

Functions and Procedures:

  • Functions: Blocks of code that perform a specific task and return a value. For example, int add(int a, int b) { return a + b; }.

  • Procedures: Similar to functions but do not return a value. They perform actions.

Object-Oriented Programming (OOP):

  • Classes and Objects: A class is a blueprint for objects, and an object is an instance of a class. For example, class Car { } and Car myCar = new Car();.

  • Inheritance: Allows a class to inherit properties and methods from another class. For example, class ElectricCar extends Car { }.

  • Polymorphism: Allows methods to do different things based on the object it is acting upon. For example, method overloading and overriding.

  • Encapsulation: Bundling data and methods that operate on the data within one unit (class), and restricting access to some of the object's components.

  • Abstraction: Hiding the complex implementation details and showing only the necessary features.

Data Structures and Algorithms

Basic Data Structures:

  • Arrays: Fixed-size data structures that hold elements of the same type. For example, int[] numbers = {1, 2, 3, 4};.

  • Lists: Dynamic data structures that can grow and shrink in size. For example, ArrayList<Integer> list = new ArrayList<>();.

  • Stacks: Follow the Last In First Out (LIFO) principle. Operations include push, pop, and peek.

  • Queues: Follow the First In First Out (FIFO) principle. Operations include enqueue and dequeue.

Complex Data Structures:

  • Trees: Hierarchical data structures with nodes connected by edges. The top node is the root, and nodes without children are leaves.

  • Graphs: Consist of vertices (nodes) and edges (connections). Can be directed or undirected.

  • Hash Tables: Store key-value pairs and allow fast retrieval based on the key.

Common Algorithms:

  • Sorting Algorithms:

    • Bubble Sort: Simple sorting algorithm that repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order.

    • Quick Sort: A divide-and-conquer algorithm that picks a pivot element and partitions the array into sub-arrays.

    • Merge Sort: A divide-and-conquer algorithm that divides the array into sub-arrays, sorts them, and then merges them.

  • Searching Algorithms:

    • Linear Search: Searches for an element by checking each element in the list sequentially.

    • Binary Search: Searches for an element by repeatedly dividing the search interval in half. Requires a sorted list.

  • Algorithm Complexity: Describes the performance of an algorithm in terms of time and space. Big O notation is used to classify algorithms (e.g., O(n), O(log n), O(n^2)).

Software Design Principles

Modularity: Breaking down a program into separate modules that can be developed, tested, and maintained independently. Each module should have a single responsibility.

Coupling and Cohesion:

  • Low Coupling: Modules should have minimal dependencies on each other, making them easier to maintain and modify.

  • High Cohesion: Each module should perform a single task or a group of related tasks, improving clarity and reusability.

Design Patterns:

  • Creational Patterns: Deal with object creation mechanisms. Examples include Singleton (ensures a class has only one instance) and Factory Method (creates objects without specifying the exact class).

  • Structural Patterns: Deal with object composition and structure. Examples include Adapter (allows incompatible interfaces to work together) and Composite (treats individual objects and compositions uniformly).

  • Behavioral Patterns: Deal with object interaction and responsibility. Examples include Observer (defines a dependency between objects so that when one changes state, all dependents are notified) and Strategy (defines a family of algorithms and makes them interchangeable).

Development Tools and Environments

Integrated Development Environments (IDEs): Software applications that provide comprehensive facilities to programmers for software development. Features typically include a source code editor, build automation tools, and a debugger. Examples include Visual Studio, Eclipse, and IntelliJ IDEA.

Version Control Systems: Tools for managing changes to source code over time, allowing multiple developers to work on the same project simultaneously. Common version control systems are Git and SVN. Key concepts include repositories, branches, commits, merges, and pull requests.

Software Testing

Types of Testing:

  • Unit Testing: Testing individual components or modules of the software to ensure they work as expected. Tools like JUnit (for Java) and pytest (for Python) are commonly used.

  • Integration Testing: Testing combined parts of an application to determine if they function together correctly. Ensures that different modules or services interact properly.

  • System Testing: Testing the complete system as a whole to ensure it meets the specified requirements. This includes end-to-end testing of the application.

  • Acceptance Testing: Testing conducted to determine whether the system meets the business requirements. Typically involves user testing to validate the system's functionality.

Testing Techniques:

  • Black Box Testing: Testing without looking at the internal code structure. Focuses on input-output verification.

  • White Box Testing: Testing with knowledge of the internal code structure. Focuses on testing internal paths, conditions, and branches.

  • Automated Testing: Using software tools to run tests automatically, which helps in continuous integration and delivery. Tools include Selenium (for web applications), JUnit, and pytest.

Database Management

Database Models:

  • Relational Databases (SQL): Use tables to store data, with relationships between tables defined by foreign keys. Examples include MySQL, PostgreSQL, and SQLite.

  • NoSQL Databases: Designed for unstructured data and provide flexible schemas. Types include document stores (e.g., MongoDB), key-value stores (e.g., Redis), and wide-column stores (e.g., Cassandra).

SQL Basics:

  • SELECT: Retrieves data from one or more tables. Example: SELECT * FROM users;.

  • INSERT: Adds new data to a table. Example: INSERT INTO users (name, age) VALUES ('Alice', 30);.

  • UPDATE: Modifies existing data in a table. Example: UPDATE users SET age = 31 WHERE name = 'Alice';.

  • DELETE: Removes data from a table. Example: DELETE FROM users WHERE name = 'Alice';.

  • JOIN: Combines rows from two or more tables based on a related column. Example: SELECT users.name, orders.amount FROM users JOIN orders ON users.id = orders.user_id;.

  • WHERE: Filters records based on a specified condition. Example: SELECT * FROM users WHERE age > 25;.

  • GROUP BY: Groups rows that have the same values in specified columns into summary rows. Example: SELECT COUNT(*), country FROM users GROUP BY country;.

  • HAVING: Filters groups based on a specified condition. Example: SELECT country, COUNT(*) FROM users GROUP BY country HAVING COUNT(*) > 5;.

Web Development Basics

Frontend Development:

  • HTML: The standard markup language for creating web pages. Defines the structure of web content.

  • CSS: A stylesheet language used to describe the presentation of a document written in HTML. Controls layout, colors, fonts, and more.

  • JavaScript: A programming language that enables interactive web pages. Used for client-side scripting.

  • Frameworks: Libraries and tools that simplify web development. Examples include React, Angular, and Vue.js.

Backend Development:

  • Server-side Languages: Languages used to create the backend of web applications. Examples include Python (Django, Flask), Java (Spring), Node.js (Express), and PHP.

  • Frameworks: Tools that provide a structure for building and maintaining web applications. Examples include Django (Python), Spring (Java), and Express (Node.js).

APIs:

  • RESTful APIs: Representational State Transfer APIs that use HTTP requests to perform CRUD (Create, Read, Update, Delete) operations. They follow standard HTTP methods like GET, POST, PUT, DELETE.

  • GraphQL: A query language for APIs that allows clients to request only the data they need. Provides a more flexible and efficient alternative to REST.

Security in Software Development

Common Security Threats:

  • SQL Injection: A code injection technique that exploits a security vulnerability in an application's software. Attackers can execute arbitrary SQL code.

  • Cross-Site Scripting (XSS): An attack where malicious scripts are injected into trusted websites. Can lead to session hijacking, data theft, and other security issues.

  • Cross-Site Request Forgery (CSRF): An attack that tricks the user into performing actions on a web application in which they are authenticated.

Best Practices:

  • Input Validation: Ensuring that all user input is validated and sanitized to prevent malicious data from being processed.

  • Authentication: Verifying the identity of users before allowing them access to the system. Methods include passwords, multi-factor authentication, and biometrics.

  • Authorization: Ensuring that users have permission to perform certain actions. Implementing role-based access control (RBAC) can help manage user permissions.

  • Encryption: Protecting data by converting it into a coded format that is unreadable without a decryption key. Use SSL/TLS for secure communication and encrypt sensitive data stored in databases.

Professional and Ethical Issues

Code of Ethics: Understanding the ethical considerations in software development, such as respecting user privacy, producing high-quality software, and avoiding harm.

Intellectual Property:

  • Copyright: Legal protection for original works of authorship, including software code.

  • Patents: Legal protection for new inventions or discoveries, including unique software algorithms.

  • Licenses: Legal agreements that specify how software can be used, modified, and distributed. Examples include open-source licenses (MIT, GPL) and proprietary licenses.