Prime-UI Namespace

jQuery UI Widgets
Post Reply
chriscundill
Posts: 1
Joined: 20 Nov 2012, 02:06
Location: Swansea, UK
Contact:

20 Nov 2012, 02:28

Hey Catagay,

Congrats on the Prime-UI project idea; it's great to have have an alternative UI library for non-JSF projects. Can I humbly suggest that you might want to consider using namespaces for the Prime UI functions, or to be more precise, an object as a container for the functions?

For example, take the recently implemented growl component (http://www.primefaces.org/prime-ui/growl.html) which is currently invoked like so:

Code: Select all

    $('#someId').puigrowl(); 
I found the name of this function, and indeed that of the other components, not very readable. I think a cleaner solution would be:

Code: Select all

    $('#someId').pui.growl(); 
And perhaps additionally, a more verbose approach for those who prefer:

Code: Select all

    $('#someId').primeui.growl(); 
Will be interested to know what you think. All the best!

-Chris C.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

20 Nov 2012, 09:35

Thanks, will consider this.

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

20 Nov 2012, 10:12

+1 :)
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

20 Nov 2012, 10:22

Code: Select all

$('#someId').pui.growl();
is shorter, but

Code: Select all

$('#someId').primeui.growl();
sounds better.

We have in German the word "pfui" http://dict.leo.org/ende?lp=ende&lang=d ... earch=pfui And this word raises strange associations for me in relation to "pui". At least for me.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

User avatar
sudheer
PrimeFaces Core Developer
Posts: 4345
Joined: 16 Oct 2011, 19:19
Location: Singapore

21 Nov 2012, 23:06

+1 Agreed.

Giving "primeui" as namespace is more readable.

First of all ,Congrats to the PrimeTecknogi about the idea of creating own UI project to support non-JSF Projects.I hope PrimeUI will provide some more new components along with PF Component features and it will take precedence over other popular UI's available in the market soon. :)


Is it PrimeUI Going to be mobile optimized also?
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

Post Reply

Return to “PrimeUI”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests