Could be useful:
http://ocpsoft.com/prettytime/
Idea of usage: For ex we could use that to show the last modified
document dates for dates in the past week (for ex):
"Document created 2 days ago"
It's in the maven central repo and it's under LGPL
-Vincent
Hi devs,
Sergiu has started a script to fully automate a release (more to come - Sergiu will document what it does soon). The only part not automated are the Release Notes.
IMO we can "automate" it by a process which I propose to be:
* An issue can only be closed if it's documented on xwiki.org and on the release notes page for the upcoming release.
* We collectively enforce this by reopening issues if someone doesn't do the first point, asking him/her to do it
This will have some nice effects:
* xwiki.org will be more up to date than it is now
* it's up to the developer to document what they do (I don't think it's good to push this to someone else) which is good since they have the most knowledge (side note: it doesn't mean we don't need a technical writer to improve on the documentation done by developers but it would be about style and not about content)
* the release notes will be ready for the release, as we progress and the burden of writing the release notes will not fall on the shoulders of the Release Manager (there's no reason it should)
* the whole release process will almost be a joy to do
* with a fully automated release process it means we'll be able to perform a lot more bugfix releases which is good for our users
Here's my +1
Thanks
-Vincent
Hi,
I've been working a while ago on a Mobile Skin which principle is the
following:
1/ Light UI adapted to mobile devices, both phones and tablet (with a
particular attention to tablets), giving most of the screen real estate to
the page content
2/ Support all Javascript normally supported in the XWiki skin in order for
any code inside pages that would use this Javascript to still work
3/ Automatic detection of mobile devices to make them switch to the mobile
skin
4/ Ability to switch from mobile to normal skin
5/ compatibility with color themes
I believe this approach is the right one, as XWiki instances do have
significant Javascript and in order to make sure these pages work, we need
to be able to accept this javascript.
Of course some other improvements could be done, for example to have a
mobile friendly dashboard or livetable.
Now this work has had a few iterations with particularly some relooking
work from Caty.
The work is published here:
http://extensions.xwiki.org/xwiki/bin/view/Extension/SimpleMobileSkin
And the code is available here in both XAR and File-System version (for
XEM):
https://github.com/ldubost/xwiki-mobileskin
The skin can be tested on the incubator (although there is not the
automated switch)
http://incubator.myxwiki.org/xwiki/bin/view/Improvements/34Proposal?skin=XW…
I've also worked on integrating this in the platform. The commit is
available in a fork on github:
https://github.com/ldubost/xwiki-platform/commit/064baeb017b35e08a526029381…
I'd like some comments and discussion so that we can bring this into the
platform.
Ludovic
--
Ludovic Dubost
Founder and CEO
Blog: http://blog.ludovic.org/
XWiki: http://www.xwiki.com
Skype: ldubost GTalk: ldubost
Hi devs,
For the upcoming Application Within Minutes I need to enhance the
XWiki platform with the ability to generate the page name
automatically when creating a new wiki page. For some applications it
doesn't make sense to have two creation steps: (1) specify the wiki
page name (i.e. the location) and then (2) edit the new wiki page with
the specified name. Let me give you two examples:
* It would be cool to be able to create a new blog post in a single
step. The blog post name could be generated from the blog post title
specified in the edit form.
* An application that manages holiday requests doesn't need meaningful
page names (i.e. free text, like a blog post would have) but something
like Request_XYZ, where XYZ is a unique counter/identifier.
These applications should be able to create new wiki pages with
automatically generated names without writing their custom create
forms.
Since 3.2RC1 was planed for today and these changes are in the 3.2
roadmap, here's a proposal that I think I can implement quickly and
safely:
(1) Introduce two new components:
// Used to generate a document name that doesn't have to be unique
(e.g. by cleaning the document title).
DocumentReferenceGenerator#generate(DocumentModelBridge):DocumentReference
// Used to make a document name unique (by suffixing an unique
counter/identifier)
DocumentReferenceDifferentiator#differentiate(DocumentReference):DocumentReference
(2) Modify editinline.vm to store "documentReferenceGenerator" and
"documentReferenceDifferentiator" request parameters in two hidden
input fields so that they are passed to the save action. Obviously,
these are component hints.
(3) Modify editactions.vm to replace "Save & View" + "Save & Continue"
with "Create" when "documentReferenceGenerator" or
"documentReferenceDifferentiator" (or both) request parameters are
set.
(4) Modify SaveAction to take into account these two request
parameters (only if they are specified). Something along these lines:
generateDocumentReference(doc)
synchronize(lock) {
doc.copyDocument(differentiate(generatedDocumentReference)).save();
}
I'm not sure where to place the two components from (1) though. WDYT?
Thanks,
Marius
Hi devs,
I'm implementing the LinkChecker UI and I want to be able to add a Tab in AllDocs. Right now I've coded it with a hardcoded #if but I really hate this.
So here's my proposal:
* Create the following modules:
xwiki-platform-uiextension/
|_ xwiki-platform-uiextension-ui/
|_ xwiki-platform-uiextension-api/
where:
* xwiki-platform-uiextension-ui/: contains XWiki.UIExtensionClass page
* xwiki-platform-uiextension-api/: contains a ScriptService to get UIExtension data + contains an EventListener that refreshes the UI Extension Cache when an UIExtensionClass object is modified (this is for performance reasons)
To start with I'm proposing to have the following fields for UIExtensionClass:
* type: String, represents the type of the extension (for example for the AllDocs needs, I'll use a "IndexTab" type (or "AllDocsTab" type)
* id: String, the technical name of the extension, which can be used for example as suffix for HTML class or ids.
* name: String, the name of the extension, which can be used for displaying. For example for the AllDocs needs, it would be used as the name of the Tab
* content: Textarea: the content of the extension. For example for the AllDocs needs, it would be used as the content to display when clicking on a tab
I'd like to implement this ASAP and thus stop hardcoding UI Extensions from now on.
Here's my +1
Thanks
-Vincent
PS: If you find a better than "uiextension" I'm all ears. A name without "extension" would be great to not confuse it with our Extensions (and with xwiki-platform-extension).
Hello developers,
I have been doing a nifty little cache monitor on www.curriki.org which is still running xwiki 1.5.4.
It can show the entries and capacity of the two xwiki caches, pageExistCache and the document cache which sound pretty central.
Not surprisingly, they're both full on our production server.
name entries capacity
pageExistCache 10000 10000
cache 3000 3000
The caches are using OSCache (through "OSCacheCache").
I've been trying to get a real statistical count but there I kind of failed thus far.
I can use the StatisticListenerImpl which gives fairly high numbers:
> StatisticListenerImpl: Hit = 9583563 / 1320251374, stale hit = 0 / 538, miss = 8541 / 17175236, flush = 27348, entries (added, removed, updates) = 25457741, 0, 7678101
these numbers are integers, and might actually be too small for the 2billions limit of an int, they are static (so count "all the OSCache instances").
What I would like to get is the "eviction rate" but I do not know how to compute it.
That is, I wish to read the number of cache-entries which are thrown away because the cache is full and others come in.
Once I can have it, I can start tuning (cache size, less greedy algorithms, ...) and measure the effect of such tuning. We have plenty of RAM space to accommodate the cache but we should use this well.
The big annoyance with this process is that it can only run on our production server. So thus far I did not dare register a CacheListener in groovy fearing it would suddenly be slow.
Has anyone used a different strategy or tool?
I'm happy to post my little monitor script.
thanks in advance.
paul
Hi all,
As you have probably notice, I have recently committed an
feature-security-authorization branch on platform. I am working on this for
a while now and it was the first step to share the outcome of this large
refactoring of the initial work done early last year by Andreas. Since the
code was not quality compliant with platform but the general structure
Andreas has build seems to me well appropriate, I have progressively
refactor its code to better fit our real needs. Here is what I have been
done:
1) Split in to module api and bridge to allow breaking the currently
unavoidable dependency on oldcore. Now only bridge depends on oldcore, and
the api does not depends on bridge. As mush as possible has been written in
the api (still some code to migrate), and some temporary internal bridge
are used to access oldcore stuffs since augmenting the existing
document-bridge does not seems appropriate IMO.
2) The initial enumeration of rights as been replaced by a Right class,
which could be seen has a pseudo enum, but could be augmented with new
rights. To register a new Right, you have to provide a RightDescription to
the AuthorizationManager. The description will define the default state,
the tie resolution policy, the inheritance policy, the list of entity types
for which the right is applicable, the implied rights and if the right
could be allowed in read-only mode. So new defined Right will benefit the
whole logic of the AuthorizationManager and currently existing one could be
declaratively defined.
3) Large renaming to better distinguish stuffs, clarify comments and
prepare for future. I have voluntarily not taken existing names to clearly
split the old and the new api. In brief, the new right service is now named
AuthorizationManager. Internally, it manipulates SecurityReference (as well
as UserSecurityReference and GroupSecurityReference, to represent entities,
user and group), SecurityRule (representing a right object) and
SecurityAccess (representing an access level in the old nomenclature),
which are store in a SecurityCache using SecurityRuleEntry (a set of rules)
and SecurityAccessEntry (the access of a given user). The
AuthorizationManager delegate cache management to a SecurityCacheLoader
which loads rules using a SecurityRuleLoader ; and delegate itself the
computing of the access for a given user and a set of rules to an
AuthorizationSettler. This last one could be overridden to provide specific
decision that could not be done in declarative mode.
4) Refactoring was necessary to improve consistency and reduce complexity,
and simplify as much as possible; while extending the limitations to allow
more rights to be registered. This work has been a little bit opposed to
the optimization done by Andreas, in particular on memory usage. But
optimization is often the enemy of clean code.
5) Improvement were necessary to better mimic the existing implementation
in some peculiar but necessary rules to stay compatible with current
working wiki. I tend to reduce as much as possible what is not done
declaratively, but there are still some special cases, like delete for
creators, deny for other user on explicit allow and admin for wiki owner
that are settle by the authorization settler. My implementation should be
almost compatible with the old one, except for groups that are currently
not checked from the entity wiki, but only from the user wiki. This needs
some more refactoring for which I feel inconfortable with, some I'd like to
share first.
6) The AuthorizationManager interface has been simplified, providing 2
methods for either checking or verifying an access right (the checking
methods throws while the verifying one return a boolean), and one to
register a new right.
The existing RightService could be bridged on the new implementation using
the XWikiCachingRightService class in xwiki.cfg and the new API could be
used side-by-side with the old implementation as well. What should still
really need to be improved is the unit testing, currently some tests are
still awful and incomplete. I already refactor some of them, to provide a
better coverage of essential part of the code: the security cache and the
default authorization settler. Obviously, any help is welcomed.
Since I already have an existing wiki using this implementation
successfully and using it for creating new rights for extensions, I would
like to merge this new implementation as experimental in platform to have
it available for anyone who need it or want to test it, and for you to use
in your new experimental development as well. Providing it in platform will
encourage it to be finalized and replace the existing implementation.
Here is my +1 for the merge on 4.x,
WDYT ?
--
Denis Gervalle
SOFTEC sa - CEO
eGuilde sarl - CTO
Hi devs,
I've been brainstorming with Jean-Vincent about how to implement hiding technical content for 4.0. Here's what we would like to do:
Note: This is related to the proposal I made earlier: http://markmail.org/thread/jupn22fdk4nnqj6p
In summary:
* Add a RoleVisibilityClass XObject to documents and spaces (in WebPreferences for Spaces) which is a list of Roles (simple or advanced users for now) deciding which role should be allowed to view a given document in result sets.
* Either modify XWikiHibernateStore or introduce a new FilteredHibernateStore store which would delegate to XWikiHibernateStore (same mechanism as the cache store) to add the JOIN to check the visibility and only return visible documents for the current user
* Remove the notion of hidden documents and have a migrator to remove the column in xwikidocs
* Modify the Lucene plugin to add a VISIBILITY field and return filtered results based on the visibility and the current user role
* Note1: After much brainstorming we think that the notion of "application" could be implemented either with an Application XObject that tie the document to an application or with an Application Descriptor.
* Note2: We'll need to decide at some point if we want more roles than just "simple user" and "advanced user" and if we need "developer" and "admin" too.
* Notes1 and 2 are currently out of scope for this proposal
However we're wondering how much performance we will loose with this implementation using XObjects (due to the extra JOIN).
Do you think it's acceptable?
Could it be improved with custom mapping? (I think not)
Should we implement this without XObjects and instead modify XWikiDocuments and add a new column in xwikidocs?
Thanks
-Vincent
Hi devs,
As you know from the previous discussion [1], I`ve worked on integrating
the work done by Anca to merge Annotations with Comments.
I`ve fixed leftover integration problems and finished implementing the
migration script.
Please have a look at the pull request [2] and cast your vote whether we
can merge it into master for 4.0 or not.
Here's my +1.
Thanks,
Eduard
----------
[1] http://markmail.org/thread/gecez5hdh5eci2le
[2] https://github.com/xwiki/xwiki-platform/pull/34/files