Skip to main content

Posts

Showing posts from December, 2021

2021 achievements & failures

2 2021 is over, it is time for a recap. I was not sure if I should share this or not, but here is one for openness, honesty and transparency. It is mostly personal so feel free to skip this. Some achievements I got few Oracle certifications, I am very proud of several of them I got few agile certifications, I value the product ownership the most and highly recommend it to everyone, it improved my approach to many things I got two interesting job offers from Oracle, but I didn't follow through, I should have I got a lovely recommendation from Steven Feuerstein after he did a review of my code, which itself was an achievement I got promoted to a Lead developer (a bit overdue and without a pay raise) I continued to share my knowledge through this blog and got to the top 100 Oracle blogs, I have a big plans and many articles forming up my 1st daughter health is slowly improving my 2nd daughter was born almost 3 months ago and she is healthy I started trading on Binance and didn't l...

Application settings in APEX

E Every app needs some sort of settings. If you are looking for a pure APEX solution, you should check APEX_UTIL.SET_PREFERENCE procedure. You might have guessed it, my solution is based on a custom (home made with love and passion) table Settings from project CORE . Let's check the table definition: CREATE TABLE settings ( app_id NUMBER(4) CONSTRAINT nn_settings_app_id NOT NULL, setting_name VARCHAR2(30) CONSTRAINT nn_settings_id NOT NULL, -- setting_value VARCHAR2(256), setting_context VARCHAR2(64), setting_group VARCHAR2(64), -- is_numeric CHAR(1), is_date CHAR(1), -- description_ VARCHAR2(1000), -- CONSTRAINT uq_settings UNIQUE (app_id, setting_name, setting_context), -- CONSTRAINT ch_settings_is_active CHECK ((is_numeric = 'Y' AND is_date IS NULL) OR is_numeric IS NULL), -- CONSTRAINT ch_settings_...

Managing users, roles and authorization schemes in APEX

T This is my solution how to manage users and roles in APEX apps in a very effective and clear way. All code is part of the CORE project . Authentication - Users You have multiple options how to manage users in APEX. Just explore Shared Components - Authentication Schemes. These methods are available: APEX Accounts Custom Database Accounts HTTP Header Variable LDAP Directory No Authentication Open Door Credentials Social Sign-in For my business projects I usually go for SSO or LDAP for legacy or small projects. For my personal projects it is usually APEX od DB accounts. Either way I have my own Users table , so I can reference users in other tables (with foreign keys). CREATE TABLE users ( user_id VARCHAR2(30) CONSTRAINT nn_users_user_id NOT NULL, user_login VARCHAR2(128) CONSTRAINT nn_users_login NOT NULL, user_name VARCHAR2(64), -- lang_id VARCHAR2(5), is_active CHAR(1...

Custom APEX navigation

I I am not a fan of default APEX navigation with hardcoded lists. It is hard and slow to maintain, sometimes you have to do things twice and it is not easy to transfer this to different environment. Fortunatelly, there is an option to create a navigation list based on your SQL query. How it works normally You create a new page and during this you specify page position and visibility in navigation menu When you change the page name, icon or page auth scheme you also have to manually alter navigation menu - this is the source of the pain Many times developers forgot to sync page changes with navigation menu which leads to users being confused How it works with my solution You add page however you like and ignore navigation options You add your page to a page group (or create a new group if needed) You open the service page (910 Navigation, on the screen below) and adjust position in navigation and page visibility When you change the page name, icon or...

Tracking developers activity

T There are some interesting views in APEX dictionary which can help you to track users/developers activity. SELECT * FROM apex_workspace_access_log ORDER BY access_date DESC; SELECT * FROM apex_workspace_activity_log ORDER BY view_timestamp DESC; SELECT * FROM apex_debug_messages ORDER BY message_timestamp DESC; For this purpose I not interested in login attempts, so I can skip the access log. Developers activity To track activity of developers in you app you can use following query. It includes both activity in the current app itself and in the APEX Builder for the same workspace. It also transform developers account name into user name. You can distinguish APEX Builder from your app via the application_id or by empty application_name. Request_type "R" means rendering of the page, "P" means processing (page submit). You can use same query without the LEFT JOIN to track common app users. SELECT NVL(d.user_id, LOWER(l.apex_user))...

89th in Top 100 Oracle blogs

8 80 articles in 9 months and my blog was today listed in Top 100 Oracle blogs on 89th place, just above Oracle blogs. I am very honoured and grateful and I will certainly continue to deliver valuable content. Thank you. I am aiming for short and practical articles, straight to the point, easy to grasp with links to the documentation (if applicable) and added value (hopefully) interesting content for intermediate Oracle developers not covered elsewhere