cancel
Showing results for 
Search instead for 
Did you mean: 

What's the best practice to work with YUI in Share

jimjxr
Champ in-the-making
Champ in-the-making
Hi,

I'm checking out the possibility of developing component for Share, however after studying the code, it looks like the entire presentation layer is written in YUI javascript, which is kind of counter intuitive since as I understand it the reason webscript is used is because it uses freemarker template engine to power the presentation layer which makes it easy to modify. Anyway, I'm wondering what is the method other developers are using in developing component with YUI, just text editor with code assistence?

Thanks
4 REPLIES 4

mikeh
Star Contributor
Star Contributor
Hi

You can use either method - either rendering on the server with Freemarker, or dynamically in the browser using AJAX/YUI. The decision on which method to use depends on how much of your UI will need updating in response to user input, and how you'd like that update to work. Generally, it's better for dashlets to just update their own content rather than refreshing the page. Also, for example, the Document Library is relatively heavy on initial load so we try to use as much AJAX updating as possible once in place.

Interestingly, the blog and discussion pages started off with server-based rendering, but then so much code needed duplicating to generate the AJAX updates that this approach was later abandoned.

Thanks,
Mike

jimjxr
Champ in-the-making
Champ in-the-making
Hi, Mike

Thank you for explaining the design philosophy behind Share. I wonder what development tool you're using when doing the coding, just Eclipse with js code assistance? Because when I look at the YUI code, it's not easy to grasp what is happening, unlike JSF or ASP.NET development where you have frontend tags for layout and backend code for logic, YUI seems have have everything mixed together and the layout is entirely generated by js.

Thanks

mikeh
Star Contributor
Star Contributor
Personally, I hate Eclipse with a passion and only use it for Java work.

I use TextMate on the Mac, alongside the YUI documents: PDF "cheat sheets" and a local copy of the API docs (http://developer.yahoo.com/yui/docs/). It's like learning any other framework - it takes time to get going, but YUI is incredibly well documented and logically structured, so doesn't take long.

I believe there's a YUI plug-in for Adobe Dreamweaver if you're so inclined, which does provide auto-complete, but I don't have any experience of that.

Thanks,
Mike

jimjxr
Champ in-the-making
Champ in-the-making
Great, thanks for the advice, I guess I have some documents to read Smiley Happy