Project Planning and Development
                CMU422: Fundamentals of Web Design - Session 10
                Birmingham Newman University
                Lecturer: James Williams
                Building complete web applications
                3-hour session • 25 slides • 2 interactive tasks
                
                    Session Timeline:
                    
                        - 10 min: Registration & waiting
 
                        - 20 min: Opening slides
 
                        - 45 min: Task 1
 
                        - 15 min: Break/Catch up
 
                        - 20 min: Secondary slides
 
                        - 45 min: Task 2
 
                        - Remaining: Self-study
 
                    
                 
            
            
            
                Learning Objectives
                
                    - Understand project planning methodologies
 
                    - Learn requirements gathering techniques
 
                    - Master project structure and organization
 
                    - Implement version control best practices
 
                    - Build complete web applications
 
                
            
            
            
                Project Planning Fundamentals
                
                    Project Planning is the process of defining project scope, objectives, and deliverables
                
                
                    - Define project goals and objectives
 
                    - Identify stakeholders and requirements
 
                    - Create project timeline and milestones
 
                    - Allocate resources and budget
 
                    - Plan risk management strategies
 
                
                
                    // Project structure example
                    project-name/
                      ├── src/
                      │   ├── html/
                      │   ├── css/
                      │   ├── js/
                      │   └── assets/
                      ├── docs/
                      ├── tests/
                      └── README.md
                
            
            
            
                Requirements Gathering
                
                    // Functional Requirements
                    - User can register and login
                    - User can create and edit posts
                    - User can upload images
                    - User can comment on posts
                    - User can search for content
                    // Non-Functional Requirements
                    - Page load time < 3 seconds
                    - Mobile responsive design
                    - Cross-browser compatibility
                    - Accessibility compliance
                    - Security requirements
                
                
                    - Functional requirements (what the system does)
 
                    - Non-functional requirements (how the system performs)
 
                    - User stories and use cases
 
                    - Acceptance criteria
 
                
            
            
            
                User Stories
                
                    // User Story Format
                    As a [type of user]
                    I want [goal/feature]
                    So that [benefit/value]
                    // Examples
                    As a registered user
                    I want to create a new post
                    So that I can share my thoughts with others
                    As a visitor
                    I want to search for content
                    So that I can find relevant information quickly
                    As an admin
                    I want to moderate comments
                    So that I can maintain community standards
                
                
                    - Focus on user perspective
 
                    - Include acceptance criteria
 
                    - Prioritize by business value
 
                    - Estimate effort and complexity
 
                
            
            
            
                Project Structure
                
                    // Recommended project structure
                    my-web-app/
                      ├── index.html
                      ├── pages/
                      │   ├── about.html
                      │   ├── contact.html
                      │   └── dashboard.html
                      ├── css/
                      │   ├── main.css
                      │   ├── components.css
                      │   └── responsive.css
                      ├── js/
                      │   ├── app.js
                      │   ├── utils.js
                      │   └── api.js
                      ├── assets/
                      │   ├── images/
                      │   ├── icons/
                      │   └── fonts/
                      ├── docs/
                      ├── tests/
                      └── README.md
                
                
                    - Organize by file type and purpose
 
                    - Separate concerns (HTML, CSS, JS)
 
                    - Include documentation and tests
 
                    - Follow naming conventions
 
                
            
            
            
                Version Control with Git
                
                    // Initialize Git repository
                    git init
                    git add .
                    git commit -m "Initial commit"
                    // Create and switch branches
                    git checkout -b feature/user-authentication
                    git checkout -b bugfix/login-error
                    // Commit changes
                    git add .
                    git commit -m "Add user authentication feature"
                    // Merge branches
                    git checkout main
                    git merge feature/user-authentication
                    // Push to remote
                    git remote add origin https://github.com/user/repo.git
                    git push -u origin main
                
                
                    - Track changes and history
 
                    - Collaborate with team members
 
                    - Branch for features and fixes
 
                    - Rollback to previous versions
 
                
            
            
            
                Git Workflow
                
                    // Feature Branch Workflow
                    1. Create feature branch from main
                    git checkout -b feature/new-feature
                    2. Make changes and commit
                    git add .
                    git commit -m "Add new feature"
                    3. Push to remote
                    git push origin feature/new-feature
                    4. Create Pull Request
                    5. Code review and merge
                    6. Delete feature branch
                    // Commit Message Convention
                    feat: add user authentication
                    fix: resolve login error
                    docs: update README
                    style: format code
                
                
                    - Feature branch workflow
 
                    - Pull request process
 
                    - Code review practices
 
                    - Commit message conventions
 
                
            
            
            
                Project Documentation
                
                    // README.md structure
                    # Project Name
                    ## Description
                    Brief description of the project
                    ## Features
                    - Feature 1
                    - Feature 2
                    ## Installation
                    ```bash
                    git clone https://github.com/user/project.git
                    cd project
                    open index.html
                    ```
                    ## Usage
                    Instructions on how to use the application
                    ## Technologies Used
                    - HTML5
                    - CSS3
                    - JavaScript
                    ## Contributing
                    Guidelines for contributing to the project
                
                
                    - README file for project overview
 
                    - Installation and setup instructions
 
                    - API documentation
 
                    - Code comments and inline docs
 
                
            
            
            
                Wireframing and Mockups
                
                    Wireframes are low-fidelity sketches of the user interface
                
                
                    - Paper sketches for quick ideas
 
                    - Digital tools (Figma, Sketch, Adobe XD)
 
                    - Focus on layout and structure
 
                    - Include user flow diagrams
 
                    - Create responsive design mockups
 
                
                
                    // HTML wireframe example
                    <div class="header">
                      <nav>Navigation</nav>
                    </div>
                    <div class="main">
                      <section class="hero">Hero Section</section>
                      <section class="content">Main Content</section>
                    </div>
                    <div class="footer">Footer</div>
                
            
            
            
                Responsive Design Planning
                
                    // Mobile-first approach
                    /* Base styles (mobile) */
                    .container {
                      width: 100%;
                      padding: 10px;
                    }
                    /* Tablet styles */
                    @media (min-width: 768px) {
                      .container {
                        max-width: 750px;
                        margin: 0 auto;
                      }
                    }
                    /* Desktop styles */
                    @media (min-width: 1024px) {
                      .container {
                        max-width: 1200px;
                      }
                    }
                
                
                    - Mobile-first design approach
 
                    - Breakpoint planning
 
                    - Flexible grid systems
 
                    - Touch-friendly interfaces
 
                
            
            
            
                Development Workflow
                
                    // Development phases
                    1. Planning & Design
                      - Requirements gathering
                      - Wireframing
                      - Project setup
                    2. Development
                      - HTML structure
                      - CSS styling
                      - JavaScript functionality
                    3. Testing
                      - Unit testing
                      - Integration testing
                      - User testing
                    4. Deployment
                      - Code review
                      - Production deployment
                      - Monitoring
                
                
                    - Iterative development process
 
                    - Continuous integration
 
                    - Testing at each phase
 
                    - Regular code reviews
 
                
            
            
            
                Testing Strategies
                
                    // Unit testing example
                    describe('Calculator', () => {
                      test('adds two numbers correctly', () => {
                        expect(add(2, 3)).toBe(5);
                      });
                      test('handles negative numbers', () => {
                        expect(add(-1, 1)).toBe(0);
                      });
                    });
                    // Integration testing
                    test('user registration flow', async () => {
                      const user = await registerUser({
                        email: 'test@example.com',
                        password: 'password123'
                      });
                      expect(user.email).toBe('test@example.com');
                    });
                
                
                    - Unit testing for individual functions
 
                    - Integration testing for features
 
                    - End-to-end testing for user flows
 
                    - Manual testing and user feedback
 
                
            
            
            
                Performance Optimization
                
                    - Image optimization and compression
 
                    - CSS and JavaScript minification
 
                    - Lazy loading for images
 
                    - Code splitting and bundling
 
                    - Caching strategies
 
                
                
                    // Image optimization
                    <img src="image.jpg" loading="lazy" alt="Description">
                    // CSS optimization
                    /* Minified CSS */
                    .header{background:#fff;padding:20px}
                    // JavaScript optimization
                    // Use async/defer for scripts
                    <script src="app.js" defer></script>
                    // Caching headers
                    Cache-Control: max-age=31536000
                
            
            
            
                Accessibility Planning
                
                    // Semantic HTML
                    <header>Site header</header>
                    <nav>Navigation</nav>
                    <main>Main content</main>
                    <footer>Site footer</footer>
                    // ARIA attributes
                    <button aria-label="Close dialog">×</button>
                    <div role="alert" aria-live="polite">Message</div>
                    // Keyboard navigation
                    element.addEventListener('keydown', (event) => {
                      if (event.key === 'Enter' || event.key === ' ') {
                        event.preventDefault();
                        handleClick();
                      }
                    });
                
                
                    - Semantic HTML structure
 
                    - ARIA attributes for screen readers
 
                    - Keyboard navigation support
 
                    - Color contrast compliance
 
                    - Alt text for images
 
                
            
            
            
                Security Considerations
                
                    - Input validation and sanitization
 
                    - Cross-site scripting (XSS) prevention
 
                    - Cross-site request forgery (CSRF) protection
 
                    - Content Security Policy (CSP)
 
                    - HTTPS implementation
 
                
                
                    // Input validation
                    function validateInput(input) {
                      if (typeof input !== 'string') {
                        throw new Error('Invalid input type');
                      }
                      return input.replace(/[<>]/g, '');
                    }
                    // Content Security Policy
                    <meta http-equiv="Content-Security-Policy"
                      content="default-src 'self'; script-src 'self' 'unsafe-inline'">
                    // HTTPS redirect
                    if (location.protocol !== 'https:') {
                      location.replace('https:' + location.href.substring(location.protocol.length));
                    }
                
            
            
            
                Deployment Planning
                
                    // Deployment options
                    - GitHub Pages (free, static sites)
                    - Netlify (free tier, continuous deployment)
                    - Vercel (free tier, serverless)
                    - AWS S3 + CloudFront
                    - Traditional web hosting
                    // Environment variables
                    const apiUrl = process.env.API_URL || 'http://localhost:3000';
                    const apiKey = process.env.API_KEY;
                    // Build process
                    npm run build
                    npm run test
                    npm run deploy
                
                
                    - Choose appropriate hosting platform
 
                    - Set up continuous deployment
 
                    - Configure environment variables
 
                    - Monitor application performance
 
                
            
            
            
                Task 1: Project Planning Exercise
                
                    Instructions:
                    
                        - Create a comprehensive project plan for a web application
 
                        - Choose one of these project ideas:
 
                        
                            - E-commerce Website: Online store with product catalog, shopping cart, and checkout
 
                            - Blog Platform: Content management system with user authentication and commenting
 
                            - Task Management App: Project management tool with team collaboration features
 
                            - Portfolio Website: Personal portfolio with projects showcase and contact form
 
                        
                        - Complete the following planning documents:
 
                        
                            - Project overview and objectives
 
                            - User stories and requirements
 
                            - Wireframes and mockups (paper or digital)
 
                            - Project structure and file organization
 
                            - Technology stack and dependencies
 
                            - Development timeline and milestones
 
                        
                        - Set up version control with Git
 
                        - Create initial project structure
 
                        - Write comprehensive README.md
 
                    
                    Time: 45 minutes
                    This task will help you understand project planning and organization
                 
            
            
            
                Break Time
                
                    15 Minutes
                    Take a break, ask questions, or catch up on the previous task.
                    Next: Secondary slides and Task 2
                 
            
            
            
                Agile Development
                
                    - Sprint planning and backlog management
 
                    - Daily standups and progress tracking
 
                    - Sprint reviews and retrospectives
 
                    - Continuous improvement
 
                
                
                    // Sprint planning example
                    Sprint 1 (Week 1-2):
                    - User authentication system
                    - Basic navigation structure
                    - Homepage layout
                    Sprint 2 (Week 3-4):
                    - Product catalog
                    - Shopping cart functionality
                    - User profile management
                    Sprint 3 (Week 5-6):
                    - Checkout process
                    - Payment integration
                    - Order management
                
            
            
            
                Code Quality and Standards
                
                    - Coding standards and style guides
 
                    - Code review processes
 
                    - Linting and formatting tools
 
                    - Documentation requirements
 
                
                
                    // ESLint configuration
                    {
                      "extends": ["eslint:recommended"],
                      "rules": {
                        "indent": ["error", 2],
                        "quotes": ["error", "single"],
                        "semi": ["error", "always"]
                      }
                    }
                    // Prettier configuration
                    {
                      "tabWidth": 2,
                      "singleQuote": true,
                      "trailingComma": "es5"
                    }
                
            
            
            
                Team Collaboration
                
                    - Communication tools and platforms
 
                    - Code sharing and pair programming
 
                    - Conflict resolution strategies
 
                    - Knowledge sharing practices
 
                
                
                    // Branch naming conventions
                    feature/user-authentication
                    bugfix/login-error
                    hotfix/security-patch
                    release/v1.0.0
                    // Commit message format
                    feat: add user authentication
                    fix: resolve login error
                    docs: update README
                    style: format code
                    // Pull request template
                    ## Description
                    Brief description of changes
                    ## Testing
                    Steps to test the changes
                    ## Checklist
                    - [ ] Code follows style guidelines
                    - [ ] Tests pass
                    - [ ] Documentation updated
                
            
            
            
                Project Monitoring
                
                    - Progress tracking and metrics
 
                    - Issue tracking and bug reports
 
                    - Performance monitoring
 
                    - User feedback collection
 
                
                
                    // Issue tracking template
                    ## Bug Report
                    **Description:** Brief description of the bug
                    **Steps to reproduce:**
                    1. Step 1
                    2. Step 2
                    3. Step 3
                    **Expected behavior:** What should happen
                    **Actual behavior:** What actually happens
                    **Environment:** Browser, OS, etc.
                    // Performance monitoring
                    // Google Analytics
                    gtag('config', 'GA_MEASUREMENT_ID');
                    // Custom performance tracking
                    performance.mark('app-start');
                    performance.measure('app-load', 'app-start');
                
            
            
            
                Task 2: Complete Web Application
                
                    Instructions:
                    
                        - Build a complete web application based on your project plan from Task 1
 
                        - Implement all planned features and functionality
 
                        - Follow best practices:
 
                        
                            - Code Organization: Modular structure with separate concerns
 
                            - Version Control: Regular commits with meaningful messages
 
                            - Testing: Unit tests for core functionality
 
                            - Documentation: Comprehensive README and code comments
 
                            - Responsive Design: Mobile-first approach
 
                            - Accessibility: WCAG compliance
 
                        
                        - Include advanced features:
 
                        
                            - User authentication and authorization
 
                            - Data persistence (localStorage or mock API)
 
                            - Form validation and error handling
 
                            - Search and filtering functionality
 
                            - Responsive navigation and layout
 
                            - Performance optimization
 
                        
                        - Deploy the application to a hosting platform
 
                        - Create a presentation showcasing your work
 
                        - Prepare for code review and feedback
 
                    
                    Time: 45 minutes
                    This task will help you understand complete web application development
                 
            
            
            
                Session Summary
                
                    - Project planning is essential for successful development
 
                    - Version control enables collaboration and history tracking
 
                    - Testing ensures quality and reliability
 
                    - Documentation helps maintain and scale projects
 
                    - Performance and accessibility are crucial for user experience
 
                    - Continuous improvement leads to better outcomes
 
                
                
                    Next Session:
                    Advanced Topics and Future Trends - Exploring modern web development