Development

Smart Database Architecture for Software Development

Gerger Consulting - Wed, 2017-05-17 13:00

We are incredibly excited to announce that the amazing Toon Koppelaars from Oracle Real World Performance Team is hosting our next webinar: Smart Database Architecture for Software Development. Register at this link.





About the Webinar

Is the database a processing engine or a persistence layer? In this presentation we'll first go through a bit of history demonstrating how the database has been used in the past 30 years: at times it was a processing engine, and at other times it was just a persistence layer. 

Having witnessed many application development projects, we are convinced that the database ought to be used as a processing engine. The persistence layer approach, where all business logic is implemented outside the database has serious drawbacks in the areas of initial application development, ongoing maintenance, and most notably in the area of performance and scalability. 

We'll discuss these drawbacks, in particular the last one: We'll debunk once and for all that moving business logic out of the database benefits performance and scalability.



About the Presenter

Toon has been part of the Oracle eco-system since 1987. He is currently a member of Oracle's Real World Performance Team. The RWP-team troubleshoots application performance issues in and around the Oracle Database. The way applications currently use (or rather, abuse) the DBMS, is often at the root of these performance issues. Prior to joining the RWP team, Toon has been mainly involved in database application development. His special interests are: architecting applications for performance and scalability, database design, and business rules / constraints modeling. He is a long-time champion of using the database in a smart way, i.e. using the database as a processing engine.

Registration is free but space is limited.


Categories: Development

Leveraging Oracle JET Composite Components in Oracle application Builder Cloud Service

Shay Shmeltzer - Mon, 2017-05-15 16:17

One of the new features of Oracle Application Builder Cloud Service (ABCS) in the May 2017 release is integration with Oracle JET's Composite Components Architecture (JET CCA).

Based on the Web Components standard, JET CCA provides a way to define reusable UI components (with logic) that can easily be incorporated into multiple applications.

The new feature in ABCS allows you to pick such components as extensions to the ABCS design time, providing an easy standard way to extend your UI capabilities. For example in the screenshot below you see a new slider component in the common components section, and how it looks like when added to the visual designer.

ABCS Design Time
 

In this blog entry we'll start by creating a very simple JET CCA component and then see how to add it to Oracle ABCS. (Thanks goes to John Brock who helped get this sample working).

To learn more about JET CCA have a look at their developer guide, and the sample in the Oracle JET Cookbook. We are going to start from that sample and build a very basic component. (For a deep guided tour of Oracle JET CCA check out Duncan's series of JET CCA blogs)

There are 5 files needed to define a component.

5 files in a directory

We'll start with the loader.js file - this file provides info on the other files involved in the component. Note that in the sample we are registering "slider" as the name of the component, in this file we are also indicating which jet components we are going to use and including them in the define section. Specifically we are adding the ojs/ojslider component here.

define(['ojs/ojcore', 'text!./demo-cca.html', './demo-cca', 'text!./component.json', 'css!./demo-cca','ojs/ojcomposite', 'ojs/ojslider'], function(oj, view, viewModel, metadata) { oj.Composite.register('slider', { view: {inline: view}, viewModel: {inline: viewModel}, metadata: {inline: JSON.parse(metadata)} }); } );

The next file we'll create is the component.json file. This file describes the meta data about our component. One of the key things you can define here is a set of properties that users of the components can set when they add it to their application. The nice thing in the ABCS integration is that these will show up at design time as properties in the visual editor.

In our component we are defining four properties that control the title, minimum, maximum, and actual value of a slider. Note that right now ABCS is using Oracle JET 2.3 and we need to specify this in the file.

{ "name": "Slider", "description": "A sample Oracle JET Slider CCA", "version": "1.0.0", "jetVersion": ">=2.3.0", "properties": { "title": { "description": "Name of slider", "type": "string" }, "min": { "description": "Numeric minimum", "type": "number" }, "max": { "description": "Numeric maximum", "type": "number" }, "value": { "description": "Slider value", "type": "number" } } }

Next we'll define the html file (demo-cca.html) that includes our UI. We are using regular HTML code here along with knockout.js binding of properties to values. You can use the $props prefix to refer to values of attributes we defined in the components.json file.

<div data-bind="text: 'Title: '+$props.title"></div>
  <input id="slider-id"
     data-bind="ojComponent: {
            component: 'ojSlider',
            max:$props.max,
            min:$props.min,
            step:10,
            value:$props.value
            }"/>
             

Next there is a css file - controlling the look and feel of the component. Since we are not doing any customization on the look and feel we'll create an empty file called demo-cca.css.

Next is the model file (demo-cca.js) - this file contains data and logic that can be accessed from the component. We'll create a basic file without any logic code in it.

define(['knockout'], function (ko) { function model(context) { var self = this; return model; } } )

Now that you have created the 5 files - simply zip them into a single zip file. This zip file is the file you'll give to your component users. In this case to the ABCS developer.


Go into your Application Settings -> Extensions in Oracle ABCS and choose to create a new UI component from zip file. Upload the zip file you just created. Then make sure to enable the component using the boolean control on the page.

Component extension

Switch over to the UI Designer and you'll see that there is a new component in the component palette.
Drag and drop it into your page - and you'll see the HTML code. Set the properties in the property inspector and you'll see them influencing the content of your page.
You can also bind the properties to the values of fields in your custom business objects.

Here is a quick video showing the integration.

 

Categories: Development

Getting Data from REST Services into Oracle Application Builder Cloud Service

Shay Shmeltzer - Fri, 2017-05-12 11:09

In the latest version of Oracle Application Builder Cloud Service (ABCS) that we rolled out at the beginning of May we introduced a set of new code templates for creating Business Object Providers.

BOP templates screen

Business Object Providers - or BOPs for short - are a mechanism that allow you to extend ABCS and have it access external REST sources of data. In the video below I'm going to show you how to use the most basic template provided for BOPs - which allows you to create a read only BOP.

The template has 2 files that you need to change - one (RESTOperationProvider.js) that has the code for accessing the REST service and reading the results, and the other (RESTEntityProvider.js) has the code that defines the structure of the object you are creating.

In the video I'm using this URL - https://api.github.com/users/Oracle/repos - that gets you a list of projects/repositories that Oracle owns on Github:

Once you created a BOP you can add a new "external service" to your application in the data designer, and then you can use that object like you would any other.

Check it out:

 

Categories: Development

Passing Business Object Values to Custom UI Components in ABCS

Shay Shmeltzer - Mon, 2017-05-08 18:54

This quick one is based on a customer question about Oracle Application Builder Cloud Service. The scenario is that we have a business object that has a field that contains the URL to an image. We want to be able to show that image on a page in Oracle Application Builder Cloud Service.

Image showing up

To do that I add a custom UI component object to the details (or edit) page of a record - then I switched the HTML of that object to be: <img id="logoimg"/>

custom code

 

I then added a button to the page and added a bit of custom JavaScript code in its action as follow:

var img = document.getElementById('logoimg'); img.src=$Company.getValue('Logo'); resolve();

This code simply locates the custom object on the page using the object id and then sets the src property of the img html tag to match the value of the field in the business object.

Code in Button

 

 

Categories: Development

I'm On a New Blog Platform!

Shay Shmeltzer - Fri, 2017-05-05 12:15

This happens every several years, our blogging platform at Oracle is switching to a new environment, and my blog is one of those moving. In the next few days I'll be testing to see if content migration did its magic and everything works.

If you run into any broken entries/links/samples please drop me a line or just comment on the specific blog entry, and I'll try to fix things.

Categories: Development

Getting the Database Backup Report for all Monitored Targets in Enterprise Manager

Arun Bavera - Fri, 2017-05-05 09:05
Use the following query in BIP:

SELECT DATABASE_NAME                                  AS CONFIGURATION_TARGET_NAME    ,
      mgmt$ha_backup.TARGET_TYPE,
 host                                                                                                                                            AS HOST_NAME                              ,
'DB Backup Status'                                                                                                                        AS CONFIGURATION_STANDARD                ,
status                                                                                                                                                AS ACTUAL_VALUE             ,
    CASE    WHEN ( mgmt$ha_backup.status = 'COMPLETED' AND round(sysdate-end_time)<=1 ) THEN 'YES'
            ELSE 'NO'
    END VALIDATION_PASSED,
    input_type,
    output_device_type ,
TO_CHAR(end_time,'YYYY-MM-DD HH24:MI:SS')                                                                            AS COLLECTION_DATE                                ,
    TO_CHAR(start_time,'YYYY-MM-DD HH24:MI:SS') START_TIME,
    TO_CHAR(end_time,'YYYY-MM-DD HH24:MI:SS') END_TIME,
    round(sysdate-end_time) LATEST,
    TIME_TAKEN_DISPLAY TimeTaken,
    INPUT_BYTES_DISPLAY INPUT,
    OUTPUT_BYTES_DISPLAY OUTPUT,
    OUTPUT_BYTES_PER_SEC_DISPLAY OUTPUT_SEC
FROM   mgmt$ha_backup
WHERE  DATABASE_NAME in (  SELECT  unique(MEMBER_TARGET_NAME)
                              from   mgmt$target_flat_members,
                                     mgmt$target_properties
                              where  member_target_type in ( 'rac_database' ,'oracle_database')
                              and    aggregate_target_name = 'Prod-Grp'
                              AND   mgmt$target_flat_members.MEMBER_TARGET_NAME = mgmt$target_properties.target_name
                              AND   mgmt$target_flat_members.member_target_type = mgmt$target_properties.target_type
                              AND   mgmt$target_properties.property_name = 'OpenMode'
                              AND   mgmt$target_properties.property_value= 'READ WRITE'
                       MINUS
                              SELECT   s1.target_name
                              FROM
                                      MGMT$TARGET s5                 ,
                                      GC$ASSOC_INST_WITH_INVERSE s5a1,
                                      MGMT$TARGET s1
                              WHERE  (   s5a1.SOURCE_ME_GUID = s1.TARGET_GUID
                                          AND s5a1.DEST_ME_GUID   = s5.TARGET_GUID
                                          AND s5.TARGET_TYPE      = 'rac_database'
                                          AND s5a1.ASSOC_TYPE     = 'member_of_cluster'
                                      )
                                      AND s1.TARGET_TYPE = 'oracle_database')

ORDER BY VALIDATION_PASSED
Categories: Development

Arup Nanda on Big Data

Gerger Consulting - Thu, 2017-05-04 14:45
Attend our free webinar and learn from the legendary Oracle DBA Arup Nanda about the Big Data ecosystem and how it compares to Oracle solutions.

Register at this link.


About the Webinar

Big Data is the future of database computing and knowing about it not just a luxury you can avoid anymore; it's necessary for survival and growth. But Hadoop, Spark, Hive, Map/Reduce, Flume - if these terms hit you more often than you have the time to pause and think about them, look no further. Learn about these and more in this informative session on this Big Data components explained from the perspective of an Oracle professional, how they are same or different and how they compare with RAC or parallel query.

Register today.
Categories: Development

Passing Business Object Values to Custom UI Components in ABCS

Shay Shmeltzer - Mon, 2017-04-24 17:29

This quick one is based on a customer question about Oracle Application Builder Cloud Service. The scenario is that we have a business object that has a field that contains the URL to an image. We want to be able to show that image on a page in Oracle Application Builder Cloud Service.

animated GIF

To do that I add a custom UI component object to the details (or edit) page of a record - then I switched the HTML of that object to be: <img id="logoimg"/>

custom code

I then added a button to the page and added a bit of custom JavaScript code in its action as follow:

var img = document.getElementById('logoimg');

img.src=$Company.getValue('Logo');

resolve();

This code simply locates the custom object on the page using the object id and then sets the src property of the img html tag to match the value of the field in the business object.

Code in Button

Categories: Development

Custom UI Components in Oracle ABCS for Dynamic Image Display

Shay Shmeltzer - Mon, 2017-04-24 17:29

This quick one is based on a customer question about Oracle Application Builder Cloud Service. The scenario is that we have a business object that has a field that contains the URL to an image. We want to be able to show that image on a page in Oracle Application Builder Cloud Service.

animated GIF

To do that I add a custom UI component object to the details (or edit) page of a record - then I switched the HTML of that object to be: <img id="logoimg"/>

custom code

I then added a button to the page and added a bit of custom JavaScript code in its action as follow:

var img = document.getElementById('logoimg');

img.src=$Company.getValue('Logo');

resolve();

This code simply locates the custom object on the page using the object id and then sets the src property of the img html tag to match the value of the field in the business object.

Code in Button

Categories: Development

We're All In This Thing Together

Greg Pavlik - Fri, 2017-04-14 17:26
This song pretty much summarizes everything I've learned to be true about life after nearly five decades of living...

Well my friend, well I see your face so clear
Little bit tired, a little worn through the years
You sound nervous, you seem alone
I hardly recognize your voice on the telephone

In between I remember
Just before we wound up broken down
We'd drive out to the edge of the highway
Follow that lonesome dead-end roadside sound

We're all in this thing together
Walkin' the line between faith and fear
This life don't last forever
When you cry I taste the salt in your tears

Well my friend let's put this thing together
And walk the path that worn out feet have trod
If you wanted we can go home forever
Give up your jaded ways, spell your name to God

We're all in this thing together
Walkin' the line between faith and fear
This life don't last forever
When you cry I taste the salt in your tears

All we are is a picture in a mirror
Fancy shoes to grace our feet
All that there is is a slow road to freedom
Heaven above and the devil beneath

We're all in this thing together
Walkin' the line between faith and fear
This life don't last forever
When you cry I taste the salt in your tears

Apache Spark for Oracle Developers

Gerger Consulting - Tue, 2017-04-11 01:27
In the last few years, business problems that have been traditionally solved using databases are now being solved using other technologies. Apache Spark is one of the emerging technologies which is used for large scale data processing.

Attend the free webinar by Ivan Lokic and learn how you can use Apache Spark in Big Data applications.  


About the Webinar:
Apache Spark is a general computing engine designed for large-scale data processing. Many well-known companies use it to process petabytes of data on 8000+ nodes with long running jobs measured in weeks.


In this webinar, you will learn about:
  • Apache Spark and how Spark relates to (traditional) Hadoop MapReduce technology
  • What makes Spark so fast
  • How to use the rich set of Spark API’s to design and run your ETL jobs
  • Apache Spark streaming capabilities for near real-time updates and its role in Big Data processing scenarios
  • Structured Streaming, a scalable and fault tolerant stream processing engine which makes near real-time processing scenarios even easier
The webinar is free but space is limited.

Categories: Development

Take a few minutes to patch Oracle APEX 5.1

Dimitri Gielis - Wed, 2017-03-29 08:00
Yesterday a first patch set of Oracle Application Express (APEX) 5.1 has been made available to download.

one-of patches

If you encounter issues, you can ask for support and most likely a bit later a patch is made available through support.oracle.com. The APEX team is doing a great job with this.

For example some people using APEX Office Print had an issue which was caused by a bug in APEX_JSON (which we heavily use behind the scenes). The next day the APEX Dev Team already made a patch available (PSE 25650850).

patch set

Instead of applying those one-off patches, you can wait for a patch set which includes those one-off patches and more. If you didn't move to Oracle APEX 5.1 yet, you can just download the latest version which includes 5.1.1 immediately. 

There're many fixes for the Interactive Grid features, but next to that, many others as well, like for example login issues.

applying the patch set

If you're on Oracle APEX 5.1, search for patch 25341386. Unzip the file, stop the webserver, run @apxpatch, copy the images folder and start the webserver again.
About 2 minutes later you're on the latest version. 


Happy patching...
Categories: Development

Best Way to Write SQL in Java

Gerger Consulting - Wed, 2017-03-15 01:17

Many of us struggle writing SQL in Java. ORM tools such as Hibernate often generate SQL statements that result in poor application performance. Surely, there must be a better way to write SQL in Java.



Attend the free webinar by Java Champion Lukas Eder to learn the best way to write SQL in Java. Find out how you can use SQL as a type safe domain specific language in Java.

Sign up for the free webinar.

Categories: Development

ORA-01031 insufficient privileges Solution

Complete IT Professional - Fri, 2017-03-10 05:00
Are you getting the “ORA-01031 insufficient privileges” error? Learn what causes this error and how to resolve it in this article. ORA-01031 Cause The cause of the ORA-01031 error is that you’re trying to run a program or function and you don’t have the privileges to run it. This could happen in many situations, such […]
Categories: Development

Passing Values Between Pages in Oracle Application Builder Cloud Service

Shay Shmeltzer - Thu, 2017-03-09 12:50

A common use case for applications that have multiple pages is passing values between pages. For example you might want to pick up a specific record or value in one page and then use that as a parameter for a query in another page.

In the February release or Oracle Application Builder Cloud Service as part of the extension hook points that we provide, we added support for shared resources. These are JavaScript libraries you can add to your application - and that can be used across your app.

In the demo below I show you how you can use the built-in sample template for a shared resource to define a variable, and then how that variable is exposed in various places in the product through the expression builder allowing you to set its value in one page and use that value in another one.

Check it out:

Categories: Development

Passing Values Between Pages in Oracle Application Builder Cloud Service

Shay Shmeltzer - Thu, 2017-03-09 12:50

A common use case for applications that have multiple pages is passing values between pages. For example you might want to pick up a specific record or value in one page and then use that as a parameter for a query in another page.

In the February release or Oracle Application Builder Cloud Service as part of the extension hook points that we provide, we added support for shared resources. These are JavaScript libraries you can add to your application - and that can be used across your app.

In the demo below I show you how you can use the built-in sample template for a shared resource to define a variable, and then how that variable is exposed in various places in the product through the expression builder allowing you to set its value in one page and use that value in another one.

Check it out:

Categories: Development

ORA-00937: not a single-group group function Solution

Complete IT Professional - Wed, 2017-03-08 05:00
Have you received an ORA-00937: not a single-group group function error? Learn what it is and how to fix it in this article. ORA-00937 Cause The cause of the ORA-00937 error is that a SELECT statement is trying to be executed, and the SELECT statement has an aggregate function (e.g. COUNT, MIN, MAX, SUM, or […]
Categories: Development

Business Logic in Oracle Application Builder Cloud Service

Shay Shmeltzer - Tue, 2017-03-07 16:35

As you start building more complex applications in Oracle Application Builder Cloud Service, you'll might need to define more complex interactions between objects or validations on rows of data or specific fields.

In the new version of ABCS that we rolled out in February we added these type of capabilities.

There are several things you could do with the new Business Rules section of ABCS

  • Triggers - allow you create logic that will be executed in specific CRUD events such as when you insert, remove or update a record.
  • Object Validators - allowing you to define checks across multiple fields in your object
  • Field Validators - allowing you to define a check on specific field values.
  • Object Functions - reusable functions that can be called from the other points

Note that these logic points will be running on the server side of ABCS. 

In the video below I demonstrate a couple of these capabilities. You'll learn how to update one object when a specific value is set in another object's field. You'll also see how to check whether a combination of values in fields in a record is valid.

Check it out:

&amp;lt;p&amp;gt; &amp;lt;/p&amp;gt;

Here is a screenshot of the nice logic flow editor:

Categories: Development

Business Logic in Oracle Application Builder Cloud Service

Shay Shmeltzer - Tue, 2017-03-07 16:35

As you start building more complex applications in Oracle Application Builder Cloud Service, you'll might need to define more complex interactions between objects or validations on rows of data or specific fields.

In the new version of ABCS that we rolled out in February we added these type of capabilities.

There are several things you could do with the new Business Rules section of ABCS

  • Triggers - allow you create logic that will be executed in specific CRUD events such as when you insert, remove or update a record.
  • Object Validators - allowing you to define checks across multiple fields in your object
  • Field Validators - allowing you to define a check on specific field values.
  • Object Functions - reusable functions that can be called from the other points

Note that these logic points will be running on the server side of ABCS. 

In the video below I demonstrate a couple of these capabilities. You'll learn how to update one object when a specific value is set in another object's field. You'll also see how to check whether a combination of values in fields in a record is valid.

Check it out:

&lt;p&gt; &lt;/p&gt;

Here is a screenshot of the nice logic flow editor:

Categories: Development

60 SQL Interview Questions and Answers

Complete IT Professional - Mon, 2017-03-06 05:00
Are you going for a job where you need to know SQL, such as a Database Developer or Database Administrator? Brush up on your interview questions with this extensive list of SQL interview questions. This collection of interview questions on SQL has been collated from my experience with SQL and from various websites. It contains […]
Categories: Development

Pages

Subscribe to Oracle FAQ aggregator - Development