HTML to define the content of web pages,CSS to specify the layout of web pages and finally,JavaScript to program the behavior of web pages Scripts JavaScript must be written inside the <script> tag in HTML. Scripts can be placed in either the <head>, <body> or both if need be. Scripts can also be placed in an external file …
Author Archives: Jake Castle
5 differences between HTML and HTML5
Multimedia Support HTML doesn’t support for video and audio in language HTML5 has them integrated into it Geographical Support It is harder in HTML to track user’s location when they are using mobile devicesHTML5 uses javascript Geolocation API which is used to identify the location of any user that uses the website Error handling HTML …
GitHub Help
GitHub for Windows https://windows.github.com GitHub for Machttps://mac.github.com git rm[file] Deletes the file from the working directory and stages the deletion git stash Temporarily stores all modified tracked files git init [project-name] Creates a new local repository git clone [url] Downloads a project and its entire version history git status lists all new or modified files …
CSS: Favorites
The CSS Universal Selector (*) selects all the HTML elements on the page The Grouping Selector is performed by using commas between elements with the same code. Backgrounds background-color: colorName background-image: url(“location”) background-repeat: repeat-x/y – make it so background image is only represented horizontally or vertically. background-repeat: no repeat – make it so background image …
Design Pattern: Singleton
What is a singleton? It is design pattern that uses only one object or instance of an object at a time. Steps to create a Singleton pattern Use getInstance() method as it is used universally for a singleton class Example Let’s take an example of Blackjack. In the game of blackjack, the dealer deals two …
Design Pattern: Facade Pattern
The Facade pattern does all the actions that need to be done by a class in the background. It will give it a false sense of not doing a lot of work but in reality all the work is done by other classes. Steps to create a Facade Pattern Create a class that will need …
Design pattern: Adapter
What is it? Steps for creating an adapter Create an Adapter class that implements the interface Create an object of the class that doesn’t follow the correct implementation of the interface. In each of the method in the adapter class, make a call to the methods of the class that doesn’t follow the correct implementation …
Design Pattern: Observer Pattern
What is it? It ensures that when on object changes state, all its dependencies are notified and updated automatically. It defines a one-to-many dependency. The key objects in this pattern are the subject and the observer. When there is a change in state with the subject, all the observers are notified. In response to the …
Design Pattern: Strategy Pattern
Description It defines a family of algorithms, encapsulates each one of them and makes them interchangeable. This means that reusability increases while preventing the code from breaking. When should you use Strategy? When many related classes different only in one behavior. This way, you don’t constantly have to implement/write code for every class that uses …
Design Pattern: Factory Pattern
How to create a factory pattern? Define an interface for creating an object, but let subclasses decide which class to instantiate. When to use factory pattern? Use it when a class cannot predict which class of objects that it must create. Use it when you want a subclass to specify the objects it must create …