KBB Style Enterprise App Prototype


Overview:
The objective of this project was to create a Kelly Blue Books style enterprise car buying application over the course of a quarter. The final product must be able to run a web server through Tomcat, receive and process data in the form of properties files uploaded from a remote client, and allow the download of this data to be configured and potentially purchased by a client instance.

Link to Git repository.

Class Diagram:

CIS35B_Lab_05_ClassDiagrams.jpg

Lessons Learned:

- Java Virtual Machine
    - Underlying conditions and workings of the JVM
  
- Object Oriented Programming
    - Usage of non-procedural programming
    - Creating and defining object relations
    - Implementation of data storing objects
- Encapsulation
    - Objects keep their data secure
    - Allow access only on their own terms
    - Maintains integrity of the object
    - Prevents misuse and errors through misuse
    - Objects should be able to function on their own
    - Implemented through the use of private and protected variables
- Containment
    - Objects within other objects
    - Allows for more complicated object relations
    - Objects have everything they need within themselves
- Component Creation
    - Their use along with packages create object relationships
    - A group of objects that work together to complete a task
- Packages
    - A group of classes that share a common use
    - Rely on eachother to complete their taks
    - They all follow a theme
- CRUD Operations
    - A method used in encapsulation
    - Create Read Update Delete
    - Allows the inner workings of a class to remain secret
    - Prevents misuse of data by restricting access
- Class Relationships
    - Define how classes can be used and what other classes they work with
- Using Projects
    - Higher scale java designs require projects
    - Helps to organize code
- Serialization
    - A way to export classes as files
    - Useful for sending objects over stream or for saving them between sessions
- Inner Classes
    - Used with containment
    - A little bit outdated, better ways to do this
    - Must seperately implement serializable
- Statics
    - Generally bad design except for uncommon cases
    - Useful only if you need objects to linger or for singlestons
- Singletons
    - An object that there should only be one instance of
- User Friendly Design(Engineer/end user)
    - There are multiple ways to design programs to make them easier to use
    - You have to make decisions on who your target audience is and what they need
- Abstract Classes
    - Form a bridge between internal and external
    - Force a contract for implementation
    - Self contained
    - Usually incomplete
    - Allows reusability
    - Multiple layers of abstraction
        - Allows a designer to decide what each layer is responsible
        - The child is not burdened with implementation of everything
    - Shortens child classes
- Interfaces
    - Useful for design
    - Similar to abstract classes in usage
    - Enforce a contract
    - Allows polymorphism (similar to templates)
    - Implement responsibility
    - Restrict generecity
    - Allows global constants
    - Encapsulate and complex implementation
    - "Multiple inheritance"
    - Using Role based access
- Role Based Access
    - Usually used with proxyclasses
    - Allows a designer to restrict access using apis
    - Only expose what you need to to clients
    - Restricts access
- Proxy Classes
    - Empty class inheriting from an abstract
    - Implements many APIs
    - Inherits implementations from the abstract
    - Prevents reverse engineering
    - Allows RBA
- APIs
    - Contracts that hide the backend of a program
    - Does what they say they do, implementation is unimportant
    - Part of RBA
    - Important at enterprise level
    - Allows people to collaborate without worrying about implementation
- Exceptions
    - Way of allowing your program to recover from issues
    - Errors = no recovery
    - Exception = fixable
    - Possible to create custom exceptions
    - Allow for program recovery in case of error
    - Fix through user input, ask for restarting
- Logging Errors
    - Allow for programmer/debugger to see where the failure is happening
    - Aids in QA
    - Makes it possible to keep track of known errors
- Self- healing
    - Program can learn to fix its own exception
    - Tied to machine learning
    - Mostly impractical due to time contraints
- Data Structures
    - Ways of organizing data
    - Each has their own pros and cons based on CRUD
    - Each store data, sort data, remove data, search data
- Templates
    - Methods or classes that determine a type at runtime
    - Allow for very reusable code
    - Can restrict type based on parent or interface
    - Can be used with abstract classes or interfaces to insure that the method required to interact with the variable is there
    - Allows for N-level architecture
- Genericity
    - methods that allow for multiple types of variables to be put into them
    but they still funciton the same way
    - allow any type, just require other things to make them work
    - custom compare functions for example
- Polymorphism
    - contract based usage
    - using a base class pointer to a child
    - allows the pointer to point to any child
    - allows the child to act as a child, using methods that are defined in the parent
    but overriden in the child
- Multi- threading
    - Full usage of the cpu
    - Allows multiple sets of commands to be executed
    - OS determines timing
    - Useful for programs where linearity is an issue
    - Consumer Producer model
        - Would waste time waiting for the producer to finishing producing
          everything, when the consumer could be consuming at the same time
    - Requires implementing runnable to inheriting from thread
    - Very unrealiable due to OS
- Wait/Notify
    - Pauses thread execution until a notify
    - Allows threads to execute exactly when they need to
    - Wait needs to be in a sychronized block otherwise it will throw an exception.
- Synchronization
    - Prevents data corruption because of multiple threads trying to access the same
      data at the same tiem
    - Synchronized block or method
    - Adds the threads to a queue and tells them when they're done
    - Adds an overhead because of the monitor
- Extensibility
    - Design consideration
    - Abstract classes and interafaces are useful for this
    - Templates are very useful
- Reusability
    - Make sure your code isn't spaghetti
    - Try to keep things generic and not overly specific
    - Allow for growth
- Tiered Architecture
    - Design in a way that allows for multiple steps
    - Each step has its own set of burdens to allow for splitting
    - Keeps class sizes small    
- Contracts
    - Part of API and interface design
    - Makes sure that classes that implement or inherit are doing what they need to
    - Backend is unimportant so long as the output is expected
- Server Storage
    - Servers are useful for maintaining data rather than exporting and saving it all
    - Allow connection to retrieve data
    - Only give data after checking
    - Allows uploading
- Sockets
    - Ways for client and server to connects
    - Ability for multiple clients to one server
    - Opens outpuut and input streams to allow communication
- ObjectStreams
    - Useful way for sending data from client to server or back
    - Requires serialiation
- HTTP
    - Protocol for a web server to interact with a client
    - In our implementation the browser was the client
    and jvm was the server
    - Browser in html works with a servlet/jsp to interact
    with the server    
    - Tag based
    - Get/Post/Head/Delete/Connect/Options
- Servlets
    - Java code run in tandem with a server
    - Runs java code that outputs html
    - Back end

- Requests
    - HTML code that is used to interact with http
    - Provides data about the server and the client
    - Allows data persistence in http
    - Use tag in url usually
- Sessions
    - One session of a user
    - Sometimes stored on a server
    - Allows data to be stored
- Cookies
    - Allows storage of data between sessions
    - Usually very insecure
- JSPs
    - Dynamic html pages along with java code
    - Allows java to be used to print html
- Properties Files
    - User friendly ways to store information
    - Allows quick uploading
- UIs
    - Good uis are difficult to design
    - Require good testing
    - Don't make me think
    - Simple and easy to use
- Testing/Quality Assurance
    - Test everything
    - Test normal cases
    - Test extremes
    - Test fringe cases
    - Het other people to test your code
    - Black box vs While box

Embed Block
Add an embed URL or code. Learn more