Step-by-step tutorial: build a media library
Thursday, 16. August 2007, 21:41:42
This prototype version needs still some improvements: the page settings have to be reviewed and the content may be missing some details. But performing it should enable you to learn how to use Oracle9i, Jdeveloper and the ADF framework (ADF BC + JSF)for developping a little media library. This application will allow users to upload their most precious files for storing them into database Blob fields then to download them when needed. Moreover, some administration tasks will be made possible like managing the extension of the uploaded files and their associated mime-types or again like handling a list of possible document types which will help to classify these files.
Download the tutorial: Tutorial_MediaLibrary _ Prototype version _ August2007.pdf
Download the needed sources for successfully completing the tutorial:
Tutorial_MediaLibrary_NeededSources4Tutorial - Prototype version - August2007.zip
Tutorial_MediaLibrary_NeededSources4Tutorial - Prototype version - August2007.rar
Download the screen shots:
Tutorial_MediaLibrary_AllScreenShots - Prototype version - August2007.zip
Tutorial_MediaLibrary_AllScreenShots - Prototype version - August2007.rar
Download the complete sources:
Tutorial_MediaLibrary_CompleteApplication - Prototype version - August2007.zip
Tutorial_MediaLibrary_CompleteApplication - Prototype version - August2007.rar
SUMMARY
I. Building the model layer
a. Generating the application skeleton
b. Making the DB schema
i. Connecting the DB
ii. Building the DB schema
c. Organizing and configuring the app module
i. Generating the Business Components
ii. Organizing the Business Components
iii. Configuring the Business Components
II. Building the controller layer
a. Generating the interface skeleton
i. Configuring the “UserInterface” project
ii. Building and using the “faces-config.xml”
iii. Adding the source files
b. Coding the needed methods and functions
i. Controlling the application administrator tasks
ii. Controlling the library tasks
III. Designing the interfaces
a. Generating the administration page
i. Management of the type list
ii. Management of the extensions and the mime-types
b. Generating the library page
i. Displaying the files
ii. Enabling to upload new files
c. Binding the controllers and refining the display
i. On the “administration.jspx” page
ii. On the “Library.jspx” page
Content
The content introduced below is exactly what you will obtain by following this tutorial. However you should quickly be able to add your own ideas and in a first time changing a part of the interface labels which have not all been set correctly (e.g. the internet browser displays still "template")
The library
Select the file you want to download
Choose belong all the files the one you want to download. You can sort the different columns of the table to find easily what you are looking for
Now confirm the download and the pop-up download screen appears (visual depends on your internet browser)
Upload new files to store them
Before uploading a new file the application asks you for a type which will help in organizing the different files. Select the most appropriate and submit it.
Finally, browse your computer and select the file you want to upload. After have uploaded a file you are redirected to the library page into which you should be able to find the new file.
The administration page
The extension management page
From this interface you can adjust the mime-types which will be associated to each extension. When trying to upload file with an extension which is not yet in this list, the new extension is added automatically.
The document types management page
This table enable to create, edit and delete the proposed file types which will be associated to each uploaded file. These types will be used for quickly sort the files and easily find what you want.




sebnoumea # 17. August 2007, 04:47
Juste une petite remarque, pourquoi n'avoir pas implémenté tes fonctions au niveau du module d'application ?
Bonne continuation,
Seb.
Fabre Tristan # 17. August 2007, 08:20
Effectivement, sur l'appli que j'ai réalisée pendant mon stage (terminé l'appli mardi, y a plus qu'à écrire le rapport de stage...), j'ai implémenté au niveau module d'application les functions qui étaient appelées depuis plusieurs interfaces. Ici je n'ai pas jugé utile de le faire puisque chaque fonction n'est appelée que depuis un bouton et que de toute façon j'ai tout groupé dans un bean. Mais cette version n'est qu'un prototype et si il est préférable de placer certaines fonctions au niveau AM, je le met sur la liste pour la version 1.0. Par contre je veux bien une petite explication des avantages et/ou inconvénients que cela entraine car je ne vois pas bien les conséquences.
Merci de ta remarque et de ton soutien,
J'espère qu'un des gars de ton équipe trouvera le temps et la motivation pour faire le tuto complet!?
A bientot,
Tristan