WWDC2004 Session 637

Transcript

Kind: captions
Language: en
good morning I'm Wiley Hodges I'm the
Senior Product Manager for developer
products at apple and one of the many
things that I'm responsible for dapple
is a product marketing for java on mac
OS 10 you know we're really excited
about what we've been doing with Java
but I'm also extremely excited about
what many of our partners have been
doing with Java and in particular a very
important Java partner is Sun and I'm
very pleased this morning I can
introduce bob brewin and Karl Quinn will
be talking about Java studio creator on
Mac OS 10 extremely pleased to see
coming to our platform so with no
further ado Wylie thank you very much so
we're going to be talking about ichat on
the PDP for offering so I'm Robert Bruin
a distinguished engineer Sun chief
architect for project ray which is now
called sun java co-creator Karl Quinn is
one of our senior engineers responsible
for some of the core technology inside
of it so he's going to be giving a
little demo a little later and so what
we're going to talk about is so why did
we do a creator you know what sort of
what things were interested in targeting
what kind of customers were we looking
at kind of developers will talk about
the project creator itself give us an
idea of what what kind of quality
measures we had for what kind of
features we wanted what kind of
capabilities we thought we could offer
developers will talk about Java
development on Mac OS 10 by the way if
anybody applies a mac OSX just throw
something at me preferably a g4
powerbook because i need a new one thank
you and then we'll do a product demo and
we'll let Carl fly with that and then
I'll talk a little bit about the road
map where we're going the kinds of
things we're trying to do in a sun java
co-curator product so let's take a look
at market segmentation one of the things
that we wanted to do was try to
understand what sort of developers are
out there what kind of applications that
are trying to create and so one can
create any kind of arbitrary a diagram
or
spreadsheet or something to try to
capture it and what we did is we came up
with a quadrant and the quadrant is
pretty self-explanatory if we take a
look along the bottom the bottom axis
talks about application complexity so
how complex is that application going up
in the vertical axis we talked about
code how much coding is actually
required and we divided this into four
quadrants and for this diverse group we
looked at for instance the technologists
base so these are people to do a lot of
coding and they love to code but the
applications they create are not
necessarily that complex technologists
love the latest thing they love to go to
Java suncom play with the latest API so
they love open source they like free
stuff these are the kinds of people that
create a lot of the innovative
technologies and products that we see
coming out on Java calm and other places
including some of the Java net sources
enterprise architects on the other hand
I have a lot of code in their
applications they're very knowledgeable
but the applications are incredibly
complex for those kinds of applications
we're looking at industrial strength
these are the kinds of applications that
run wall street these are the kind of
applications that run the telephone
services the things that makes your
mobile phones work they need
architectural tools they need uml
modeling they need things to go ahead
and allow them to performance tune and
scale the applications for the
enterprise and so that the dial tone
never stops on your phone the
integrators are people who take
potentially very complex applications
and assemble them together so these are
people to take existing applications and
they're doing the there's a lot of
technology that's just emerging in terms
of business process modeling and so on
where people are taking pre-built
components some of a very large scale
putting them together to create end-user
solutions corporate developer space is
all about productivity these are the
people who are doing maybe not so much
code they're reusing existing
infrastructure and artifacts and the
application complexity is not
necessarily that high either again these
are people who are primarily building
applications that a lot of you see
within your IT infrastructure so people
that are doing
travel accounting people that are doing
payroll management things like that for
them a lot of times complete solutions
are extremely important you know they
may not be experts in the sense of
programming experts they may not have
you know a PhD in computer science what
they would like to do is they'd like to
be at one CD install and have the entire
everything they need all the tools all
the runtimes everything they need to
actually get productive and develop
applications simplify development we
talked about the corporate developer
space one of the things are they're not
necessarily your typical developers it
could be domain experts if we take a
look at the spectrum and we'll take a
look at that quadrant again if we take a
look at the spectrum of what corporate
developers do they may range from people
that are doing spreadsheet macros all
the way up to people who are using for
GL languages Delphi visual basic and
other codes languages so there could be
domain experts they may be people that
understand for instance the mortgage
business they may be people that
understand HR they may be people that
understand finance but they may not be
typical developers the applications that
create typically are not producers of
business logic they are in fact
consumers of them so they consume a lot
of data they consume business services
they consume a lot of the application
artifacts that the enterprise developers
create or the technologists create
typically you'll take a look at a
corporate developer and if we contrast
that to the way in enterprise
developerworks an enterprise
developerworks typically from the back
to the front so I've done enterprise
development so I've sat down with uml
modeling tools and I've divided device
this really large and complex
architecture inspect it all out and then
built this huge Shang and then started
grafting you eyes on top of it corporate
developers typically work in the reverse
they have an idea in their mind about
how this application is going to look
and behave the design the user interface
and then they wire all the pieces and
beneath and beneath it and usually what
they're trying to get is a Richie why
because again we're visualizing this
thing is this is what I want my end
users to see and that end user may be
only them could be a department could be
a worker but generally it's a smaller
group of people
a problem we take a look at the
application space today is that the bar
to enter to Java with most IDEs is too
high so if I take a look at a
technologist or I take a look at
Enterprise Architect the value they get
right is richness and flexibility while
for the corporate developer its
simplicity and understandability one of
the examples that I like to use is the
difference between a let's say a Cessna
plane and a 747 if I both of them would
get me from point A to point B both of
them have a small subset of controls
that's the same but the amount of
experience the amount of understanding
of all the way that these systems work
together has to be a lot higher to get a
747 to fly from let's say LA to New York
but assessment will work just the same
same way again you know the the idea
here is to provide a simple interface
and it's a set of abstractions of the
corporate developer can work with to
develop their applications and again
like I said they need a complete
solution so one of the things we're
looking for is a one-stop shop so like
we're talking about with a plane if
we're going to develop an application or
a tool and a runtime infrastructure that
is simple all that power still needs to
be available one of the things that
we've run into is it's not just
corporate developers that are using
tools like this enterprise developers
and technologists are using this well
why well if I'm tasked with creating a
large j2ee infrastructure you know i'm
spending forty percent of my time
developing JSP front ends well i'm
wasting my time i should be spending all
my brainpower working on the hard
problem solving those so the richest of
the platform needs to be available I
need to be able to get underneath the
covers if I know what I'm doing and if I
can take that application and move it
from a corporate developer space into
somebody who really understands what
they're doing I need to be able to get
to the code and I'm able to dive down
and then tweak it but the use of the
complex api's should not be required I
shouldn't have to be able to understand
for instance what a javaserver faces
life cycle is in order to actually
develop an application I shouldn't have
to know what all the platform api's are
either the resulting code should be
obvious I should be able to look at the
code and understand intuitively what
it's supposed to be doing if I'm setting
a property or if I'm responding to an
event I should be able to have a bay
sick understanding of how that's going
to work for people that are
transitioning from languages like visual
basic are coming from Delphi they should
be able to look at the code that we
generate and have that same
understanding of what that thing is
supposed to be doing understanding
higher-order concept is not required I
shouldn't have to know what a visitor
pattern is in order to be productive
again when i talked about up front
design it's important to understand that
i'm going to design the interfaces and
then i'm going to configure properties
and set the attributes as I'm moving
forward and then plug in the logic so
simplified coding doesn't mean no code
one of the things that we're really
looking at is when we generate code that
code is exactly what you expected to do
we're not going to be hidden anything
there's no proprietary XML layer which
is driving this entire system one of the
things that we did when we first started
this project is we took a look at the
entire spectrum of all developer
products out there specifically ones
which were targeting the corporate
developer space when we did that we saw
a lot of companies which were of the ilk
where you would design some interface or
specify some attributes for a system and
it would generate this huge metamodel in
XML that you could never move forward
you could never update you could never
manage what the developers were telling
us we're also that well they want the
code so i may be able to quickly
prototype an application but i want to
be able to get to the java code i want
to be able to get to the xml descriptors
if I know what I'm doing it if I need to
migrate this and scale it to the
enterprise so one of the things in the
end the general tenants that we have for
creator is we just generate pure Java
code if we need XML the scriptures there
there we may hide them behind really
pretty veneers which are visual tools
but they're all there so I can take that
application and then I can move it scale
it to somewhere else
so let's talk about creator excuse me so
sun java studio creator which used to be
called Project rave is designed for
corporate developers it's designed for
people who want to be immediately
productive people who are going to be
developing applications or people who
are experiencing going to be prototyping
applications but they don't necessarily
want to learn the plumbing they don't
necessarily have to learn and read the
you know multi-hundred page GSF spec JSP
jst l servlets j2ee and java to
understand what they're doing it's the
first idea that's completely built from
bottom to top on Java one hundred
percent it's designed to be around the
idea of what you see what you get highly
productive drag and drop everything when
you see what you would see on the screen
is what you'll see in the end the
application the other thing is is that
we as i described people design
applications in terms of the front into
the user interface and they'd wire it in
behind so one of the things that we had
to do is make sure that you can get to
data you can get to services and easily
drag them and drop them and put them to
wire them into your application the
other thing is that unless you're
building just a single page you need to
understand how that page is going to
interact with some other page how am I
going to get from point A to point B and
so again we could just throw the xml
descriptors at them but we thought the
visual page navigation would be much
better way to go again the idea being is
that this whole environments visual so
Java standards one of the things that
son of course is really key on his
everything should be standard I should
be able to take this application I
should be able to run it on any server
that you have this j2ee compliant and
that's something that we've done so you
can take a java studio creator
application not only can I take that
code and move it into any development
environment that supports Java I can
take the resulting application and
deploy it to any j2ee compliant server
and have it run so for that we use
javaserver faces if you're if you're
also going to the java one conference
you'll see there's a lot of hype and a
lot of conference material about JSF
jsf provides a simplified component
model and runtime that allows people to
create web applications easier we use
jdbc rosettes jdbc rosettes is a new jsr
that just went final which holds the
promise of a simplified jdbc access to a
rosette model that allows things like
that supports web applications to
supports data caching so when we talked
about our quadrant obviously sun java
studio creator targets the lower left
corporate developers and again that it's
a range so it doesn't necessarily mean
these are all going to people who are
doing scripting and spreadsheets but it
does include people that doing
enterprise work it does include people
doing technology work but the idea is to
make them as productive as possible and
to make people develop applications in
Java so sun java studio creator is what
we're going to go ahead and demo today
and what it has is it's based on
NetBeans three dot six one of the
advantages in that netbeans is it
provides us a mature product a lot of
the people that are using our products
are people who are in fact experienced
developers once they develop that
application they're going to want to
have the same sort of capabilities they
can get with any standard Java IDE by
building on NetBeans we get a mature
product its form as our base again what
I talked about before it's just Java so
take the application deploy to any j2ee
app server it's open in any Java
development environment so I can open
this thing in jbuilder I can open it an
Xcode i can open in WebSphere developer
any of those products and if you have
any kind of Java programming skill it
works everywhere and the other thing of
course is perfect for the Apple
Developer so an interesting
characteristic of our team is we started
out a priori thinking of the Mac
platforms so a third of our developers
are all building and developing and
testing this application on the Mac so
rather than building it on Larnell
solaris and then porting it to all the
various platforms we are in fact
building it every day and testing it
every day on Mac OS 10 as well as
windows as well
solaris and linux the other thing is is
that we've leveraged the latest
platforms that the Apple engineers have
put together in fact you're going to
watch Carl crash and burn here in a few
minutes because being an engineer he
decided to download what cp3 lat aight
for the demo so we'll see how that works
so he is the last surviving member of
the Flying Wallendas if you remember
them so one of the other things we
talked about is complete solutions you
got to have be able to develop you have
to be able to deploy right out of the
box you can't expect people to go
hunting around and determining what the
right platform is to run on the right
tool the right JDK so in the box when
you get studio creator you get sun java
studio creator you'd get the java
application server platform edition 8
which is the latest version of the j2ee
14 run time you get a lightweight test
DBMS which allows you to go ahead and
very quickly prototype and develop
applications against the database
however we include a number of data
directs drivers in the box for you for
Oracle sybase which I know run on the
mac platform db2 and sequel server if
you're daring full developer
productivity one of the things you get
when you buy creator and you can join
the software developer network program
as you get a website you get tutorials
you get forums code samples support and
that support will be growing over time
excuse me so it's a complete package now
I number of you are going here to the
apple conference but one of the things
you can do is next door at javaone we're
offering a deal and kind of fortunate
for you is you don't need a badge to get
the deal because if you walk into the
south entrance you can get some sun java
sea to your Creator field guide which is
the first book to come out for creator
in it you get the full package of
creator based on the software developer
network subscription program which
includes all everything you see there
now normally the subscription program
for Creator will be ninety-nine dollars
today if you buy this book which is
about 40 bucks you get that $99
subscription as well as the book for
95 so if you have a chance to earn lunch
run over there and pick up the book now
we'll talk about the release plans for
the Mac but the interesting thing about
the way we've done this is that any
license key you get with this product
when the mac version is available in
terms of an FCS product for final
release that same license key you get
with this will work with that product so
again just save yourself a few bucks
here if you go out and get this and does
not only that you get a pretty good book
to describe what the system's about so
let's talk about Java development on Mac
OS 10 so job to the core component of
Mac OS 10 platinum environment obviously
I mean been hearing about a lot of the
conference I was at the keynote
yesterday so it's a full version of Java
too he's building it on dp3 as you heard
a little earlier it's optimized for the
platform and Java applications are
first-class citizen and we've actually
taken that and proven that by building
creator on the mac OS 10 platform
obviously we have a bunch of unit hacks
in our group and so they really enjoy
the fact that mac OS tents built on unix
so all those tools and capabilities you
get in the portability of scalability
you get with unix is all available to
them as well as the full complement of
the j2ee stuff and what can you say
about is a development i think you guys
have it something that we've tried to
aspire to so this particular development
environment right provides a rich
development sort of develop the tools
obviously if you shop around you'll find
out you get apple xcode there's java
studio creator son has a number of
products NetBeans and IBM and others
have products for the mac platform and
as I described earlier any application
you create with creator if you wanted to
you could develop it in those codes and
we've done that we've actually moved our
code and we have some people that have
done development on the mac and take and
creator code in there so what i'm going
to do is I'm going to turn it over to
carl and we're going to watch him fly
and he's going to go ahead and show you
a little bit about creator he's going to
talk a little through the system talk
about the environment talk about the
applications we can create and give you
sort of a general run through what we
can expect
okay okay i'm going to first start out
by showing a partial application that we
built with creator and i'll just kind of
walk you through the functionality and
the look and feel of this application so
this is kind of a media zone the
resolution looks pretty good up there
sort of a website where you can go and
log in and purchase things sort of a
feelin iTunes for poor man's iTunes I
guess so we start out with a page with
some sort of featured media on the front
page and on the right there is let's
retreat control that lets you browse
different categories of of content
artwork
serve with a little slow right now there
we go so we can browse through
photographs preview some of the content
if anybody was at last year's javelin I
can't forget tours of victory saving the
demo so at this point we can't purchase
any content we haven't logged in it
doesn't know who we are so up on the top
there's a little panel where we can log
in and usually a good is fubar along
yeah we can see that the panel is
actually now switched its switch from
the login panel to the panel that shows
that we're already logged in it's given
us a little message at the bottom that
shows hello fubar who shows who we are
our user identity our person ID and now
I'm able to check off and purchase
potentially purchase some of this
content okay as one thing is this
particular application is not yet
finished there's pages that aren't there
some things that are missing so why
don't we go ahead and take a look at how
the application is assembled so pull up
javis to do creator and then we'll try
to fill in some of the missing
functionality so actually I'm going to
do is create a brand new project based
on the template that I saved which
contains the media application so we had
opened that original incomplete
application and saved it as a template
so that we can then reuse it and add on
to it so we can kind of in a workflow
environment we can just keep building on
the project that we had sort of set up
as a skeleton so at this point it's
actually copying lots of media files and
parsing all of the such a Java code and
the JSP code so again we're building an
application that's based on javaserver
faces and
dp3 no this is just lots of me so its
ears old there's a lot of files in here
this is actually a rather complex demo
that one of our engineers who joined our
architect Craig McClanahan which is
created for java one so it really is
loading a tremendous amount of file one
of the things of course it's doing is it
is in fact loading every single file
parsing the mall generating a bunch of
information that will need to go ahead
to the the actual demo either that or
db3 was mistake yes it could be they
also try to make it even more
complicated by booting my system we're
booting running this on the g5 here
that's it booted off the target mode
powerbook so we're going over the
firewire cable and we thought it would
be a little bit too easy to just put it
on the machine itself okay
there we go hammer ago okay so we have
here the first page is the Welcome page
that we saw in the application it's
really just kind of a highlight showing
some of the various you know selected
content for the day refresh a little bit
that's kind of paint you can see the
various components that we have here so
this is the visual designer so it's a
WYSIWYG editor let you lay out the
javaserver faces components drag and
drop onto the screen position them using
CSS to style sheets you can actually set
up backgrounds and styles configured
positions and look and feel of all the
components who than that it's going to
through some of the components here but
for instance we have on the left there
is a application outline which shows you
sort of the breakdown detailed view of
the components on your page do we see
the various we have some the image
components here some of them just for
looks some of them are actually bound to
information that's coming from the
program so this particular cover image
here is going to be filled in at runtime
with data from the database that will
actually contain pulling it to them to
the cover art itself if I can interject
one thing that the design preciate
behind what we've done is is that again
truth encode everything here is real
Java real XML and it's all there or JSP
in this case but what we're doing is
essentially we're prying a model view to
a tool so what you're looking here is
just one view of what it's in fact a JSP
on the bottom of the page on a number of
pages will see that we have designed and
source views if you're more comfortable
writing in rogers p have at it one of
the other things then maybe Carl will
get into it later on is that everything
we everything we do is and is kept in
sync so if I make changes either in the
visual representation of any view you
see or the raw JSP work we're looking at
a Java code file when they could change
their or if we take a look at the
navigation view and change the
navigation configuration in an XML file
those changes get reflected throughout
your entire application which Carl knows
well about because that's his
baby so I'll let you go on okay they're
just going to show a few more things on
this first welcome page we actually have
a couple of reusable components here
we've created some fragments so at the
top of every page in our application
we're going to want to have this little
login bar that shows us whether it shows
the user whether they're logged in or
that they need to login so we've
actually put this in a separate page so
it's actually a page fragment using JSP
fragment and on this page we've laid out
this is a multiple card layout
combination of components which I'll
come back and show you a little bit
later but you can see that it's just
dropped directly into the Welcome page
and placed as if it were a sort of a
composite component on its own and so
then that can be reused on every page
let me see ya and also over here we have
the same kind of thing we did with a
little menu control that we saw on the
right I hit the right part of it it's
actually inside of a dim over here there
we go now this particular component is a
custom component that Craig actually
wrote for this application and he didn't
implement any design time visualization
so over see here at this component
design time is just a white box not very
interesting but this all of the
components that are added in to create
our gist javaserver faces standard
components and they can be dropped in
just imported in dropped in and as the
market matures for the JSF component the
vendors are going to know that they want
to supply design-time visualization so
fake data maybe just to show what the
components the example of what the
component will look like when it's
display okay
okay this particular page that comes up
at the beginning it's populated from
information that's just written in Java
code so I'm going to switch over so for
every page that you see there's the JSP
source that we saw a little while ago
there's also a backing bean so there's a
job of being behind it that controls all
the logic and the flow of the page
knowing here there's a bunch of code
that creator generates and manages for
the user and you can go in and look at
it if you want but we've done is we use
code folding to fold up a lot of these
blocks of code just by default so that
it's not you know doesn't clutter up so
when the user drops back in here to add
in their event handlers and things they
just see a couple methods just the
things they need to look at so in this
case you can see the components on the
page have been dropped in here and
they're built is a javabean so they
become properties of the page and so
there's a gathering a setter for each
one there's also potentially
initialization code in the constructor
second hit that guy in this case there
aren't any Java side beans that need to
be initialized and actually the one
Craig set up this part of the
application he went ahead and added his
own code folding so that he can wrap up
all the configuration methods into a big
block that you can turn on and off and
take a look at now one of the
interesting things to note here is is
that if you take a look at other tools
which are providing a sort of a
multi-way capability in a tool or code
generation facilities one of the things
you'll see frequently as guarded blocks
don't touch this you touch this you die
third rail of a product application in
this case there are no such entities in
Creator generated code you can check and
change anything and the system will
track it modify the changes in it that
something gets reflected elsewhere for
instance one of the things you'll note
is there's this this is binary
relationship between those elements on a
page those things in code and one of
those is the ability to easily visualize
inferences modify a property in code or
handle and events pretty easy for
instance if I have a button I want to do
something with the button it's much
easier for you actually to write a small
little one line piece of code in the
Java Bean that's backing the page rather
than hunt through the markup and try to
find out where I can send it
tribute and so one of the key points of
that of course is that once you start
doing that you're talking about making
changes in multiple places and so when
one of the things we did when we
implemented the technology behind
creator is to make sure that you can do
that safely and without the requirement
for having guarded blocks that if you
took into some other tool for instance
would blow leg either deliberately or
accidentally and so your application
will continue to run and as expected
okay so it's going to show on this one
so this this particular this is the main
page that comes up in in the application
and what Craig chose to do was just
write some straight out Java code to set
up the various little thumbnails on on
that starting page so he pulls out some
of these the list of some nails from the
application being itself and then just
start populating by setting properties
on these components so it's just very
straightforward kind of boilerplate Java
code that he wrote at this point to
configure the first page we can see here
he's actually accessing an application
being so get application being so then a
normal create a project we give the user
an application being which lives in
application scope so that same beam is
shared by all the users of the
application so all the user sessions
will have access to it and this is a
good place to put shared information in
this case all of the daily hit are just
put into a row set there and they just
are shared by all the applications and
so every beam then has a quick access ER
to get to the application being so that
it can write code where I simply like
this cost over here on the left where we
saw we have the application outline you
can see all the beans in the application
and there again it's the application
being which we were just seeing the
reference to is available by accessing
through the application outline there
you can just open it up and take a look
at the code for that guy there the same
goes for the session bean so for every
every time a user logs in the user gets
a unique session beans and that being
can be used to track information for the
for the individual user so in our case
we'll use that keep track of whether the
users logged in what's
what's a person ID in effect and all the
information about that maybe the
purchases and things will be stored in
that so that session will live across
multiple page requests and be available
for the UI to display things and to do
the transactions that we want to do okay
I think that's pretty good now so once
we logged in and we went over to the
Browse page in the application we were
then doing some more things where we
could we could browse through the
content and look at some of that so I'm
going to switch over to that page in the
designer so I default we just pop over
to the visual view here you can again
see we have the fragment up on top for
them for the login navigation but the
main component here this time is a big
data table so it turns out the dave
attainable is one column but it's down
to arouse that and the row that contains
particular set of products that match a
certain media type that you selected on
the right so you can see how the data
table is organized here it contains sort
of a layout of images and text
information there and we can actually go
in here and take a look at the data
table table layout so it's one of the
nice customizers for some of the more
complex components is you can actually
control data binding and property
binding of the components to the
back-end data in this case we're buying
into a database of rosette so we knows
all about the columns and all the
information available from the row set
that we found it too so this case all
these columns are available product
names and components and dates and all
the sorts of serial numbers and things
and we chose to just grab basic product
column and have that available and then
kind of a neat trick it's not inside of
there's all the components that are
embedded into the particular row of the
table are nested into panels sort of
laid out and different in different
orders there and each of those
individually bound to different parts of
the information from the Rope net so we
can show the title and we can show the
author and we can show the thumbnail and
lay that out how we want it and bind
each one to it too
different thing individually we see one
here that's interesting like the artist
name property means actually able to
show the because you can either bind to
a kind of an object property or you can
bind to a database and that's more of a
of a tailored type of binding dialogue
so here we can see that we're bound to
the products wrote that and this
particular control is down to the artist
name so they ends up just creating that
an expression in the JFS Jeff peacoat
that binds it directly to that data and
that's evaluated at runtime so you
really don't write any code to populate
these controls in this kind of thing is
kind of fashion you just playing and
clicking and selecting things to bind to
you know all of those on this page are
bound to a single wrote that that we've
set up here and this was dropped from
the server navigator so we actually have
a set of data sources running on a local
database here and in the data sources as
a number of tables for the media data
source and these are all the tables that
are used by the application list of
artists the list of hits and items and
media's and persons that that can log in
purchases things like that and we've
actually created a product row set here
so this was dropped on there and we can
edit the query and take a look at how
that was actually gathered so we took
basically the product wrote that itself
and then also joined it with the artist
rosette so that we can come up and
instead of showing the artist ID we can
show the name of the artist and a little
more information about the artist so
we'll have the combination of these two
tables available to bind to
ok so when go back to that page now the
few more components on here that are
interesting the little navigation guys
up here yeah so these are just buttons
that have images as part of their
display one of these is for going
forward in the list one of them for
going back you double click on those
will take you back to the Java code to a
basically event handler method in this
case buttons produced an action event in
the action event could be used to
navigate between pages or just perform
some operation on the page and stay on
the same page and in our case we're
using the navigation buttons previous
action next action to just adjust the
row that position within the table and
then just repaint a table so this case
we're just calculating how far to go
backwards and then and then resetting
the position of the road set of the data
table and for going forward for next we
do the same thing going forward and just
set the the first index position of the
data table in this case for navigating
we want to stay on the same page so
we're returning null otherwise we could
return an outcome name which will tell
us what next page to go to which we can
take a look at in a little while
any other comments Baba things now
you're doing fine ok so I'm presuming
that so what he's showing you a number
of the features behind with a pre
generated application obviously we're
looking at those artifacts which have
been generated by the application of the
tool itself what will I'm guessing we're
doing this is we're going to show you
some of the visual drag and drop of how
you actually design things in a visual
manner to show you how that the actual
experience can be easy not just looking
at something that's already been done so
when we're looking at that we realized
there was a number of features that
obviously were missing in the app so one
of those might be nice to see a list of
all the purchases when you've logged
into the app and you're looking at what
you bought what you're going to buy so
you might want to say oh how much of our
we spent should I take a look at what
I've already bought so we need to add a
page to do them so this is our
navigation editor which gets us an
overview of all the pages in the
application and all of the routes the
links between the pages so jsf uses kind
of a layer of indirection for managing
navigation it creates an XML file that
has a list of outcomes and navigation
cases so that if you do decide later on
to change your page name there's only
one file that has to be updated and
created will take care of that
automatically so when you rename things
and move things around and remove links
around the xml file is managed for us or
sauna yeah in this case there's the
source file it's really just a snippet
of the phases config file with the
navigation rules in it it's as all we're
looking at here so this particular
visualizers showing that xml
configuration file and also looking at
all of the pages themselves the model
for those to know what's inside of them
so within each page you can see all of
the components that create command of
the action event that could cause
navigation and all of these in this case
are handled by code so this little code
icon I think in all this application
they're all handled echoed on this case
this one is directly linked to another
case it's I think it's just a back to
the Browse page so it's a very simple
kind of navigation so you can either
navigate with kind of a hardwired link
or you can navigate with code that you
write in your event handler so we'll go
ahead and add a new page and it's as
simple as just saying
new page and we want to do is say add it
to the Browse page who put a button on
this page that we're going to use to
navigate us over to the purchases page
and so i'll just do basically let's just
add that guy simple navigation purchases
we give a name to the link so that we
have a name that we can understand we
decide later on to change the purchases
page to some other kind of web or
combination of pages we can easily we
can easily do that later so now we want
to actually go do something nice with
the button because it's up here in the
corner and have the wrong name so we'll
make sure we have it where we want it I
double clicked let's go back I think I
need a little more room to get down to
the bottom corner let's put them down
over here there's some space they are
four different yeah so it's the handles
the easy axis and layering and
everything too so in this case Thea the
background was in front of the button
which wasn't very good so I'm going to
change a few things about the button
let's give it a better and a better name
let's give it a better title
at that point it should be functional so
now the action for this particular
button it's just a hardwired string
which takes us to the purchases page so
now we go to that page and take a look
so this is the page we've created when
you're in the navigation editor it just
created an empty page for us in this
case the project template populates it
with a default style sheet so we've
created a style sheet for the whole app
and all the pages we want them to look
the same so it's inheriting the
background and some of the layout and
coloring information as a bunch of
styles too so the controls all have the
right colors and look and feel and we
can go ahead and play around there's a
few custom components that were written
for this application that we can just
drag and drop and they will give us a
nice look and feel so this particular
one is kind of a background grid thing
with images and it's just configured by
how many rows and columns you want it
automatically attaches to some of the
background images in the style sheet so
there we go there's our look and feel in
a couple clicks few other things maybe
we want to have some text output for the
page say my purchases hate my house call
soon enough just call it product
purchases
and that's pretty small so we use one of
the standard a classes stylesheet
classes called I have to learn how to
spell there we go the neck sir sighs and
now for the actual purchases we're going
to do is drop in a data table and this
will then customize to show us the
purchases for this particular user this
particular person that's logged in so
I'll grab the data table drop it here so
it starts out with some empty dummy data
so a primarily thing we're going to put
in there is purchases so there's a big
table that's available for all the
purchases from all of the all the people
so we'll go ahead and drop that guy I
keep double clicking nice preview yep so
this was actually a preview of the table
content people people so there's a
number of different ways to get back to
where you are
and we'll go ahead and drop that guy
right there on the table and so the
table picks up the schema information
for all the columns in the in the broken
the wrote that table and actually gather
the column headers and all the data
types for the columns and just basically
sets up a default layout for it we can
go and customize it a little bit more
but actually want to do something a
little nicer than showing the person ID
the product ID we want to show a little
bit more information to the user about
what the product is that they purchased
so I'm going to actually adjust the
roast that by going back to the query
editor that we saw before in addition to
looking at the purchases table we'll add
in the products table so we can give
them a better description of the
products that they purchased then we see
it's automatically joined because the
keys match there and we can go and look
at all of the various columns that are
available from the query and turn off
once we definitely know we're not going
to need you'll notice that the sequel on
the bottom is changing every single time
you check the box again this is one of
the other areas where we're tracking all
the changes you're making in the system
and making sure that everything remains
in sync so this point we're actually
we're actually controlling what columns
are returned in a query itself and so
turning off stuff we don't need to make
a transaction with the with the database
a little bit smaller now when we look at
the particular purchases for this user
we don't want to see them for all the
users so we're going to change the
person ID and this and make it a
criteria for the query so we can provide
it as a parameter and then we will only
get back the purchases that match the
particular person so we prioritized it
by doing that so now we need to add a
little bit of code so we'll go back to
the purchases JSP and actually with it
customize the look and feel a little bit
now so the layout at the end of the
table is still sort of based on when we
first drop the rowset onto it so let's
go back to the layout dialog and clean
it up a little bit so we just have the
original row that columns in there so
we'll go back through and change and put
in some things that might look a little
better so what does the user going to
see probably the purchase date and the
name of the product and maybe a
description okay so
get what it's called and we can also
shorten up what we're putting in the
actual column display so depend on what
you're doing if you're doing something
more complex you can actually change the
component type that's used in each
column so you can have drop downs in the
column to get information back you can
have buttons to perform actions you can
use input text fields within the column
so you can mix and match depend on what
you're doing in this case we're just
going to be doing all output and we can
also set up some paging so we want to
say what our screens kind of small and
maybe these descriptions are going to be
big so let's limit the number of
purchases shown to three per page and go
ahead and turn on some navigation
control so the user can step through and
we'll just put those on the bottom so
creator then insert the code
automatically and sets up the components
for this particular rest of the way
Watson over against the date name
description of the products so there's a
little bit of code we're gonna have to
write so we'll go back to the to the
Java file so the javabean that's behind
this page
purchase oh yeah no it's all there sir
it wasn't the right page so this is all
the code that handling and navigation
are the buttons that I just inserted so
there's one little bit of code that
we're going to need to initialize the
row that queries of the criteria so we
want to tell at what person ID that
we're going to put in there and we have
this capability of code clip so you can
actually take code that use commonly and
just save it up on the palate there so
it's sort of just a drag-and-drop
clipboard and in this case it's really
good for demos because you don't have to
sit in type and make type of them
everybody's watching the one thing I
found that I had trouble with with DP
three in this app that sometimes drag
and drop was causing me trouble I'm
going to actually not try to do drag and
drop today I'm going to do it the hard
way
I'm just going to do traffic
there we go
there's a couple lines that we're really
one actual functioning line of code here
is grab the data table model which is so
the modified adapter for the table
itself set object one to be the session
being so the person ID from the session
be so again remember the session is
tracking the user and we have a property
on the session which is the person's ID
when they're logged in and so we're just
grabbing that integer property popping
it into the model so that it could be
used as part of the query to the rowset
and at that point we should have an
application that's ready to go so let me
go ahead and run it and see how it looks
so building it this point is compiling
all the Java files using aunt as a
built-in compile engine it's going to
deploy the whole the war file to the
built-in application server so just
there we go
we head on the Browse page that's what
we put it let's go over there
so there's our view purchases although
in order for us to look at our purchases
we have to login we'll go ahead and
login first probably would have yeah and
what we can do is actually when we show
that this works we'll go back in and
we'll add some functionality so that we
can hide the button when users not
logged in so I just popped it on there
without doing any kind of checking so we
can do something a little smarter with
that so now that we're logged in it
knows that we're mr. fubar we can go to
view purchases and there we go we see we
have three purchases or three or more
some CDs we bought various things there
but this one i didn't set up the size of
the table very well so we didn't fit
into our box but there was the force or
two scrolling around through our
purchase take a look at that so as the
sky gentleman pointed out there why
don't we fix that functionality a little
bit so instead of losing track of ramp
instead of just always showing I clicked
on set mush in half okay so we're back
you got rid of the leading commons
opening comments gone yeah don't I you
did that okay I think I drag and drop a
bunch of code up to the top so let's
taste go to the Browse page that's where
a button once and get rid of this guy
it's some more room we can take a look
at almost all of the javaserver faces
components there is an advanced property
called rendered and this determines
whether that the particular components
going to be rendered for that page
rendering so you can actually do is have
some logic in your backing bean that
turns off certain components depending
on things depending on conditions or
state so you can actually have paid a
single page that's defined with
different personalities depending on
various settings and flags and things so
go ahead and turn that off and we'll do
some behind-the-scenes work in this
particular case it's if I can find that
guy
purchases see okay so this is the top so
there's the button that we had just add
it look right there and one of the
properties on the button that that's
actually managed normally by the UI is
the rendered flag action see I'm sorry
I'm pass actually I'm looking at the the
wrong button there so fine dia purchases
should probably use the search feature
okay so while he's doing that yeah so
one of the things that we're looking at
is there is a you know it is a highly
visual environment as you can see you
also have code if you really are
comfortable working there which curl is
not right now and again a lot of things
that we're trying to do is we're trying
to make things as easy as possible for
developers so a lot of the things you'll
see and when you use the environment
there's a lot of consistent gestures you
do in the UI which regardless of the
type of action you're trying to perform
or consistent so you notice that well
this may be a very Western thing
everything you're trying to do in terms
of drag and drop is from the left to the
right so you drag components on from
left to right you drag services you drag
data your drink do everything from left
to right code clips which you didn't
show and maybe we'll do it at the end
this ebook you know again you drag and
drop those those are parameterised so
for instance if you can in fact create
reusable code clubs and code snippets
that you can use or you can be you can
provide other developers so they can
create applications of this type and
then everything on the right are things
or properties and attributes you control
in terms of application component
properties display properties and so on
the other thing that's the environment
has is every we know that screen real
estate can be quite limiting so there's
a number of capabilities in terms of you
know auto hiding and you know you can
dock windows and different kinds of
things like that you find it what I'm
going to do is type this in down that
somehow i ended up bound to something
else which was surprising me but i think
this is the right place so we really
want to do is control this particular
buttons rendered property based on
whether the user is logged on while dan
logged on so on the session being itself
there is a property called tickets just
logged on so what we're doing here is
using a feature of jsf which is called
expression language PL and we're doing
value binding so we can just reference
beans in our application by name and
reference their properties so basically
binding some particular behavior or look
of the component to some data that's in
the beans in the back end so just by
binding that a lot of the properties in
the in the tool
have the UI controls built in so that we
can show you the binding this particular
one wasn't in figured with with the data
binding built into it so we can but we
can still go in the back and kind of
poke around and do whatever we want with
that now we see that the buttons not
displayed here and we can go ahead and
try to run that again so one of the
things that are we talking about you can
create custom components for this
everything that runs from the system or
standard jsf component so if you know
how to write a jsf component all of
those were you can easily drag and drop
and put into the applications that
people can use there are a number of
third parties which are creating
components that work with creator I'd
rather not mention them just because
I'll probably miss one and they'll get
upset at me but companies like I log and
chart effects and so on will do this and
they've created a number of components
which work and creator and you can you
can use them in design them and use them
in applications every day through bar so
now we see we're back to the Browse page
and the button is hidden hopefully when
I log in the button will be enabled and
there we go so now it wont let us even
navigate to the purchase of page until
we've got the logged in state is true so
that didn't really require any code just
going in type in a little expression
we're going under the covers if you need
to and that's perfectly fine with
creator it won't mess with your with
your changes and it will respect
everything you've done okay that's about
all ahead okay so let's just try the
track and drop club okay work again okay
he was just scaring me last night
because it did really bad thing then
work perfectly fine this morning it was
you know how go and pick a cloak any
club
no it's not locked up
oh yes it is okay anyway it is amazing
actually if you think about it so the
Apple engineers have actually built a
new release of the JDK he downloaded it
last night and the whole thing is
running on that JDK so just that one
little poopsie could because it probably
by us to you know the fact that I mean
the regular cool stuff we're running the
app server and the database and IDE on
Java database java application server
and the tool all running on BP three
yeah downloaded last night yeah brave
guy okay let's talk a little bit of raw
road map the first thing is interesting
is that the early access available now
and I know that various Mac people have
found it because I'm seeing downloads so
what we're doing today is the Hammerhead
relief is what we announced yesterday at
javaone primarily for a number of
platforms not all of them including a
Mac unfortunately but it is designed to
create dynamic web applications based on
jsf the mac OS x apart did it George
something having steve is another
everything mac OS 10 release will be
available within 90 days of our revenue
or initial release right now you can get
the initial release if you go to a site
you'll see on the slide here in a moment
you can download the EA you can try it
out you can provide feedback part of
that is as you get into the forums and
if there's things that you believe need
to be added you can tell us now and
hopefully we can address them but by the
time we actually release the mac OS 10
and release again also think about good
book and no i didn't write it so I'm not
getting royalties but you can get a book
and that will give you some discount
when the final release comes out you're
going to save yourself about 50 bucks
and get the year subscription which
gives you all the content that goes with
us pressure is an update is primarily
going to be based on customer feedback
so this is a release we're looking at
roughly the end of the year the main
goal there is to provide is to take
customer input apply it to the product
fix some quality issues improve the ease
of use and essentially increase the
the breadth of whatever coverage of the
number of app servers number of
databases talking more to j2ee artifacts
like ejbs and so on easier for our
customers when we get to the mako which
is a release we're targeting for next
year we're talking about broadening the
client coverage so rich richer clients
whether their web or non web mobile
devices and again simplified modeling so
one of the things that we really didn't
show is we showed page navigation we
really need to show application modeling
so how is you know this pizza logic
talking versus to a piece of logic on my
app server so for more information
obviously you can contact us so I'm
Robert Bruin dan roberts ism the
Hawaiian shirt over there because i
think is going on vacation soon and jim
and score who I don't think is here go
to ww msjs creator follow the link
download the EA you can take a look at
some of the the forum samples and
examples that are out there the apple
gel bob viously the apple reference
library will give you access to that
stuff