I News I Downloads I Installation I Documentation I Roadmap I License I Features I
 
 

GWiki Features Developer View

Show this page as slide show

GWiki is not only an wiki application, but also an plattform to develop web base applications.




GWiki Features for developer


Introduction to GWiki Features.


Audience


Customizing Goals

  • Change Look of Pages
  • Create public web pages with coperate style
  • Change way to do things.

Customize Tools

Knowledge:

  • HTML, CSS, Javascript
  • GWiki internals
  • JSP
  • Groovy (Java)

Extending Goals

  • Adapting to runtime environment
  • Organize your Content
  • Provide alternative Access

Extending Tools

  • Create your own Macros
  • Implement services for GWiki infrastrukture.
  • Implement Filter to hook into core processes
  • Create own GWiki Element types.
  • Write dynamic pages.

Blueprint template

Define a form, which filled by the user.
A Blueprint template is a wiki page located in admin/blueprints.

{formlabel}
Fill this form for your template.
{formlabel}
Name:  {input:text|name=name|size=40|maxlength=10}.
{input:inputType=label|value=This is only a label and will not be included in resolved blueprint}
{formlabel}
This text will not shown in the evaluated wiki.
{formlabel}
Textarea:
{input:textarea|name=thetext|cols=50|rows=10}
{formlabel}
{input:radio|value=First|name=radio} {input:label|value=First}
{input:radio|value=Second|name=radio|checked=true}{input:label|value=Second}
{input:checkbox|name=checkboxp|checked=true}{input:label|value=Choose it.}
{input:select|name=selectp|value=Second|values=First, Second, Third}
{formlabel}

Blueprint insert




Blueprint result


Extending Sample: Slide shows 1

Defining a new Meta template.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
    <bean id="config"
        class="de.micromata.genome.gwiki.model.config.GWikiMetaTemplate"
        singleton="false">
        <property name="elementType" value="gwiki" />
        <!--  1 Hour -->
        <property name="elementLifeTime" value="3600000" />
        <!--  no controlerId -->
        <!--  no controlerClass -->
        <property name="parts">
            <map>
                <entry key="Controler">
                    <bean
                        class="de.micromata.genome.gwiki.page.impl.GWikiDelegateToPageExecutableArtefakt">
                        <property name="pageId" value="inc/s5template" />
                        <property name="parts">
                            <map>
                                <entry key="MainPage">
                                    <bean
                                        class="de.micromata.genome.gwiki.page.impl.GWikiWikiPageArtefakt" />
                                </entry>
                            </map>
                        </property>
                    </bean>
                </entry>
            </map>
        </property>
    </bean>
</beans>

"inc/s5template" defines a new template


Extending Sample: Slide shows 2

The JSP Template

boolean showSlide = "true".equals(wikiContext.getRequestParameter('asSlide'));
if (showSlide) {
    String s5f = wikiContext.localUrl("static/s5");
    String s5h = """
        <meta name=\"version\" content=\"S5 1.1\" />
        <meta name=\"defaultView\" content=\"slideshow\" />
        <meta name=\"controlVis\" content=\"hidden\" />
    <link rel=\"stylesheet\" href=\"${s5f}/slides.css\" type=\"text/css\" media=\"projection\" id=\"slideProj\" />
    <link rel=\"stylesheet\" href=\"${s5f}/outline.css\" type=\"text/css\" media=\"screen\" id=\"outlineStyle\" />
    <link rel=\"stylesheet\" href=\"${s5f}/print.css\" type=\"text/css\" media=\"print\" id=\"slidePrint\" />
    <link rel=\"stylesheet\" href=\"${s5f}/opera.css\" type=\"text/css\" media=\"projection\" id=\"operaFix\" />
    <script src=\"${s5f}/slides.js\" type=\"text/javascript\"></script>
    """
    ;
    wikiContext.getRequiredHeader().add(s5h);
%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<%
    wikiContext.include("inc/htmlHead");
%>
</head>
<body>
<div class="layout">
<div id="controls"><!-- DO NOT EDIT --></div>
<div id="currentSlide"><!-- DO NOT EDIT --></div>
<%
    wikiContext.setRequestAttribute('GWIKI_SLIDESHOW_SECTION', 'layout');
    MainPage.render(wikiContext);
%>
</div>
<div class="presentation">
<%  
} else {
    wikiContext.skinInclude('standardhead');
%>  <a target="slideshow" href="#" 
    onclick="window.open('<%=wikiContext.localUrl(wikiContext.getCurrentElement().getElementInfo().getId()) %>?asSlide=true', 'gwiki_slideshow', 'resizable, scrollbars'); return false;">As Slide</a><br/>
<%
}
%>
<%
wikiContext.setRequestAttribute('GWIKI_SLIDESHOW_SECTION', 'slides');
    MainPage.render(wikiContext);
%>
....

Extending Sample: Slide shows 3

Create some Macros

  • slideshow, slideheader, slidefooter, slide, ...

Extending Sample: Comments

  • Comments specific Macros.
  • Inserted into wiki or in template.
  • ActionBean handling macro command (create, edit, delete)
  • Inserted into host page via Ajax
  • Comments itself wiki elements organized in file system.

Extending More

  • Blog
  • Forum
  • name it.

Using Taglibs inside wiki

{jsptaglib:prefix=c|uri=/WEB-INF/tlds/c-rt.tld}
Now use the macro:
{cset:var=x|value=Hallo}{cset}

{cout:value="This will printed via jsp: ${x}"}{cout}

Result:


Now use the macro:

This will printed via jsp: Hallo


Using Groovy

{groovy}
for (int i in 1..10) {
 out.println("Hello " + i + "<br/>");
}
{groovy}

Access to:

  • GWiki infrastructure
  • GWiki Element+Artefakt
  • Web application

All is GWiki

  • All internal pages in GWiki are implemented using GWiki.

  • With sufficient rights you can also edit the edit page.
  • Open the Admin/ Wiki Control and edit it
    • Controler: ActionBean
    • InputForward: JSP
    • MainPage (optional) text parts
    • Settings

Integrate Goals

  • Make usage of GWiki functions in your web applications.
  • Embedd content centric pages in your application
  • Make gui parts editable by business department.
  • => Register GWiki Servlet in your web.xml

Integrate for Internationalization

  • Use Standard Java I18N properties in common Frameworks.
  • Example, JSP: <fmt:message key="my.key"/>


Integrate for GUI parts

  • Dynamic Pages with logic (developers part) and text (business part).
  • HTML. Too complex for I18N.
  • => Just include page or fragment of page
    pageContext.include("/gwiki/gwikidocs/howtos/en/IntegrateGWikiSampleSnippet");
  • If current user has edit rights, directly can edit fragment.

Wicket Support

  • Using gwiki internationalization.
  • Use GWiki Fragments to embedd editable parts in the Wicket page.
  • Use GWiki to manage HTML files used by Wicket as template to render the view.

Content Management

  • Manage online Help, FAQ, etc.
  • Manage files.


Developing Applications

GWiki can be used as rapid development plattform.

  • Create dynamic web applications without need of an additionally framework.
  • Create online modification without need of redeployment.
  • Track modification with integrated version management.

Developing GWiki



Future plans in GWiki Development.


Developing GWiki Improvments

  • GUI polishing
  • Editor refinements
  • Rich Text Editor
  • User Managment.

Developing GWiki New Core Features

  • Database support for more data bases like PosteSQL, MS SQL, mySQL. Please leave a message.
  • Support something like a draft version. Include a release mechanism for publish drafts.
  • Integrate versioned ClassLoader (genome)
  • Improved User Management
  • Drop in Plugins
  • Better Document generation process (PDF, Word)

Developing GWiki Web 2.0

  • RSS/Atom Feeds
  • Inter-Wiki Links / Backtrack links.
  • Wiki as Google App
  • Portlet

Developing GWiki Ad Ons

  • Macros, Skins, Macros, Macros
  • Blog Plugin. Integrate Blog in GWiki just with a macro. The work is already started, but not finished yet.
  • Forum Plugin. Create Forums inside GWiki.
  • Virtual Content Folder Macro: To integrate external HTML files - for example Java Doc and own gwiki element will be provided.

Developing GWiki Cloud

  • Wiki as Service
  • Virtualize GWiki instances
  • Distributed Wikis.

End

 
Last modified 2010-05-21 14:41 by rkommer (ViewCount: 242 ) By Roger Rene Kommer and Micromata GmbH | License