SAPUI5 Interview Questions Part D

1) What is OpenUI5?
->A subset of SAPUI5 containing the complete core and more than 200 UI controls
->A free-to-use and open source UI library ready for your contributions

2) How can you load SAPUI5 to your application?
->Load it from the content delivery network (CDN) at (or without installing it on your own server.
->If only features contained in OpenUI5 are needed, download it from, put it on your Web server, and load it from there.
->SAPUI5 comes with current versions of the SAP NetWeaver ABAP and Java server and SAP HANA Cloud Platform. If you are a customer, you can load it from there.

3) What is the correct syntax for defining namespaces in XML views?

4) Why is not all JavaScript code put in a <script> tag directly on the index.html page?
->To clearly separate concerns according to the MVC concept.
->To make your code much easier to read and maintain
->To enable your code to dynamically load resources as they are needed

5) What is a component within SAPUI5?
->An independent and reusable part that can be used to structure SAPUI5 applications

6) What information can be stored inside the manifest.json file of your app?
->Content densities
->Root view
->Models of your app

7) What is the benefit of data binding within SAPUI5?
->SAPUI5 uses data binding to bind two data sources or information sources together to keep them in sync. This means: All changes in one source are also reflected in the other one.

8) How can you add a margin all around a control

9) Which base class are you recommended to extend when implementing a custom type?

10) How can you distinguish absolute and relative binding paths?
->Absolute binding paths always start with a "/".

11)How to sort and group your sap.m.List when added to the view.xml?

    path : '/ProductSet',

    sorter : {

        path : 'Category',

        group : true



12) How can you access the list item control in an event handler for the press event?
->Call the getSource() method at the event object parameter.

13) What is the role of the application template in the development process?
->To generate an initial set of files that serve as the starting point for the development of a productive application

14) How can sap.m.Table behave on smaller devices such as phones and tablets?
->It hides less important columns.
->It displays less important columns as a "pop-in"; it stacks them vertically inside the row making the table larger in height.

15) Which filter operation is appropriate for a textual search in SAPUI5?

16) Which responsiveness features can you realize by setting standard CSS classes provided by SAPUI5?
->Adding different margins to controls depending on the screen size
->Hiding controls depending on the screen size

17) Which options for code reuse are available in SAPUI5?
->Controller inheritance
->Nested views

18) When should you put code from your view into a separate view or fragment and nest it into the original view?
->When you realize that you need to reuse this code in several other places and views in your app.

19) What do you have to do to grant a dialog access to the surrounding view’s models?
->Add the dialog to an aggregation of the view, for example the "dependent" aggregation.

20) What is the purpose of the "Static Area" in the DOM?
->To display dialogs and popup controls over the application UI

21) Which benefits does the hash-based navigation in SAPUI5 offer?
->Hash-based navigation adjusts the current hash to your interactions with the app, so that the URL can always be bookmarked.
->It allows you to build one-page apps where the contextual navigation is done by changing the hash, so the browser does not have to reload the page.

22) What do you have to do to be notified when the hash has changed to a certain pattern?
->Register to the patternMatched event of the route.

23) What is Sinon.JS?
->A standalone unit testing library for JavaScript that provides spies, stubs, and mocks

24) Where does OPA fit in the testing pyramid?
->In component/integration tests

25) Why is automated testing beneficial for app development?
->It significantly reduces the manual testing effort.
->It is easier to hand over the app to other developers.
->You can avoid regressions and bugs in your code.

Watch sapui5 video tutorials from youtube, here's the video on introduction to sapui5:

Next Post »