Monday, September 06, 2010

Upgrading to APEX 4.0: Templates

In the last weeks I migrated more applications from APEX 3.x to 4.0 and thought to share my thoughts on the Theme and Templates part of the application.

I've applications that were initially build in APEX (HTMLDB) v2 and other build straight with APEX 3.x. Some applications used a build-in theme, but more had a custom look and feel.

Most migrations went ok, but I did have issues when I used templates which didn't have all tokens (#...# things in html that get replaced at run time by APEX) e.g. with tabular forms (but I'll do a specific blog post on that - and is already a known issue).

I'm personally following the path of installing a new APEX 4.0 theme for my application and apply changes to that to get the same look and feel I had before. Or at least I verify my custom templates to support the new APEX 4.0 features.
I also try to update it to a nicer and more up-to-date look and feel.

The reason why I'm following this approach are multiple:

  • better w3c compliant
  • easier for screen readers (for disabled people)
  • fresher and more up-to-date look and feel
  • support for all new APEX 4.0 features
  • more div/css based layout, which makes it more clean and easier to adapt in the future
But obviously you should decide yourself if it's worth updating your templates in your applications ...

Thursday, September 02, 2010

APEX Meetup @ OOW 2010

It's an annual tradition, so also this year we'll organize an APEX Meetup at the 4th Street Bar & Deli on the Tuesday (7.30 PM) during Oracle Open World.

Here you find some pictures of last year. As you can see, it's always fun with nice people, drinks and food.

Every year we get more people during the meetup, so we started to get sponsors to help to pay for the bills ;-)

Thanks so much to our sponsors of this year:
- Oracle Technology Network (OTN)
- Oracle Development Tools User Group (ODTUG)
- APEX Development Team

If you or your company wants to sponsor aswell, feel free to send me a mail or add a comment to this post. The current total to spend is $500 :-)

See you soon!

Wednesday, August 25, 2010

Follow-up on comparing two Oracle schemas

Over 4 years ago I wrote a blog post about software that helps you to compare two Oracle schemas. That post is accessed a lot and I still get questions about it, so I decided to write a follow up on that post as things change over time.

Comparing two Oracle schemas is still something I have to do regularly, e.g. if I want to compare a development, test and production instance after a deployment of an application.

Alongside Oracle Application Express (APEX), I use Oracle SQL Developer daily. They have a built-in Database Diff tool which works, but I tend to use other tools as well, as it’s hard with SQL Developer to see exactly what has changed. We built our own tool in APEX that compares schemas based on dbms_metadata, which we use when we have access only through the APEX interface. But when I can run things from my own system, I like to use Schema Compare for Oracle.

The people of Red Gate wrote a nice post on how to use their software, with screenshots and steps you can follow, so I won't repeat that. Instead I’m going to compare it against the Diff Tool built into SQL Developer.

Simplicity

The older I get, the more I can appreciate user-friendly software. That is something I try to do in the software I write myself, follow the KISS principle = keep it simple stupid.

For me software has to look good, ’be easy to use and do what it’s intended to do in an efficient way. If I want to compare two schemas I just want to follow a couple of steps:
1. Select my source and target database
2. Select the schema(s) I want to compare
3. Optional - select what exactly it should compare (tables, packages etc.)
4. Get an overview of the results
5. Produce synchronization scripts

Schema Compare for Oracle (SCfO)

Here’s how it works in Schema Compare for Oracle.

When you open Schema Compare you have to create or open a project.


It asks you for the source and target database you want to connect to and which schema you want to compare. An advantage in SCfO is that you can compare multiple schemas at once.
Another thing I found interesting was the option to compare against a Snapshot. You basically take a “picture” of your schema at a certain moment in time and compare against that. Very handy when you can’t access both schemas from the same location. Or if you develop applications and want to generate upgrade scripts, I see the use of snapshots too.

But let’s get further with the normal schema compare.

In SCfO you don’t select the objects first, you just hit the Compare Now button and SCfO starts to compare the whole schema directly. At first I thought, I don’t really want you to do that as you are doing a lot of work for nothing, but the more I used the tool, the more I appreciated it. To start a comparison is very easy and quick...

One thing I found handy as well is the Options tab, which allows you to define if the tool needs to ignore white spaces, storage clauses etc.


When we are happy with the options, we click the Compare Now button and we get a screen with the progress.


Once it’s finished you have a complete overview of the differences in both schemas.


I like this screen a lot as it has many more functionalities than you would first imagine. The filter (find box) is very handy to find some specific objects quickly. You can also sort by different things and just from the way it looks it is so easy to understand what is different in which schema and database! But the nicest thing is when you click on a row where there are differences. It shows you both versions and highlights the differences. No need for an extra tool or text editor to get that information out. It’s just there.


If you want to create an upgrade script or make both schemas equal you just have to use the Synchronization Wizard...

The wizard asks you what it has to do and generates a script for you or automatically synchronizes both schemas based on the objects you selected.


I think Schema Compare for Oracle does it really well. So let’s compare it to the comparison tools that come with Oracle SQL Developer.

Oracle SQL Developer

In SQL Developer you go to Tools - Database Diff.

The first time it will tell you it’s using Oracle Change Management, a payable option of the Oracle database, and you have to acknowledge you have a proper license to use that.


Next, it will pop up with a screen that allows you to select a source and destination connection and immediately asks you what objects you want to compare.


Clicking on Next shows you a screen where you can select the individual objects.
You can view all objects at once, or change the select-list to only see tables, sequences and select the objects that way. This might be a good thing to do if you have many objects!


Once you click Finish it will compare the objects and present you the result in a Diff Report.


You can click on the green SQL button and it will generate the script for you based on the differences you selected.

So it’s rather straightforward to compare two Oracle schemas in SQL Developer, but there are some things I would prefer a bit different.

This is my wish list:
1. Not be forced to have the Change Management license for your Oracle database. The price depends your Oracle Database license, but it can be high if you just want to compare two schemas through SQL Developer.
2. Be able to compare multiple schemas at the same time.
3. Get a cleaner Diff Report, which allows me to add filters to it and allows me to see what exactly is different between the two versions. At the moment I just see a count there, when I click on the row. I get the script to generate that version, but I couldn’t find a way to see exactly the source and target and compare them side-by-side.

Point 3 is my biggest issue and that is why I searched for something else that made my life easier and finally came across Schema Compare for Oracle. Although Red Gate created a Windows only version of Schema Compare for Oracle, so as a Mac user I need to run it through a VM, I find it worthwhile to do it. The interface of SCfO is very clean, it’s easy to use and it gives me most features I’m searching for. There is even a SQL Developer plugin for SCfO (search for Schema Compare for Oracle in the SQL Developer Plugin repository).

So is Schema Compare perfect and is it better in every aspect than the Diff Tool in SQL Developer? Almost, but not completely. SQL Developer supports the comparison of Materialized Views (and their logs) and Database links, which SCfO doesn’t do in the release I tested (1.3).The version of SQL Developer I used was 2.1. I’m not sure the Diff Tool in SQL Developer 3 (which will be released in a few weeks/months) will be different...

Happy comparison!

Wednesday, August 18, 2010

APEX 4.0.1 Patch released

Hi just read Joel Kallman's post that the Oracle Application Express (APEX) team released 4.0.1 which corrects a number of issues found in APEX 4.0.

I recommend going to 4.0.1 if you have 4.0 installed as soon as possible.

If you still have 3.x running and want to upgrade to 4.0 you can directly download the 4.0.1 release and install that.

The new version of APEX is 4.0.1.00.03.

Monday, August 09, 2010

Add Default to Tabular Form in APEX

If you want to set a default value for a column in your tabular form, you can set the Default Type to "PL/SQL Expression or Function" and put into Default e.g. 'N'.


That sets the default for that column to the static text 'N'.

Wednesday, August 04, 2010

Upgrade to APEX 4.0 - Known Issues - Workarounds and Patches

If you upgrade your application from APEX 3.x to 4.0 you might encounter some issues.

At ODTUG I did a live migration of an application written in APEX 3.2 to 4.0 and I talked about some of the issues I discovered and how I worked around them. I'm doing the same presentation at APEXPosed in Brussels in October. You also might have seen my previous posts where I upgrade DG Tournament from APEX 3 to 4.

On the Known Issues page you see the issues categorized nicely. If the issues can be fixed by working around it, it's also mentioned there. Oracle is working hard on a patchset (4.0.1) and they hope to release it soon. On Metalink you can already find patches for specific issues too.

I plan to write some other blog posts with steps I did when upgrading DG Tournament to APEX 4.0.

APEX Father is speaking ...

If you didn't pickup another important APEX blog to follow yet... you definitely want to follow Mike Hichwa.

Mike is the "father" of APEX, it must be over 10 years ago he started with the development of APEX (HTMLDB/Project Flows).

Mike is a VP at Oracle and is now responsible for a lot more than APEX alone. He also has SQL Developer and many other tools all related to Database Development.

Tuesday, August 03, 2010

ODTUG comes to Europe in October! Registration open!

As announced on the latest OBUG APEX SIG, we will participate in the first ever ODTUG event in Europe!

It's a two day conference focused on PL/SQL and APEX, with two full tracks for each.

If you look at the Agenda you will see the presenters are well known in the APEX community and amongst the best in their field. On the PL/SQL side you have ofcourse Steven Feuerstein and a lot of other big names.

Registration is open now, so don't wait to register, places are limited!

Thursday, July 15, 2010

My first time at Orcan - and wearing a kimono!

A few months ago I got an invitation from the Swedish Oracle User Group (Orcan) to present at their event, which I agreed to do. It was my first time in Sweden and it was an unbelievable experience. The environment is so nice there... a lot of green (trees), a lot of water, nice people...

About the event itself, it started all normal. My first presentation was "Mastering an APEX Page", which you might have seen me doing before. I basically explained how an APEX page works and how/where to change things so you get exactly what you want.


But this event was in a SPA hotel... a very relaxing environment with hot tubs, steam baths etc. and everybody was wearing a kimono!

My second presentation I did in such a thing! It was very strange in the beginning to be wearing a kimono, but soon it became very nice and comfortable. I talked about my experiences going from APEX 3.x to 4.0 and demoed a lot of the new features in 4.0.


The event was also a great time to meet other people I didn't meet before but follow on internet. On the picture you might recognize Francisco Munoz Alvarez, Daniel Morgan, Husnu Sensoy, Grant Ronald and Jose Senegacnik. We all had a great time with some nice food.


If you've never been to Sweden or one of the events of Orcan, it's definitely worth it.

Thanks to Patrik Norlander and his team to make this an unbelievable experience.

DG Tournament / World Cup 2010 wrap-up

The World Cup 2010 is over... Spain is victory, the Netherlands lost in extra time, but can be proud on the tournament they played. And I was surprised how well Germany played.

Over 400 people had fun on DG Tournament by betting on the games and chatting with others.
Congratulations to the top 5!

The people interesting in some stats; there's a stats page in the app itself and below I put a screenshot of the page loads during the time of the World Cup. Over 120,000 page loads... not bad at all.

See you again in the next tournament... hopefully Belgium qualifies next time!

OBUG APEX SIG - APEX 4.0 day - the month after

On Thursday June 17 the first OBUG (Oracle BeNeLux) APEX SIG 4.0 day took place in congress centre 't Elzenveld in Antwerp. Over 90 visitors, great sessions and a beautiful day, made it a very successful event.


After I welcomed the people and talked a bit about the purpose of the OBUG APEX SIG, we kicked off with the first presentation (keynote) of the day. Patrick Wolf talked about Oracle APEX 4.0 - The next step in Web Application Development. He gave an overview of the new features in APEX 4.0 and talked about how things change for a developer.


Next Patrick Hellemans of InterAccess came on stage to talk about the Maturity level of APEX. He talked about developing in Agile, how to handle projects and by having a framework be able to go even faster.


After lunch Roel Hartman presented "Creating sub-zero Dashboard plugin for APEX with Google Visualizations". He showed how you can create a more advanced APEX Plugin (based on Google Visualizations). His demos were very cool! Roel already blogged about the event too.


Then it was my turn. I talked and demoed Websheets and Team Development. Where APEX was the Access killer a few years ago, Websheets will be the Excel killer. Websheets changed a bit over time (compared to beta versions I saw); it's now much more a collaboration tool, next to the availability for end-users to work with and share data. I think the wiki functionalities are really good already, for the data part I would like to see some more features in APEX 4.1. If there's one feature I would like to have in there, it's a pivot functionality.
Team Development is a first step into the direction to control your entire projects from within APEX itself. There's still place for improvements (e.g. link with other bug tracking systems), but I strongly believe it will already help many people managing their project in a more structured way.


Olivier Dupont and Jan Huyzentruyt from iAdvise showed other new features in APEX 4.0. They talked about the improvements in Globalization, Interactive Reports, Excel integration etc.


The last presentation of the day was for Iloon Ellen-Wolff. She talked about the enhancements of Tabular Forms in APEX 4.0.


As you can see, the day was packed with sessions :-) This first OBUG APEX SIG day was very technical. In the future we plan to have less technical presentations as well, especially for business people.

I would like to thank everybody who came along for the great atmosphere. Special thanks to Roel Hartman and the OBUG Secretary to help organizing the event.

All the above presentations you can download on the OBUG website.

Today - blogging day

As I've so many blog posts in my Draft Folder, I decided to try to at least finish a few before the end of today...

Saturday, June 26, 2010

ODTUG 2010 - Back in DC after 4 years

In 2006 I went to ODTUG Kaleidoscope for the first time... it was also in Washington DC and in the exact same hotel! It was also my first visit to the US, so it's a memory I'll never forget.
I already blogged in 2006, so it's nice to see what I had to say at that time ;-) (and the World Cup was also going on!)

Now we are four years later and I'm back where my "Oracle Conferences journey" started.


Time goes so fast... four years ago I was a visitor/participant. Now I've a booth with my company and am presenting almost every day...

WC2010 - DGTournament - Next Round

So far the World Cup 2010 was a bit unpredicted. Teams like France and Italy I expected to go through, but they didn't. That it's difficult to predict the right autcome of a football game is reflected in the stats at DG Tournament.

The next round is starting now, so don't forget to do your bets again!

Wednesday, June 23, 2010

APEX 4.0 goes production

It's finally there... the day we all waited for :-)

You can download APEX 4.0 production release at this very moment.

Friday, June 18, 2010

Sites up again

We are back in business :-)

We also upgraded our systems, so it should run even smoother...

My sites temporarily down

Just a quick note that I'm aware of the problems with my sites e.g. dgtournament.com, apexblogs.info, ...

It's a server issue and we are looking into it.
It should be working again soon.

Thanks for your patience.

Wednesday, June 16, 2010

APEX 4.0 Websheets - Behind the scenes

Tomorrow during my presentation about Team Collaboration in APEX 4.0, I'll talk about Websheets. While I was going over my presentation again I came accross two things I thought are interesting.

The first; if you want to search in SQL Workshop for the Websheets table, you want to type APEX$ as they all start with that. However if you type APEX$ in the search it doesn't find the tables. To find the tables you have to escape the $ sign, so your search becomes "APEX\$", then SQL Workshop finds the tables.

Secondly, when you have a closer look at the columns, it's commenly known there are 50 date, 50 numbers and 50 varchar2 columns. But I didn't notice before, there is also a Geocode column in the definition of the table. The last weeks I'm involved in a project that uses Geocodes, so I find it interesting to see there's already something in Websheets for that...

Monday, June 14, 2010

CD APEX 4.0: Feedback feature and Team Development

This blog post is part of a series posting "Count Down to APEX 4.0 Public Release" (click on link to view history).

In the previous posts we imported our application (and database objects) in APEX 4.0, ran the Advisor to check if the application didn't have any errors and upgraded some components like charts, validations etc. to their new equivalent in APEX 4.0.

We still have some javascript errors in our application and we should now open page by page and see if we have any issues or if we can make better use of the APEX 4.0 features.

We could take a piece of paper to write down all the changes we want to make to the app or use tools like Jira, Fogbugz and many others. Instead I'm going to use the Feedback features of APEX 4.0 in combination with Team Development. This allows me to have a structured plan of the changes I want to make.

We'll create a new (special) page, called the Feedback Page.

We can change the attributes of this page, but we'll just go with the defaults for now.
That's all you have to do to enable feedback for your application. Now people can tell you what they like, don't like and want improved... all that information will appear in the Team Development section of APEX 4.0.

The wizard created a new page and an entry in the navigation bar (which you find in Shared Components). So you can manually do these steps too.


As I already included the Navigation Bar in my custom look and feel of DG Tournament, I literally didn't have to do anything else. I just got the Feedback button (link), which if you click on you get a popup to enter feedback information.

As a default you get the above items on your page, but you can add that like you wish.
The Feedback Type can be off: General comment, Enhancement Request or Bug.

If you look at the Page Process of the Feedback Page you will see the apex_util.submit_feedback package is used to get the data into Team Development.


The most right-side button is Feedback. When we click on that we see a dashboard of all the feedback for the applications in this workspace.


As you can see I entered 3 feedback comments, but I didn't treat the comments yet.
I can now convert the feedback into a bug, a to do entry or a feature.

We'll click on the Feedback tab and see all of the feedback. You have different views of this feedback, you can see open, closed or all and can see the feedback in Extended or Basic modus.


From this screen you click on a Feedback entry


You update the feedback entry and can change the status etc.

That is how I would go forward. I would let people test our migrated application and ask to enter their comments as Feedback. I, as a developer, would do the same. It gives me (and project manager and other developers for larger projects) and the customers insight in what has to be done and we can properly plan.

I didn't touch the Milestones, Features, To-Dos and Bugs, but it's worth to have a look at that aswell. It's all in Team Development.

Saturday, June 12, 2010

WC2010 - DGTournament - hot

Looking at the statistics you just know something happened yesterday... Yes! The World Cup 2010 started... it looks like people are competitive and care about their ranking ;-)


Three people betted the correct score of the first two games!
This is the top 3 so far at DG Tournament, all with equal points:
- Marco Gralike
- Szabolcs Horai
-
Thomas Tomm

Concerning my bets... I almost had it right, but France didn't score and Mexico scored against... so 0 points. Hopefully my next bets are a bit better :-)