Bonjour!
What is Mulesoft?
The first and the most basic question asked in Mulesoft developer interviews.
Mulesoft, is the vendor that provides an integration platform to help businesses connect data, applications, and devices.
Mule, is the runtime engine of Anypoint Platform. It is a lightweight Java-based enterprise service bus (ESB) that allows developers to connect applications and exchange data.
What is the difference between map and mapObject?
map operator is used for array. It takes an array as input and returns an array.
mapObject operator is used for object with key: value pairs. It takes an object as input and returns an object.
map invokes lambda with two parameters: value and index from the input array.
Example:
%dw 2.0 output application/json --- ["apple", "orange", "banana"] map (value, index) -> {
(index) : value
}
Output:
[ { "0": "apple" }, { "1": "orange" }, { "2": "banana" } ]
mapObject invokes lambda with key, value, or index for mapping given object.
Example:
%dw 2.0 output application/json --- {"chandler":"bing","monica":"geller"} mapObject (value,key,index) -> {
(index) : { (value):key}
}
Output:
{ "0": { "bing": "chandler" }, "1": { "geller": "monica" } }
What is API-led connectivity?
API-led connectivity is a methodical way to connect applications to data through reusable APIs. APIs are created in three distinct layers: Experience, Process, and System.
Variables in Mule 4 vs Mule 3?
In Mule 3, we had three types of variables: Session variables, Record variables, and Flow variables.
In Mule 4, we only have Flow variables. These variables can be accessed using the keyword "vars".
Example:
vars.variableName
Error Handling in Mule 4?
Error handling in Mule 4 is redesigned. It has three mechanisms to handle errors now.
1. On-Error Propagate: In an On-error Propagate scope, when an error occurs, it terminates the current execution of flow and then throws the error to its parent flow where it's handled.
2. On-Error Continue: In case of an error in an On-error Continue scope, the execution of the flow continues as if successful sending a 200 OK response.
3. Try Catch scope: A Try Catch scope is used to handle errors on individual components. It is especially useful when you need to separate error handling strategies for different components in a flow.
What are the Logger levels?
There are 5 logger levels namely: DEBUG, ERROR, INFO, TRACE, and WARN.
What does scatter-gather return?
A scatter-gather returns a Mule event.
API Life Cycle?
An API life cycle consists of 3 layers:
The first step towards API development is API Specification. This phase involves designing the API based on the requirements of the business. An API Specification is a blueprint of an API.
Anypoint Platform provides Design center to design API's REST interfaces.
The next phase is API Implementation. This phase involves the actual implementation of the API.
Anypoint Platform provides Flow Designer which is a web-based tool to create a prototype of the API.
Anypoint Studio is the IDE for the development and testing of Mule applications.
The final phase in API life cycle is API management, which uses a tool named API manager on Anypoint Platform which is used to apply policies to secure APIs and restrict access.
What is RAML?
RAML stands for RESTful (REpresentational State Transfer) API Modeling Language. It's a way of describing a RESTful API that is readable by both humans and computers.
They use HTTP methods such as GET, PUT, POST, DELETE, etc.
Difference between URI parameters and Query parameters.
URI parameter is used to specify a specific resource whereas Query parameter is used to filter or sort those resources.
let's say we need to filter products based on productType, we use query parameters in this case:
GET: /products?productType=electronics
Let's consider another scenario where we need to retrieve particular product details, we use URI parameters in this case:
GET: /products/{productID}
here, productID will be replaced by a value.
adios amigos
Thanks for providing this information
ReplyDeleteMulesoft Training in Hyderabad
Mulesoft Online Training