Skip to content

Commit

Permalink
add code/swe process
Browse files Browse the repository at this point in the history
  • Loading branch information
Solomon Berhe committed Feb 5, 2025
1 parent 53fe875 commit 2fbaecd
Showing 1 changed file with 346 additions and 4 deletions.
350 changes: 346 additions & 4 deletions i40/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ <h4>Welcome<br> Software Engineering in Industry 4.0 Ecosystems</h4>

</tr>
<tr style="color: #ccc;">
<td style="padding: 6px; border: 1px solid #666;">4 (Feb <a href="./#/feb-3">3</a>, 5,
<td style="padding: 6px; border: 1px solid #666;">4 (Feb <a href="./#/feb-3">3</a>, <a
href="./#/feb-5">5</a>,
7)</td>
<td style="padding: 6px; border: 1px solid #666;"><a href="./#/module-4">Development
Processes in Industry 4.0</a></td>
Expand Down Expand Up @@ -2477,14 +2478,302 @@ <h4>Scrum vs V-Model for IoT Plant Watering System</h4>
<section>
<p><span style="font-size: 50px;">💡</span>Scrum is ideal for managing iterative and <span
class="highlight">independent tasks</span> in our IoT Plant Watering System project, such as
feature development, sensor integration, and system design.</p>
feature development, sensor integration, and system design</p>
</section>

<section>
<p><span style="font-size: 50px;">💡</span>The V-Model is more rigid, following a sequential flow
where <span class="highlight">system critical requirements</span> are verified and validated
before proceeding, ensuring that the system meets all specifications and requirements before
deployment.</p>
deployment</p>
</section>

<section id="feb-5">
<h4>February 5, 2025</h4>
<ul>
<li>Practice Questions</li>
<li>Feature Branch Workflow</li>
<li>Gitflow Workflow</li>
<li>Forking Workflow</li>
</ul>
</section>

<section>
<h3>How do we align SWE and Code Process?</h3>
</section>

<section>
<h3>Comparing Git Workflows</h3>
<ul>
<li>GitFlow</li>
<li>Forking Workflow</li>
<li>Feature Branch Workflow</li>
</ul>
</section>

<section>
<h3>GitFlow</h3>
</section>

<section>
<h3>GitFlow</h3>
<img style="height: 400px;"
src="https://wac-cdn.atlassian.com/dam/jcr:a13c18d6-94f3-4fc4-84fb-2b8f1b2fd339/01%20How%20it%20works.svg?cdnVersion=2542"
alt="Feature Branch Workflow" style="max-width: 80%; height: auto;">
</section>

<section>
<h3>GitFlow Workflow with Submodules</h3>
<pre><code>git submodule add <repo-url> backend</code></pre>
<pre><code>cd backend</code></pre>
<pre><code>git checkout develop</code></pre>
<pre><code>git add </code></pre>
<pre><code>git commit -m "[ticket number] Implemented feature API v2"</code></pre>
<pre><code>git push origin develop</code></pre>
</section>

<section>
<h3>Merge Develop into Main for Release</h3>
<pre><code>git checkout main</code></pre>
<pre><code>git pull origin main</code></pre>
<pre><code>git merge develop</code></pre>
<pre><code>git push origin main</code></pre>
</section>

<section>
<h3>Release Workflow with Version Tag</h3>
<pre><code>git tag -a v1.0.0 -m "Release version 1.0.0"</code></pre>
<pre><code>git push origin v1.0.0</code></pre>
</section>

<section>
<h3>Mapping Git Workflow to Agile Workflow</h3>
<ul>
<li><strong>Develop Branch</strong> → User Stories + Tasks</li>
<li><strong>Main Branch</strong> → Epic or MVP (Set of User Stories)</li>
</ul>
</section>

<section>
<h3>GitFlow Workflow Benefits</h3>
<ul>
<li>Clear separation of stable production code (`main`) and development work (`develop`)</li>
<li>Supports <strong>continuous integration</strong> and proper versioning</li>
<li>Helps manage releases and hotfixes efficiently</li>
</ul>
</section>

<section>
<h3>GitFlow</h3>
<ul>
<li>Feature branches for isolated development</li>
<li>Hotfix branches for urgent fixes</li>
<li>Best for structured release cycles</li>
</ul>
</section>

<section>
<h3>Forking Workflow</h3>
</section>

<section data-background="white">
<h3>Forking Workflow</h3>
<img style="height: 400px;" src="https://docs.rhodecode.com/4.x/rce/_images/fork-flow.png"
alt="Forking Workflow" style="max-width: 80%; height: auto;">
</section>

<section>
<h3>Fork vs Branch</h3>
<ul>
<li><strong>Fork</strong>:
<ul>
<li>Creates a **copy** of the repository under your own GitHub account</li>
<li>Allows **full independence** from the original repository</li>
<li>Typically used for **open-source contributions**</li>
<li>Requires a **pull request (PR)** to merge changes into the original repository</li>
</ul>
</li>
<li><strong>Branch</strong>:
<ul>
<li>Creates a **sub-branch** within the same repository</li>
<li>Shares the **same repository history** and settings as the original branch</li>
<li>Used for **working on features, bug fixes, etc.** in the same codebase</li>
<li>Can be merged back directly into the main branch without a PR (if within the same
repository)</li>
</ul>
</li>
</ul>
</section>

<section>
<h3>Forking Workflow</h3>
<ul>
<li>Pull requests for controlled integration</li>
<li>Great for open-source and external collaboration</li>
<li>Main repo remains clean and stable</li>
</ul>
</section>

<section>
<h3>Forking Workflow with Submodules</h3>
<pre><code>git submodule add <repo-url> backend</code></pre>
<pre><code>cd backend</code></pre>
<pre><code>git clone <forked-repo-url></code></pre>
<pre><code>cd <forked-repo></code></pre>
<pre><code>git checkout develop</code></pre>
<pre><code>git add </code></pre>
<pre><code>git commit -m "[ticket number] Implemented feature API v2"</code></pre>
<pre><code>git push origin develop</code></pre>
</section>

<section>
<h3>Pull Request (PR) to the Main Repository</h3>
<pre><code>git checkout develop</code></pre>
<pre><code>git pull origin develop</code></pre>
<pre><code>git merge upstream/develop</code></pre>
<pre><code>git push origin develop</code></pre>
</section>

<section>
<h3>Merge Pull Request and Tag Release Version</h3>
<pre><code>git checkout main</code></pre>
<pre><code>git pull origin main</code></pre>
<pre><code>git merge develop</code></pre>
<pre><code>git push origin main</code></pre>
<pre><code>git tag -a v1.0.0 -m "Release version 1.0.0"</code></pre>
<pre><code>git push origin v1.0.0</code></pre>
</section>

<section>
<h3>Mapping Forking Workflow to Agile Workflow</h3>
<ul>
<li><strong>Forked Repository's Develop Branch</strong> → User Stories + Tasks</li>
<li><strong>Main Repository's Develop Branch</strong> → Integration of multiple User Stories
</li>
<li><strong>Main Branch</strong> → Epic or MVP (Set of User Stories)</li>
</ul>
</section>

<section>
<h3>Forking Workflow Benefits</h3>
<ul>
<li>Facilitates <strong>collaboration</strong> across multiple contributors</li>
<li>Ensures contributors don’t have direct access to the main repository</li>
<li>Clear separation between contributors' work and the main codebase</li>
</ul>
</section>

<section>
<h3>Feature Branch Workflow</h3>
</section>

<section>
<h3>Feature Branch Workflow</h3>
<img style="height: 400px;"
src="https://wac-cdn.atlassian.com/dam/jcr:34c86360-8dea-4be4-92f7-6597d4d5bfae/02%20Feature%20branches.svg?cdnVersion=2542"
alt="Feature Branch Workflow" style="max-width: 80%; height: auto;">
</section>

<section>
<h3>Feature Branch Workflow with Git Submodules</h3>
<pre><code>git submodule add <repo-url> backend</code></pre>
<pre><code>cd backend</code></pre>
<pre><code>git checkout feature-api-v2</code></pre>
<pre><code>git add </code></pre>
<pre><code>git commit -m "[ticket number] Implemented feature API v2"</code></pre>
<pre><code>git push origin feature-api-v2</code></pre>
</section>

<section>
<h3>Feature Branch Workflow with Git Submodules</h3>
<pre><code>git checkout develop</code></pre>
<pre><code>git pull origin develop</code></pre>
<pre><code>git merge feature-api-v2</code></pre>
<pre><code>git push origin develop</code></pre>
</section>

<section>
<h3>Feature Branch Workflow with Git Submodules</h3>
<pre><code>git tag -a v1.0.0 -m "Release version 1.0.0"</code></pre>
<pre><code>git push origin v1.0.0</code></pre>
<pre><code>git checkout develop</code></pre>
<pre><code>git pull origin develop</code></pre>
<pre><code>git merge main</code></pre>
<pre><code>git push origin main</code></pre>
</section>

<section>
<h3>Mapping Git Workflow to Agile Workflow</h3>
<ul>
<li><strong>Feature Branch</strong> → User Story + Tasks</li>
<li><strong>Main Branch</strong> → Epic or MVP (Set of User Stories)</li>
</ul>
</section>

<section>
<h3>Feature Branch Workflow</h3>
<ul>
<li>Frequent merges to the develop branch</li>
<li>Encourages continuous integration</li>
<li>Good for agile teams and rapid iteration</li>
<li>Supports enable and disable of features flags</li>
</ul>
</section>

<section>
<h3>Question?</h3>
</section>

<section>
<h3>Mapping V-Model & Scrum to Git Workflows</h3>
<table>
<thead>
<tr>
<th></th>
<th>V-Model</th>
<th>Scrum</th>
</tr>
</thead>
<tbody>
<tr>
<td>GitFlow</td>
<td>+ Main & Develop reflect structured phases</td>
<td>+ Feature branches for iterative development</td>
</tr>
<tr>
<td>Forking</td>
<td>+ Forks represent separate validation environments</td>
<td>+ Pull requests enable collaborative sprint integration</td>
</tr>
<tr>
<td>Feature Branch</td>
<td>+ Branches align with specific verification steps</td>
<td>+ Short-lived branches support rapid iteration</td>
</tr>
</tbody>
</table>
</section>

<section>
<h3>Proposal: One Repository</h3>
<pre><code>git init main-repo</code></pre>
<pre><code>git submodule add <repo-url> embedded</code></pre>
<pre><code>git submodule add <repo-url> backend</code></pre>
<pre><code>git submodule add <repo-url> frontend</code></pre>
<pre><code>git add .</code></pre>
<pre><code>git commit -m "Added submodules"</code></pre>
<pre><code>git push origin main</code></pre>
</section>

<section>
<h3>What do you recommend?</h3>

GitFlow - Forking - Feature Branch
</section>

<section>
<p><a href="https://github.com/SE4CPS/PlantWaterSystem" target="_blank">Repository</a>
</p>
</section>

<section>
Expand All @@ -2498,10 +2787,63 @@ <h4>Scrum vs V-Model for IoT Plant Watering System</h4>
</section>

<section>
<p><a href="https://github.com/orgs/SE4CPS/projects/19/settings" target="_blank">Sprint Retrospective</a>
<p><a href="https://github.com/orgs/SE4CPS/projects/19/settings" target="_blank">Sprint
Retrospective</a>
</p>
</section>

<section>
<h3>Please prepare sprint #2 demo slides for Friday</h3>
</section>

<section>
<h3>Team Project Part 1</h3>
</section>

<section>
<h3>Question?</h3>
</section>

<section>
<ul>
<li>What is the primary purpose of GitFlow in version control?</li>
<li>What does the "develop" branch represent in GitFlow?</li>
<li>When should a release branch be created in GitFlow?</li>
</ul>
</section>

<section>
<ul>
<li>Which GitFlow branch is used for hotfixes?</li>
<li>What is the purpose of the "main" branch in GitFlow?</li>
<li>What happens when a feature branch is merged in GitFlow?</li>
</ul>
</section>

<section>
<ul>
<li>What is the main benefit of the V-Model over the Waterfall model?</li>
<li>In the V-Model, which phase corresponds to Unit Testing?</li>
<li>What is the primary focus of the Validation phase in the V-Model?</li>
</ul>
</section>

<section>
<ul>
<li>What is the role of the Scrum Master in Scrum?</li>
<li>Which Scrum event is designed to review and adapt the sprint?</li>
<li>What is the purpose of the Product Backlog in Scrum?</li>
</ul>
</section>

<section>
<ul>
<li>How does GitFlow integrate with Scrum's iterative development process?</li>
<li>What is the relationship between GitFlow's release branch and Scrum's sprint?</li>
<li>When should feature branches be merged in a Scrum + GitFlow workflow?</li>
</ul>
</section>

<section id="module-5">
<h4>Module 5<br>Architectural Design for Industry 4.0 Applications</h4>
</section>
Expand Down

0 comments on commit 2fbaecd

Please sign in to comment.