Hello
*How can we used Computed Field?*
In XWiki Data Model page [1] I found:
*Computed pseudofield* new in 4.2M3 Allows to create a pseudo field for
which the display can be configured using a script. It allows to combine
other fields together.And in 4.2 release note [2]:
Another new type of class fields adds support for *virtual values* computed
live from other class values, data from the database, data obtained from an
external service, or practically any other source of data. These fields are
non-editable and aren't stored in the database, since they only provide
some wiki content that will be rendered each time such a property is
displayed.
Traditionally, this kind of computation would have been written directly in
the sheet used to display instances of that class, but putting it in a
class field allows easier reuse of the code, since the property will be
*displayed* in livetables, when indexing the document in Lucene, when
displaying documents in an index page, and so on.
I try to used it with a Contact class I defined as following
<<Contact>>
String firstName
String lastName
ComputedField fullName
I found in mail history only one explanation about this field [3]
So, for fullName field, I set script with
{{velocity}}
$row.firstName $row.lastName
{{/velocity}}
And that display:
$row.firstName $row.lastName
OK, [3] speak about Live Table, but what's about displaying this field in
other place?
Regards,
Arnaud.
[1] http://platform.xwiki.org/xwiki/bin/view/DevGuide/DataModel
[2]
http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWiki42#HCompu…
[3] http://xwiki.475771.n2.nabble.com/Computed-fields-td7586948.html
Hello!
I am working on a script service to provides better support for querying
groups of users. I would like to publish it as the api-user-group or
user-group-api extension, as you see fit. Please could you create a
repository on xwiki-contrib for this extension, my github user is pcojan.
Thank you!
Hi devs,
Can I be added as a committer on xwiki-contrib, please?
I plan to mainly work on application-task (already have a few pull
requests for it).
Thanks,
--
Jean
Since Marius wrote the FileManager application using AngularJS
and there has been some discussion about making increasing use
of it in XWiki, I wanted to share a review by someone who uses
it in his job as their entire platform.
These are advantages and disadvantages which I determined from the chat:
+ Easy and efficient workflow (when you know it)
+ Testing is easy and well understood
+ Debugging is not difficult, thanks to Angular's popularity and integrated software
+ Separates model and view well (makes angular apps skinable).
- Owns your system, if angular dies you die with it
- Learning curve
- Though it separates your model and view well, you can't test your model and controller without a DOM present (he's not sure of this).
Although I think we need to keep investigating, I feel that
Angular warrants more investigation.
Thanks,
Caleb
PS: And the actual conversation, including some useful links:
16:31 < cjd> gimme teh infoz
16:32 < SomeoneWeird> well, there's a lot of (maybe too much) magic going on behind the scenes
16:32 < SomeoneWeird> all the DI stuff, scope tracking
16:32 < SomeoneWeird> sticking one broken thing in the digest loop will kill the entire app
16:32 < cjd> /nod
16:32 < SomeoneWeird> but.. once you know how it works, it's great
16:33 < SomeoneWeird> it's entire stdlib is all promises (which I don't care for, but because it's ALL promises, it makes it a breeze to work with)
16:33 < SomeoneWeird> plus, the DI system is awsm
16:33 < cjd> ok
16:34 < SomeoneWeird> scoping it out because you wanna use it?
16:34 < cjd> xwiki is interested in it
16:34 < cjd> do you use it as a system to control your entire app or as a library?
16:34 < SomeoneWeird> it's our entire thing
16:34 < cjd> ok
16:34 < SomeoneWeird> our CMS is built up of multiple angular apps
16:34 < SomeoneWeird> which are nested
16:35 < cjd> how is it for debugging?
16:36 < SomeoneWeird> not terrible, the errors it gives up are sometimes broken (but we're using a slightly outdated version), but there's also batarang, which is a cool ext. so you can view scope contents in your browser
16:36 < SomeoneWeird> https://chrome.google.com/webstore/detail/angularjs-batarang/ighdmehidhipcm…
16:36 < cjd> ok
16:37 < SomeoneWeird> oh, testing
16:37 < SomeoneWeird> is awesome
16:37 < cjd> you can unit test in node ?
16:37 < SomeoneWeird> built in mocking support for everything in build in libraries
16:37 < SomeoneWeird> cjd: probably, using phantom or something
16:38 < cjd> ok, so you need a DOM to test
16:38 < SomeoneWeird> hm
16:38 < SomeoneWeird> i think
16:38 < cjd> ok
16:38 < SomeoneWeird> we're using karma at work
16:39 < cjd> explain?
16:39 < SomeoneWeird> http://karma-runner.github.io/0.12/index.html
16:39 < SomeoneWeird> check the vid
16:39 < cjd> ok
16:39 < SomeoneWeird> it's a test runner for browser tests
16:39 < SomeoneWeird> i think you can do headless stuff with it too
16:39 < cjd> how is the seperation between your models and the views?
16:40 < cjd> (is it skinnable?)
16:40 < SomeoneWeird> skinnable?
16:40 < cjd> could you write a new <fakehtml> view for a widget
16:41 < SomeoneWeird> yes
16:41 < cjd> so put a new skin on that widget
16:41 < SomeoneWeird> directives
16:41 < cjd> ok and you don't need to tinker with your model or controller code to do that?
16:41 < SomeoneWeird> models & views are pretty seperated, html can be completely declarative if you want
16:41 < cjd> ok
16:42 < SomeoneWeird> http://www.sitepoint.com/practical-guide-angularjs-directives/
16:42 < cjd> so summary:
16:42 < SomeoneWeird> so you can define <hello>, and then bind that to a model etc
16:42 < cjd> + easy and efficient workflow (when you know it)
16:42 < SomeoneWeird> but they're seperate until you do
16:42 < cjd> + testing is easy and well understood
16:43 < cjd> + debugging is not difficult, thanks to angular's popularity and integrated software
16:43 < SomeoneWeird> there is a definite learning curve though
16:44 < cjd> - Owns your system, if angular dies you die with it
16:44 < SomeoneWeird> especially if people are used to using jquery etc
16:44 < cjd> - Learning curve
16:44 < cjd> - Though it seperates your model and view well, you can't test your model and controller without a DOM present.
16:45 < cjd> anything to add?
16:45 < SomeoneWeird> i'm not 100% sure on the last point
16:45 < cjd> ok
16:45 < cjd> can I publish this conversation?
16:46 < SomeoneWeird> i guess, hopefully I'm not wrong about anything >.>
16:46 < cjd> ok :)
16:48 < SomeoneWeird> http://www.reddit.com/r/webdev/comments/1rbz0h/is_angularjs_worth_developin…
16:48 < SomeoneWeird> good points in here
Hi,
We did some usability testing sessions and found out that one of the
biggest problems users are facing is that they don't understand the Home -
Wiki - Space - Page concepts.
Because of this confusion:
- they are creating a wiki instead of a space or a page,
- they don't know where they are located when looking at a page (in the
main wiki or in a subwiki),
- they don't know how to navigate to the pages they've created,
- very confused that we have a Main space in every wiki,
- they are having a hard time making a difference between a space and an
application,
- hard to understand everything is a page,
- etc.
We could do many things in order to improve our navigation, but one thing I
want us to focus in this mail thread is the explanation of Wiki - Space -
Page concepts on the Main.WebHome.
Currently the content of the Welcome Block is:
= Welcome to your wiki =
>
> It's an easy-to-edit website that will help you work better together. This
> Wiki is made of //pages// sorted by //spaces//. You're currently in the
> **Main** space, looking at its home page (**WebHome**).
>
> Learn how to use XWiki with the [[Getting Started Guide]]
> You can then use the [[Sandbox space]] to try out your wiki's features.
>
I would like to replace this message with an introductory text that explain
the concepts (there were also some ideas that maybe we need some images to
represent the hierarchy, etc.) and I need your opinion on this subject.
So, how would you pitch the Wiki - Space - Page concepts to newcomers?
Thanks,
Caty