CIS Linux – Micah Webner

Tutorials

Quick PHP Objects Demonstration (24/WI)

1/3/2024 • This quick demo explains the basics of PHP objects.

CIS-294 Site Installation Walk-through for Winter 2024 (24/WI)

12/27/2023 • Screenshots of site setup on XAMPP for Windows and Docker for MacOS and Windows.

Query Symfony users by role (23/FA)

11/29/2023 • Here are some rough notes on querying Symfony users by role. It's tricky because the roles are stored in a JSON array in the database, and Symfony does not allow using JSON functions by default.

Using Stylelint and Prettier to check CSS files (23/WI)

2/22/2023 • Stylelint is a CSS linter that helps you avoid errors and enforce conventions. Prettier is an opinionated code formatter that can be used to help keep your CSS and JS files formatted consistently. We use Stylelint and Prettier as part of the automated testing in the QA pipeline for the CIS-294 website. Installing Stylelint and Prettier locally makes CSS testing and cleanup an easy part of the development process.

Adding web pages to Symfony projects (22/FA)

9/21/2022 • When developing a complete Content Management System (CMS), the content for web pages is normally stored in the database. However, for our CIS-294 projects, we are taking a more hybrid approach where content is built into the Twig templates, with dynamic information added as needed.

This is covered somewhat in Part 4 of my TV Watchlist tutorial series, but this tutorial provides a simple approach for generating multiple different pages in your CIS-294 websites.

GitLab pipeline automated testing for CIS-294 projects (22/FA)

9/21/2022 • Starting with the Fall 2022 Semester, CIS-294 web projects now include automated testing for basic security and code quality. These tests run every time commits are pushed to the website git repository, and we will not merge changes to the production branch until all tests pass.

Some of the included tests can be run in your local environment before committing, helping you to check for mistakes and write higher quality code.

Build a TV watch list in Symfony (22/FA)

9/5/2022 • I have created a new YouTube series on[Building a TV watch list in Symfony. This six-part series demonstrates the basics of building a Symfony web project to store and display items in a TV watch list. This starter project is not feature complete, but demonstrates the principles needed to get started with Symfony, Twig templates, and the Easy Admin bundle.

New Windows Terminal (22/FA)

8/30/2022 • Windows Terminal is a free download from Microsoft that provides a much better command line experience for PowerShell, Git Bash, and WSL.

Creating a service in Symfony (22/WI)

3/21/2022 • When writing Symfony applications, you may find that you need to reuse some of your code over and over. A common example of this would be when writing separate controllers to manage different entity types in a REST API, where you need to authenticate the authorization header token for each request. Rather than including this method in each controller, this reusable code can be moved to a service which can be injected into all of your controllers as a dependency. With Symfony's autowiring enabled, adding a service is a quick and easy solution to avoid repeating code.

Recommended Editor and Git settings for Web Development (22/WI)

1/20/2022 • I have posted this information elsewhere, but wanted to consolidate this info in a single place for future reference. I recommend the following settings for git and Visual Studio Code for web development, especially in group projects. These settings will help keep code consistent and reduce git problems when working across multiple platforms, including Windows and MacOS development and HFC's Linux web servers.

Jacob Rockowitz: Good Project Leadership (22/WI)

1/6/2022 • Drupal developer Jacob Rockowitz recently posted a blog series on Good Drupal Leadership. While this series does mention some things specific to Drupal and the Drupal community, it's actually an excellent general overview for any large software implementation project, including the types of group projects found in CIS-294. I highly recommend reading Jacob's series to get an overview of what you'll encounter during your semester in HFC's Software Engineering class. The posts are short and should only require 15-20 minutes to read the entire series.

Using JWT for API authorization (21/FA)

10/30/2021 • It's important to make sure that all REST API traffic is properly secured, but it's not practical to force applications to provide login credentials every time. Instead the API should return a reusable token during login, then the application should verify this token in the Authorization header for every request. JSON Web Tokens can be a good tool to satisfy this need.

Symfony security setup (21/FA)

10/30/2021 • The Symfony Security documentation page provides an excellent tutorial for setting up security, this page will be more of a guide for using that page, rather than a full tutorial itself. Please note that this information was written in Fall 2021 and corresponds to the Symfony 5.3 release. Please note that this information was written in Fall 2021 and corresponds to the Symfony 5.3 release. These notes will cover installing the security bundle, creating a user entity, adding a user via phpMyAdmin, and getting started with available authentication options. There are steps on the documentation page not covered here that are required to fully implement security in your project.

Web Development Environment for PHP Projects (21/FA)

10/6/2021 • Several of the tutorials on this site are intended to guide students through steps to set up a local development environment for PHP projects, including the CIS-294 website, but none of these provides an actual overview of what is needed. This guide will attempt to summarize the steps needed for setup. This guide is also applicable for CIS-122, CIS-222, CIS-227, and anyone interested in doing local PHP development with XAMPP or Docker.

Getting Started with Git (Fall 2021 Update) (21/FA)

9/30/2021 • This video demonstrates how to install Git source control management on Windows then configure ssh keys for secure communication with remote servers like HFC's GitLab server or public providers like GitHub, GitLab, or BitBucket. This page also contains a list of important settings for your git projects.

Symfony Website and API demo (21/FA)

9/27/2021 • Updated with a new video for Winter 2024! Symfony is a framework for PHP. It allows developers to use existing libraries, so you can focus on writing code for your project, not repetitive tasks. This is a demonstration of how to create a website in Symfony and add a REST API endpoint to retrieve data. This is not a full Symfony tutorial, but it does demonstrate most of the concepts we'll cover in our CIS-294 project.

Download Composer for PHP projects (21/FA)

9/22/2021 • Composer is a package management system for PHP applications. With Composer, developers can easily browse libraries on Packagist and add them to projects.

Accessibility Resources (21/FA)

9/20/2021 • Accessibility is not a black and white checklist, but rather a mindset of inclusion that guides how we create and measure the effectiveness of content for all users. HFC has many diverse populations, including English Learners (ELL/ESL), people with varying ability/disability and reading level, people who use assistive technologies, and people using phones/mobile devices to access our websites, and our accessibility practices create a better experience for everyone.

Enable PHP error display for MAMP (21/FA)

9/16/2021 • MAMP does not show PHP errors by default. This can often be solved by adding lines to your code, but enabling error messages for your whole MAMP server is a simple solution to this probem.

Backing Up Your CISLinux Projects to GitLab (21/WI)

5/6/2021 • This video tutorial demonstrates how CIS students at Henry Ford College can back up projects the cislinux server to HFC's GitLab service for version control long-term storage. See my other tutorials for more details about using git to manage project history and changes.

Basic Web Projects with Git and Visual Studio Code (21/WI)

5/5/2021 • This new video covers the following topics: Create ssh keys for authentication; load ssh agent in git bash; create and clone a new project; make changes and push to remote repository; publish changes to a web server.

Resetting Credentials with Git and Visual Studio (21/WI)

1/28/2021 • Here are some screenshots that a student from last semester shared regarding Visual Studio and resetting passwords in Git Credentials Monitor. This is somewhat limited information, but should help change your git password if necessary.

Rest API concepts and examples (20/FA)

9/14/2020 • This is a pretty good video for getting started with REST APIs. This is good info for all teams, because it shows some working examples.

What is an API? (20/FA)

9/14/2020 • As part of this project, we'll be creating an API, or two: a database API to handle all database functionality, and a RESTful API to allow the desktop application(s) to connect to the Database API over the web. If you're not super familiar with APIs, this short 3-minute video will help.

Eclipse Git Notes (19/WI)

9/10/2019 • I wrote this page to demonstrate to use git from within Eclipse. I don't know much about Java or Eclipse, but as show here, I did manage to make a small change to an existing application, and to commit that change using git from within Eclipse.

Drupal Startup Notes (19/WI)

1/8/2019 • This page contains a subset of the information that the HFC Web Team provides to new team members and co-op students. It's a mix of things that new people need to get up to speed quickly, along with some content that we hope will be useful over time. Not all of it is technical. People are often surprised to learn that our team spends far more time working with people, on content, rather than configuring Drupal and writing code.

CIS-295 Drupal Website Notes (18/WI)

3/21/2018 • This guide outlines the steps required to install a Drupal website for Mr. Fulton's CIS-295 students. Students in this class will set up a web server and load a Drupal site with the Out of the Box demo site.

Introduction to PDO (17/WI)

3/26/2017 • This page is a brief introduction to using the PHP Database Objects (PDO) extension to retrieve and store data in your PHP application. This is only a quick overview to help those in CIS-294 get started. Please consider CIS-222: Web Database Development with PHP for complete coverage of this topic.

Generating SSH Keys (16/WI)

4/9/2016 • SSH authentication keys are a way to provide authentication without sending a password to the server. Instead, you use a passphrase to unlock a private key on your computer, and this is matched with a public key placed on the server. See the full tutorial on the HFC Student Portal.

Using GitLab (16/WI)

4/9/2016 • HFC's CIS students can use HFC's GitLab server at gitlab.hfcc.edu to store source code for projects. Git allows revision tracking and collaboration between multiple developers working on the same project.

GitKraken Demo Video (16/WI)

4/9/2016 • Please note: We no longer recommend using GitKraken as a git client, since the features we need are now in the paid version. However, the git operations shown here are still valid using any tools to manage a git repository.