1. Po raz pierwszy odwiedzasz EDU. LEARN

    Odwiedzasz EDU.LEARN

    Najlepszym sposobem na naukę języka jest jego używanie. W EDU.LEARN znajdziesz interesujące teksty i videa, które dadzą Ci taką właśnie możliwość. Nie przejmuj się - nasze filmiki mają napisy, dzięki którym lepiej je zrozumiesz. Dodatkowo, po kliknięciu na każde słówko, otrzymasz jego tłumaczenie oraz prawidłową wymowę.

    Nie, dziękuję
  2. Mini lekcje

    Podczas nauki języka bardzo ważny jest kontekst. Zdjęcia, przykłady użycia, dialogi, nagrania dźwiękowe - wszystko to pomaga Ci zrozumieć i zapamiętać nowe słowa i wyrażenia. Dlatego stworzyliśmy Mini lekcje. Są to krótkie lekcje, zawierające kontekstowe slajdy, które zwiększą efektywność Twojej nauki. Są cztery typy Mini lekcji - Gramatyka, Dialogi, Słówka i Obrazki.

    Dalej
  3. Wideo

    Ćwicz język obcy oglądając ciekawe filmiki. Wybierz temat, który Cię interesuje oraz poziom trudności, a następnie kliknij na filmik. Nie martw się, obok każdego z nich są napisy. A może wcale nie będą Ci one potrzebne? Spróbuj!

    Dalej
  4. Teksty

    Czytaj ciekawe artykuły, z których nauczysz się nowych słówek i dowiesz więcej o rzeczach, które Cię interesują. Podobnie jak z filmikami, możesz wybrać temat oraz poziom trudności, a następnie kliknąć na wybrany artykuł. Nasz interaktywny słownik pomoże Ci zrozumieć nawet trudne teksty, a kontekst ułatwi zapamiętanie słówek. Dodatkowo, każdy artykuł może być przeczytany na głos przez wirtualnego lektora, dzięki czemu ćwiczysz słuchanie i wymowę!

    Dalej
  5. Słowa

    Tutaj możesz znaleźć swoją listę "Moje słówka", czyli funkcję wyszukiwania słówek - a wkrótce także słownik tematyczny. Do listy "Moje słówka" możesz dodawać słowa z sekcji Videa i Teksty. Każde z słówek dodanych do listy możesz powtórzyć później w jednym z naszych ćwiczeń. Dodatkowo, zawsze możesz iść do swojej listy i sprawdzić znaczenie, wymowę oraz użycie słówka w zdaniu. Użyj naszej wyszukiwarki słówek w części "Słownictwo", aby znaleźć słowa w naszej bazie.

    Dalej
  6. Lista tekstów

    Ta lista tekstów pojawia się po kliknięciu na "Teksty". Wybierz poziom trudności oraz temat, a następnie artykuł, który Cię interesuje. Kiedy już zostaniesz do niego przekierowany, kliknij na "Play", jeśli chcesz, aby został on odczytany przez wirtualnego lektora. W ten sposób ćwiczysz umiejętność słuchania. Niektóre z tekstów są szczególnie interesujące - mają one odznakę w prawym górnym rogu. Koniecznie je przeczytaj!

    Dalej
  7. Lista Video

    Ta lista filmików pojawia się po kliknięciu na "Video". Podobnie jak w przypadku Tekstów, najpierw wybierz temat, który Cię interesuje oraz poziom trudności, a następnie kliknij na wybrane video. Te z odznaką w prawym górnym rogu są szczególnie interesujące - nie przegap ich!

    Dalej
  8. Dziękujemy za skorzystanie z przewodnika!

    Teraz już znasz wszystkie funkcje EDU.LEARN! Przygotowaliśmy do Ciebie wiele artykułów, filmików oraz mini lekcji - na pewno znajdziesz coś, co Cię zainteresuje!

    Teraz zapraszamy Cię do zarejestrowania się i odkrycia wszystkich możliwości portalu.

    Dziękuję, wrócę później
  9. Lista Pomocy

    Potrzebujesz z czymś pomocy? Sprawdź naszą listę poniżej:
    Nie, dziękuję

Już 62 408 użytkowników uczy się języków obcych z Edustation.

Możesz zarejestrować się już dziś i odebrać bonus w postaci 10 monet.

Jeżeli chcesz się dowiedzieć więcej o naszym portalu - kliknij tutaj

Jeszcze nie teraz

lub

Poziom:

Wszystkie

Nie masz konta?

Google App Engine - Early Look at Java Language Support


Poziom:

Temat: Media

Hi, I'm Andrew Bowers,
product manager for developer products at Google.
Today I'm going to give you an early look
at Java language support on App Engine.
I'll guide you through the development
of a simple guestbook application,
from creation to deployment.
Let's get started.
I'll start by opening up the Eclipse IDE.
Here I have the standard Java perspective,
and you can see a few extra toolbar icons at the top left.
We've extended the environment
with a Google plugin for Eclipse,
providing support for Google Web Toolkit
and App Engine.
Of course, you can also develop
using another IDE, or from the command line if you wish.
To create a new project, I'm going to click
on the blue "g" in the top left.
This brings up the new web application project wizard.
I'll enter in a project name and a package for my project.
I can also choose whether to use App Engine
or Google Web Toolkit with the project.
Choosing these will configure the starter project differently,
depending on what you pick.
For this example I'm going to create
a simple JSP servlet,
so I'll uncheck Google Web Toolkit
and click, "okay."
The project wizard has now created a template project
that I can edit and run.
Taking a look inside the project,
you'll notice that it's a standard J2EE Type
servlet project that can be run on any J2EE container.
There's a source directory, which contains
our Java source files, like you'd expect.
The App Engine and Java Virtual Machine SDK libraries.
And finally, a web archive, or war directory.
App Engine uses a standard Java web archive directory
as its deployment directory.
You put the files you want to deploy to App Engine
into this directory, including static files,
JSPs, and your compiled class files.
Going back to the source directory,
you'll notice that there is a standard Java servlet file.
This file responds to an HTTP request,
and outputs, "Hello, world."
Let's try it out locally.
In order to do that, I need a server.
Luckily, App Engine ships with a development web server
that mimics the production environment.
This enables you to download the SDK
and immediately start developing on your local machine.
I'll start the local server by choosing,
"debug web application."
This starts the server on port 8080.
Navigating to this URL, I see, "Hello, world."
We now have the foundation for our project.
Let's add the source files that we need
for a guestbook application.
This application is going to consist
of three basic source files.
First, we'll have a guestbook.jsp file
that contains the HTML form for creating a new entry.
That will post to a GuestBookServlet,
which will accept the form variables
and create a GuestBookEntry object.
We'll then save that object to the datastore,
and redirect back to the JSP page.
Finally, the JSP page will list out
all of the GuestBook entries in the datastore.
I've already written most of the code for those three files.
I'll import them into my project.
And I'll drag the JSP file into the web archive directory.
Finally, I want to modify the web.xml configuration file
to point to my new JSP.
I'll do that by opening up the web.xml,
and changing the welcome file entry.
Let's run this again, and you'll see
that I have a simple HTML form that submits,
but it doesn't store anything to the datastore yet.
Let's take care of that next.
App Engine's datastore is built on top of Big Table,
a scalable, distributed storage platform.
In addition to low-level datastore APIs,
we provide standards-based APIs in the form
of Java Data Objects and Java Persistence API.
JDO and JPA are Java standards for persisting
plain Java objects to a datastore.
They're datastore agnostic, mapping to relational databases,
XML, or in our case, the App Engine datastore.
This means that I can write a Java class
and persist those objects directly to the datastore
without having to read and write specific fields
to and from a table.
In this example, we'll use JDO.
I'd like to store the GuestBookEntry objects.
In order to do that, I simply annotate the class.
JDO then performs a step called, "enhancement,"
where it will modify the bytecode of the class
so that it can persist to the datastore.
First, I'll import the annotation classes.
Next, I'll add an annotation to the class
that indicates it is capable of persistence.
Third, I'll annotate the fields I wish to save
with a Persistent annotation from JDO.
And finally, every object in JDO must have
a unique primary key.
So I'll set the primary key in the class.
I want the datastore to allocate a unique key for me,
so I'll ask it to do that in the annotation.
Saving the file causes the DataNucleus enhancer
to run in the background, making my class capable
of being saved to the datastore.
Now we need to actually save to and query from the datastore.
JDO uses something called the PersistenceManager
to interact with the datastore.
You get a JDO PersistenceManager
using a PersistenceManagerFactory.
Now, a PersistenceManagerFactory is analogous
to a database connection pool, and it has some overhead
associated with creating it.
In order to be efficient in our application,
we want to create a singleton instance of the factory,
and only create it once.
If you remember, our JSP posts to the servlet,
which then creates a GuestBookEntry object,
and should store it to the datastore.
We create a PersistenceManager from our factory.
Next, we save the object by calling makePersistent.
Then we close our JDO PersistenceManager.
That's it.
Now let's go to our JSP, and query for all the entries.
We get the PersistenceManager again.
I create a query with SQL-like constructs,
and tell it which object I'm looking for.
Finally, I execute the query and assign the results
to a list which I can iterate through.
Now, with our JDO datastore code in place,
let's try it out.
I go back to my local server,
enter in an entry, and voila.
The JSP posts to the servlet,
the servlet creates a new entry object,
persists to our datastore,
and then redirects back to the JSP.
The JSP then queries the datastore
and lists out the entries.
I now have a fully functioning guest book application.
I want to share that with the world
by deploying to App Engine.
So I go back to Eclipse, and click on the deploy icon
in the top-left corner.
This brings the deploy dialogue box.
You'll notice there's an error at the moment.
That's because I've not yet set the application I.D.
I click on project settings, and then click on the link
to the right, which takes me to the App Engine console.
Every application on App Engine must have
a unique application I.D. to identify it.
I create a new I.D.
And then I go back to Eclipse and set the I.D. in my project.
Now all I have to do is enter my account I.D. and password.
App Engine will now compile my Java source code, if needed,
then package everything up in my web archive folder
and send it up to the cloud.
I can go back to my browser and navigate
to my new guest book application in the cloud.
You've just seen how easy it is to go from creating
a new project to deploying a working application
on App Engine.
But there's a lot more to the App Engine environment
than we've demoed here, including authentication,
mail, and the memcache API.
You can also easily use Google Web Toolkit
to create modern AJAX frontends entirely in Java.
Now, our Java language support
isn't yet feature complete.
We're giving developers early access to the product
in order to solicit feedback as soon as possible
and insure that the end result meets your needs.
To learn more, go to code.google.com/appengine.
Mobile Analytics