Wednesday, March 31, 2010

APEX Training in the Netherlands

Yesterday I was at the OGh APEX day. Over 150 people and a full day of multiple APEX tracks. The athmosphere was great. It shows that APEX is getting momentum in the Benelux.

I did a presentation about how I do a typical APEX project in version 3.x and how things change when APEX 4.0 comes out. Although I got 1.5h, I felt I could speak a whole day about it, if not more!

A few weeks ago we announced some APEX Trainings in the Netherlands. The training will start from APEX 3.2, but whenever possible the new features and changes that come with APEX 4.0 will be covered as well. The beginner training will have more handson/workshop, where as the advanced APEX course go more in dept in certain areas e.g. security, ajax and jquery, debugging etc.

The schedule looks like this:

Hope to see you at one of the classes!

Monday, March 29, 2010

APEX 4.0 - Looking at Feedback through Team Development

In the previous blog post I posted how you can add a Feedback link to your own application. I didn't specify how you can retrieve the Feedback, but got a question about it from Stew. I thought it might be useful for others, so decided to do another post about it.

In APEX 4.0, there's a completely new section called Team Development.
Team Development allows you to specify Milestones, Features, To Does ... but also to look into the Feedback.


I see the Team Development as something that helps you to do Agile Development. It's just a first try of the APEX Development team, so not perfect yet, but it's a lot better than an Excel file or I don't know what else people tend to use for handling their projects. But Team Development is definetely something you might want to give a try.

If you click on the Feedback icon you see the Feedback the people entered and you can Follow this up and make it a Bug, a Feature etc. As the Feedback option capture a lot of APEX specific things (e.g. in which app and page you were), it makes it all a bit easier to understand what the person is logging and to reproduce at your (the developers) end.


Obviously everything is stored in the APEX Repository so you can do whatever you want with it. Another good example if you want to see what you can do with it, is the APEX 4.0 Early Adopter feedback application itself. That app also sends a mail whenever feedback got updated.

Wednesday, March 24, 2010

APEX 4.0: Feedback link

APEX is written in APEX, so all feature you see in APEX you can do in your application as well.

One of the nice things in APEX 4.0 is Team Development and a way to get customer feedback.


To enable such a Feedback link in your application you have to do the following:

1) Create the Feedback Page


2) Edit the Application Attributes and Allow Feedback


3) Create a Feedback Navigation Link


4) In the Page Template, the APEX Development team already foresaw a #FEEDBACK# token, so I guess they want to give you control how and where the Feedback link is shown. However I couldn't get that to work yet, so that is still work in progress.


I believe this is a very useful feature... we actually already build such a functionality for our APEX 3.x applications, so it's nice to see it will be part of APEX itself in the future.

Monday, March 22, 2010

In memory of Scott Spadafore

The world stopped turning for a moment when the sad news came out of Scott Spadafore.

It's aweful to lose a person you know, especially one you look up to. Scott was very, very helpful to anybody. He has the most posts on the APEX Forum and never went for the easy route. He helped people till they really got it and the issue was solved. He's also the person who did a lot of the security in APEX. I remember Carl liked to call him "THE" man. But next to his knowledge I admired Scott because he could put the things in proportion and he always seemed to take things with a smile.

This picture was taken in 2007 at Open World. Scott is in the middle.


The last picture I could find was one from last Oracle Open World where Scott was talking to John at the APEX Meetup.


We will miss you Scott. Our thoughts are with you, your family and your friends.

ODTUG Kaleidoscope schedule available now

Just a quick note to say the ODTUG Kaleidoscope conference schedule is published now.
There's a double APEX track scheduled... Delaware A and B are the rooms to go to if you want to see APEX 4.0 and so much more!

Sunday, March 14, 2010

APEX 4.0 - New Features Application and Description

If you didn't have time to review APEX 4.0 Early Adopter I and II, but you want to have a quick look what new features will be in APEX 4.0, you can do that now...

There is an APEX 4.0 New Features Application which shows a lot of the new features in action.
e.g. the screenshot below shows the new features for tabular forms in action.


If you want more detail about the new features and when they got introduced (e.g. you reviewed EA1 but want to see what is new in EA2), you can go to the APEX 4.0 New Features Description.

I find it very useful to have something like above.

Friday, March 12, 2010

Word count in Pages (OSX)

Sometimes it's hard to find something if you don't use it that much.

I was searching for a Word and Character count in Pages (OSX). Pages is like Word, but than from Apple. Anyway, in Pages most nice "things" are under the Inspector icon.

The first icon (Document) and the third tab in there, give you what you need. Information about your document, like the number of words you used, number of characters etc.


The better you know something, the faster you can get what you want, it applies to everything ...

Thursday, March 04, 2010

APEX 4.0 EA2 - Websheets

In APEX 4.0 EA2 the Websheet functionality is enabled. Websheets allow you to share information with others in a very quick, user friendly and secure way.

Let's have a look at an example. If you go to Application Builder in APEX 4.0 there is a new type there called "Websheet Applications".


We create a new Websheet Application and give it a name and possibly some content that will appear on the home page. You can type the content with the WYSIWYG editor (CK Editor) by clicking on the arrow button.


Before it creates the Websheets, the wizard gives a summary page and that is it.
Websheets are even simpler to create than a normal APEX (database) application.

You can compare Websheets with a preconfigured APEX application. A whole Framework is build for you with a lot of features out-of-the-box. You can just use all that.

When you run the Websheet from the App Builder you come into "Websheet-land". As a default Authentication mechanism it uses the . But you can change that by going into the Websheet Properties to Public Access, Single Sign On, LDAP or Custom.


When logged in, you come into the Websheet Framework. As we have Websheet Development Access, we can change the Websheet. In the top menu and on the right hand side you see what you can do. E.g. you can add pages, sections, data grids etc. There's a lot to explore there!


In the different sections of the page you also have Edit links, which allow you to easily change the text, all with a (WYSIWYG) html editor.


I see two big parts of Websheets; sharing information and data. The information is done through using Pages, sections, tags, files etc. just like you do in a Wiki/CMS. But where it outperforms all the typical wiki or content management systems, is with the data part!

One of the killer features of Websheets are the Data Grids. If you go to Data > Data Grids and create a new Data Grid, you have the choice to start from scratch or from Excel/Text with copy/paste. That allows you to create "a table" on the fly which holds your data (actually it's a record in the Websheet repository). This Data Grid look very similar to an Interactive Report (see Actions button), but it allows to do inline editing and a lot more (see Manage button)!

Websheets are too big to discuss in one blog post. There are so many areas which could be covered. There's the wiki part, the data part, the administration (security, dashboards), ...

Maybe one last thing... look at the url of a Websheet (login with end/end)... it doesn't start with f?p... it starts with ws?p ;-)

Saturday, February 27, 2010

Oracle Application Express 4.0 EA2 live

A few hours after my previous post, APEX 4.0 EA2 hit the air.

The url to this new version of APEX 4.0 is still the same: http://tryapexnow.com/apex/


I'll start some proper testing next week, but if you already want to read what is changed, you find more information on Joel Kallman's post.

Friday, February 26, 2010

APEX 4.0 EA2 (with Websheets) very very close...

The APEX Development likes to hint and build up our expectations ;-)


It looks like APEX 4.0 Early Adopter 2 is almost there... a couple of hours? a couple of days?
Fact is that Joel is doing some tests on the EA2 build and reading Patrick's tweets says enough!


I really look forward to that release as it should have Websheets (and the DataGrids?) in and a ton of other new features! Keep watching the blogs...

APEX Listener EA2 with native Excel Upload

Kris Rice blogged about the new version of the APEX Listener here and here. The APEX Listener will become the preferred way of connecting to APEX (before Apache and the Embedded PL/SQL Gateway). If you are not familiar with the APEX Listener, you find more information here.

To install the APEX Listener EA2 (0.10.56.22.08) on my Oracle Linux VM I followed these steps:

  • Download Java SE JDK (before I used the JRE, but Kris told me the debugger doesn't work with that as you need the JDK for that part of the code)
    As a side note; now that Oracle and Sun are together, that website already has the "Oracle look". I wasn't expecting that so fast, but it's nice. The theme looks very similar to the APEX 4.0 Theme 1.
  • Become root: su
  • Go to the path you want java to install: cd /usr/java
  • Copy the file you downloaded in that directory
  • Change the permission of the file you downloaded to be executable: chmod a+x jdk-6u18-linux-i586-rpm.bin
  • Start the installation process: ./jdk-6u18-linux-i586-rpm.bin
    If that is done you should see a screen like this and a directory jdk1.6.0_18 should exist:

  • You find a complete guide of installing Java here.
  • Next you need to download and install the APEX Listener
  • The APEX Listener needs a webserver, depending the webserver you need to follow different steps. You find a complete guide how to install the webserver and the APEX Listener here.
  • I already had Apache Tomcat installed on my VM, so I went with that and just followed the installation notes.
  • Basically copy a war file to the webserver and change the config file
  • I was interested to test the new Excel upload feature, to get to work I added following line to the config file (apache-tomcat/temp/apex/apex-config.xml)
    true
  • Finally run APEX via the port of the Listener and create a new page with a File Browse item, a button and a report that queries the collection.
  • That's it!

With the latest release of the APEX Listener you query the collection like this:
select *
from apex_collections
where collection_name = 'P1_EXCEL_FILE'
P1_EXCEL_FILE is the item name of the File Browse Item. The other thing to remember is to call your button XLS2COLLECTION or have that as the request value.

Get me a Suite at ODTUG!

If you are going to ODTUG this year and you want me to do a favor... Put in my name "Dimitri Gielis" in "How did you hear about the conference?" when you register.

The person who has the most "referrals" gets a Suite at the Marriott Wardman Park!



I'm not sure about the size of that Suite, but if it's big enough and I win, I'll give a party in the suite and everybody is invited to come! We could even start the "APEX Meetup" in the Suite and have already a couple of drinks before we go further!
Hopefully the mini bar is big enough and has enough drinks, if not there are other ways to get drinks in that room I guess :-)

LOL

Anyway APEX will be big at ODTUG again... in fact it will be the biggest APEX event this year! Not to miss especially with the upcoming 4.0 release. See you there...

Thursday, February 25, 2010

Branches with Conditions When Button Pressed - be careful

Consider this example; we have a typical APEX Report with Form.


When we click on the Create button we come into the Form and normally you would see just one Create button. If you hit that button you get back into the Report.
In some projects I use a "Create and Create Another" button as people need to enter more records at a time and this way they stay in the Form when they hit that button.


So how do you create such a button? I typically do:
- copy the Create button
- add a Branch that has as Target Page the same page and add a condition to fire on that "Create and Create Another" button. Be sure to put that Branch (sequence) before the unconditional branch.


If you test that Form and you hit on the "Create and Create Another button" you stay on that page. Works great... so you think you are done, however if you hit the Create button you want to go back to the report (like it was before). But this doesn't work anymore, it stays on the same page too. So for some reason, although the Branch has a condition to fire on the "Create and Create Another" button, it ALSO fires on the normal Create button.

After having a closer look at what APEX is doing, it turns out that APEX is using the Request value or incase of a button, the button name. As the buttons have the same name (the condition of) the Branch fires for both buttons.


If you use the standard "Automatic Row Processing (DML)" to handle the insert/update/delete it requires the Request value to be a specific one. In case of Insert you have following options: INSERT, CREATE, CREATE_AGAIN, CREATEAGAIN

So the solution to the above problem is to rename your "Create and Create Another" button to e.g. CREATE_AGAIN


I found it confusing as the select box let you think it's a condition on a button. The behaviour is the same in APEX 3.x and 4.0.


I would suggest to the APEX team to only show the request values or make it so the branch really knows which button got clicked.

Monday, February 22, 2010

APEX 4.0: Dynamic Actions - Part 2

If you are interested in a Standard Dynamic Action in APEX 4.0, you should read this blog post.

In this post I'll cover how to create an Advanced Dynamic Action. 'Advanced' allows you to create more complex native dynamic actions such as 'Add Class' or 'Set Value' and also plug-in dynamic actions, that are installed in your application.

In this example I want to retrieve the department for a given employee.

In the Application Builder you find a new region (tree record) called "Dynamic Actions". Right click on that and click Create


In this post we select Advanced, as we want to create an Advanced Dynamic Action, that does more than just show/hide or enable/disable.


Give the dynamic action a meaningfull name e.g. Refresh Employee List

Tell the dynamic action when it needs to fire. In this case I want that something happens whenever I change from Employee (P25_EMPNO).


Select the action you want to do. In this example I want to set the value of an item (the department) for an employee. The value can be retrieved in a number of ways, but in this case I search the department with a SQL Statement.


Finally you tell the dynamic action what item it needs to update. What you want to update can also be a Region, a DOM object or a JQuery Selector.


Hit the Create button and you are good to go! Not a single line of Javascript to get this done!
You see the example in action here.

If you want to combine different actions in one dynamic action, that is possible too. You can add multiple actions when the condition is true or false. (See True/False Actions)


There are many Actions you can chose from. If you imported or created Dynamic Actions plugins, you find them in there too.


Dynamic Actions are VERY VERY powerful and have an unlimited amount of possibilities. Although the above is classified as an "Advanced Dynamic Action" it's still a fairly simple example. In Part 3 I'll show how to combine plugins with dynamic actions to be even more powerful!

The key reasons why I like Dynamic Actions so much:

  • it's a declarative way of creating more interactive websites
  • it allows people without Javascript experience to create more dynamic websites
  • it allows more experienced people to get the job done faster
  • the dynamic content is more structured and always in the same format
  • the dynamic content can be found at one place, directly in the App Builder (not searching in different javascript files anymore!)
  • the javascript is more maintainable (and possible more performant and more secure)

Tuesday, February 16, 2010

Bandwidth problem? investigate your log files

On some of my APEX sites I seem to have a bandwidth problem. Not that the sites become slow, they just eat so much bandwidth without reason.


We set a limit on the bandwidth a site can take a month, just so we are in control about the hosting/bandwidth fees we need to pay. If for some reason we see the site is eating a lot of bandwidth (which we didn't expect) we enable full logging for that site.

Next we investigate the logs. You can read the raw data, but you can compare that with reading a tracefile. You can understand things if you look closely at it, but it's not very user friendly, so for tracefiles you use tkprof to get a more human readable output. Same counts for the Apache logs, there are programs that can format that in a better way. I used AWStats to convert my logs to a nice overview. The result looks very much like statcounter stats (without the chart).


Out of these logs you can get very valuable information about your customers, not only do you see how many people you have per month/day/hour or which IP is accessing your site, you also get statistics about the platform they use.


For me it was interesting to see that for that site Windows and IE are less used than what I expected.

Further on in the log files you see how people reached your site; which keywords they used in a search engine or from which other site they came and how long they stayed on your site.

For me most important was to get an insight where my bandwidth went to. It didn't take me long to see that Robots/Spiders where the problem! It's unbelievable that Yahoo's bot is eating so much bandwidth!


To solve this issue you need to create a robots.txt with some parameters like specified in this link.

Looking at your stats and investigating the full logs can be very useful from time to time...


Supported by hosting