Show last authors
1 {{box cssClass="floatinginfobox" title="**Contents**"}}
2 {{toc/}}
3 {{/box}}
4
5 In the last track you've created your first application. Congratulations!
6
7 [[Applications>>xwiki:Documentation.UserGuide.Features.Applications]] are usually the way we want users to interact with XWiki. They should use the application to create, edit, delete entries. Applications are usually the most complex type of entity, because they can contain other types of entities in their code. As you've seen, applications are composed of classes, sheets, templates, translations, etc. But there are also other types of entities that come with XWiki by default that you can create and use, like macros, skins, color themes, panels, etc. Each entity type has a particular functionality and reason of why you would need it.
8
9 = Task 1: Create a wiki macro =
10
11 Macros are reusable pieces of functionality that can be integrated inside pages. Users can insert macros using the [[editor>>extensions:Extension.CKEditor Integration||anchor="HWikiMacros"]] or using [[syntax>>xwiki:XWiki.XWikiSyntax||queryString="syntax=2.1&section=Macros"]].
12
13 In your local instance you have the [[Macros Index>>extensions:Extension.Wiki Macro Bridge Application]] that will list the macros that are installed on that particular XWiki instance. There are some macros that are vital for development and you will use them regularly (like [[Velocity macro>>extensions:Extension.Velocity Macro]], [[HTML macro>>extensions:Extension.HTML Macro]], etc.).
14
15 In this task you should [[create a wiki macro>>xwiki:Documentation.DevGuide.Tutorials.WritingMacros]] that lists the recent 5 entries created for your application. Have at least one optional parameter for your macro. You should display the title of the entry, the author and the date it was created.
16
17 In order to succeed in this task you might need to read more about:
18
19 * [[XWiki Data Model>>xwiki:Documentation.DevGuide.DataModel]] to understand XWiki classes
20 * [[Velocity Documentation>>http://velocity.apache.org/engine/devel/vtl-reference.html]] to have more details about the language itself
21 * [[XWiki Scripting>>platform:DevGuide.Scripting]] to have some informations about how to make scripts in XWiki
22 * [[XWiki API Guide>>platform:DevGuide.APIGuide]] to have some examples of how to use the API
23 * [[XWiki API Reference>>platform:DevGuide.API]] to see the recent methods available
24 * [[Query Module>>extensions:Extension.Query Module]] to learn how to do advanced queries
25 * [[HQL Velocity Examples>>xwiki:Documentation.DevGuide.Scripting.velocityHqlExamples]]
26
27 = Task 2: Style your macro =
28
29 You should try to display the entries in a nice way. You can add CSS and JS extensions to enhance your macro styling or interaction. Add a SSX extension and style your entries. You could have a custom icon for the list entries or use a different color for the date when the entry was created.
30
31 Read more about Skin extensions at:
32
33 * [[Skin Extension Tutorial>>xwiki:Documentation.DevGuide.Tutorials.SkinExtensionsTutorial]]
34 * [[Skin Extension Plugin>>extensions:Extension.Skin Extension Plugin]]
35
36 = Task 3: Create a panel =
37
38 In XWiki you can combine multiple entities / classes in order to create engaging experienced for your users. When installing an application, that application can also have a custom color palette, launch its own notifications, or can provide a custom panel, macro or gadget that users can integrate in other parts of their wiki.
39
40 In this task you should create a custom [[panel>>extensions:Extension.Panels Application]] that uses the macro you've created and place that panel so that is visible on multiple pages of your wiki.
41
42 = Task 4: Export your panel =
43
44 You should export this panel and add it to your application module that you've created in the previous track. Now your application is more complete. Build your application and test it on a fresh XWiki instance.
45
46 Note: In case you get an error like ##Missing ...## when testing your changes, make sure you've exported and committed all the dependencies / pages.
47
48 ----
49
50 Do you have other ideas of what functionality you could create a macro for? How about an application idea? As a developer you have the power to bring all these ideas to life so that other people can use them.

Get Connected