Repository in Dashlet
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2013 05:28 AM
Hello,
Is there a method to developp a Dashlet that browse the repository ? if yess so how to do it thinks for your answers .
Is there a method to developp a Dashlet that browse the repository ? if yess so how to do it thinks for your answers .
Labels:
- Labels:
-
Archive
8 REPLIES 8
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2013 12:24 PM
The Share web app consists of dashlets that fetch data from the repository, so it is full of examples. Aside from that, here is a simplified example:
Part One: http://ecmarchitect.com/archives/2012/05/08/1592
Part Two: http://ecmarchitect.com/archives/2012/05/15/1599
You should also look at the dashlets in <a href="http://code.google.com/p/share-extras/">Share Extras</a> as examples.
Jeff
Part One: http://ecmarchitect.com/archives/2012/05/08/1592
Part Two: http://ecmarchitect.com/archives/2012/05/15/1599
You should also look at the dashlets in <a href="http://code.google.com/p/share-extras/">Share Extras</a> as examples.
Jeff
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-22-2013 06:05 AM
Thanks for this answer i will test it .
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-22-2013 07:14 AM
I have a question for you Jeff why almost prefer to code the controler of webscript with javascript API and little do java backend ?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-22-2013 04:59 PM
I think this is because of the fast deploy. You do not need to restart alfresco, you do not need to do serious configuration changes or manage dependencies. Everyhing needed is already (well almost) in the javascript API, so it is the easiest way to work. + changes are a breeze.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-22-2013 08:02 PM
I agree, that is definitely one reason. I think another is that, in general, many devs find JavaScript more accessible. It is just faster to develop with.
There are times when Java is preferred. Maybe for API gaps or operations where performance is critical. But for web scripts, I almost always start with JavaScript and only go to Java when needed.
Jeff
There are times when Java is preferred. Maybe for API gaps or operations where performance is critical. But for web scripts, I almost always start with JavaScript and only go to Java when needed.
Jeff
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-23-2013 05:47 AM
Thanks very much for this infomation, i read many things about web-script and i get how it works, but i still have a problem in coding javascript and java, because i i can't find a way to compile, debug, test my code before to deploy it in share for example.
I still looking for an IDE for javascript that know the syntax of alfresco javascript API, and then can help me to correct my code and test it.
We need so your help in this point .
I still looking for an IDE for javascript that know the syntax of alfresco javascript API, and then can help me to correct my code and test it.
We need so your help in this point .

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-25-2013 04:56 PM
Well, building an alfresco-specific javascript syntax recognition might be a bit tricky. You see, there are at least three different tiers to it:
- Repository controller - server side - scripts (for repo webscripts) - those are javascript, and have access to stuff like companyhome, people, group, userhome and similar objects tied to the repository and content itself.
- Share controller scripts - these are used in components for /share webapp. Like a frontend. So they have a bit of a frontendy root-scoped objects - like url, page, context.
- Share UI, client-side javascript - your regular javascript, but specific by including a lot of YUI 2 elements, and few alfresco-specific. Alfresco.constants is one such object, Alfresco.util.Ajax is another, Alfresco.util.PopupManager is yet another useful in building UI.
What I did is I used Eclipse a lot, but it felt clunky. It's not necessarily an overkill, but it can definitely get slow sometimes.
But since I prefer git over svn, and since Eclipse broke my .git repository a few times, I ditched it.
I now use vim and I'm pretty satisfied, especially when paired to ucompleteme plugin.
Regarding your question about "compile, debug, test code before deploying it", again I can't give you an answer, but I can give you an example.
What I have on my local workstation is a git repository, named after whatever project I'm working on. Something like $HOME/projects/MyNewAlfrescoProject. There are usually 4-5 subfolders: alfresco (for repository code), share for share, shared for the extensions directory, doc sometimes and if I need to also do Java, then src. The first two would simply be the exploded war archives.
Since it's linux, I keep my tomcat installation in /opt/tomcat or something like that. And I either configure tomcat to look directly in the folders I am working on.
So when I edit some code, I usually just have to refresh the webscripts - I have a tab open for alfresco and share webscripts. Of course, when you're working with data model changes, you might need to restart tomcat, but that's usually done fast, just to fix your usual typos
Almost anything else (well, most of the time it's share frontent), you don't need to refresh, just reload the new javascript.
- Repository controller - server side - scripts (for repo webscripts) - those are javascript, and have access to stuff like companyhome, people, group, userhome and similar objects tied to the repository and content itself.
- Share controller scripts - these are used in components for /share webapp. Like a frontend. So they have a bit of a frontendy root-scoped objects - like url, page, context.
- Share UI, client-side javascript - your regular javascript, but specific by including a lot of YUI 2 elements, and few alfresco-specific. Alfresco.constants is one such object, Alfresco.util.Ajax is another, Alfresco.util.PopupManager is yet another useful in building UI.
What I did is I used Eclipse a lot, but it felt clunky. It's not necessarily an overkill, but it can definitely get slow sometimes.
But since I prefer git over svn, and since Eclipse broke my .git repository a few times, I ditched it.
I now use vim and I'm pretty satisfied, especially when paired to ucompleteme plugin.
Regarding your question about "compile, debug, test code before deploying it", again I can't give you an answer, but I can give you an example.
What I have on my local workstation is a git repository, named after whatever project I'm working on. Something like $HOME/projects/MyNewAlfrescoProject. There are usually 4-5 subfolders: alfresco (for repository code), share for share, shared for the extensions directory, doc sometimes and if I need to also do Java, then src. The first two would simply be the exploded war archives.
Since it's linux, I keep my tomcat installation in /opt/tomcat or something like that. And I either configure tomcat to look directly in the folders I am working on.
So when I edit some code, I usually just have to refresh the webscripts - I have a tab open for alfresco and share webscripts. Of course, when you're working with data model changes, you might need to restart tomcat, but that's usually done fast, just to fix your usual typos

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2013 07:14 PM
Thanks very much for this explanation it's so useful .
