Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
562 changes: 562 additions & 0 deletions .gitignore

Large diffs are not rendered by default.

74 changes: 74 additions & 0 deletions README-Sample.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Project Title

* **Objective** - To create a product...
* **Purpose** - To gain familiarity the following features...




## Instructions


### Testing Application via Postman

* Ensure that the `start-class` tag in your `pom.xml` encapsulates `com.github.curriculeon.MyApplication`
* Open a command line and navigate to the project's root directory and run this command:
* `mvn spring-boot:run`
* Launch the [Postman](https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomop?hl=en) app and enter the URI `http://localhost:8080/` and hit Send.
* If your application cannot run because something is occupying a port, use this command with the respective port number specified:
* **OSX and Linux**
* ``kill -kill `lsof -t -i tcp:8080` ``
* **Windows**
* _For use in command line_:
* `for /f "tokens=5" %a in ('netstat -aon ^| find ":8080" ^| find "LISTENING"') do taskkill /f /pid %a`
* _For use in bat-file_:
* `for /f "tokens=5" %%a in ('netstat -aon ^| find ":8080" ^| find "LISTENING"') do taskkill /f /pid %%a`




## How to Download

#### Part 1 - Forking the Project
* To _fork_ the project, click the `Fork` button located at the top right of the project.


#### Part 2 - Navigating to _forked_ Repository
* Navigate to your github profile to find the _newly forked repository_.
* Copy the URL of the project to the clipboard.

#### Part 3 - Cloning _forked_ repository
* Clone the repository from **your account** into the `~/dev` directory.
* if you do not have a `~/dev` directory, make one by executing the following command:
* `mkdir ~/dev`
* navigate to the `~/dev` directory by executing the following command:
* `cd ~/dev`
* clone the project by executing the following command:
* `git clone https://github.com/MYUSERNAME/NAMEOFPROJECT`

#### Part 4 - Check Build
* Ensure that the tests run upon opening the project.
* You should see `Tests Failed: 99 of 99 tests`







## How to Submit

#### Part 1 - _Pushing_ local changes to remote repository
* from a _terminal_ navigate to the root directory of the _cloned_ project.
* from the root directory of the project, execute the following commands:
* add all changes
* `git add .`
* commit changes to be pushed
* `git commit -m 'I have added changes'`
* push changes to your repository
* `git push -u origin master`

#### Part 2 - Submitting assignment
* from the browser, navigate to the _forked_ project from **your** github account.
* click the `Pull Requests` tab.
* select `New Pull Request`
171 changes: 171 additions & 0 deletions README-annotations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
### About Spring Annotations

#### `@Entity`
* Annotates class signature
* **Description:**
* Allows the persistence provider to recognize it as a persistence class.
* An object representative of a snap shot of data from a database.
* By default, maps this entity to a table whose name is the name of the annotated class. Can be rerouted via the `@Table` annotation
* Entities are said to be _fungible_, or _mutually interchangeable_.
* **Pre-requesites for use:**
* An interface cannot be an entity.
* An enum cannot be an entity.
* The class can be abstract or concrete.
* The class must define a no-arg constructor.
* Each `Entity` must be annotated with a respective `ID`.








<hr>

#### `@Id`
* Annotates field declarations
* **Description:**
* Denotes the primary key for this `Entity`.
* Can be generated manually by application or by automatically by the persistence provider.
* **Pre-requisites for use:**
* Class must be annotated with `@Entity`









<hr>

#### `@GeneratedValue(strategy = GenerationType.ENUM_VALUE)`
* Annotates `Id` fields.
* **Description:**
* Specifies how the persistence provider will generate this value.
* `GenerationType.SEQUENCE` - specifies the use of database SQL sequence
* `GenerationType.IDENTITY` - uses a database identity column
* `GenerationType.TABLE` - instructs provider to store the sequence name and its current value in a table, increasing the value of each time a new instance of the entity is persisted.
* `GenerationType.AUTO` - default when nothing specified. Provider does generation of a key automatically. It will select an appropriate strategy for a particular database.
* **Pre-requesites for use:**
* Field must be annotated with `@Id`.











<hr>

#### `@Autowired`
* Annotates field declaration or method-parameters
* **Description**
* injects bean by type
* can be used alone.
* If is used alone, it will be wired by type
* If more than one bean of same type are declared in the container `@Autowired` does not know which beans to use for injection.
* **Pre-requesites for use:**
* Field-type must be annotated with some form of `@Component`.







<hr>

#### `@Component`
* Annotates class signature
* **Description**
* denotes that Spring framework will autodetect these classes for dependency injection when annotation-based configuration and classpath scanning is used.
* **Prerequisites for use:**
* none






<hr>

#### `@Service`
* Annotates class signature
* **Description**
* specialized form of `@Component`
* responsible for performing service tasks
* in many case you use this annotation for best practice, but isn't _always_ necessary.
* **Prerequisites for use:**
* none




<hr>

#### `@Controller`
* Annotates class signature
* **Description**
* specialized form of `@Component`
* indicates that a particular class serves the role of a controller
* acts as a stereotype for the annotated class, indicating its role
* dispatcher scans such annotated classes for mapped methods and detects @RequestMapping annotations
* **Pre-requesites for use:**
* none








<hr>

#### `@RequestMapping`
* Annotates a method signature
* **Description**
* annotation maps HTTP requests to handler methods of MVC and REST controllers.
* **Pre-requesites for use**
* class must be a annotated with `@Controller`








<hr>

#### `@PathVariable`
* Annotates a method parameter
* **Description**
* indicates that a method parameter should be bound to a URI template variable
* **Pre-requesites for use**
* class must be a annotated with `@Controller`







<hr>

#### `@RequestParam`
* Annotates a method parameter
* **Description**
* indicates that a method parameter should be bound to a web request parameter
* used to extract query parameters, form parameters
* **Pre-requesites for use**
* class must be a annotated with `@Controller`


69 changes: 4 additions & 65 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,69 +1,8 @@
# Full Stack Web Application

* **Objective** - to create an implementation of a web service
* **Purpose** - to demonstrate the construction of a full-stacked web-application
* **Project** - Online banking website
* **Description**
* This Case Study is your first foray into building a full-stack application. You'll be building a Spring MVC based application, which means you'll learn about what it takes to build a functional application from the ground up yourself.
* This is exciting! It's a lot, but we've given you the tools to be able to build what you need, and you get to decide what you do with it. You also get to be creative in choosing what sort of application you want to build!
* You will be working individually to design your app. We hope you'll exercise creativity on this project, sketch some wireframes before you start, make sure you have time to run these ideas by your instructors to get their feedback before you dive too deep into coding! Remember to keep things small and focus on mastering the fundamentals.
* **Additional Resources**
* [The Original Case Study Document](./case-study.pdf)
* [Case Study Outline](./case-study-outline.pdf)
* [Case Study Deliverables](./README_deliverables.md)
* [Identifying Plagiarism](./README_plagiarism.md)
* [Suggested Project Topics](./README_suggested-project-topics.md)
* This was created to show my project creation skills following my PerScholas graduation. It is my final project and display skills I learned!
* To download make sure you hve your favorite IDE, and a command line capable of cloning github projects. A gif guide is given below!



## Minimum Features
* `RESTful` web service which consumes requests from a front-end web application and caches each request and the respective response to a database.
* The application must support a login functionality.




## Developmental Notes

### Tech Stack Selection
* Select at least 1 technology from each of the following categories:
* **Version Control System**
1. Github
2. Bitbucket

* **Wireframe**
1. Mockflow
2. Balsamiq
3. Lucidcharts

* **Frontend**
1. Java Server Pages

* **Business Logic**
1. Java
2. TypeScript

* **WebServer Implementation**
1. Spring Boot
2. At least 1 [backing service](https://12factor.net/backing-services) API

* **Data Layer**
1. MySQL
2. PostgreSQL
3. MariaDB

* **Web Server Cloud Deployment**
1. Heroku
2. AWS EC2 Instance

* **Web Application Cloud Deployment**
1. Netlify
2. AWS EC2 Instance




### Installation
* It is advised that you make install each of the following technologies to ensure that are at least accessible
* Install [NodeJs](https://nodejs.org/en/).
* Install [Angular](http://angular.io/).
* Install [AngularCli](https://cli.angular.io/).
![](screen-capture.gif)
Binary file added how-to-use.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions kill-8080.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
for /f "tokens=5" %%a in ('netstat -aon ^| find ":8080" ^| find "LISTENING"') do taskkill /f /pid %%a
1 change: 1 addition & 0 deletions kill-8080.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
kill -kill `lsof -t -i tcp:8080`
Loading