everything

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

What is the @Type annotation for?

To tell what type of data do you want to store in database

What is Postman?

Tool for testing webservices by sending requests and reading responses

What is Isolation?

Transactions must act independently of one another

" What is the Web Service Protocol Stack?

Transfer, messaging, description, discovery

What is the Protocol Stack?

Transport, Messaging, Discovery, Definition

What exceptions will get thrown if you try to run the client (single microservice) before the server (eureka)?

TransportException

What is an Abstract class?

Type of methods: Interface can have only abstract methods. Abstract class can have abstract and non-abstract methods. From Java 8, it can have default and static methods also. Final Variables: Variables declared in a Java interface are by default final. An abstract class may contain non-final variables. Type of variables: Abstract class can have final, non-final, static and non-static variables. Interface has only static and final variables. Implementation: Abstract class can provide the implementation of interface. Interface can't provide the implementation of abstract class. Inheritance vs Abstraction: A Java interface can be implemented using keyword "implements" and abstract class can be extended using keyword "extends". Multiple implementation: An interface can extend another Java interface only, an abstract class can extend another Java class and implement multiple Java interfaces. Accessibility of Data Members: Members of a Java interface are public by default. A Java abstract class can have class members like private, protected, etc.

What does TS transpile into?

TypeScript is transpiled into JavaScript

" What does a Unit refer to?

Units are referred to methods within the application.

Merge vs Update

Update tries to attach the object to a persistant state and if an object with the same indentifier is already in a persistant state a NonUniqueObjectException is thrown. Merge first checks for a persistant object with the identifier of the provided object and if it doesn't exist, instantiates one. It copies over fields from the provided object to the persistent object and returns the persistent object

How do you connect to EC2 from Putty?

Use a ppk,

What does a SessionFactory do?

Use it to get our sessions. Implements Singleton & Factory design patterns.

What is the @JoinTable annotation for?

Used in the mapping of associations. It is specified on the owning side of an association. A join table is typically used in the mapping of many-to-many and unidirectional one-to-many associations.

VARCHAR vs VARCHAR2

VARCHAR2 does not distinguish between null and empty values

What are the different types of Views?

Views in SQL is nothing but the logical table created from one or more tables.We can use the views to fetch the columns from one or more different tables at a time. Simple View: When user wants data or some columns from same table then simple view is used.For an example if there is employee table which has Employee_num,Employee_name,salary columnns and we just need to see Employee_num,Employee_name then user can create a simple view. Complex View: Complex view is created on using more than one tables.When user wants to retrieve data from more than 1 table then we have to use complex views.To create complex view there should be relation between 2 tables else cartesian product will come by joining 2 tables.There should be some joining conditions,some filters needs to be considered while creating complex views.

What is @Embedded annotation used for?

We can use the @Embedded annotation to embed an embeddable class (an entity that can be embedded in another entity).

Inner Join vs Intersect

When using INTERSECT operator the number and the order of the columns must be the same in all queries as well data type must be compatible. Use an intersect operator to returns rows that are in common between two tables; it returns unique rows from both the left and right query. This query is useful when you want to find results that are in common between two queries. An inner join attempts to match up the two tables based on the criteria you specify in the query, and only returns the rows that match. If a row from the first table in the join matches two rows in the second table, then two rows will be returned in the results.

" Dynamic Insert vs Dynamic Update

With the dynamic-insert property set to true, Hibernate does not include null values for properties that are not set by the application, during an INSERT. With the dynamic-update property set to true, Hibernate does not include unmodified properties in the UPDATE.

" What is Well-Formed XML?

XML with a beginning and closing tag

" Are JS objects mutable or immutable?

Yes in JavaScript objects and arrays are mutable not primitives

" When should you use javax.persistence vs org.hibernate?

You use javax.persistence to keep implementation-agnostic (i.e. you can change to use a different JPA implementation later.) If you want to just go with Hibernate, you can use org.hibernate annotations. But it's advisable to just import the javax classes rather. Then Hibernate will provide the implementation, but can be replaced by just switching in a different dependency.

" What is a topic?

a category which records are published

What is an Interface?

a class that does not cotain method implementation, only signature

" What is a module?

a collection of services, directives, controllers, filters, and configuration information

" What is a CLI?

a command line interface. Angular has a nice console thingy.

What is a DAO?

a data access object (DAO) is an object that provides an abstract interface to some type of database or other persistence mechanism.

What is an iFrame?

a nested HTML element-- in essence a page within a page

What is a nested query?

a query inside a query

What is a Dockerfile?

a text document that contains all the commands a user could call on the command line to assemble an image

What is a Singleton?

" The singleton pattern is a design pattern that restricts the instantiation of a class to one object. This class provides a way to access its only object which can be accessed directly without need to instantiate the object of the class.

How do you write servlet context and servlet config on the web.xml?

" <servlet> <servlet-name>controlServlet</servlet-name> <servlet-class>com.jenkov.butterfly.ControlServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>controlServlet</servlet-name> <url-pattern>*.html</url-pattern> </servlet-mapping>

" What is an Injectable?

" @Injectable decorator identifies services and other classes that are intended to be injected. It can also be used to configure a provider for those services.

InputStream vs Reader

" InputStreams are used to read bytes from a stream. So they are useful for binary data such as images, video and serialized objects. Readers on the other hand are character streams so they are best used to read character data

" SpringMVC Workflow

"(1) client sends HttpRequest to Server (2/3) our request is directed to our MasterServlet/DispatcherServlet (4) DispatcherServlet consults handler mapping to determine the appropriate controller to handle our request (5) controller handles the request andsends response back to DS (6/7) D.S. consults the view resolver( or doesnt ) and generates the appropriate view (8) view is returned to client

" Microservices vs SOA

"* SOA is more about orchastrating several enterprise applications * Microservices are mainly about decomposing a single application |-> our services are more choreographed vs orchastrated * orchastrated analogy: vehicular traffic patterns (lanes, rules, lights) * choreagraphy analogy: pedestrian traffic (autonomous, self-governed)

What are the types of Inheritance Models?

"* Table per heirarchy * Table per subclass * Table per concrete class

" Microservice Disadvantages

"* complexity is moved from the application layer to the ops layer * services may be unavailable * transactions are absent when data is spread across services * loss of ACID properties during transaction * Chatty

" Microservice Advantages

"* no single point of failure * easier to test individual service * easier to scale individual service * ability to use the proper language or framework for the job * ability to use a persistence model suited to the services data * data is more secure

"Microservice Application Diagram summary"

"* services can (optionally) get their config from the config server * all services must register w/ the discovery service * API Gateway consults the discover service to forward a request to the proper service

" How are web services and SOA related?

"- A web service is a basic building block in a SOA. - When multiple services are combined, we have an application that falls under SOA

" What is REST?

"- REpresentational State Transfer (REST) is an architectural style that defines a set of constraints and properties based on HTTP. Web Services that conform to the REST architectural style, or RESTful web services, provide interoperability between computer systems on the Internet. REST-compliant web services allow the requesting systems to access and manipulate textual representations of web resources by using a uniform and predefined set of stateless operations. - REST describes a set of architectural principles by which data is transfered over a standarized interface (such as HTTP).

" What is SOAP?

"- SOAP (originally Simple Object Access Protocol) is a messaging protocol specification for exchanging structured information in the implementation of web services in computer networks. Its purpose is to induce extensibility, neutrality and independence. It uses XML Information Set for its message format, and relies on application layer protocols, most often Hypertext Transfer Protocol (HTTP) or Simple Mail Transfer Protocol (SMTP), for message negotiation and transmission. - SOAP is an XML-based protocol for accesing web services.

What is SOA?

"- Service Oriented Architecture - It's an architectural concept which focuses on having different services communicating with each other to carry out a bigger job. - Services have simple well-defined interfaces. - Promotes loose coupling. - Services are black-box

What is WSDL?

"- Web Service Definition Language. - It's a language agnostic XML document that defines the structure of our SOAP web service. - The WSDL is an XML-based lenguage for describing web services

" What are some benefits to using REST?

"-REST allows a greater variety of data formats, whereas SOAP only allows XML. -Coupled with JSON (which typically works better with data and offers faster parsing), REST is generally considered easier to work with. -Thanks to JSON, REST offers better support for browser clients. -REST provides superior performance, particularly through caching for information that's not altered and not dynamic. -It is the protocol used most often for major services such as Yahoo, Ebay, Amazon, and even Google. -REST is generally faster and uses less bandwidth. It's also easier to integrate with existing websites with no need to refactor site infrastructure. This enables developers to work faster rather than spend time rewriting a site from scratch. Instead, they can simply add additional functionality.

What is contract first and contract last?

"-When WSDL is created first and then the application is then structured around the definition provided in the WSDL -application is created first and then our WSDL is generated based on our application code

" What is a messaging queue?

"-a queue of messages sent between applications -in a queue, a pool of consumers may read from a server and each record goes to one of them

" What is a Web Service?

"-a software that makes itself available over the internet -uses a standardized messaging system -typically used in B2B (Business to Business integration)

" Microservices Definition

"-an architectural style of developing applications and an alternative to the traditional "monolithic" applications -decomposition of a single system into a suite of small services: -each service runs on an independent process -inter-service communication is performed using standardized, open protocols

" Any disadvantage in using microservices?

"-complexity is moved from the application layer to the ops layer -services may be unavailable -transactions are absent when data is spread across services -loss of ACID properties during transaction -chatty

Main advantage of using Microservices?

"-no single point of failure -easier to test individual service -easier to scale individual service -ability to use the proper language or framework for the job -ability to use a persistence model suited to the services data -data is more secure

" Microservices Features

"-services are separately written, deployed, and maintained -services encapsulate business functionality(instead of a functionality being encapsulated using language constructs (classes, packages, etc.)) -services are independently replaceable + upgradeable

What are the Ready States in HTTP?

"0 - UNSENT 1 - OPENED 2 - HEADERS_RECEIVED 3 - LOADING 4 - DONE

" LinkedList vs ArrayList

"1) LinkedList uses double linked list to store elements while ArrayList uses dynamic array to store elements. 2) Manipulating(inserting/removing) elements of a LinkedList is faster than ArrayList because ArrayList requires shifting of elements in memory. 3) LinkedList is faster for manipulating, ArrayList is faster for storing and accessing data.

What is the difference between a List and a Set?

"1) List maintains insertion order, Set doesn't 2) List allows duplicates, Set does not 3) List allows null values, Set only allows one

" What is the AJAX workflow?

"1) Make XHR object 2) Define readystatechange function 3) open 4) send

" Bean Lifecycle

"1) request bean (ac.getBean(""name"")

What is the general flow of Hibernate to the RDBMS?

"1. Load the Hibernate configuration file and create configuration object. It will automatically load all hbm mapping files. 2. Create session factory from configuration object 3. Get one session from this session factory. 4. Create HQL query. 5. Execute query to get list containing Java objects.

What are the HTTP statuses?

"100s - Informational 200s - Success 300s - Redirection 400s - Client side errors 500s - Server side errors

HTTP Error codes: 200, 202, 204, 300, 400, 401, 403, 404, 415, 418, 420

"200- OK! Success 202 accepted 204 no content 300 Multiple choice 400- Bad Request - Invalid request 401- Unauthorized- missing/incorrect authentication credentials 403- Forbidden - Request is understood but its been refused, w/ explaining why 404 Not found 415 Unsupported Media Type 418 I'm a teapot 420 Enchance your calm- too many requests

" c) Configuration Server.

"<!-- Config Server: Configuration Service used to configure other services, registered to Eureka --> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-config-server</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-eureka</artifactId> </dependency>

a) Eureka (Discovery).

"<!-- Eureka: Service registration and discovery --> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-eureka</artifactId> </dependency> <!-- Eureka Server --> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-eureka-server</artifactId> </dependency>

" b) Zuul (Gateway).

"<!-- Zuul: Gateway API Service used to access our services registered to Eureka --> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-zuul</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-eureka</artifactId> </dependency>

What do elements and attributes need to be to achieve XHTML?

"<!DOCTYPE html> html, head, title, body inside the html tag it must specify xml namespace

" d) Kafka (Messaging).

"<dependency> <groupId>org.springframework.kafka</groupId> <artifactId>spring-kafka</artifactId> </dependency>

" What do you need to include in the hibernate.cfg.xml file?

"<hibernate-configuration> <session-factory> <property name=""some property""> some properties: hibernate.dialect - (what type of sql?) hibernate.connection.driver_class (what driver our DB uses) hibernate.connection.url (url of DB) hibernate.connection.username/hibernate.connection.password mapping resource=""Classname.hbm.xml""

" What do you need to include in the HBM?

"<hibernate-mapping> <class> -name -table -catalog <id> -name -type, and in it <column>, perhaps also <generator> any number of <property> -name -type, also requiring <column> <one-to-one>,<one-to-many>,<many-to-many>, or <many-to-one> -- should provide name,class, and cascade fields

What are some common tags?

"<html> <body> <link> <a> <h1> <p> <img>

" What tag do you use to create an image?

"<img> ex: <img src=""..."">

" What are the important tags you need to include within Context-Param and Init-Param

"<param-name> <param-value>

What tag would you use to create lists?

"<ul> or <ol> and <li> should be nested within for each item

" @Autowired vs @Inject vs @Resource

"@Autowired and @Inject Matches by Type Restricts by Qualifiers Matches by Name @Resource Matches by Name Matches by Type Restricts by Qualifiers (ignored if match is found by name)

" Difference between @BeforeClass and @Before?

"@BeforClass will run once before any of the test methods in the class. @Before runs before @Test

" SpringMVC Annotations

"@Controller @InitBinder @ModelAttribute @RequestMapping @RequestParam @SessionAttributes

" Annotations for Eureka

"@EnableEurekaServer - in Spring Driver @EnableDiscoveryClient

" Annotations of Eureka and what they do.

"@EnableEurekaServer: start-ups a registry that other applications can talk to. (service) @EnableDiscoveryClient:uses the Spring Cloud DiscoveryClient abstraction to interrogate the registry for it's own host and port. (client)

" What are common annotations associated with Kafka?

"@EnableKafka @KafkaListener(""{{topic}}"")

" Annotations of Zuul and what they do.

"@EnableZuulProxy: turns the Gateway application into a reverse proxy that forwards relevant calls to other services.

Annotations of Hysterix and what they do?

"@HystrixCommand: wraps method in a proxy connected to a circuit breaker so that Hystrix can monitor it. @EnableCircuitBreaker: tells Spring Cloud that the application uses circuit breakers and to enable their monitoring, opening, and closing.

Annotations

"@Ignore, @Test, @After, @Before, @AfterClass, @BeforeClass

What are the annotations used in Web Services?

"@WebService @WebMethod @WebParam @WebResult

" Soap Annotations

"@WebService @WebMethod @WebResults @RequestWrapper @ResponseWrapper

" URL vs URI vs URN

"A URL is a URI that identifies a resource and also provides the means of locating the resource by describing the way to access it Uniform Resource Identifier (URI) is a string of characters used to identify a name or a resource on the Internet

" What is a URI?

"A Uniform Resource Identifier (URI) is a string of characters designed for unambiguous identification of resources and extensibility via the URI scheme.

What is a callback function?

"A callback function, also known as a higher-order function, is a function that is passed to another function (let's call this other function "otherFunction") as a parameter, and the callback function is called (or executed) inside the otherFunction.

" What does it mean to be Layered?

"A client cannot ordinarily tell whether it is connected directly to the end server, or to an intermediary along the way. Intermediary servers may improve system scalability by enabling load-balancing and by providing shared caches. Layers may also enforce security policies.

What does it mean to be "Falsy"?

"A falsy value is a value that translates to false when evaluated in a Boolean context. Boolean, Null, Undefined, 0, NaN, Empty Strings

" What is a Sequence?

"A feature supported by some database systems to produce unique and automatically incrementing value on demand.

" What is a Provider?

"A provider is an instruction to the DI system on how to obtain a value for a dependency. Most of the time, these dependencies are services that you create and provide. e.g. providing a service or httpservice...

" What is a Schema?

"A schema is a collection of database objects associated with one particular database username.

" What is Elastic Beanstalk?

"A service used for deploying and scaling web applications and services developed with different languages. Elastic Beanstalk also handles the deployment, from capacity provisioning, load balancing, auto-scaling to application health monitoring

What are Tables?

"A table is a set of data elements using a model of vertical columns and horizontal rows, the cell being the unit where the two intersect.

" What is Normalization? What is it used for?

"A technique used to restructure an relational database (RDS) to reduce data redundnacy and promotes data integrity

" What is a Cursor?

"A tool that is used to iterate over a result set, or to loop through each row of a result set one row at a time.

What are Triggers? When can it execute?

"A trigger is a of stored procedure that automatically executes when an event occurs in the database server. Triggers execute when a user tries to modify data through a data manipulation language (DML) event.

" What is Docker Swarm?

"A way of creating multiple instances of docker container nodes with one queen image and many worker nodes, with all nodes as candidates to take the place of the queen, should the queen fall

What are actuators in Spring Boot?

"Actuator is a library that brings production-ready features to an application. The main benefit of it is that we can get production grade tools without having to actually implement these features ourselves.

" Autowiring. How to configure it?

"Add the context schema to your configuration XML and use the @Autowired annotation.

" How do you reload any changes in Spring Boot withou having to restart it?

"Add the dependency of spring-boot-devtools in pom.xml: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <version>1.3.0.RELEASE</version> </dependency>

" What is AMI?

"Amazon Machine Image is a special type of virtyal appliance that is used to create a virtual machine within the EC2. It serves as the basic unit of deployment for services delivered using EC2

What is AWS?

"Amazon Web Services is a secure cloud services platform, offering compute power, database storage, content delivery and other functionality to help businesses sclase and grow.

" What is ANSI?

"American National Standards Institute- is a private, non-profit organization. that administers and coordinates the U.S. voluntary standards and conformity assessment system.

" What is ASCII?

"American Standard Code for Information Interchange- is a character encoding stadard for electronic communication

" What is an ERD?

"An Entitiy Relationship Diagram is a graphical representation of an information system that depicts the relationships among people, objects, places, concepts or events within that system.

What does it mean to be a Single Page Application?

"An application that creates or emulates the user experience of having one HTML page that updates in real time, as opposed to chaining redirects and refreshes to pages

" What is an Index?

"An index is a copy of selected columns of data from a table that can be searched very efficiently.

What is an index?

"An index is used to speed up the performance of queries. It does this by reducing the number of database data pages that have to be visited/scanned.

" What are Closures?

"An inner function that has access to the outer functions variables. Scope Chain

" What is an Observable?

"An object that provides support for passing messages between publishers and subscribers in an Angular application. methods: next (get a value), error (error), complete (complete) -an observable is used by SUBSCRIBING to an observable. in an assigment operation, you are usually doing .subscribe( aliasToNext => (do some crap with aliasToNext))

" What is Code-On-Demand?

"Any technology that sends executable software code from a server computer to a client computer upon request from the client's software. Some well-known examples of the code on demand paradigm on the web are Java applets, Adobe's ActionScript language for the Flash player, and JavaScript.

" What are the types of ELB?

"Application Load Balancer - handles advanced traffic routing from other services or containers at the application level Computing - speads app or network traffic across EC2 instances

Array vs ArrayList

"Array is a fixed size data structure while ArrayList is not. Array can contain primitives and objects while ArrayList can only contain objects.

" What is AOP?

"Aspect-Oriented Programming (AOP) complements Object-Oriented Programming (OOP) by providing another way of thinking about program structure. The key unit of modularity in OOP is the class, whereas in AOP the unit of modularity is the aspect.

What is AJAX?

"Asynchronous JavaScript & XML: Update a web page without reloading the page Request data from a server - after the page has loaded Receive data from a server - after the page has loaded Send data to a server - in the background

What are the Transaction Properties?

"Atomicity Consistency Isolation Durable

What is resiliency?

"Basically the ability to quickly recover and continue to operate in the event of a disruptions

" ApplicationContext vs BeanFactory

"BeanFactory is older, lazily intantiates, and must be provided a resource object. Application Context is newer/includes more functionalities, eagerly intantiates, and creates and manages their own resource object.

" How do I create a bean in the container?

"Beans.xml <beans> <bean name=""beanA"" class=""com.example.bean.BeanA""> <property name=""beanB"" ref=""beanB""/> </bean> <bean name=""beanB"" class=""com.example.bean.BeanB""> </bean> </beans>

Advice Kinds

"Before: Advice that executes before a join point, but which does not have the ability to prevent execution flow proceeding to the join point (unless it throws an exception). After returning: Advice to be executed after a join point completes normally: for example, if a method returns without throwing an exception. After throwing: Advice to be executed if a method exits by throwing an exception. After: Advice to be executed regardless of the means by which a join point exits (normal or exceptional return). Around: Advice that surrounds a join point such as a method invocation. This is the most powerful kind of advice.

" What are some common decorators?

"Class decorators, e.g. @Component and @NgModule Property decorators for properties inside classes, e.g. @Input and @Output Method decorators for methods inside classes, e.g. @HostListener Parameter decorators for parameters inside class constructors, e.g. @Inject

What is a Restriction?

"Class that contains static methods to narrow Criteria searches

" What is a Projection?

"Class that contains static methods to narrow Criteria searches. Most of the functions act like aggregate functions

What is a Proxy?

"Classes functioning as an interface to something else. In the case of Hibernate, classes generated dynamically to help with lazy loading

" What does it mean to be Cacheable?

"Clients can cache responses. Responses must therefore, implicitly or explicitly, define themselves as cacheable, or not, to prevent clients reusing stale or inappropriate data in response to further requests. Well-managed caching partially or completely eliminates some client-server interactions, further improving scalability and performance.

" Load time vs Compile time Weaving

"Compile-time weaving: The AspectJ compiler takes as input both the source code of our aspect and our application and produces a woven class files as output Post-compile weaving: This is also known as binary weaving. It is used to weave existing class files and JAR files with our aspects Load-time weaving: This is exactly like the former binary weaving, with a difference that weaving is postponed until a class loader loads the class files to the JVM

Compiling vs Transpiling?

"Compiling is the general term for taking source code written in one language and transforming into another Transpiling is a specific term for taking source code written in one language and transforming into another language that has a similar level of abstraction

Complex Types vs Simple Types

"Complex type is an element that contains other elements/attributes Simple type is element which cannot have element content and cannot carry attributes

" Microservice features

"Componentization via Services * services encapsulate business functionality |-> not based on a single tech stack |-> suitable for cross-functional teams * services are small, independently deployable applications |-> no language/framework lock |-> polygot persistence |-> individual services are more easily scaled, maintained, and deployed

What are components?

"Components are the most basic building block of an UI in an Angular application. An Angular application is a tree of Angular components. Angular components are a subset of directives. Unlike directives, components always have a template and only one component can be instantiated per an element in a template.

What are the set operators?

"Conbine results of two queries into a single set ex. Union union all intersect minus

How do you consume a Web Service?

"Consuming a SOAP service with a Java Application 1. Apache CXF dependencies in our pom 2. Create the same models (pojos) as are defined in the SOAP service, these are the complex types defined in the WSDL 3. Create an interface which declares all of the service methods, found in our operation tags in our WSDL -don't provide any implementing class just interface with @WebService -also want to declare exceptions (no need for implementation for here either) 4. JaxWsProxyFactoryBean object is used to interact with our service -set interface and endpoint url -invoke its create() method 5. Client is able to use service methods ~~~~Service is consumed~~~~

" What is CDN?

"Content Distribution Network - a way of importing angularJS files form the web: <script src=""<url>.js"" ></script>

" Context-Param vs Init-Param

"Context Param is global for all servlets Init Param is for local servlets

" ContextLoaderListener

"ContextLoaderListener creates a root web-application-context for the web-application and puts it in the ServletContext. This context can be used to load and unload the spring-managed beans ir-respective of what technology is being used in the controller layer

" What is CD?

"Continous Delivery-on top of continuous integration, you automate updates to backend

" What is CDD?

"Continous Deployment- on top of continous delivery, you automate the updates to production

What is CI?

"Contious Integration- is a development practice that requires developers to integrate code into a shared repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems early

" Spring Modules.

"Core, Beans, Context, Expression Language, JDBC, ORM, OXM, JMS, Transaction, Web, Web-Servlet, Web-Portlet, AOP, Aspects, Instrumentation, Test

" What are the HTTP Methods? What CRUD operations do they correspond to?

"Create POST Read GET Update PUT PATCH Delete DELETE

What is a Query Interface? What methods does it provide?

"Creates more complicated and specific queries to the database. Where you use HQL (or even SQL but you wouldnt do that). Methods: list(), executeUpdate(), setFirstResult(int startPosition), and setMaxResults(int maxResult)

Difference between HQL and Criteria API

"Criteia performs only ""select"" in a database Criteria is slower, but is safe from SQL injection A Criteria object has methods to to narrow queries

" What is DCL and its keywords?

"Data Control Language Used to modify access. GRANT and REVOKE are both statements that fall into this category

What is DDL and its keywords?

"Data Definition Language Used to define a data structure. CREATE, ALTER, DROP, and TRUNCATE are all statements that fall into this category.

" What is DML and its keywords?

"Data Manipulation Language Used to manipulate data in a data structure. INSERT, UPDATE, and DELETE are all statements that fall into this category

" What is DQL and its keyword?

"Data Query Language A subset of DML (SELECT, JOIN)

" What is a Binding?

"Data binding in Angular is the synchronization between the model and the view.

" What is DataBinding?

"Data binding is the process that establishes a connection between the application UI and business logic. If the binding has the correct settings and the data provides the proper notifications, then, when the data changes its value, the elements that are bound to the data reflect changes automatically.

" What is Referential Integrity?

"Database concept which states that relationships must always be consistent

" What are decorators?

"Decorators are a design pattern that is used to separate modification or decoration of a class without modifying the original source code. In Angular, decorators are functions that allow a service, directive or filter to be modified prior to its usage.

" What is Uniform-Interface?

"Defines the interface between clients and servers. It simplifies and decouples the architecture, which enables each part to evolve independently. The four guiding principles of the uniform interface are: Resource-Based Individual resources are identified in requests using URIs as resource identifiers. The resources themselves are conceptually separate from the representations that are returned to the client. For example, the server does not send its database, but rather, some HTML, XML or JSON that represents some database records expressed, for instance, in Finnish and encoded in UTF-8, depending on the details of the request and the server implementation. Manipulation of Resources Through Representations When a client holds a representation of a resource, including any metadata attached, it has enough information to modify or delete the resource on the server, provided it has permission to do so. Self-descriptive Messages Each message includes enough information to describe how to process the message. For example, which parser to invoke may be specified by an Internet media type (previously known as a MIME type). Responses also explicitly indicate their cache-ability. Hypermedia as the Engine of Application State (HATEOAS) Clients deliver state via body contents, query-string parameters, request headers and the requested URI (the resource name). Services deliver state to clients via body content, response codes, and response headers. This is technically referred-to as hypermedia (or hyperlinks within hypertext).

What is DevOps?

"Development + Operations teams -Seeks to build a relationship between developers & operations team with open communication between the two

What is the Docker workflow?

"Docker file Docker image Docker container

What is DTD?

"Document Type Definition - section in the xml document that determines the legal elements. and attributes

" What are some providers for L2 Caching?

"EHCache, OSCache, SwarmCache, JBoss Cache You will want to look into their concurrency strategies, or their strategies for mediating data storage in cache from safest to unsafe: -Transactional Read-write Nonstrict-read-write Read-Only

" What is First Normal Form?

"Each table cell should contain single value and each record is unique (to that column) and is identified by a primary key

" What is EBS?

"Elastic Block Storage- provides persistent block storage volumes for use with EC2 instances in the AWS Cloud. It protects us from losing data by automatically replicating data within its Availability Zones

" What is EC2?

"Elastic Cloud Compute- Provides scalable computing capacity in the AWS cloud. It allows us to develope applications faster. Allows us to scale up or down to handle changes in requirements or spikes in popularity, reducing your need to forecast traffic

" What is ELB?

"Elastic Load Balancing It automatically distributes incoming application traffic and scales resources to meet traffic commands

What are the rules for an element in XML?

"Element names are case-sensitive. Element names must start with a letter or underscore. Element names cannot start with the letters xml (or XML, or Xml, etc) Element names can contain letters, digits, hyphens, underscores, and periods. Element names cannot contain spaces.

" How do I enable/configure annotations?

"Enable annotation based bean configuration by including the ""context:annotation-config tag in the Spring XML based configuration file.

What are common commands found in a Dockerfile (explain those listed)

"FROM <image> [AS <name>] FROM <image>[:<tag>][AS <name>] FROM <image>[@<digest>][AS <name>] ARG EXPOSE <port> LABEL <key>=<value> ... ADD --- copies files and adds to the filesystem of the image at the path COPY --- 2 forms similar to ADD WORKDIR -sets working directory for running commands RUN - run commands in a new layer on top of the image and commits the result. CMD - provides defaults for an executing container

" How to configure SpringMVC?

"First, web.xml is to be set up as you would a servlet config can be done with java or xml: in Java: with Annotations, define an MVC bean InternalResourceViewResolver bean = new InternalResourceViewResolver()

" Forward() vs SendRedirect()

"Forward() - sends the request to another resource within the same server. Also the URL is transparent and you cannot see the change. SendRedirect() - sends the request to another resource outside of the server to another or the same server. The client can then see the change of the redirection in the URL

What is a self-invoking function?

"Functins that invoke themselves. Typically should be used once for event listeners. They are only executed once to ovoid cluttering the global namespace

What are functions in JS?

"Functions are one of the fundamental building blocks in JavaScript. A function is a JavaScript procedure—a set of statements that performs a task or calculates a value. To use a function, you must define it somewhere in the scope from which you wish to call it.

" GET vs POST

"GET - is used to request data from a specified resource POST - is used to send data to a server to create/update a resource

doGet vs doPost vs GET vs POST

"GET and POST are Http methods while doGet and doPost are methods used inside of Service()

" What is a Generic?

"Generics are a facility of generic programming. They are designed to extend Java's type system to allow a type or method to operate on objects of various types while providing compile-time type safety

How would you express a join in Hibernate?

"HQL provides four ways of expressing (inner and outer) joins:- ● An implicit association join ● An ordinary join in the FROM clause ● A fetch join in the FROM clause. ● A theta-style join in the WHERE clause.

HashTable vs HashMap

"Hashtable is synchronized, whereas HashMap is not. This makes HashMap better for non-threaded applications, as unsynchronized Objects typically perform better than synchronized ones. Hashtable does not allow null keys or values. HashMap allows one null key and any number of null values.

What is HBM?

"Hibernate mapping-- used to declare relationships between hibernate entities.

" What is IAM?

"Identity and Access Management- a web service that helps you securely control access to AWS resources. You use IAM to control who is authenticated (signed in) and authorized(has permissions) to use resources

" How do you achieve Abstraction?

"In Java, this is primarily achieved through the use of interfaces and abstract classes. Interfaces up until Java 8 (inclusion of default and static methods) was pure abstraction as it provided only abstract methods and abstract classes have always had the ability to create concrete methods along with providing abstract methods.

" How do you expose a Web Service?

"In SOAP: -Make a WAR packaged project, including Apache CXF dependencies & Spring MVC -WEB.XML define CXF Servlet Beans.xml - include schema definitions/namespaces Create an interface annotated with @webservice-- includes all of our service method create an implementing class, which specifies the behavior of the service method Register our service implementation endpoint in our beans.xml run our application on tomcat

" InternalResourceViewResolver

"In Spring MVC, InternalResourceViewResolver is used to resolve "internal resource view" (in simple, it's final output, jsp or htmp page) based on a predefined URL pattern.

" What is XML Namespace?

"In XML, element names are defined by the developer. This often results in a conflict when trying to mix XML documents from different XML applications. Name conflicts in XML can easily be avoided using a name prefix. When using prefixes in XML, a namespace for the prefix must be defined.

What is the IS-A rule?

"In object-oriented programming, the concept of IS-A is a totally based on Inheritance, which can be of two types Class Inheritance or Interface Inheritance. It is just like saying ""A is a B type of thing"". For example, Apple is a Fruit, Car is a Vehicle etc. Inheritance is uni-directional. For example, House is a Building. But Building is not a House. It is a key point to note that you can easily identify the IS-A relationship. Wherever you see an extends keyword or implements keyword in a class declaration, then this class is said to have IS-A relationship.

" How do you register an annotated POJO?

"In the hibernate.cfg.xml file add: <mapping class=""com.NameOfPOJO""/>

" How do you register a HBM file?

"In the hibernate.cfg.xml file add: <mapping resource=""path/NameOfPOJO.hbm.xml""/>

" What is IaaS?

"Infrastructure as a Service. It takes care of the Virtualization, Storage, Networking and Servers.

" Inversion of Control

"Inversion of Control is a principle in software engineering by which the control of objects or portions of a program is transferred to a container or framework.

" What is Interpolation?

"Is inserting something into something else. In angular, we can interpolate values into attributes and strings with {{}}

What is the Garbage Collector?

"It allows developers to create new objects without worrying explicitly about memory allocation and deallocation, because the garbage collector automatically reclaims memory for reuse. This enables faster development with less boilerplate code, while eliminating memory leaks and other memory-related problems. At least in theory. Ironically, Java garbage collection seems to work too well, creating and removing too many objects. Most memory-management issues are solved, but often at the cost of creating serious performance problems. Making garbage collection adaptable to all kinds of situations has led to a complex and hard-to-optimize system.

What are events?

"It essentially executes JavaScript code. Examples are click, image loads, page loads, hovering, key strokes, ect.

" What is Autoscaling?

"It is a feature in AWS that allows us to gurantee that we have enough EC2 instances behind an Elastic Load Balance so data will not be lost

" What is a Cache?

"It is a memory buffer between application and database. It stores recently used data to reduce database hits

What are Generics for?

"It is used for type-safety and also it provides increased flexibility when designing a class by allowing for one to create objects of varying types using a single class.

What is the iterative model?

"Iterative process starts with a simple implementation of a subset of the software requirements and iteratively enhances the evolving versions until the full system is implemented. At each iteration, design modifications are made and new functional capabilities are added.

" JSON vs JS Object

"JSON valuse are limited to strings, numbers, objects, arrays, Boolean, null data types. JS Objects can take a variety of different types of objects. Such as functions

" Which version of JUnit have you used?

"JUnit version 4.12. Its located on the POM.XML as a Dependency -> Dependencies tags.

" What is JAX-RS?

"Java API for RESTful Web Services (JAX-RS) is a Java programming language API spec that provides support in creating web services according to the REST architectural pattern.

" What is JAX-WS?

"Java API for XML Web Services (JAX-WS) is a Java programming language API for creating web services, particularly SOAP services. JAX-WS is one of the Java XML programming APIs. It is part of the Java EE platform.

" What is JAX-RPC?

"Java API for XML-based RPC (JAX-RPC) allows a Java application to invoke a Java-based Web service with a known description while still being consistent with its WSDL description. JAX-RPC is one of the Java XML programming APIs. It can be seen as Java RMIs over Web services.

What is a Queue?

"Java Queue interface orders the element in FIFO (First In First Out) manner. In FIFO, first element is removed first and last element is removed at last.

" What is a TreeSet?

"Java TreeSet class implements the Set interface that uses a tree for storage. The objects of TreeSet class are stored in ascending order.

What is Java?

"Java is a general-purpose computer-programming language that is concurrent, class-based, object-oriented, and specifically designed to have as few implementation dependencies as possible

JavaScript vs AJAX

"Javascript is a scripting language which is typically used for client-side functionality although it can exist at server-side (node.js). AJAX (Asynchronous javascript and XML) is the javascript implementation of partial server requests which is typically carried out using the XMLHttpRequest object

JoinPoint vs Point cut

"Join point: a point during the execution of a program, such as the execution of a method or the handling of an exception. In Spring AOP, a join point always represents a method execution. Pointcut: a predicate that matches join points. Advice is associated with a pointcut expression and runs at any join point matched by the pointcut (for example, the execution of a method with a certain name).

What is a record?

"Key/Value pair that has a timestamp. Key specifies what partition that the record belongs to and value is the payload

L1 caching vs L2 caching

"L1 is session scoped, L2 is sessionFactory scoped L2 will persist after session closes

" What are the types of Caches? What are the differences? What the levels? L1, L2

"L1, L2, Query Level L1: session cache - mandatory and default L2: persists across multiple sessions-- generally used with third party caches. org.hibernate.cache.CacheProvider

" Spring is loosely coupled. Explain why we say this.

"Loose coupling is achieved by means of a design that promotes single-responsibility and separation of concerns.Loose coupling in Springis made possible through dependency injection. In dependency injection, components define their own dependencies when they need it.

" What is @RequestMapping?

"Maps a URL pattern and/or HTTP method to a method or controller type.

@Autowired.

"Marks a constructor, field, setter method or config method as to be autowired by Spring's dependency injection facilities.

What happens if you don't have a gateway? Can you have microservices without this?

"Microservices do not need a gateway. An API gateway provides a single, unified API entry point across one or more internal APIs. They typically layer rate limiting and security, as well.

What is SpringMVC?

"Module of spring which allows our applications to handle HttpRequest. Epitomizes front controller pattern.

" Contextual Session

"Most applications using Hibernate need some form of ""contextual"" sessions, where a given session is in effect throughout the scope of a given context.

" What is Routing? How do we implement it?

"Navigation from one view to the next without breaking the one-page-application UX Import router module with @angular/router you must then configure a router-module to have 'routes'

" Examples of who is using microservices

"Netflix (Java monolith → microservices) Twitter (Ruby/Rails monolith → microservices) Facebook (PHP monolith → microservices)

" Can you override static methods?

"No, static methods are looked up at compile-time and overriding a method occurs during runtime

" What is a broker?

"Nodes that are found in a cluster that handle a share of the parition

" What is OBP?

"Object Based Programming-It is not OOP the main difference is instead of traditional inheritance like in OOP, JavaScript supports Protoype inheritance

" What is a Phantom Read?

"Occurs when a row that matches a search criteria is not shown, usually when an outside transaction generates a new row inbetween queries

" What is a Dirty Read?

"Occurs when a transaction reads data that has not yet been commited

" What is a Non-Repeatable Read?

"Occurs when transaction reads same row twice, but gets different data each time

" What are the different relationships in SQL

"One to One, One to Many, Many to Many, Many to One, Self-referencing

PUT vs POST

"PUT -idempotent -will have server store data POST -not idempotent -pushes newly created data to web service

" What 3 parts of a business are associated with DevOps?

"People, Process, and Technology People-involves culture and change Process-Involves the adoption of the process that makes the most sense for your people and your business Technology- is automating everything you can to make it ""Hands-Free""

" What is PaaS?

"Platform as a Service It takes care of the Middleware Applications, Runtime Environments, Operating System(s) Virtualization, Storage, Networking and Servers.

" What is Spring Data?

"Provides a familiar and consistent, Spring-based programming model for data access, from databases and repositories, while still retaining the special traits of the underlying data store.

What are the ORM levels?

"Pure Relational ORM: At this level entire application is designed around the relational model. All the operations are SQL based at this level. Light Object Mapping: At this level entity classes are mapped manually to relational tables. Business logic code is hidden from data access code. Applications with less number of entities use this level. Medium Object Mapping: In this case, application is designed around an object model. Most of the SQL code is generated at compile time. Associations between objects are supported by the persistence mechanism. Object-oriented expression language is used to specify queries. Full Object Mapping: This is one of the most sophisticated object modeling level. It supports composition, inheritance, polymorphism and persistence. The persistent classes do not inherit any special base class at this level. There are efficient fetching and caching strategies implemented transparently to the application.

" SOAP vs REST

"REST -not much implicit documentation (not contract based) -any data format (wml, json, etc) -lightweight -cached -accessed through uri endpoint + http verbs -http SOAP -contract based -only using xml -heavier protocol than REST -accessed through a service endpoint interface -not tied to any paticular protocol (don't have to use http)

" What is RESTful?

"RESTful means a service follows all of the following principles (not all REST services follow these): -It should be stateless -It should access all the resources from the server using only URI -It does not have inbuilt encryption -It does not have session -It uses one and only one protocol that is HTTP -For performing CRUD operations, it should use HTTP verbs such as get, post, put and delete -It should return the result only in the form of JSON or XML, atom, OData etc. (lightweight data )

" What is JAX-RMI?

"RMI (remote method invocation) is a type of RPC (remote procedure call) scheme that is particular to the specifics of the Java language and runtime environment. The purpose of RMI is to allow nearly-transparent access to Java objects running in remote Java address spaces through local interfaces in the local Java address space. RMI makes use of the Java serialisation standard to serialise graphs of objects that might be passed as parameters or returned as results.

What are the different Isolation Levels? What anomalies does each allow?

"Read uncommited - has dirty read,nonrepeatable reads,and phantom Read commited - has nonrepeatable reads and phantom Repeatable Read - phantom Serializable - no problems

" What is minification?

"Reducing source code down to the bare minimum representation -remove all whitespace,linebreaks,etc that do not serve function -remove all comments and unused code -reduce variable and method names, if possible, down to few characters (e.g. int a instead of int alpha)

" Region vs Availability Zones

"Regions- Are essentially seperated geographic areas. It is designed to be completely isolated from other Amazon EC2 regions Availability Zones- Takes the information from the instances and stores them. You can span your instances across a variety of Availability Zones to essentially always be allowed to acess that information if one goes down.

What is RDS?

"Relation Database System is a web service that makes it easier to set up, operate, and sclae a relational database in the cloud. It provides cost-efficient, resizable capacity for an industry-standard relational database and manages common database administration task

What is an RDBMS?

"Relational Database Management System It uses a structure that allows us to identify and access data in relation to another piece of data in the database. Often, data in a relational database is organized into tables.

WSDL Messaging exchange Formats

"Request-Response - cliend sends request, server sends response One-Way - client sends request, no response from server Solicit Response - server sends request, client sends response Notification- Server sends req, no client Response

" What is a Constraint? Give a few examples.

"Rules used to limit the type of data that can go into a table. -NOT NULL -DEFAULT -UNIQUE -PRIMARY KEY -FOREIGN KEY -CHECK -INDEX

" @EnableFeignClients

"Scans for interfaces that declare they are feign clients (via @FeignClient). Configures component scanning directives for use with @Configuration classes.

What is Serialization?

"Serialization is a mechanism of converting the state of an object into a byte stream. Deserialization is doing the reverse

Servlet Context vs Servlet Config

"Servlet Config- parameters are specified for a particular servlet and are unknown to other servlets. Servlet Context - parameters are specified for an entire application outside of any particular servlet

" What is S3?

"Simple Storage Service- is a object storage built to store and retrieve any amount of data from anywhere. It is dessigned to deliver 11 9's durability. Inside of an S3 there is Buckets, Objects, and Keys

What is varargs?

"Simplifies the creation of methods that need to take a variable number of arguments. This feature is called varargs and it is short-form for variable-length arguments. A method that takes a variable number of arguments is a varargs method.

" Bean Scopes.

"Singleton(default), Prototype, request, session, global session

" What is SonarQube?

"SonarQube (formerly Sonar) is an open source platform developed by SonarSource for continuous inspection of code quality to perform automatic reviews with static analysis of code to detect bugs, code smells and security vulnerabilities on 20+ programming languages.

" Spring AOP vs AspectJ

"Spring AOP aims to provide a simple AOP implementation across Spring IoC to solve the most common problems that programmers face. It is not intended as a complete AOP solution - it can only be applied to beans that are managed by a Spring container. On the other hand, AspectJ is the original AOP technology which aims to provide complete AOP solution. It is more robust but also significantly more complicated than Spring AOP. It's also worth noting that AspectJ can be applied across all domain objects.

" What is SQL?

"Structured Query Language is a programming language used to communicate with and manipulate data in a RDBMS.

What is a Structural Directive?

"Structures HTML layout. It reshapes the DOM structure by adding, removing, or manipulating elements.

" What are the EC2 Instance types

"T2- They are designed to provide a baseling level of CPU performance with the ability to burst to a higher level when required by the workload M5-Latest generation of general purpose compute instances. Offers a balance of compute memory and networking resources for a broad range of workloads. Best used for small and mid-size databases, data processing tasks that require additional memory, caching fleets, and for running backend servers for SAP, Microsoft, SharePoint, cluster computing, and other enterprise applications M4-same as M5 but it is the older version

What is TCP/IP?

"TCP/IP stands for Transmission Control Protocol/Internet Protocol, which is a set of networking protocols that allows two or more computers to communicate.

Explain Spring Boot

"Takes an opinionated view of building production-ready Spring applications. Spring Boot favors convention over configuration and is designed to get you up and running as quickly as possible.

" What is Spring Boot?

"Takes an opinionated view of building production-ready Spring applications. Spring Boot favors convention over configuration and is designed to get you up and running as quickly as possible.

What is your experience with JUnit?

"Talk about how you incorporated unit testing into your java applications using JUnit. YOU DO NOT NEED MAVEN FOR JUnit. Its a plus if you talk about TDD

" Why do we test software?

"Testing verifies that the system meets the different requirements including, functional, performance, reliability, security, usability and so on. This verification is done to ensure that we are building the system right.

How do I create a component? What does it receive?

"The Angular CLI is the easiest way, but the following is needed: -a directory for component files(.ts, .html, .css, .ts, spec.ts) - .ts file must have @Component and an exported class - app.module.ts must have the component imported in its declarations of @NgModule

How to make http calls in Angular.

"The HttpClient in @angular/common/http offers a simplified client HTTP API for Angular applications that rests on the XMLHttpRequest interface exposed by browsers.

" What is HTTP?

"The Hypertext Transfer Protocol is an application protocol for distributed, collaborative, and hypermedia information systems.

What is a RequestDispatcher?

"The RequestDispatcher interface provides the facility of dispatching the request to another resource it may be html, servlet or jsp.

" What is a SortedSet?

"The SortedSet interface extends Set and declares the behavior of a set sorted in an ascending order.

" What is Spring?

"The Spring Framework is an application framework and inversion of control container for the Java platform. It performs IOC through dependency injection.

" What is the Spring Container?

"The Spring container is at the core of the Spring Framework. The container will create the objects, wire them together, configure them, and manage their complete life cycle from creation till destruction. The Spring container uses DI to manage the components that make up an application.

Cross Cutting Concerns

"The crosscutting concern is a concern which is applicable throughout the application and it affects the entire application. For example: logging, security and data transfer are the concerns which are needed in almost every module of an application, hence they are cross-cutting concerns.

What is the deployment descriptor?

"The deployment descriptor takes the HTTP Request and guides it to the correct servlet. It is also called web xml

" What is an Endpoint?

"The endpoint is a connection point where HTML files or active server pages are exposed. Endpoints provide information needed to address a Web service endpoint. The endpoint provides a reference or specification that is used to define a group or family of message addressing properties and give end-to-end message characteristics, such as references for the source and destination of endpoints, and the identity of messages to allow for uniform addressing of ""independent"" messages.

What is Front Controller?

"The front controller design pattern means that all requests that come for a resource in an application will be handled by a single handler and then dispatched to the appropriate handler for that type of request.

" What is the lifecycle of a Service?

"The life cycle of Web services may be simplified into four stages: design/build, test, deploy/execute, and manage.

" What does it mean to be Stateless?

"The necessary state to handle the request is contained within the request itself, whether as part of the URI, query-string parameters, body, or headers. The URI uniquely identifies the resource and the body contains the state (or state change) of that resource. Then after the server does it's processing, the appropriate state, or the piece(s) of state that matter, are communicated back to the client via headers, status and response body.

" What is Hoisting?

"The process of moving the declaration of a variable NOT the implementation higher up in the code

Difference between the run and start method?

"The start method begins the execution of the thread, while run describes what the thread is going to do.

What are the class members?

"There are FIVE members in a class. Member Variables (States) Methods (Behaviors) Constructor Blocks (Instance/Static Blocks ) Inner Classes.

What is SoapUI?

"Tool for testing web services. Its functionality covers web service inspection, invoking, development, simulation and mocking, functional testing, load and compliance testing.

" What is TCL and its keywords?

"Transaction Control Language Used to manage transactions. SAVEPOINT, ROLLBACK, and COMMIT are all statements that fall into this category

" What are the Hibernate Object States?

"Transient: instantiated on Java side but no representation in the database. Persistent: object managed on the Java side by a hibernate session and has a representation in the database Detached: Object is represented on the databse but is no longer managed by a session

" What is TypeScript?

"TypeScript is a superset of JavaScript that allows for object-oriented properties such as type safety, classes, and interfaces. TypeScript is additionally more robust and easier to test (because you can catch errors in real time).

" What are the RESTful characteristics?

"Uniform Interface Stateless Cacheable Client-Server Layered System Code on Demand (optional)

What is UDDI?

"Universal Description, Discovery, and Integration -XML-based standard for describing, publishing, and finding web services -uses WSDL to describe interfaces to web services

" How do you configure the custom port in Spring Boot?

"Update via a properties or yaml file: server.port=<port> or server: port: <port>

" What is the purpose of ZooKeeper?

"Used by Kafka as a data store (repository for persistent data) and in general it is used as an open-source server used for distributed system

" What design patterns does Kafka employ?

"Uses one parition-multiple subscribers which solves the problems with Queue and Publish/Subscribe

What is the Maven Lifecycle?

"Validate Compile Test Package Integration-test Verify Install Deploy

What are the different types of XML parsing?

"Validating Parser It requires document type declaration It generates error if document does not Conform with DTD and Meet XML validity constraints Non-validating It checks well!formedness for ""ml document It can ignore e""ternal DTD

" ArrayList vs Vector?

"Vector is synchronized. ArrayList is a better choice if your program is thread-safe. Vector each time doubles its array size, while ArrayList grow 50% of its size each time.

What is containerization?

"Virtualization method used to deploy and run distributed systems without creating a virtual machine for each app

" Why would you choose Java?

"We use Java because it is object oriented, type-safe, platform-agnostic, secure, has a large library and user base, and has strong support for multi-threading. Also, Java is used by a large number of devices and is relatively easy to learn and use.

" What is Capturing?

"When a parent element is clicked it will do that event and then look to the child elements to see if there is any events on those. If so, the child elements will be executed

What is Bubbling?

"When an child element is clicked it will do that event and then look to any of parent elements to see if they have an event. If so, they will be activated too.

" Can you test your entire application with JUnit?

"You can test all of your Units within your application. Meaning that you can test all of your application methods.

" How do you test your application automatically?

"You can use JUnit with other tools to manage automated testing such as Selenium which is a library of web drivers that simulates user interaction, and finally Jenkins to schedule testing. There are many tools to help automate your Unit Testing.

What is GREP?

"a Unix command used to search files for the occurrence of a string of characters that matches a specified pattern

What is IT Infrastructure?

"a combined set of hardware, software, networks, facilities, etc. used to develop, test, deliver, monitor, control, or support IT services

" What is the lifecycle of a component?

"a component goes through an entire set of processes or has a lifecycle right from its initiation to the end of the application, many of its stages can be observed through lifecycle hooks

" What is Bootstrap?

"a free front-end responsive library for designing websites and web applications

What is linting?

"a grammar check for computer programs. beyond checking for compile time errors, linting will encourage best practices.

" What is a container?

"a light weight run-time environment that can be created en-mass with a container manager

What is a servlet?

"a small, server-resident program that typically runs automatically in response to user input.

" What is Kafka?

"a very popular publish/subscribe system (similar to messaging queue), which can be used to reliably process a stream of data

" What are the xmlHttpRequest methods?

"abort() - cancels the current request getAllResponseHeaders() - returns header information getResponseHeaders() - returns specific header infromation open() - method,Url,async,uname,pswd send(string) - sends the request off to the server setRequestHeader() - adds a label/value pair to the header to be sent

" What is a Security Group?

"acts as a virtual firewall that controls the traffic for one or more instances. You can associate one or more security groups with the instance. You can also add rules that allow traffic to or from its associated instances

" What is Javascript?

"an object-oriented computer programming language commonly used to create interactive effects within web browsers.

" What are Meta Tags?

"are snippets of text that describe a pages content. they are litte content descriptors that help tell search engines what a web page is about

Different types of assert methods.

"assertEquals- checks if two primitives/objects are equal assertTrue- Checks to see if the condition is true assertFalse- Checks that a condition is false assertNotNull- Checks that an object is not null assertNull- Checks that an object is null assertSame- see if two object references point to the same object assertNotSame- test if two object references do not point to the same object assertArrayEquals- test if two arrays are equal to each other

What are the Hibernate Collection Types?

"bag, indexed list, sets, sorted set, map, sorted map,arrays

" Different types of Autowiring.

"byName: Autowiring looks for specfic method names to make connections. byType: Autowiring looks for specific input type to make connections.

" What are the types of variables?

"byte (number, 1 byte) short (number, 2 bytes) int (number, 4 bytes) long (number, 8 bytes) float (float number, 4 bytes) double (float number, 8 bytes) char (a character, 2 bytes) boolean (true or false, 1 byte)

" "Microservice Application development setup flow"

"configuration,then discovery service, then service (Gateway can be made anytime after discovery service)

" Types of Dependency Injection

"constructor injection: the dependencies are provided through a class constructor. setter injection: the client exposes a setter method that the injector uses to inject the dependency. interface injection(not supported in Spring): the dependency provides an injector method that will inject the dependency into any client passed to it. Clients must implement an interface that exposes a setter method that accepts the dependency.

" What is container orchestration?

"container orchestration - when you orchestrate all the containers?

" How do I integrate Spring and Hibernate?

"create table in the database (optional) create applicationContext.xml file It contains information of DataSource, SessionFactory etc. create persistent class (Employee.java) create employee.hbm.xml file It is the mapping file. create EmployeeDao.java file It is the dao class that uses HibernateTemplate. create InsertTest.java file It calls methods of EmployeeDao class.

" Monolithic disadvantages

"difficult to manage a large codebase difficult for a single form to manage a large database language/framework lock only able to use a single data model single part of failure (if all works, or none of it works)

" What are the method signatures of doGet() and doPost()

"doGet() - this method is designed to get response context from web resource by sending limited amount of input data, this response contains response header, response body doPost() - this method is designed to send unlimited amount of data along with the request to web resource

" What are common CLI commands related to docker? (explain those listed)

"docker build -t {{tagname}} . - creates docker image from docker file docker run -d -p {{hostport}}:{{exposedport}} {{imagename}} - builds a container based on a docker image on described ports

What is XML?

"eXtensible Markup Language, designed for storing and transporting data as-is, XML is purely informative--information that's wrapped in tags. It is designed to be both machine and human readable

Monolithic advantages

"easy to understand conceptually easily tested * easily deployed * easily maintained * complexity is managed by language constructs * → easier up to a certain point (easier if smaller app)

getParameter() vs getAttribute()

"getParameter()-returns http request parameters. Those passed from client to the server. Can only return String getAttribute()-is for server-side usage only. you fill the request with attributes that you can use within the same request. can be used for any object

" Forward() vs Include()

"include()- loads the content of the specified resource directly into the servlets response. as if it was part of calling it Forward() - is used for server side redirection where an HTTP response for one servlet is routed to another resource for processing

" What is the lifecycle of a servlet?

"init method service method destroy method

" What is Kubernetes?

"is a container orchestration system for Docker containers that is more extensive than Docker Swarm and is meant to coordinate clusters of nodes at scale in production in an efficient manner -docker swarm is better for smaller, switch over to kubernetes at a higher scale

" What is Jenkins?

"is a self-contained, open source automation server which can be used to automate various tasks related to building, testing, and delivering or deploying software.

" What are the types of Data Bindings?

"list box check box

" What is NPM?

"node package manager, a dependency manager for node.js and by extension, Angular.

What are the data types in TS?

"number, string, array, tuple, enum, any, void, null, undefined, never, boolean

What is a Dependency Injection?

"one object supplying the dependencies of another -injectable method from service class -inject into receiving class

" What are the relationships in Hibernate?

"one-to-one, many-to-many, one-to-many, many-to-one

" Spring Cloud

"provides libraries to apply common patterns needed in distributed applications: * Eureka (Discovery Service) * Zuul (API Gateway) * Config Server (Configuration Server) * Hystrix (Circuit Breaker) * Feign (RestTemplate)

What are the benefits to Hibernate?

"reduces need for JDBC and sql ceremonies, allows for object-oriented functionality with interaction with DB, allows you to dynamically generate tables

" What is a Service?

"services allow us to access data and methods form components outside of its own

How do I create queries?

"session.createQuery() session.createSQLQuery() session.createCriteria()

What are the query types in Hibernate?

"session.createQuery() - creates a query in HQL syntax session.createSQLQuery() - creates a query in native SQL dialect session.createCriteria() - creates Criteria object for setting the query parameters.General rule for criteria-- used to make complex query. you can use the .add() method to add additional arguments cr.add(some restriction)

" What are the Non-Access Modifiers?

"static final abstract synchronized transient volatile native

" How do I call a resource from Angular?

$resource(url, [paramDefaults], [actions], options);

What are template literals?

'string literals that allow ${embedded} values'

What is the extension to an HTML file?

.html

" What is the first tag in every html file?

<!DOCTYPE html>

in XML:

<bean id=""viewResolver"" class=""org.springframework.web.servlet.view.InternalResourceViewResolver""> <property name=""prefix"" value=""/WEB-INF/view/"" /> <property name=""suffix"" value="".jsp"" /> </bean> <mvc:view-controller path=""/sample.html"" view-name=""sample"" />

" What tag would you use to create forms?

<form>

What tag would you use to create tables?

<table>

What are some org.hibernate.annotations.*?

@CascadeType, @SortType, @Fetch, @Proxy, and @Sort

" Stereotype Annotations.

@Component @Controller @Service @Repository

What are some common annotations?

@Entity, @Table, @Id, @Column, @GeneratedValue, @SequenceGenerator, @OneToOne, @OneToMany, @ManyToMany, @ManyToOne

How do I set up an entity?

@Entity, @Table, have mapping class in hibernate.cfg.xml

Gateway Application annotations needed

@MessagingGateway(name= "")

How do I relate entities?

@OneToOne, @OneToMany, @ManyToOne, @ManyToMany

" What do you need to make a REST application into a RESTful service?

@RestController

What is a Set?

A Set is a Collection that cannot contain duplicate elements

Class vs Object

A class is a template for an object, an object is an instance of a class

What is a Unique Key?

A constraint that ensures all values in a column are different.

" What is a Primary Key?

A constraint that uniquely identifies a row/record in a table.

What is a Foreign Key?

A constraint that uniquely identifies a row/record in any of the given database tables.

" What are the components of an HTTP Request?

A correctly composed HTTP request contains the following elements: A request line. A series of HTTP headers, or header fields. A message body, if needed.

" What is Marshalling?

A feature of JAXB: converting Java objects to XML

What is Unmarshalling?

A feature of JAXB: converting XML back into to Java objects

" What is Angular?

A front-end framework developed by Google to develop single-page applications.

What are the Maven Goals?

A goal represents a specific task which contributes to the building and managing of a project.

" What is Idempotent?

A method that always returns the same result/response

" Aspect

A modularization of a concern that cuts across multiple classes.

" What is Docker?

A platform for containerization

" What is a Thread?

A single path of execution.

What is ORM?

A technique for converting data between incompatible type systems using object-oriented languages creating, in effect, "virtual object databases" that can be used from within the programming language.

" When does a test fail?

A test fails when something happens that was not expected

" What are Views?

A view is a virtual table whose contents are defined by a query.

What are the Cascade Types?

ALL, ALL_DELETE_ORPHAN, DELETE, DELETE_ORPHAN, EVICT, LOCK, MERGE, NONE, PERSIST, REFRESH, REPLICATE, and UPDATE

Advice

Action taken by an aspect at a particular join point.

What is the @NotFound annotation for?

Action to do when an element is not found on a association.

" What is Atomicity?

All of the transactions have to go through or none of them do

What is the difference between an Exception and a RuntimeException?

An Exception is checked, and a RuntimeException is unchecked. Checked means that the compiler requires that you handle the exception in a catch, or declare your method as throwing it (or one of its superclasses). Generally, throw a checked exception if the caller of the API is expected to handle the exception, and an unchecked exception if it is something the caller would not normally be able to handle, such as an error with one of the parameters, i.e. a programming mistake.

What does ORM consist of?

An ORM solution consists of: API for performing basic CRUD operations, API to express queries refering to classes, facilities to specify metadata, and optimization facilities: dirty checking, lazy associations fetching

What is an XML Schema?

An XML Schema describes the structure of an XML document, via XML Schema Definition (XSD)

What is an Exception? What class does it extend?

An exception (or exceptional event) is a problem that arises during the execution of a program. When an Exception occurs the normal flow of the program is disrupted and the program/Application terminates abnormally, which is not recommended, therefore, these exceptions are to be handled. It extends Throwable.

" What is a Docker image?

An immutable snapshot of a specific run-time environment with everything needed to run a container

When is an object ready for garbage collection?

An object is eligible to be garbage collected if its reference variable is lost from the program during execution.Sometimes they are also called unreachable objects.

What is a Database?

An organized collection of data.

AngularJS vs Angular4

AngularJS uses JavaScript, Angular 2+ uses TypeScript

" What is Maven?

Apache management tool for building, dependency gathering, testing, and deploying project solutions.

" What are the types of lists?

ArrayList, LinkedList, Vector

Cache vs Cacheable

Cache adds a caching strategy, allowing to set the usage, region, and whether or not to include all properties. Cacheable enables caching behavior for a method.

What is CSS?

Cascading Style Sheets, describes how HTML elements should be displayed (the styling)

" Monolithic Application Diagram summary

Client <----> Controllers <----> Services <----> Repositories <----> Database

What is Durability?

Commits are always final

" RunTime vs CompileTime

Compile-time: the time period in which you, the developer, are compiling your code. Run-time: the time period which a user is running your piece of software.

" What are subtypes/sublanguages of SQL?

DDL, DML, DCL, DQL, and TCL.

" What is another name for web.xml?

Deployment Descriptor

" What is a Attribute Directive?

Describes features of HTML elements

What is DTD

Document Type Definition - defines the structure and legal elements and attributes of an XML document.

What are the portType elements?

Elements you'll find within the portType element are operations and message.

What is File I/O?

File I/O (input/output) refers to the transfer of data either to or from a storage medium.

" What is Second Normal Form?

Follows 1st Normal form, also does not allow partial dependencies

What is Third Normal Form?

Follows 2nd Normal form, does not allow transitive dependencies

Functions vs Stored Procedures

Functions compute values and cannot perform changes to SQL DB, Stored procedures can also return 0 to multiple values, can't use SP in select/where/having statement

" What are the HTTP methods?

GET, POST, PUT, DELETE, TRACE, HEAD, OPTION

" get() vs load()

Get is eager and immediately hits the database and instantiates an object and populates all of its fields. Load is lazy and will hit the database and populate all object fields when the object is accessed within that session. When an attempt is made to access the object outside of the session, having never being accessed w/in session, a LazyInitializationException will be thrown.

What are the components of an HTTP Response?

HTTP Status Code (For example HTTP/1.1 301 Moved Permanently, means the requested resource was permanently moved and redirecting to some other resource). Headers (Example - Content-Type: html) An empty line. A message body which is optional.

What is cascade?

In cascade, after one operation (save, update and delete) is done, it will decide whether it need to call other operations (save, update and delete) on another entities which has relationship with each other.

What is hashCode() for?

In the Java programming language, every class implicitly or explicitly provides a hashCode() method, which digests the data stored in an instance of the class into a single hash value (a 32-bit signed integer). This hash is used by other code when storing or manipulating the instance

What are the 4 pillars of OOP?

Inheritance, Polymorphism, Abstraction, and Encapsulation

What are the different types of Joins?

Inner join, Left join, Right join, Full outer join

What is XSL? (extensible stylesheet language)

It explains how to display an XML document of a given type

What is constructor chaining?

It is the process of calling one constructor inside of another constructor

How does the servlet container track sessions?

It keeps track through HTTP session objects. so when an HTTP session object is created the client interaction is considered to be stateful

What are the different fetching types?

Lazy and Eager

Lazy Fetching vs Eager Fetching

Lazy is the default fetch type and with lazy, Hibernate won't load the relationships for that particular object instance until they are needed (doesn't query for them until necessary). Fetch type Eager is essentially the opposite of Lazy, Eager will by default load ALL of the relationships related to a particular object loaded by Hibernate.

What does a Transaction do?

Manages our ACID compliant transactions. We get transactions from Session.

Can I sort a Map?

Map does not have a sort method, but SortedMap, which extends it, has sorting features. An example of a class that implements SortedMap is TreeMap, which is sorted using the Red-Black tree algorithm.

What is MVC?

Model View Controller

What are the states of threads?

New, Runnable, Blocked, Waiting, Timed_Waiting, Terminated

" What tools do you need to run a SQL statement?

One tool that we use is SQL Developer

Which relationship requires mappedBy parameter refrencing?

One-to-Many

What does attribute 'target="_blank"' do?

Opens the link in a new tab.

BEAN vs POJO

POJO has no real requirements since it is a Plain Old Java Object, BEAN specifies that it needs to implements serializable, a no-args constructor, and that all properties are private with getters and setters

Is JS pass-by-value or pass-by-reference?

Pass by value

How do you configure Hibernate?

Passing a hibernate.cfg.xml file to our configuration object in which we define the parameters needed to connect to our database instance (username, password, url) as well as mappings between pojos.

" What tools should I use to test a Web Service?

Postman, SoapUI, TestingWhiz, SOAPSonar

" What is a Criteria Interface? What methods does it provide?

Programmatic approach to querying the database (object-oriented). Methods: list(), .add(), setFirstResult(int startPosition), and setMaxResults(int maxResult)

What is a Subquery?

Query nested in another query that is usually embedded within the where clause

" How do you define you custom Repository?

Query query = entityManager.createNativeQuery create an interface and a class

What is a SOAP Envelope?

Required part of a SOAP message that distinguished the beginning and end of it.

What are the APIs used to implement Web Services?

SOAP and REST.

Servlet Hierarchy

Servlet Interface - Generic Servlet - Http Servlet - My Servlet

What are the important interfaces?

Session, SessionFactory, Transaction, Query, and Criteria

" Session vs SessionFactory

SessionFactory is gotten only once and is thread-safe whereas Session is implemented as many times as necessary, not thread-safe, and is obtained using SessionFactory.

What is Starvation?

Situation where a greedy thread hogs the resource so other threads are unable to access it

Which method does the garbage collector call?

System.gc(), belongs to System class

What are Objects in SQL?

Tables, Views, Triggers, Schemas, Indexes, and Sequences.

What is a short circuit operator?

The && and || operators are short circuit operators. A short circuit operator is one that doesn't necessarily evaluate all of its operands

What's the parent of all exceptions?

The Throwable class

What is casting?

The ability to take an object of a type and convert it to another type.

What is a Factory?

The factory is an object, that creates objects

What is inverse?

This is used to decide which side is the relationship owner to manage the relationship (insert or update of the foreign key column). In short, the "inverse" decides which side will update the foreign key, while "cascade" decides what's the follow by operation should execute.

" Why do we use Web Services?

business to business communication

" How do you perform any database operations with Spring Boot?

by adding the spring data starter pack

" What is UTF-8?

character encoding using one to four 8-bit bytes-- naturally, it is backward compatible with ASCII

What are the differnt types of Indexes?

cluster and noncluster

Which are the main interfaces of JDBC?

connection, statement, prepared statement, callable statement, and resultset

What are the CRUD operations?

create, read, update, delete

What is Encapsulation?

data hiding.

What are the types of Constructors?

default, no-args, parameterized (with args)

" What are the types of elements in WSDL?

definitions, types, message, operations, portType, binding, service, port, import

What is an XML Schema?

describes the structure of an XML document-- defines what legal elements go into an XML doc

double equals vs triple equals

double equals will perform a type conversion when comparing two things

" what is shadowing?

is when two variables with the same name exist within overlaping scopes

" Is TS loosely or strongly typed?

it is strongly (static) typed.

When you start the angular application, what is the entry point of it? Where does it start?

main.ts and then it goes to the component

How do I make an object Serializable?

mark the class with the marker interface syncronizable

" What is a directive?

method of connecting behaviors to elements in the DOM

What are default methods in an interface?

methods that are implicitly public, no need for the default keyword

" What is the CLI command to generate a component?

ng generate component <name>

What is the CLI command to generate a service?

ng generate service <name>

What is ngModel?

ngModel is a directive that binds input to view

Is there any case the finally block won't execute?

no

How do you achieve Encapsulation

one way is through private fields and public accessors

How do you achieve Inheritance?

primarily through class extension.

What are the Access Modifiers in TS?

public, private, default

" How do I insert elements in a map?

put

" JDBC vs Hibernate

sql vs hql; exceptions

" @Before vs @Around

they are not the same

What does the Arrow function (=>) do?

this aliases a lambda function, which means that the left hand side is assigned or used on the right hand side (assuming a, then b is a*2 a =>{b=2*a }

How do I start a Thread extending the Thread class?

thread.start()

How do you go about starting a thread?

thread.start()

soap exceptions

through the soap message, fault, and fault code

how do you make asynchronous calls using Angular?

through usage of observables, or through promises

What is a composite Primary Key?

two or more columns that uniquely identify each row in a table

What is the final keyword used for?

used to state that a variable is final, so it can't be changed anymore (becomes a constant)

" What is a List?

"An ordered collection. The user of this interface has precise control over where in the list each element is inserted. The user can access elements by their integer index, and search for elements in the list.

" What are the Lifecycle Hooks?

"Angular keeps tabs on a component's lifecycle. NgOnInit() NgOnDestroy() NgOnChange() NgDoCheck() and many more..

" What is JERSEY?

"Jersey RESTful Web Services framework is open source, production quality, framework for developing RESTful Web Services in Java that provides support for JAX-RS APIs and serves as a JAX-RS Reference Implementation.

Sorted vs Ordered Collection

A sorted collection is sorting a collection by utilizing the sorting features provided by the Java collections framework. Order collection is sorting a collection by specifying the order-by clause for sorting this collection when retrieval.

How do you invoke a static method?

From inside the same class, using ClassName.staticMethodName() for an outside class, or by calling a static method using an instance (considered bad practice).

What is a Scalar Function?

Function based on user input, returns single value

What is an Aggregate Function?

Function where multiple values from multiple rows are grouped together to form a single value

What is an anonymous function?

Functions that do not have a name

What are the variable scopes in JS?

Global, function, and block

" What is mappedBy?

The mappedBy property is what we use to tell Hibernate which variable we are using to represent the parent class in our child class.

" What is a Singleton?

The singleton pattern is a design pattern that restricts the instantiation of a class to one object. This class provides a way to access its only object which can be accessed directly without need to instantiate the object of the class.

Where are Maven Dependencies stored?

They are stored in your Maven local repository

What is the main purpose of Version Control Software?

To manage changes in software and see previous versions and potentially rollback to previous versions.

Can I catch an error? Does it make sense?

Yes, but errors are serious problems that a reasonable application should not try to catch

Can an Interface have variables? What are they?

Yes, they are variables that are final and static by default.

" Can constructors be private?

Yes.

Can I force garbage collection?

You can use the .gc method to ask for garbage collection, however you cannot actually force garbage collection

" FallBack component

response from Hystrix

DATE vs TIMESTAMP

roughly the same except timestamp also has fraction of seconds and timezone

Is JS case-sensititive?

" JavaScript is a case-sensitive language. This means that language keywords, variables, function names, and any other identifiers must always be typed with a consistent capitalization of letters. The while keyword, for example, must be typed "while", not "While" or "WHILE".

What is XSLT? (XSL + Transformations)

" XSLT stands for XSL Transformations XSLT is the most important part of XSL XSLT transforms an XML document into another XML document XSLT uses XPath to navigate in XML documents

" e) Hystrix (Monitoring).

"<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-hystrix</artifactId> </dependency>

What is a Pipe?

"A way to edit data. eg. changing a date format Pipes can be chained after the next.

HTML vs CSS

"HTML defines the structure and content of web pages CSS describes how HTML elements are styled

What is Cloud Computing?

"The practice of using a network of remote servers hosted on the internet to store, manage, and process data, rather than a local server or a personal computer

" Where are variable references stored?

Stack memory

" What are the types of Polymorphism?

Static/Dynamic AKA compile-time vs runtime. Achieved through overloading and overriding respectively

What is an Array?

object that holds a fixed number of values(elements) of a single type

" What is a Webpack?

"An open source JavaScript module bundler. It takes modules with dependencies and generates static assets representing those modules.

" What are the data types in Angular?

"Numbers Strings Arrays Objects

What is DOM?

"Document Object Model - a representation of a doc, with a logical tree-- HTML manipulates the dom

How do you create a SOAP Web Service?

applications.yaml

What are the different types of Cursors?

static, dynamic, forward only

What is a Map?

A Map is an object that maps keys to values, or is a collection of attribute-value pairs. Note that a Mapis not considered to be a true collection, as the Map interface does not extend the Collection interface. Instead, it starts an independent branch in the Java Collections Framework.

What does the let keyword mean?

A variable declared using let, uses block-scoping. This means that the variable is not visible outside of block scope.

What is the finally block?

Block that comes after a try-catch block and essentially contains code that will be run after the try-catch block occurs, unless an exception is thrown

" What are the data types in JS? (7)

Boolean, Number, String, Null, Undefined, Object, Symbol

" What are the different forms of CSS?

CSS, SCSS CSS3

" What is HQL?

Hibernate specific language used to query a database. Stands for Hibernate Query Language.

What is Transactional-Write Behind?

Hibernate, while synchronizing the persistent object changes, optimizes the list of SQL statements issued. This optimization prevents foreign key violations but still be predictable.

" What is HTML?

Hyper text markup language, which is used to define the structure of our web pages.

" What is xpath?

Is basically stepping thru each element of your HTML document

What makes the String class special?

Is immutable and is stored in string pool inside the heap

What does it abstract?

It abstracts away alot of the boilerplate, "ceremonial" code.

What is JAXB

Java Architecture for XML Binding - a tool used for mapping Java class objects to and from XML representations

What is JDBC?

Java Database Connectivity, Java API that we use to we use to connect to our SQL database.

" What is J2EE?

Java Enterprise Edition - a set of specifications for enterprise features such as distritbutive computing and web services

What kind of compiler does Js use/have?

Just-In-Time Compiler (JavaScript is an interpreted language and is compiled by the browser)

" What is a Listener?

Listener basically just waits for a specific action to take place

Is JS loosely typed or strongly typed?

Loosely typed for example, you do not need to specify the type when declaring variables.

GROUP BY vs ORDER BY

ORDER BY alters the order in which items are returned. GROUP BY will aggregate records by the specified columns which allows you to perform aggregation functions on non-grouped columns (such as SUM, COUNT, AVG, etc).

Why do you need ORM tools like Hibernate?

ORM tools like Hibernate provide the following benefits: improved performance, improved productivity, improved maintainability, and improved portability.

How many times do Init, Service, and Destroy execute?

Once per Servlet

" What does a Session do?

Represents a connection to our database. The Session is a persistence manager that manages operation like storing and retrieving objects.

Where are Strings stored in memory?

String pool, which is inside the heap

What is the @CollectionId annotation for?

Used to create a collection id.

What is the @GenericGenerator annotation for?

Used to denote a custom generator, which can be a class or shortcut to a generator supplied by Hibernate.

What is @AttributeOverrides annotation for?

Used to override mappings of multiple properties or fields.

What is @AttributeOverride annotation for?

Used to override the mapping of a Basic (whether explicit or default) property or field or Id property or field.

What is Varargs used for?

Used when a method needs to take a variable amount of a parameter. It's denoted by "..." and should always be the last in the parameter listings. Ex. int ...a

" How do you insert elements in a Map?

Using .put

How do you invoke a Stored Procedure?

Using session.createSQLQuery(), declare a stored procedure using @NamedNativeQueries and calling session.getNamedQuery, or declaring stored procedure in <sql-query> and calling session.getNamedQuery().

What does the Iterable interface do?

When a class implements the Iterable interface, it is telling other classes that you can get an Iterator object to use to iterate over (i.e., traverse) the data in the object.

What is Dirty Checking?

When a session is closed, Hibernate checks for any changes in persistent objects and updates the database to those changes.

What is Consistency?

When modifying data, if table is already in consistent state it must stay in that state.

What is Transitive Dependency?

When one or more columns are functionally dependant on a column other than the primary key

) 2) instantiation 3) populate properties 4) BeanNameAware setBeanName 5) BeanFactoryAware setBeanFactory 6) BeanPostProcessor pre-initialization 7) InitializingBean afterpropertiesSet 8) custom init method(if defined) - best place for custom

behavior 9) BeanPostProcessor Post-initialization --------------Bean ready---------------- 10) container is shut down 11) DisposableBean destroy() method 12) custom destroy method

what are the key bulding blocks of angular

components

What does attribute "required" do?

forces a form field to be filled (will not successfully submit otherwise

" What is Hibernate.hbm2ddl?

hibernate mapping to make schema ddl

What is Hibernate?

is an object-relational mapping tool that provides a framework for mapping an object-oriented domain model to a relational database.

What's the first line in a constructor?

super()

WHERE vs HAVING

the main difference between WHERE and HAVING clause in SQL is that, condition specified in WHERE clause is used while fetching data (rows) from table, and data which doesn't pass the condition will not be fetched into result set, on the other hand HAVING clause is later used to filter summarized data or grouped data.

What is Native SQL?

the sql dialect that the database is configured with

Which are the scopes of a variable?

"-static/class -> accessible anywhere in the class -instance -> variable specific to an instance -method scope -> only accessible w/in a method -block scope -> ex. in a loop. For example using a for loop the int it can only be used in the loop not anywhere outside

" What is a deadlock?

"Deadlock describes a situation where two or more threads are blocked forever, waiting for each other. Deadlock can occur in a situation when a thread is waiting for an object lock, that is acquired by another thread and second thread is waiting for an object lock that is acquired by first thread

" What are the Access Modifiers?

"Default Protected Public Private

" Comparable vs Comparator

A comparable object is capable of comparing itself with another object. The class itself must implements the java.lang.Comparable interface to compare its instances. Unlike Comparable, Comparator is external to the element type we are comparing. It's a separate class. We create multiple separate classes (that implement Comparator) to compare by different members.

What are the types of sets?

HashSet, SortedSet, TreeSet

" How do I start a thread implementing Runnable?

Overwrite run method and then run the start method

Can I instantiate an Abstract class? Constructor?

You cannot instantiate an Abstract class, but it can hava a constructor.

What is a Collection?

a group of individual objects represented as a single unit

What is synchronization?

only one thread can access the resource at a given point of time.

What are the thread methods?

run(), start(), join(), and wait()

" TreeSet vs HashSet?

"1) HashSet gives better performance (faster) than TreeSet for the operations like add, remove, contains, size etc. HashSet offers constant time cost while TreeSet offers log(n) time cost for such operations. 2) HashSet does not maintain any order of elements while TreeSet elements are sorted in ascending order by default.

" What is Multithreading? How do you do it?

"A multi-threaded program contains two or more threads that can run concurrently and each part can handle a different task at the same time making optimal use of the available resources

What is Abstraction?

"Abstraction is the concept associated with hiding the implementation details and providing just the functionality.

Difference between Exception and Error?

"An Error ""indicates serious problems that a reasonable application should not try to catch."" An Exception ""indicates conditions that a reasonable application might want to catch.""

What are some types of exceptions?

"Arithmetic Exception - It is thrown when an exceptional condition has occurred in an arithmetic operation. ArrayIndexOutOfBoundException - It is thrown to indicate that an array has been accessed with an illegal index. The index is either negative or greater than or equal to the size of the array. ClassNotFoundException - This Exception is raised when we try to access a class whose definition is not found FileNotFoundException - This Exception is raised when a file is not accessible or does not open. IOException - It is thrown when an input-output operation failed or interrupted (cont ->)

" What are the Data Structures in Java?

"Array Linked List Stack Queue Binary Tree Binary Search Tree Heap Hashing Graph Matrix

What is an ArrayList?

"ArrayList supports dynamic arrays that can grow as needed.

How do you achieve Polymorphism?

"In Java, we see this in method overloading where methods with the same signature are able to be used in different ways depending upon the arguments one passes into them. In method overriding a Parent class can reference a subclass, which in effect gives itself another form by being able to invoke the subclasses overridden method. Another polymorphic aspect is the ability for an interface type to reference any class that implements it. Then you also have covariant return types where an overridden method is able to change its form by being able to return a subclass type.

What is a HashSet?

"Java HashSet class is used to create a collection that uses a hash table for storage.

" What is a LinkedList?

"Java LinkedList class uses doubly linked list to store the elements. It provides a linked-list data structure. It inherits the AbstractList class and implements List and Deque interfaces.

" Is Java 100% Object Oriented Programming? Why or why not?

"Java is not a pure Object Oriented Language, but is a so-called ""Hybrid"" language. For any language to be 100%, it must follow these 6 rules: 1) It must have full support for Encapsulation and Abstraction 2) It must support Inheritance 3) It must support Polymorphism 4) All predefined types must be Objects 5) All user defined types must be Objects 6) Lastly, all operations performed on objects must be only through methods exposed at the objects. Java supports 1, 2, 3, and 5, but fails to support 4 and 6.

" JDK vs JRE vs JVM

"The Java Development Toolkit (JDK) is a software development environment used for developing Java applications and applets. It is a superset of the Java Runtime Environment (JRE) which provides the libraries, the Java Virtual Machine (JVM) and other components to run applets and applications written in Java. The JVM executes a computer program compiled into Java bytecode.

" What is a Process?

"The ProcessBuilder.start() and Runtime.exec methods create a native process and return an instance of a subclass of Process that can be used to control the process and obtain information about it. The class Process provides methods for performing input from the process, performing output to the process, waiting for the process to complete, checking the exit status of the process, and destroying (killing) the process.

What is a Try-Catch-Finally Block?

"The try block contains set of statements where an exception can occur. A try block is always followed by a catch block, which handles the exception that occurs in associated try block. A try block must be followed by catch blocks or finally block or both. A catch block is where you handle the exceptions, this block must follow the try block. A single try block can have several catch blocks associated with it. You can catch different exceptions in different catch blocks. When an exception occurs in try block, the corresponding catch block that handles that particular exception executes. For example if an arithmetic exception occurs in try block then the statements enclosed in catch block for arithmetic exception executes. A finally block contains all the crucial statements that must be executed whether exception occurs or not. The statements present in this block will always execute regardless of whether exception occurs in try block or not such as closing a connection, stream etc.

" Checked vs Unchecked Exceptions

"Unchecked exceptions: -represent defects in the program (bugs) - often invalid arguments passed to a non-private method. To quote from The Java Programming Language, by Gosling, Arnold, and Holmes: ""Unchecked runtime exceptions represent conditions that, generally speaking, reflect errors in your program's logic and cannot be reasonably recovered from at run time."" -are subclasses of RuntimeException, and are usually implemented using IllegalArgumentException, NullPointerException, or IllegalStateException -a method is not obliged to establish a policy for the unchecked exceptions thrown by its implementation (and they almost always do not do so) Checked exceptions: -represent invalid conditions in areas outside the immediate control of the program (invalid user input, database problems, network outages, absent files) are subclasses of Exception -a method is obliged to establish a policy for all checked exceptions thrown by its implementation (either pass the checked exception further up the stack, or handle it somehow)

" What are the scopes of the variables?

"class/static-belonging to the class, thus persisted in object instances, instance-belonging to a particular object of this class, method-belonging to a method signature (parameters), block-limited to the scope of its logic container (variable declared in a method or loop)

" What is a Constructor?

A special method (if it can really be called one) that is used to instantiate an object. A class comes pre-equipped with a default, no-args constructor. If a different constructor is declared explicitly, we will need to define this again, or the compiler will expect us to use the newly defined one.

" Abstract Class vs Interface

An abstract class is a class that is not implemented directly, containing one or more abstract methods, or methods that are not yet implemented. An interface can have only abstract methods, with a caveat in default methods. They are not close enough entities to classes to be thought of as one-- they exist primarily to describe a set of functions that a class that is said to be of that interface should have. (cars should accelerate, brake, and change gears, but you would never say that a car is a child of brakes). An important feature of interfaces is that multiple can be implemented by a class, as opposed to the option of extending a single abstract class.

" What is a Wrapper Class?

Class that encompasses a primitive type in order to allow it to provide it additional functionality reserved only for classes, such as being able to use them in collections.

What is the difference between 'Collection' vs 'Collections' vs 'collections'

Collection is the root interface in the collection hierarchy. A collection represents a group of objects, known as its elements. Collections is a class consists exclusively of static methods that operate on or return collections.

" What is Reflection?

It allows an executing Java program to examine or "introspect" upon itself, and manipulate internal properties of the program. For example, it's possible for a Java class to obtain the names of all its members and display them.

Is a catch block needed?

It is not, but you need at least a try with either a catch or finally block

" Throw vs Throws

Java throw keyword is used to explicitly throw an exception. Java throws keyword is used to declare an exception.

What is the difference between protected and default?

Protected is accessible from outside of the package for subclasses, however default only is accessible from within the package

STACK vs HEAP

STACK is used for static memory allocation and Heap for dynamic memory allocation. Stack is faster and follows a Last in First Out pattern, while HEAP is slower and contains within it the String Pool (a allocation of memory that stores Strings).

" State vs Behavior

States refer to features of an object, and more than likely fields. They differ from behaviors, or methods, the latter describing actions that an entity can take.

" String vs StringBuilder vs StringBuffer

String is immutable whereas StringBuffer and StringBuider are mutable classes. StringBuffer is thread safe and synchronized whereas StringBuilder is not, thats why StringBuilder is more faster than StringBuffer. String concat + operator internally uses StringBuffer or StringBuilder class. For String manipulations in non-multi threaded environment, we should use StringBuilder else use StringBuffer class.

What is the difference between StringBuilder and Buffer?

StringBuilder is not synchronized, StringBuffer is synchronized

" STACK vs VECTOR?

The Stack class represents a last-in-first-out (LIFO) stack of objects. It extends class Vector with five operations that allow a vector to be treated as a stack. The usual push and pop operations are provided, as well as a method to peek at the top item on the stack, a method to test for whether the stack is empty, and a method to search the stack for an item and discover how far it is from the top.

What is Polymorphism?

The dictionary definition of polymorphism refers to a principle in biology in which an organism or species can have many different forms or stages.

What is Inheritance?

The process by which a class (blueprint for an object) acquires the properties (fields and methods) of another (as when a class extends another). Multiple Inheritance can be emulated through interfaces. Multiple Inheritance should not be confused with Hierarchical Inheritance, which enables the IS-A relationship.

What are Wrapper classes?

They convert primitive data types into objects. Objects are needed if we wish to modify the arguments passed into a method (because primitive types are passed by value).

Why would you use an Abstract class over an Interface?

Use an abstract class when specifying what an object is. Use an insterface when specifying what the object can do.

What is a hashCode?

When using a hash table, these collections calculate the hash value for a given key using the hashCode() method and use this value internally to store the data - so that access operations are much more efficient. Simply put, hashCode() returns an integer value, generated by a hashing algorithm. Objects that are equal (according to their equals()) must return the same hash code. It's not required for different objects to return different hash codes.

What are the data types in Java? (8)

byte - 8 bits, short - 16 bits, int - 32 bits, long - 64 bits, float - 32 bits, double - 64 bits, char - 16, boolean - 1*

What does the keyword "static" mean?

execute first, belongs to class, not instance

Final vs Finally vs Finalize

final: a keyword that indicates that its subject is not to be mutated. Finally: a block within a try-catch that always executes. Finalize: calls preparation for garbage collection

.equals() vs ==

value equality vs memory location


Kaugnay na mga set ng pag-aaral

C++ Early Objects, Ninth Edition - Chapter 2

View Set

STUDY EXAM 2 - Quizzes/Study Guide

View Set