Wiki source code of My First Requea Application

Last modified by Pierre Dubois on 2011/01/26 16:58

Hide last authors
Pierre Dubois 2.1 1 The Requea platform allows you to create simple applications (and very complex ones also) very easily. Before we get into the details of the architecture and structure of entities and apps, let's create a small app.
2
3 Let's assume you want to tracks books that you get at your local public Library. For this we nee a couple of things:
4
5
6 * track books and store basic information into a "book" entity
7 * a few forms and lists to enter book information and get the list of books to be returned
8
Pierre Dubois 9.1 9 = Designing our Book app =
10
Pierre Dubois 2.1 11 To do that, you need to log as a super admin or "RequeaDev". Password is "RequeaDev" by default.
12
13
14 Go to the design tab. There you will find menus to create and edit "Bundles", "Entities" and so on. We will cover those concepts in details later on, but for now, click on the "Entities" menu.
15
16 An Entity is kind of an object. It has properties and most of the time it is stored in the database.
17
18 So let's create a new one that will manage our books. That will get us to a mutli-step wizard to enter basic entity information
19
20
Pierre Dubois 4.1 21 * Type of application. Let's keep "normal" for now. We want a basic book. The other options are for extensions of existing entities. We will get into this later.
Pierre Dubois 2.1 22
Pierre Dubois 38.1 23 (((
Pierre Dubois 40.1 24 [[image:app1.png]]
Pierre Dubois 38.1 25 )))
26
Pierre Dubois 4.1 27 * After clicking on "Next" you get to the name page. Let's call it "Book". The bundle field should be "Customer personalization". It's the good option for a start. Then make sure the "Persisted" option is checked. "Persisted" means "stored in the database", as opposed as a transient entity which is only used for intermediate calculations.
Pierre Dubois 2.1 28
Pierre Dubois 4.1 29 * Click on Next and go to the Property page. Click on the plus sign to add a property. We will have to add 3 properties: Titile, Author, and return date.
Pierre Dubois 2.1 30
Pierre Dubois 44.1 31 * Property 1: Title. Fill in name and property title. The property type is "Text String" and you may increase the maximum length to 80.
Pierre Dubois 2.1 32
Pierre Dubois 44.1 33 [[image:newapp3.png]]
34
Pierre Dubois 4.1 35 * Property 2: Click on submit will get you back to the property page. Click on the plus sign again and add the Author property.
Pierre Dubois 2.1 36
Pierre Dubois 4.1 37 * Property3: Same thing with Date. Make sure the type is "Date"
Pierre Dubois 3.1 38
Pierre Dubois 44.1 39 [[image:newapp5.png]]
Pierre Dubois 3.1 40
Pierre Dubois 44.1 41 * Click on submit will get you back to the Property field list. Click on next to go the the navigation options.
42
Pierre Dubois 4.1 43 * Make sure everything is checked on the navigation panel. Those options are there to instruct the wizard to create default user navigation (called "User actions").
Pierre Dubois 3.1 44
Pierre Dubois 44.1 45 [[image:newapp6.png]]
46
Pierre Dubois 4.1 47 * The next page is about setting up default security. For now, let's keep it open with "No restrictions".
Pierre Dubois 3.1 48
Pierre Dubois 44.1 49 [[image:newapp7.png]]
50
Pierre Dubois 4.1 51 * The next tab is a summary screen and should look like this:
Pierre Dubois 3.1 52
Pierre Dubois 44.1 53 [[image:app8.png]]
54
Pierre Dubois 4.1 55 * Fill in the "Book title and "BO" as the short SQL name for relation table. Then click on "Submit". It may take a few moments to complete.
Pierre Dubois 9.1 56
57 = Using our Book app =
Pierre Dubois 24.1 58
59 Now that our book app is created, we have a few URLs to manage our books:
60
61 To create a new book:
Pierre Dubois 45.1 62 [[http:~~/~~/localhost:8080/dysoweb/do/custBook:new>>http://localhost:8080/dysoweb/do/custBook:new||rel="__blank"]]
Pierre Dubois 24.1 63
Pierre Dubois 47.1 64
Pierre Dubois 49.1 65 [[image:Screenshot2011-01-26at4.57.20PM.png]]
Pierre Dubois 47.1 66
67
Pierre Dubois 24.1 68 To get the list of books:
69 [[http:~~/~~/localhost:8080/dysoweb/do/custBook:list>>http://localhost:8080/dysoweb/do/custBook:list||rel="__blank"]]
This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 9.11.5 - Documentation