Configure player

Close

WWDC Index does not host video files

If you have access to video files, you can configure a URL pattern to be used in a video player.

URL pattern

preview

Use any of these variables in your URL pattern, the pattern is stored in your browsers' local storage.

$id
ID of session: wwdc2005-605
$eventId
ID of event: wwdc2005
$eventContentId
ID of session without event part: 605
$eventShortId
Shortened ID of event: wwdc05
$year
Year of session: 2005
$extension
Extension of original filename: mov
$filenameAlmostEvery
Filename from "(Almost) Every..." gist: ...

WWDC05 • Session 605

Using Oracle JDeveloper with Oracle 10g on Mac OS X

Enterprise IT • 1:07:19

Oracle JDeveloper is a great Java development tool for Oracle 10g on Mac OS X. Bring your laptop to this hands-on session and learn how to build a Java application using JDeveloper connecting to an Oracle database, as demonstrated by Oracle. This session will be valuable for in-house developers and developers at ISVs.

Speaker: Shay Shemltzer

Unlisted on Apple Developer site

Transcript

This transcript was generated using Whisper, it has known transcription errors. We are working on an improved version.

Welcome everyone. My name is Shay Shemltzer. I'm from Oracle and welcome to the Developing J2E Application using Oracle JDeveloper. What we'll try to do today in the session is take you through the process of developing a complete J2E application using the Oracle development tools, which is called JDeveloper. Just to get a feeling of the audience, how many people here are currently doing Java development? How many people here actually have JDeveloper currently installed on their machine? Just a few.

Because the original thought was for you to follow what I'm doing on the stage and duplicate it on your machines. And how many people of you actually have an Oracle database on your machines? Okay, so we expected this might happen. So what we did is we basically plugged in my PowerBook into the network and there's a database running on this PowerBook and I let you access it for those of you who will be following step by step.

But note that since we are doing it through a Wi-Fi connection and since we are using a PowerBook as a server, it might not perform that well, right? So just a head notice. Right, so even for those of you who don't have JDeveloper on your machines, I think by looking at what I'm doing today, you should be able to go back to your office later on today, download JDevelooper for free, install it and run through it. And I'll also show you where you can get step by step instruction for doing what I'm doing and doing even more.

This is our topic today. And I'll start by giving you a short overview of what JDeveloper is. JDeveloper is Oracle's Java development environment, but it is more than just a Java development environment. It is basically a development environment that we use for building database objects and creating XML files and XML schemas and creating web services and creating anything that has to do with Java, as well as creating other stuff. And I shall explain later on. So it's a single ID that we expect to be used for any type of development.

JDeveloper itself is written in Java, and therefore it runs on a Macintosh or any other machine that has Java on it, which is one of the benefits of having Java. So we actually don't expect any problems taking JDeveloper and running it on the Intel-based Macintosh machines. We probably should try it out this week.

JDeveloper also supports the full development lifecycle. Some people like to design the application before they build it, which is a strange way of doing stuff. But usually it results in better quality of an application. Inside JDeveloper there are UML modelers that let you design your application. There is also a database modeler that lets you design your database structure and create the tables that you need in your database. After modeling, you can actually generate code. The code and the modelers are synchronized at all times.

After that, you go into the coding environment. We have a lot of graphical utilities and helpful things to help your development process be more fluent. Once you are finished developing, we have a debugger, tester, we integrate with JUnit so you can do unit testing. We integrate with N so you can build your projects.

We integrate with CVS so you can do version management of your files. We also support deployment. We give you one-click deployment to Oracle's application server, JBoss, Tomcat, or WebLogic. Basically, JDevelooper creates standard J2E applications. You can take what we create in JDevelooper and deploy it to any J2E compliant application server that is out there.

And that's basically a nice segue to the second point, which talks about the fact that whatever you create in JDeveloper is completely standard. We use standard J3, standard XML, standard HTML. Nothing is Oracle proprietary. You can choose your application server, and you can also choose your database. So if it happens to be that you don't have Oracle on your machine, but you have MySQL, you should be able to do the same stuff that I'm doing with the Oracle database using MySQL or any other database for that matter. So because you're using JDBC, basically. As I mentioned before, we integrate with open source standards and open source utilities, such as JUnit, CVS. We have exceptional support for the STRATs framework that you'll experience later on.

And JDeveloper itself has an extension API. So if there's something we missed while we built JDeveloper, you can always use the extension API to integrate other capabilities and other products into JDeveloper, add functionality. And we have an extension exchange on our website that lets you download, I think, currently about 50 extensions to JDeveloper. That do everything from code formatting to building wireless applications.

The main focus for us when we develop JDevelooper is on ease of use while you're developing your application. So what we are trying to do is bring sort of the power of a 4GL environment into the J2E world, but still keeping intact the fact that you can always access the code.

So while you'll see me doing a lot of stuff using visual tools and dialogues instead of actually going and hard-coding Java, I can always switch to the code view. And you can always go and edit the code. The actual Java code. So the way that we make everything simpler for you is by providing you with a framework while you're developing. And this is what we call the Oracle Application Development Framework, or Oracle ADF.

Oracle ADF aims to simplify the way that you build JT application by giving you certain utilities. There are some principles that we use when developing this stuff. First of all, what we try to do is provide you with solutions to common problems or common needs when developing a JT application.

So if you ever developed a JT application, you know that you need, for example, a layer that will enable you to map your object world, the object that you create in the Java language, to relational tables in the relational database. Assuming that you are using a relational database. Then after you do this thing, you might want to use caching and persistence solution.

If you're creating a web application, you need a framework that will allow you to control the flow of the application, how one page leads to another page when you're operating with them. If you're creating user interfaces, you might need a set of user interface components that you can just pick up and use in your application instead of building complex UIs on your own.

[Transcript missing]

It's not just about providing a solution, it's also about giving you an easy way to use this solution. As I said, portability and compatibility are always important for us. ADF can be deployed on any application server that supports J2E.

We support different development approaches. Some people prefer to just go ahead and start coding Java, directly access the code. Some people would like to first do modeling and then generate code, what we call MDA approach. Some other people would like to work with visual tools and wizards and dialogues.

Your development team usually comprises of people from all those areas, of those preferences. In JDeveloper, you can use each one of those approaches, but everyone works on the same file from the same environment. So if I'm doing a Strats page flow and I prefer to do it visually using drag and drop, another guy can go to the same file I created and edit the XML file directly if he prefers to. The same framework can be used by different types of developers, which is a very important fact for organizations who have many developers. We always keep the white-box approach. You can always access the code and look what's happening behind the scenes.

ADF is based on the MVC architecture for building applications. MVC architecture separates your application into three distinct layers, which makes development easier and maintenance easier, and makes it easier to plug and change components without needing to change everything in the system. So there's the view layer. That's the V. View layer has to do with the way that you display data, and we support both rich client as well as web clients. So you can build a client server type application, or you can build a web application accessible through a browser.

There's the controller, which is an important part for web application, controls the flow between the different pages. We basically use Strats, which is the de facto controller for Java server pages in the market. And there's the model layer, which is the layer that does your business logic and connects to your data. What we did is below the model layer, we basically created a layer called the business services layer.

[Transcript missing]

Some people say that EJB are overhead and they prefer, for example, when they do access to database, they take the POJO approach, where they simply create Java objects that access the database directly. So you can create business services in POJO. Some people say we want to do a service-oriented architecture and all our business services are exposed as web services. So this is another way to build a business service. And we let you take each one of those and plug it into the system and use the same way and the same development approach to do the rest of the development.

So what we'll be doing today. Basically, we'll do a very basic application to manage employees and departments, which is the usual Oracle demo. The steps that we'll be doing is first, we'll create Java classes that access the database and do all the operations against the database. We're going to use Oracle TopLink, which is Oracle's persistent solution for POJO objects. Then we're going to build a JSF user interface on top of this layer. So create web pages to allow you to actually access the database and see data, update data, add data.

To control the flow of the application, we are going to use Strats, an open-source framework. If we have enough time, we will also try to create a web service based application. I don't know if we will have enough time at the end. If not, you can come down to the demo booth, to the data center area, and we will show you how to do it over there.

Some words about TopLink. TopLink is a way for you to do object relational and persistence.

[Transcript missing]

The nice thing is that it can do it in two ways. One way is to start with existing tables in the database and just create Java objects from those tables. The other approach is that you let the Java people design their own object. and you let the database people design their own tables. And then you do what we call the scenario of "meet in the middle", where you map existing Java objects to existing tables and you tell the Java objects how to persist data into the tables.

This is basically what Toplink does. It also does all the persistence stuff, which means all the create, read, update, delete operations on the tables without you having to write a single line of JDBC to access the database. It does it automatically for you. Manage transaction lockings and those type of things.

It has advanced caching mechanisms, so it can cache data in the middle tier, to reduce the number of network traffic that you do to the server and offset load from your database machine. There's a lot of tuning options that we won't go into today, which let you control the way it behaves. And it's a non-intrusive solution, which means that it doesn't actually go into your Java code and you don't change anything in your Java code in order to persist your data. Everything is done externally in XML files.

It has a flexible deployment approach. You can deploy TopLink as a CMP for EJBs, you can deploy TopLink as a server object, or you can deploy TopLink in a client-server mode, running on the client, accessing the database. Another thing we'll do today is web interface development. We'll be using the Visual JSP Editor and the Visual Strats Editor in JDeveloper to do this in a nice and easy way.

If you don't have the software on your machine currently, this is where you'll be getting the software later on. We have a website called OTN, the Oracle Technology Network, and you can basically download JDeveloper for free from this website. It's the complete version, no time limit, just go ahead and play with it. There are currently two versions of JDeveloper, actually there are more, but the two relevant versions of JDeveloper that are out there is 10.1.2, which is our current production version, which we'll be using today.

And there's also a preview of our next version, which is called 10.1.3, but probably should have been called 11, because it's a major rehaul of the interface and a lot of new features in there. JSF, EJB3, a lot of other stuff is in there. So you can download JDeveloper, and you can also download the Oracle 10g on Mac OS X. So you can download both of them running on the Mac and play with them and see how you like them. And if you need an Oracle database, this is the URL to get your Oracle database for Macintosh. Question? Yeah.

The first link is to the JDevelooper homepage on OTN. So the way that we keep communication open between us and the developer community is through that page, basically. Over there you can get tutorials and demos and code samples and how-tos and all the stuff that we offer, basically, along with a discussion forum where you can ask questions and get answers, hopefully, and an extension exchange where you can get all the extensions to JDevelooper and more and more. So basically you can either write down the URL or just go to Google and do a search for JDevelooper. It will take you there as the first link.

All right, so let's switch to Demo Machine 2. is the developer of the application. This is what you should have on your machine if you want to follow up. Start up JDevloper 10.1.2. If you have a database on your machine, you might want to start that one as well. I'll start my database.

and inside JDevelooper when you first start it up, you'll probably see something like that, which means that you currently don't have anything and you have a little welcome page with all the links to all the pages and the information that you need. You can probably... One thing I can do is get you all to sit a little closer. This is one way.

I think I actually did something about the font size. If I do application... For the dialogues, I can't actually do it for the dialogues, but I think for the actual code editor...

[Transcript missing]

Once your database has started, you should be able to connect to it from JDeveloper. If you don't have a database on your machine, this is what you're basically going to do.

There's a connection tab that lets you define connections to various places, like your application server. So this is where you can define a connection to the Oracle application server or a BEA application server, and this would let you deploy your application easily later on. You can access your UDDI registry to look up web services. You're interested in the database connection tab. And if you don't have anything in here, you basically right-click and choose "New Database Connection." Click Next and give a nice name to your database.

This is going to be the WWDC database. Here you can define the type of JDBC you are going to use. I'm going to use the Oracle JDBC, but you can add JDBC drivers for other databases. Next, username and password. It's very easy here. It's HR HR, human resource. And also click the deploy password checkbox. It would make it easier to save you the login screen each time you run the application.

HRHR username and password. If you have any problems, Gary is here from the JDevelooper team. He will be trying to help you. If you have any problems following with me, just raise your hand and Gary will try to help you. The next step is defining the database connection to the server.

You need a hostname. I actually have a hostname.

[Transcript missing]

So I'll click cancel here, but keep this form open. You'll keep the 1521 here and the ORCL uppercase over here as default. The IP address that you actually need is-- 206.13.37.55. And this will get you connected to the server machine.

I'll keep this on the screen for a second or two. Again, remember, this is not a very powerful machine, and I'm hoping that it can handle the load from the guys who actually are following up. You can then go to the Test tab, click Test Connection. It should bring up Success.

If it doesn't bring up Success, it means that something went horribly wrong before that. But don't panic. Gary is here to help. Let me just copy this in case someone will need it later on. Yeah, so... is the IP address. Write it down somewhere in the notepad and you can access it.

Once you have your database connection, you are basically ready to work. Switch back to the application tab. The application tab is basically where you see all the components of your application. Currently you don't have anything, so if you actually right-click or control-click here, you are able to choose "New Application Workspace". Application Workspace is a way for you to manage multiple projects under a single roof, letting you build projects that depend on one another. Create a new application, give it a meaningful name, like the WWDC demo. You can specify an application prefix if you want to.

Then you can specify the template that you are going to use. We are not going to use any template for this run. Let me explain the concept. The template lets you specify a set of technologies that you are going to use in this specific project. For example, as I told you before, you can use EJBs in JDeveloper, or you can use POJOs, and you can use JSPs, and you can use stats, or you can choose not to use stats. JDeveloper has everything in it.

When you create new stuff, it would basically show you a new gallery of the things that you can use. This is a way for you to limit the number of things that it displays to you, to only show you the things that you care about. By choosing "Gallery", you can limit the number of things that it displays to you, to only show you the things that you care about. By choosing "Gallery", you can limit the number of things that it displays to you, to only show you the things that you care about.

By choosing "No Template", you tell it basically: show me all the technologies that you have. So we'll choose "No Template", click "OK", and it creates a project for you. And it calls it "Project", which is not very meaningful, so you can go and do "File", "Rename", and rename the project into "Model". Because this is the model layer for our MVC architecture.

[Transcript missing]

Click on Top Link and then on the right. This will allow you to add Top Link components to this specific project. Under Technology Scope, Top Link, and then on the right. Right-click on the project and choose New. is the founder of Oracle JDeveloper. He is the founder of Oracle JDeveloper. He is the founder of Oracle JDeveloper. He is the founder of Oracle JDeveloper.

He is the founder of Oracle JDeveloper. Click OK, you get a little wizard. You go through the motion of selecting the various things. So here you choose the database connection that you're going to use. Then you'll see the list of tables. is a developer at ISVs. Shay Shemltzer is a developer at ISVs. Shay Shemltzer is a developer at ISVs.

TopLink is a database that finds out about the structure of the tables, and creates two Java classes that interact with those tables. If you double-click on the classes, you'll see the code. On the left side, you see the list of methods that it provides you. It gives you a getter and a setter for each column in the database, as well as add methods for collections that are nested inside objects. In the structure pane, look for a method called setLastName and double-click on it. This will take you directly into the setLastName place in the code. This is the current business logic that it does, which is not very complex. Let's add some business logic to this method.

So do something like that. Write if and then press Control-Return. It automatically completes the if structure for you. JDevelooper comes with code templates, with existing code templates, as well as code templates that you can add. So it's a very easy way for you to reuse code that you do a lot of times. You can basically just type it and it will pop up.

OK, so if a last name, which is the parameter that this method gets-- Click the dot to activate the methods. You are looking for the "Equal ignore case" method. Type "Eq" and it will give you that one. You can add a name here. This is the name of the software. You can put your own name here. You need to do something if this is the case. Type "sop" which stands for "System Out Print". Click "Ctrl + Enter" again. Here you can write something like "I got high as input".

This is a very simple business logic, but it's just to show you the concept. When you write validation logic or stuff like that, you write them in the Java bin, in the Java world, without actually caring about how I'm going to access the database and retrieve the values from the database and insert them into the database. I'm just working in the object view of stuff.

You can compile everything just to make sure that you didn't do any mistakes. There's a little compile button up here. One of those two. One is compile, one is rebuild. The next step is to click on the top link mapping, right-click on it and choose "New Session XML".

New SessionXML creates the SessionXML object which basically, if you double-click it and click "Add", just use the default name that it provides you, the SessionXML controls all the aspects of how you connect to the database in terms of managing, connection pooling, logging, caching and stuff like that. We won't go too deep into this, so just create one by clicking the "Add" and you can save everything and close this window by clicking here.

Click on the TopLink mapping, right-click on it and choose "Generate TopLink deployment descriptor". The TopLink deployment descriptor is basically the XML file that maps all the Java objects to the specific columns in the database and does everything for you. Everything was generated for you, you don't need to change anything.

If you want to, you can change, but for this demo, don't. Basically, you right-click on the TopLink mapping and choose "Generate TopLink deployment descriptor". By now, you should have two classes: a session object and a deployment descriptor XML file. Right-click on the department class and choose "New Sample Java Client".

The new sample Java client creates some basic code that you can run by clicking on the "Run" icon over here. That would access the database and retrieve all the departments using TopLink, just to verify that the code that you did so far works. And it would show it up over here in the log window, so you can see the information coming from the database.

This is our model layer for our MVC. We created some Java objects, we added business logic, and we made sure that they can access the database and do everything for us. The next step is to build some nice user interface on top of it. What you'll be doing now is standing on your workspace, which I call WWDC demo, right-clicking on it and choosing New Project. Choose an empty project and you can name the project "View". This is where we'll create our view layer. We created a new project called "View".

By double-clicking on the project, you can go to the Preferences or the Properties of the project, go to the Technology Scope node, and shuttle to the right Strats and Java Server pages. and servers. Stats and JSPs will allow you to create Stats diagram and Java server pages in this project.

Okay, so it actually created a strats config XML file for you. Double-click this strats config XML file and it will open the strats page flow modeler. And this is basically what you're going to see. It's an empty page. At this stage, you might want to zoom in just to make sure that it is empty.

Okay, because it is empty. And here is basically where I'm going to define the flow of the application. Which page is going to call which page. So we'll start by choosing from the component palette on the right side. Choose the data page and click anywhere in the empty area over here. And it will create a data page for you.

And name this page browse. Make sure there's a slash before the browse. Okay, you can actually name it whatever you want. You can even keep the default name. It's okay with me. For those of you interested in looking at the code view, you can switch to the source tab and you can see the code for the Strats page flow.

If you want to edit the look and feel of the browse page, just double-click on it and choose "Create the JSP page". Click "OK". This would take you into the Visual JSP page editor, where you can create HTML pages and JSP pages. So over here you can just write some text like "Welcome to my app". You can format the text by doing "head 3" and "head 1". If you right-click here and choose "Split Document", you can see the HTML code behind this stuff. You can change the HTML code.

will be a great example of this. If you are the type of person who writes HTML directly, go ahead and do it. How about adding some stylesheet to this page? On the component palette, you can choose the stylesheet, the CSS page of components, and just click the JDevelooper to implement a stylesheet on your page. Make it look a little nicer, I guess.

Now I want to show you the departments of the database. I have the department as a Java object in my other project. How can I bring them over into my page? You should have here a data control tab, which is currently empty. If you don't have it, go to "View" and check the "Data Control" palette. Make sure it's visible on the right side. Now I can go to the "Model Project" and click the "Department" tab. Drag and drop JDeveloper into the Data Control Palette. Choose the two values in the session configuration.

What I just created is a visual way to look at the Java class as a data component that I can use in my JSP. I can see the departments and I can see the various columns that each department has. This is basically a method called "read all departments". It has a return value which is a collection of objects. So, "Stand on the return". Over here choose "read only form" in the "Drag and drop as" box. Drag and drop the return into your page. Into an empty area on your page. This creates three fields with three labels to show you the information about the departments.

While still sending out the return, choose "Navigation" buttons and drag them directly after the table, but inside the red rectangle. So, inside the same form object, just add the buttons. And those buttons basically let me scroll through records, moving to the previous next record and scrolling to the last and first record.

[Transcript missing]

This creates a table of employees. This is the JSP visual way of looking at it. This is the code version. The code version is basically using expression language to bind to our Java classes. Our page is ready to be operated. Go back to the strats config tab, go to the browse page, right-click on it and choose "Run".

What this will do is start compiling everything, make sure everything is compiled. And then it would start up the embedded J2E server that comes with JDeveloper. So while you're developing J2E applications and you want to test them and run them and see if everything works, you don't have to deploy to a remote server. Everything is inside JDeveloper. You don't even have to bother with the configuration of deployment descriptor files. You just click "Run" and it automatically invokes the J2E container and goes to your page.

I'm guessing it won't find the IP address, so let me just change here the IP address to...

[Transcript missing]

This is a basic browser application. How much code did I need to write? Nothing so far. Everything is drag and drop. Behind the scenes, a lot of Java code was created for me. But we give you a nicer way to do it instead of just coding.

You have this application which is very nice, but it only lets you see data. You also want to be able to insert and update information. So, let's do it. Let's add another data page to our Strats page flow. So, click Data Page, click an empty area, and call this page the Edit Page, with a slash at the beginning.

Just one slash. Double-click the Edit page to take you to the JSP Visual Editor.

[Transcript missing]

So now we know that from the edit page we can go back to the browse page. But we also want to go the other way around. We want to be able to go from the browse page and create things. So click on the browse page.

Let's add the operation for creating an employee. If you expand the employee object, you'll see the operations for the employee. Click the Create button and drag and drop the Create into this empty space right here. There's an empty cell here. And it will basically create a button for you that enables you to create a new employee.

This will invoke the create operation. The next step is optional. Click on the lowest left cell and go into Design - Table - Split Cell. and click OK. This creates another cell in your table. This time in the operations choose the setCurrent row with key. It's the first thing that looks a little differently than the other operation.

Choose findRowLink, so it will be embedded as a link, not as a button. And drag and drop it into this little empty cell that you just created. So if you saw the application before that, we basically had many employees. And I want to be able to select a specific employee from the multi-record table and edit the details of this employee. And this is basically what I did now, is I just specified that I'm going to choose a specific row in this multi-record table.

And it created this link. When you're standing on the link, you can actually see the href or the URL that it's going to call. You need to go to the end of the URL and specify the event. So you do ampersand event. And you do ampersand event = edit. At the end of everything though.

This basically tells our strats diagram that in the event of someone clicking this link, I'm going to invoke the edit operation. So let's go back to the strats page flow. Add a forward link from the Browse page to the Edit page in the event of someone clicking the Edit.

Make sure uppercase and lowercase are important here. The name of the link should be "edit". Do another forward link from the Browse page to the Edit page. Make sure the name of the link should be "edit". Complete the application. You have two pages and navigation built between them. You can do other stuff on your machine.

You can do things like design a table, split cells, add two more empty cells, in order for you to be able to ClickForm operation, the commit operation.

[Transcript missing]

is a great developer for in-house developers and developers at ISVs. Shay Shemltzer is a great developer for in-house developers and developers at ISVs. Shay Shemltzer is a great developer for in-house developers and developers at ISVs.

If you're interested, I can show you later on how to make sure it won't pop up this. So now I have my page. I can actually create a new employee by pressing the create button. And then I can insert some information. So you can insert whatever information you want.

Employee ID: 104 First name: Shay Hire date: 2004-03-03 Job ID: ad_vp Last name: Shay Phone number: 650-555555 When you click "Submit", it actually saves the data. By the way, if you remember, at the beginning of the session, we actually did some business logic that we added to the set last name.

So if the last name equals "shy", we did something. And you can actually see the results over here at the log window. It actually popped up the message. So the business logic that you created in your model layer was invoked at the correct place. And probably you have a more complex business logic in your application, but it just works.

If you want to edit the details of an employee, click on the details and you can edit the last name over here. Click and it works. You can commit the changes or roll back the changes. Let's roll back. Data has disappeared. Although you browsed through various pages, moved back and forward using stats, transaction management was completely unharmed and everything was done for you. This is how we do J2A development in JDevelooper. Visual approach, drag and drop, very easy to do.

What I want to do in the remaining time is I want to try and build a similar application, but this time I'm going to try and use a web service as the data source. I'm not actually sure if the network connection here to the internet actually works. I'm going to do a find web service on my UDDI repository and I'm going to look for a web service with the name "airport". This is a Microsoft UDDI repository. It looks up all the web services that are on this repository, hopefully finding one that is called "AirPold". I'm not sure it's actually working here, but I'll try it.

The concept is that just as I created a class to access the database, I can create a class to access the web service. I can embed this class into my JDeveloper and use it in my application. This session will be valuable for in-house developers and developers at ISVs. Shay Shemltzer Let's do something else instead. Instead of showing you how to use an existing web service, let me show you how easy it is to create a web service of your own. You can create a new application.

is the founder of Oracle JDeveloper. He is the founder of Oracle JDeveloper. He is the founder of Oracle JDeveloper. He is the founder of Oracle JDeveloper. He is the founder of Oracle JDeveloper. and let's add some method here. So public string. will say hello, which actually receives a string variable call name.

[Transcript missing]

This is your "Hello World" example in Java. Now I want to expose this complex business logic as a web service for other people to use. Right-click on the class and I have the ability to create a J2E web service from this class. Once I created this web service, it actually went ahead and created, if you click on the web service here, it created the WSDL for me. So if you know anything about web services, it's an easy way to communicate between processes and functions that are written in any language running on any system.

[Transcript missing]

This takes the web service and deploys it to the Oracle application server inside my machine. It gives me a URL for accessing this web service. Let's copy the URL. will probably change the IP address again to 127.0.0.1. This is a testing harness for my web service. I can invoke the say hello, pass a parameter,

[Transcript missing]

This was another aspect of JDeveloper, the ability to create web services and use them in your application.

What else can I show you? Any questions so far? So if you click on the web service over here, you have the WSDL. It doesn't matter. Over here on the web service, right click and choose Run. This basically takes the WSDL, takes the JAR, basically gets the JAR file, packages everything and deploys it to the embedded J2E server. On the log window, you'll have a URL that you can copy and paste on your machine. and this would bring up the page to test your web service. You can try adding more parameters to your web service and try to run it that way.

Yeah, so if I copy this one, pop this up.

[Transcript missing]

So you can actually click the "Say Hello." This pops up just a screen that knows how to activate your web service. is a great example of this. You can see the results of your web service as the return value of your SOAP message.

[Transcript missing]

If you're a company that produces a utility to create PDFs from Word documents, you can have a web service interface to your utility and expose it. You can charge people for using the web service. It's also very powerful in-house. If you have various departments in your organization doing various things, you can use the utility to create PDFs from your database. You can also use the utility to create PDFs from your database. Expose it as a web service.

Okay. While we're here, I'll show you just a little bit of JDeveloper 10.1.3 just to give you a taste of how it differs from 10.1.2 in terms of look and feel and functionality. In 10.1.3, I'm popping up the preview version that you can currently download from OTN. One of our main focus areas was improving coder productivity. So in 10.1.2, you saw how I do everything visually.

But when you actually go and you develop a project beyond just doing things visually, at some point you'll have to delve into the code and do some changes. We wanted to make sure that even those types of changes would be easy to do. So, let's create a new application over here. Call it 10.1.3 demo.

Let's get a new class. Let's call this class, that would be my dog class. One thing you should see out of the box is that the whole user interface has been revised. It includes the way that you can double-click a tab to maximize the area so you can see more things. This works for every area of your screen. You can click the structure window, you can click the application navigator.

Let's define a couple of variables, like a private string name for the dog and also a private int age for the dog. Let me try and increase the font so you'll be able to see more because this is actually a coding demo. It would be nice for you to be able to see some of the stuff. France.

What you can see now is that the name and age are grayed out. If you compare them, for example, to the string. And if you actually stand on the line, you'll see a little light bulb on the side. And if you click on it, it will tell you this is an unused parameter or unused variable. Do you want to remove it? And you can choose to remove it if you want to. I actually do want to use them, so let's right-click over here generate accessos.

This generates setters and getters for my two parameters and now they are used so they are not grayed out anymore. I can now add another method, for example, which will do public string say hello and is a great developer. He is a great developer. He is a great developer.

He is a great developer. He is a great developer. This is a very good class. I can use it as an interface for other classes. Right-click over here and choose Refactor and say Extract Interface. Call this interface the I-Animal interface.

[Transcript missing]

So now I can actually go and say, that's very nice, let's create another class. Let's create the class cat, the cat class.

Let's tell this class that it actually implements an interface. I didn't save everything, so I probably should save everything. Tools, implement interface, and add there my apple, my package, I have the animal interface, and everything was generated for me. And then at some point I say, it doesn't make sense for animals to say hello. They don't say hello. So I actually want to rename this method. So I can just right-click on it and say refactor rename and say speak, because animals can't speak, of course. So I click speak and I have the preview checked here.

And it actually shows me if I change it in the interface, where else it should be changed. So it should be changed in the cat class as well as in the dog class. And if I'm fine with that, I can just tell it, okay, run ahead and change it.

And if you go to the cat class, it now says speak over here. And if you go to the dog class, it says speak over here. And if you find out, actually this is not what I wanted, I want to go back. You just go and you do undo. and it undoes the changes everywhere for you.

This is refactoring, which is a very strong way to organize your code. Refactoring is defined as changing the structure of the code without influencing the functionality of the code. It makes it very easy to break out parts of your code and make it more usable. For example, if say hello actually got a parameter. Suppose I want to have a parameter for this stuff. Hello. Click over here. And I can say introduce parameter.

[Transcript missing]

This session will be valuable for in-house developers and developers at ISVs. Shay Shemltzer

[Transcript missing]

and actually, if I take those two things, I would like to have... I would like to refactor them into a variable that is called greeting. So now I have a greeting that is consistent of those two. So you see how easy it is to take parts and move it out.

Other stuff that you can do is, for example, we have dynamic code templates now. So if you type, for example, a tally and press return enter, you get a loop, an i, and for i loop, that you can actually change. So you can go, I don't want to call it i, I want to call it counter, and then I'm going to run all the way to the dog size, and when you click, it changes everything in the loop for you automatically. And you can define your own templates like this. So there's, for example, the connection stuff that automatically creates a JDBC connection for you in your class. And then maybe you say, hey, that's very nice. Maybe I should take... Let's remove this part. Okay.

This is a great way to build a Java application using JDeveloper. Refactoring is one of the features of the code. Better integration with CVS. JSF support. If previously we did JSP page editing in JDevelooper 10.1.3, you can also go to the web tier and create JSF pages using a visual JSF page layout editor, as well as a visual way to manage the JSF page flow, or basically the faces config file. There are a lot of other features in 10.1.3. As I said, it should probably be called 11.

And this is, can we switch back to the slides now? This is the demo I wanted to show you. If you missed anything or if you didn't have your machine ready here to follow with me, you can just go to this URL over here to the JDevelooper homepage on OTN. There's a link there to something called the ADF Workshop Top Link version. This basically takes you to the same steps I did on the stage with screenshots and everything in there for you to follow step by step.

There are many other tutorials in there. If you want to do more web services stuff, it's also there. That's it. So what should be your next step? Go to otn.oracle.com, download the software, free download, complete version on your machine. Follow the tutorials, demos, white papers, sample extensions. If you have any questions, you can ask them on the discussion forum on OTN.

And you might want to join our Java newsletter, a monthly newsletter that goes out to our Java developers. It keeps you up to date on the latest things that we added to the product and the latest how-tos, articles and other stuff. And that's it. Any questions?

[Transcript missing]

All right.

So if you want to see more about JDeveloper, see other types of development, see JB development, how it's done in JDeveloper, see web services development, see other things, just come down to the data center. We have a JDevelooper booth over there. Thank you very much for joining me today. Hope to see you soon.