Sunday, June 14, 2020

What are RESTful Webservices

Information exchange among internal and/or external systems is an essential part of an organization’s IT division. To achieve these integrations, one can use Representational State Transfer (REST) APIs instead of using traditional file transfers.


So, what are REST APIs?

REST being an architectural style, takes a resource-based approach to web-based interactions. With REST, you locate a resource on the server, and you can either update that resource, delete it or get more information about it.


RESTful services are lightweight web services for the transfer of representation of resources through requests and responses.

RESTful services utilize the primary or most-commonly-used HTTP methods POST, GET, PUT and DELETE. These correspond to create, read, update, and delete (or CRUD) operations, respectively. (There are several other less frequently used verbs, too.)



REST APIs use the Status-Line part of the HTTP response message to notify a REST client of their request’s result. Each response to a request provides an HTTP status code. 2xx codes indicate success, while 4xx and 5xx codes denote client or server errors.



How does REST compare with SOAP


REST being an architectural style, takes a resource-based approach to web-based interactions. With REST, you locate a resource on the server, and you can either update that resource, delete it or get more information about it. REST is simple, scalable and optimized for web REST is data driven. REST allows many data formats such as XML, JSON, plain text, HTML


As SOAP is a protocol, the client doesn't choose to interact directly with a resource, but instead calls a service and that service moderates the access to the various objects and resources behind the scenes. SOAP is a much complex in structure than REST SOAP is function driven. SOAP only allows XML SOAP has tighter security as WS-Security is a built-in in addition to SSL support


Share:

Thursday, May 14, 2020

How to collapse Navigation Menu on page load in Oracle APEX

By default, an APEX application shows the navigation menu on the left hand side and it's expanded by default when the application or a page loads.


What if you want to display it in Collapsed state by default ? Is it possible ?


Yes, this can be done in two ways. Let's see how to achieve this.


Method 1 -


You can set this at design time so that the Navigation menu is displayed collapsed by default when the application loads.


To do this -

- Navigate to Shared Components

- User Interface Attributes -> Navigation Menu

- Under Template Options, uncheck 'Use Template Defaults' and check 'Collapsed by Default (Default)' option

- Apply Changes




Method 2 -


Above method will let you hide Navigation menu but it won't be conditional as it will take effect when the application loads.


What if you want to hide the Navigation menu when a particular page loads ?


Let's take an example of below page. By default it will look like this with expanded Navigation Menu -



Let's hide the Navigation menu conditionally.


To do this -

- Navigate to the desired page definition

- Go to Dynamic Actions section

- Create a new DA on Page Load

- In True section, set Action as Execute JavaScript Code

- Enter below code -

$('#t_Button_navControl').click();

- Save





Now when you run the application and navigate to this particular page, the page will open and the Navigation Menu will be collapsed giving the page more space on screen.



Share:

Sunday, April 26, 2020

How to hide Interactive Report Control Panel in Oracle APEX

So, you've created a beautiful Interactive Report and to make it even better and cater to user requirements, you added a bunch of filters, formatting for highlights and perhaps some control breaks as well.


Now your report looks even better and much more readable for users .. but now there's a big section on top of the IR showing all the controls/settings you incorporated and they don't want to see it as they are never going to modify it (or you don't want them to modify it so as to retain the fix format for your report).

But how can we do this ? We don't see any out of box option that will let us hide the Control Panel of an Interactive Report.


This is where again the power of humble CSS comes in handy. Let's see how we can achieve this.


So, let's take an example of below IR. By default, it will look like this after applying all the controls. You can see the Control Panel section appearing on top of IR -



To hide the Control Panel -

- Navigate to your IR

- Under Advanced section, enter a Static ID (EMPREPORT in this case)


- Now, let's navigate to Page (Page2: Employees in this case)

- Scroll down in Property Pane until you locate CSS section

- Under Inline section, enter below code (replace EMPREPORT with your IR's Static ID) -

#EMPREPORT_control_panel{

display:none;

}



- Save



Now when you run this report, you'll see the Control Panel section is no more visible and IR still retains all the settings you've incorporated -



Share: