May 03

There has been a lot of talk about SaaS applications with SFDC and Oracle CRM on Demand being the frontrunners in the space. Something that the development community and the business users always want is results “quickly”.

What is APEX?

Oracle Application Express APEX is one such tool which is a RAD (Rapid Application web Development) tool that can be used over an Oracle Database. With application resulting in a rich user interface, it’s easy to learn, easy to use and organizations using Oracle Databases can highly benefit out of it.

APEX is written using PL/SQL and runs entirely inside a web browser; it’s an IDE and a runtime environment. No client software is required to develop, deploy, or run Application Express applications. New built-in capabilities for Application Express include Forms Conversion and additional security enhancements. The important thing to remember is that APEX is designed to be tightly integrated with Oracle Database, to be a fully capable web development environment, and be easy enough for savvy business users to extend applications for themselves.

How is APEX an RAD tool?

Application Express provides three primary tools: 

  • Application Builder – to create dynamic database driven web applications
  • SQL Workshop – to browse your database objects, run ad-hoc SQL queries, as well as a graphical query builder
  • Utilities – allows for data to be loaded and unloaded from both flat files and spreadsheets

Since APEX is so tightly integrated to Oracle database, you can prototype screens right there and then. The object browser allows you to create and view database objects like tables and build reports, charts around those objects. APEX being declarative, changes can be easily made in real time via the built in wizards.

Users are demanding more user interactivity and client-side functionality whereby the application responds as soon as a value is changed or the user leaves a field (wysiwyg, the new buzz word). Such functionality can be readily built into applications today using JavaScript and AJAX, providing you knows how to program in such languages. Dynamic actions are designed to make implementing such functionality declarative, allowing every APEX developer to enhance the user experience without needing to master JavaScript and AJAX. Such an implementation also makes maintenance and debugging a much simpler task.

Out of the box development features include Report, Forms, Charts, Email Services. All of the normal web widgets are available too: radio groups, buttons, drop down lists, date pickers etc. It comes with built in applications such as Project Task Tracker, Bug tracker, Project Issue tracker etc. Output from the application can be directed to the screen or to PDF, Flash, Excel or even integrated into a web service. You can even integrate your javascript code should you need it.

Who can use APEX?

APEX is targeted at the Rapid Application Development (RAD) developer. It is best suited to Departmental / Targeted applications. Not to say it can’t be used for enterprise applications or developed by end-users, there are many examples of both which have been implemented. Its advantage over scripting languages is the declarative framework and longevity as based on PL/SQL. If your business logic is in the database tier, APEX is the way to go. If your business logic is in the middle tier, J2EE maybe a better choice.

You can try APEX by signing up for a hosted account:

http://tryapexnow.com/

Next Blog: “How to” in APEX!

More resources:

Tagged with:
Mar 28

Web Services are tested for throughput, efficiency, and response simulating real-world conditions. A well designed load-testing strategy can simulate real-world load and performance scenarios with minimal hassle and cost. User loads and network conditions of varying nature can be effortlessly created and replicated. Testing can be undertaken till the output charts show a performance range considered acceptable for an application of its nature. Load-testing results can hence be taken as a strong indicator of application performance in actual business environments.

Adding Thread Group: Thread group element controls the number of threads. Thread group allows the following controls:

1. Set the number of threads

2. Set the ramp-up period

3. Set the number of times to execute the test plan (Loop)

First control tells JMeter to execute the number of threads to execute the test.

Second control tells JMeter how long to “ramp-up” to the full number of thread chosen.

If 10 threads are used, and the ramp-up period is 100 seconds, then JMeter will take 100 seconds to get all 10 threads up and running. Each thread will start 10 (100/10) seconds after the previous thread was begun.

Third control tells Jmeter how many times to execute the test plan.

Adding WebServices Requests: Samplers are used to tell Jmeter to send requests to a server. For load/stress testing of WebServices select WebService (Soap) Request sampler.

Step 1: On Thead Group use Add–> Sampler--> WebService (Soap) Request.

Step 2: Enter the WSDL URL and click on “Load WSDL”.

If the WSDL was loaded successfully, the “Web Methods” drop down should be populated. Otherwise it will prompt some error or exception.

Step 3: Select the web method and click “Configure”. The sampler populates the “URL”, Path and “SOAPAction” text fields. Change the proxy setting of the browser i.e. Http Proxy: localhost; Port: 8080.

Step 4: Paste the SOAP message in the “SOAP/XML-RPC Data” text area. We can optionally save the soap message to a file and browse to the location. We can also use message folder.

The sampler will randomly select files from a given folder and use the text for the soap message.

Jmeter1 (2)

Adding Listener to Store or view Test results: Listeners are use for storing all of the results of your HTTP requests in a file and presenting a visual model of the data. Select Add–>Listener–>View Results Tree (Select the type of graph you want to use as listener).

From run menu run the test plan. The result will be stored in the listener.

Load Testing Metrics and Parameters
The results obtained by load testing Web Services can potentially be reflected in terms of the following parameters.

Response time: It’s the most important parameter to reflect the quality of a Web Service. Response time is the total time it takes after the client sends a request till it gets a response.

Number of transactions passed/failed: This parameter simply shows the total number of transactions passed or failed.

Throughput: It’s measured in bytes and represents the amount of data that the virtual users receive from the server at any given second. We can compare this graph to the response-time graph to see how the throughput affects transaction performance.

Load size: The number of concurrent virtual users trying to access the Web Service at any particular instance in an interval of time.

CPU utilization: The amount of CPU time used by the Web Service while processing the request.

Memory utilization: The amount of memory used by the Web Service while processing the request.

Wait Time (Average Latency): The time it takes from when a request is sent until the first byte is received.

Sample Graph Result: Below is the sample graph result for a load test of webservices.

img_500_10_2_15

References: Apache JMeter by  Emily H. Halili

http://jakarta.apache.org/jmeter/usermanual/build-ws-test-plan.html

Tagged with:
Nov 26

This is a method how we can save the output of report into an CSV file.This is the new thing I  learnt.First of all I would like to mention, what the requirement is and further will tell the appropriate solution for it.

REQUIREMENT  is as Following:

  • We have an oracle form from which we are calling an oracle report when user press the PREVIEW button.  
    PARAMETER FORM
    PARAMETER FORM
  •  Now if user press the PREVIEW button, first a prompt should be shown which will ask user to enter the path and name of CSV file in which user wants to save the output of called report.SAVE PROMPT
  • SAVE PROMPT
  • When user clicks on the save button in the above picture, then a .csv file will be  saved at the specified path and an oracle report will be displayed.

How it should be done:

  • I used the follwing function for the save prompt to pop up, in “WHEN-BUTTON-PRESSED” trigger on the PREVIEW button:                                                                                                                                            v_file_path:=GET_FILE_NAME(‘D:\’, ‘file_name1.csv’, ‘CSV Files (*.csv)|*.csv|’, NULL,SAVE_FILE, TRUE);
  • Whatever path user will enter in save prompt that will be stored in variable v_file_path and an empty csv file will be created at specified path.
  • The path of csv file is send as parameter to called report.
  • As we are having path of excel file in which we have to export data we will use “BEFORE REPORT“  trigger of oracle report so that before running the actual report data is exported into csv file.
  • As we have passed path as a parameter to report so we can use that path in “BEFORE REPORT“  trigger.
  • We will use V_OUTFILE :=TEXTIO.FOPEN(FILE_PATH,’W') to open the csv file in write mode where V_OUTFILE variable’s data type is  TEXT_IO.FILE_TYPE.
  • And  TEXT_IO.PUT_LINE(V_OUTFILE,V_OUTSTRING) in which V_OUTSTRING is any chracter string.
  • Sample code is as following:  

CODE
CODE
  •  This will store the string in the cells,means each part of string between two commas will go in different cell.
  • Donot forget to close the file using  TEXT_IO.FCLOSE(v_outfile).

This was all what I used to store the data output of a report into the csv file.This was new to learn for me so i thought i should share it on blog.May be it can be helpful for someone.

Tagged with:
preload preload preload