Hi,
I'm proposing a new category: Anti Patterns!
Here's one:
Instead of writing:
#set($obj = $doc.getObject("XWiki.XWikiUsers"))
#if ($obj.avatar == "...")
...
Write:
#set($obj = $doc.getObject("XWiki.XWikiUsers"))
#if ($obj.getProperty("avatar") && $obj.getProperty("avatar").getValue
() == "...")
...
Reason:
$obj.avatar actually is equivalent to: $doc.display("avatar", $obj)
And the display() method renders differently when in view mode, in
inline mode, etc. For example in inline mode it generates an HTML
form INPUT element...
WDYT?
Thanks
-Vincent
Hi,
Here's another one best practice I'd like to propose:
Instead of writing:
#set($obj = ...)
#if ($obj.getSomething() == "...")
Write:
#if($obj && $obj.getSomething() == "...")
This prevents the following error in logs:
11:54:04,777 ERROR P1-19 ... SimpleLog4JLogSystem:logVelocityMessage:
154 - Left side ($obj.getSomething()) of '==' operation has null
value. If a reference, it may not be in the context. Operation not
possible. [line 1, column 21]
WDYT?
Thanks
-Vincent
Hi,
I'd like to propose the following best practice: to test for Object
existence in class sheets. For example:
#set($obj = $doc.getObject("XWiki.XWikiUsers"))
#if($obj)
...
#else
This stylesheet must be applied on a document containing a
XWiki.XWikiUsers object.
#end
If you're all ok I'll add it to the dev guide on http://www.xwiki.org/
xwiki/bin/view/DevGuide/BestPractices (I'll remove what's in there
and send each best practice separately to this list for agreement as
this is old stuff).
Thanks
-Vincent
Hi All,
I'm Tharindu Jayasuriya from Sri-Lanka. My application on IDE Editor
Integration project was accepted for SOC this year.I followed up the
things mentioned by the The XWiki SOC mentor team, for the students
who got accepted for SOC . I look forward to collaboratively work with
all.
Best Regards,
Tharindu Jayasuriya.
On 4/16/07, Vincent Massol <vincent(a)massol.net> wrote:
>
>
> On Apr 16, 2007, at 10:32 AM, Ludovic Dubost wrote:
[snip]
>
> The reason I did not propose XClass is because even though we've
> agree to use this name when we talk about it, this is not a name
> currently used in the code and introducing a new concept in only one
> place in the code is, I think, a bad idea.
If we are going to use these names, then the best places to start is in the
JavaDoc and the documentation on xwiki.org. APIs should not be modified for
the moment. Maybe when we define the components for the 2.0 architecture.
Sergiu
--
http://purl.org/net/sergiu
Hello,
My name is Evelina Slatineanu and I participate at GSoC for XWiki - Ajax Interface Improvements, mentored by Mr. Sergiu Dumitriu.
1. The address I use frequently is: Evelyne24(a)gmail.com
2. Short introduction:
I am a 2nd year student at Computer Science Faculty in Iasi, Romania.
I chose to participate to GSoC this summer because I am interested in Open Source community and I consider it to be a very good opportunity for people to collaborate and let other people benefit from their work and their experience.
I choose XWiki because I think it has great potential and I want to take part in the development of a software that has such a promising future. More over, I was told that XWiki community is very reliable and supportive and as I am a beginner in this field, I would very much appreciate that.
3. Project milestones:
- I want to completely understand and familiarize with XWiki architectural pattern (MVC) and coding rules
- I want to be able to learn how XWiki classes work, its layout and structure
- I already picked 3 issues on Jira and by the end of May I want to solve them all as good as possible, to prove that I am ready to move on to the next step of coding
- I want to start writing the code, under the guidance of my mentor
- I want to finish this project as good as possible by the end of August (including a lot of testing to make sure everything is in order)
And, of course, I would very much like to become a "permanent" member of XWiki community and a happy contributor to Open Source software and to participate to the next editions of GSoC.
That is all, I guess...
Happy coding for all! :)
Hello,
Following the recent discussion on using SVN as a backend for Xwiki, I'd
like to discuss something symetrical, i.e. to use SVN and Eclipse as a
front-end. The idea is to write Xwiki pages containing Groovy code in
Eclipse (or Emacs), store it in SVN and deploy it automatically on an Xwiki.
My idea is to use Ant as a deployment tool, with the Ant POST task for
instance:
http://antelope.tigris.org/nonav/docs/manual/bk03ch17.html
This way, the project can be easily integrated into Eclipse. I'm
wondering how the Groovy Eclipse plug-in can be used:
http://groovy.codehaus.org/Eclipse+Plugin
My guess is that the editing part can be usefull, but that running
Groovy inside Eclipse wont do it for now.
Best,
François
Hi Stephane,
This sounds cool. Could you please send a short email explaining what
this is for, what you're planning to do with this, who's going to
work on this, architecture decisions taken, etc?
Also I've see you've imported sources from org.semanticdesktop.*. I
have some questions regarding this:
1) Why do we need this library?
2) Why don't we depend on a JAR version of it rather than on source?
3) What is the license of it?
4) It looks like JDK 1.5 code... but I guess we're going to
standardize on JDK 1.5 now...
A general comment: while this sounds cool, I think you're dumping a
LOT of files and this makes it almost impossible for anyone else to
participate in this refactoring which isn't good for you as it may
mean you'll have to do the whole coding yourself... ;-) I would have
rather had a discussion first explaining what you wanted to do, what
architecture, how does it fit with the 2.0 architecture, etc. Of
course we can and should do that now but still it's hard to review
that huge commit... at least for anyone not having 3-4 full days
ahead of him... :)
All that said, I'm happy we're getting traction on this :)
Thanks
-Vincent
On Apr 15, 2007, at 10:10 PM, St??phane Lauri??re wrote:
> Author: slauriere
> Date: 2007-04-15 22:10:22 +0200 (Sun, 15 Apr 2007)
> New Revision: 2817
>
> Added:
> xwiki-sandbox/com.xpn.xwiki.wikimodel/
> Log:
> XWIKI-1088: Put wikimodel integration prototype available in the
> xwiki-sandbox
>
>
>
> --
> You receive this message as a subscriber of the xwiki-
> commits(a)objectweb.org mailing list.
> To unsubscribe: mailto:xwiki-commits-unsubscribe@objectweb.org
> For general help: mailto:sympa@objectweb.org?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/
> wws